GNOME Bugzilla – Bug 698132
Kill inhibit_lid_switch_timer_cb()
Last modified: 2013-04-17 14:45:55 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).
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.
Attachment 241751 [details] pushed as 1e14c67 - power: Don't poll for external monitors