GNOME Bugzilla – Bug 338814
throttle state cleared after active-changed
Last modified: 2006-04-21 19:36:05 UTC
Please describe the problem: Power manager events are sometimes missed and hacks are run when a laptop is running on battery power. Steps to reproduce: 1. Allow screensaver to activate 2. Disconnect power 3. deactivate screensaver by moving the mouse or press a key 4. Allow screensaver to activate again. Actual results: When screensaver kicks in again, the hacks are being run, even though the laptop is still running on battery power Expected results: blank screen should be shown instead Does this happen every time? yes Other information:
Created attachment 64054 [details] [review] patch for gnome-2-14 branch Are you able to test this patch?
Patch works. Now the events are respected even if the screensaver is active. One minor thing though, the screensaver deactivates when one disconnects the power, but that could count as activity ;)
OK. The reason that the throttle state is being cleared on deactivation is that we offer throttling via the gnome-screensaver-command interface. This interface can't be reference counted because there is no way to make sure that for every --throttle there is an --unthrottle. I'm working to fix this properly in HEAD but for 2-14 I guess it is better to err on the side of more throttling over less. So I think I'll commit this. Regarding the deactivation on ac power change, I recall Richard added a feature to gnome-power-manager that pokes the screensaver when that occurs.