Hi. In case somebody has a solution more elegant than the script I am about to write:
With lightdm and gtk-greeter, if the screen is powered off when the display boots, then the X11 servers starts with no output enabled: Screen 0: minimum 320 x 200, current 1024 x 768, maximum 16384 x 16384 DP-1 disconnected primary (normal left inverted right x axis y axis) HDMI-1 disconnected (normal left inverted right x axis y axis) … Then switching the screen back on is not enough: Screen 0: minimum 320 x 200, current 1024 x 768, maximum 16384 x 16384 DP-1 connected primary (normal left inverted right x axis y axis) 1920x1200 59.95 + … HDMI-1 disconnected (normal left inverted right x axis y axis) … (Since some of our students think they will save the planet by turning the screen off, that happens a lot.) I need to either restart lightdm or, I recently noticed, just trigger some xrandr: DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 xrandr --output DP-1 --auto Now, that is easy to solve: start a script in the background from the greeter helper script that will watch for RRScreenChangeNotify in the output of xev and call xrandr in reaction. Or, strace tells me there are things happening in udev when I turn the screen on, I can use a rule to trigger the xrandr or restart lightdm. xev seems less intrusive and easier to test, though. My question is: Did somebody already do the job? Ideally, it would be done by the greeter. Regards, -- Nicolas George

