Optimus system (intel/nvidia combo) results in a black screen when running Xorg -retro
When running a naked Xserver, e.g. via "Xorg -retro", on an Optimus (intel/nvidia GPU combo) laptop the internal screen gets black. You can lighten it up and everything works as it should via "xrandr --auto".
How to reproduce:
X -retro :0 & #results in a black internal Laptop screen
DISPLAY=:0 xterm &
DISPLAY=:0 xrandr --auto # lighten up the screen
#or use DISPLAY=:0 xrandr --output <output_name> --preferred
Seems everything is configured correctly. Just the output not initialized somehow.
DISPLAY=:0 xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 346mm x 194mm
1920x1080 59.93*+
[...]
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)