GNOME Bugzilla – Bug 683585
When docked and lid closed, screen frequently locks automatically
Last modified: 2012-09-07 19:10:23 UTC
Scenario: - I have my laptop docked, with an external monitor and lid open - If I close the lid in this situation, my laptop doesn't suspend (good), and keeps the external display active - After 30 seconds or so, the monitor will automatically turn off, and the session locked; after unlocking it, it will happen again after another 30 seconds or so This doesn't happen if I keep the lid open in the very same scenario
From a very quick look at gsd-power-manager.c, it looks like do_lid_closed_action() does too much work when the lid is still closed after the timeout, and there is still a monitor active. It should not be dealing with the screensaver then. Maybe we need to test for non_laptop_outputs_are_all_off() right after gnome_rr_screen_refresh(), and *before* all the screensaver-y stuff.
Created attachment 223775 [details] [review] gsd-bgo683585-dont-suspend-when-docked.diff Cosimo, can you try this patch? It's totally untested :)
Patch seems to work perfectly here, thanks!
Looks good, can you please get this a proper commit message? Thanks.
Looks like this has been pushed already, thanks!
Pushed to master as 356f31f40ece78.