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 338814 - throttle state cleared after active-changed
throttle state cleared after active-changed
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: daemon
2.14.x
Other All
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-17 18:57 UTC by Sami Haahtinen
Modified: 2006-04-21 19:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
patch for gnome-2-14 branch (1.24 KB, patch)
2006-04-21 14:11 UTC, William Jon McCann
committed Details | Review

Description Sami Haahtinen 2006-04-17 18:57:08 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:
Comment 1 William Jon McCann 2006-04-21 14:11:08 UTC
Created attachment 64054 [details] [review]
patch for gnome-2-14 branch

Are you able to test this patch?
Comment 2 Sami Haahtinen 2006-04-21 19:23:07 UTC
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 ;)
Comment 3 William Jon McCann 2006-04-21 19:34:40 UTC
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.