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 698132 - Kill inhibit_lid_switch_timer_cb()
Kill inhibit_lid_switch_timer_cb()
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-16 14:01 UTC by Bastien Nocera
Modified: 2013-04-17 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Don't poll for external monitors (3.31 KB, patch)
2013-04-17 14:45 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-04-16 14:01:29 UTC
Or at least stop it waking up the machine every 30 seconds.

The callback checks every 30 seconds whether an external monitor is plugged in (which we can receive events for), or a GSetting has changed.

Instead, we should be kicking it after we're in a position to suspend. Furthermore, it would keep the timeout consistent (if the event happened 25 seconds into the timeout, we'd have a 5 second grace period, instead of a 30 secs one).
Comment 1 Bastien Nocera 2013-04-17 14:45:33 UTC
Created attachment 241751 [details] [review]
power: Don't poll for external monitors

Instead of checking every 30 seconds whether we should suspend,
only start the timeout if we should suspend but don't because
the external monitor is gone.

We currently ignore changes to "default-monitors-setup" because it's
unlikely that they will happen between external monitor changes.

This fix also ensures that there are really 30 seconds of safety timer
instead of somewhere between 0 and 30 seconds.
Comment 2 Bastien Nocera 2013-04-17 14:45:51 UTC
Attachment 241751 [details] pushed as 1e14c67 - power: Don't poll for external monitors