After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683585 - When docked and lid closed, screen frequently locks automatically
When docked and lid closed, screen frequently locks automatically
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-07 16:30 UTC by Cosimo Cecchi
Modified: 2012-09-07 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsd-bgo683585-dont-suspend-when-docked.diff (2.50 KB, patch)
2012-09-07 16:54 UTC, Federico Mena Quintero
none Details | Review

Description Cosimo Cecchi 2012-09-07 16:30:03 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
Comment 1 Federico Mena Quintero 2012-09-07 16:48:27 UTC
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.
Comment 2 Federico Mena Quintero 2012-09-07 16:54:51 UTC
Created attachment 223775 [details] [review]
gsd-bgo683585-dont-suspend-when-docked.diff

Cosimo, can you try this patch?  It's totally untested :)
Comment 3 Cosimo Cecchi 2012-09-07 17:16:12 UTC
Patch seems to work perfectly here, thanks!
Comment 4 Bastien Nocera 2012-09-07 17:41:59 UTC
Looks good, can you please get this a proper commit message? Thanks.
Comment 5 Cosimo Cecchi 2012-09-07 18:24:15 UTC
Looks like this has been pushed already, thanks!
Comment 6 Federico Mena Quintero 2012-09-07 19:10:23 UTC
Pushed to master as 356f31f40ece78.