Bug 214603

Summary: gnome-power-manager fails to suspend, sometimes.
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: gnome-power-managerAssignee: David Zeuthen <davidz>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: mclasen, ncunning, richard, sundaram, triage
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-06 16:45:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
successful suspend
none
"suppressed" suspend none

Description David Woodhouse 2006-11-08 16:41:57 UTC
And by 'fails' I mean doesn't bother, rather than attempts but is unsuccessful.

The event log says 'Skipping suppressed policy event' but with no information
about why it might have been suppressed. Attaching output of
'gnome-power-manager --no-daemon --verbose' during lid-close events, both
successful and unsuccessful.


Looking at those logs, I think I now have a clue why g-p-m stopped changing the
backlight level when I plug/unplug the AC too :)

Comment 1 David Woodhouse 2006-11-08 16:41:59 UTC
Created attachment 140664 [details]
successful suspend

Comment 2 David Woodhouse 2006-11-08 16:43:44 UTC
Created attachment 140666 [details]
"suppressed" suspend

Comment 3 David Woodhouse 2006-11-08 17:03:40 UTC
Note that the AC power had been unplugged fairly shortly before each attempt to
shut down, as you can see in the logs. In general, it seems to work better if I
leave it for ten seconds or so after removing power, before closing the lid -- 
although I don't think it had been left for that long in the 'successful
suspend' log above.


Comment 4 Richard Hughes 2006-11-08 18:15:24 UTC
Two things:

* You don't apprear to have gnome-screensaver running
* You can't perform an action less than a few seconds after an ac disconnect.
This is due to lots of BIOS's not updating info for a few seconds, and a race
occuring. This is a bug : we should use a state machine to monitor this
condition of lid closed and act after the timeout has elapsed.
 
I'll have a look in detail at the logs tonight.

Comment 5 David Woodhouse 2006-11-10 07:34:12 UTC
Will installing gnome-screensaver fix the backlight brightness?

Being unable to just stand up, unplug laptop and shove it in its bag without a
few seconds of pause is suboptimal but I suppose I can live with it till we fix it.

However, a more serious failure mode is when the laptop comes open and then
closes while it's in the bag. It seems that the close event is again lost, and
the laptop doesn't suspend. It does do a thermal shutdown fairly shortly
thereafter though.

Comment 6 David Woodhouse 2006-11-15 15:40:20 UTC
Install gnome-screensaver doesn't seem to help at all. In fact, now the machine
doesn't power off its display when it's idle. It even turns the display back
_on_ again within seconds of me running 'xset dpms force off'. Killing
gnome-screensaver doesn't fix this.

Comment 7 David Woodhouse 2006-11-15 15:48:40 UTC
Uninstalling gnome-screensaver instead of just killing the process seems to fix
screen saving for me. Now in the preferences I get the xscreensaver stuff I'm
used to, which actually manages to turn off the display.

Comment 8 David Woodhouse 2007-02-23 02:53:04 UTC
Suspend is still not working, due to events being "supressed". If I unplug the
laptop and close its lid immediately, it deliberately discards that second
event, and remains awake instead of suspending.

If the laptop comes open briefly in the bag and then closes again, it wakes up
and again discards the second event, then overheats or runs out of battery.

This really needs to be fixed before F7.

Comment 9 Richard Hughes 2007-03-21 01:23:23 UTC
(In reply to comment #8)
> Suspend is still not working, due to events being "supressed". If I unplug the
> laptop and close its lid immediately, it deliberately discards that second
> event, and remains awake instead of suspending.

Yes, it's trying to work around a race by waiting for a few hundred ms. You can
remove the delay in gconf, but then you get lots of people stuck in
suspend,suspend,suspend loops.

I've redesigned the core code in 2.19.1 so we hopefully don't have to work
around the race, so long term things are getting better.


Comment 10 David Woodhouse 2007-03-24 19:12:33 UTC
This still seems broken in rawhide. If I unplug the power and shut the lid, the
thing doesn't suspend. I have to unplug, wait for a number of seconds, and
_then_ shut the lid.

Comment 11 Richard Hughes 2007-03-25 18:37:32 UTC
David, any chance you could try to built trunk and tell me if you still have
problems? If not, no worries, and I'll try to fix something on 2-18. Thanks.

Comment 12 David Woodhouse 2007-03-25 18:48:37 UTC
Ew. Subversion?

Comment 13 David Woodhouse 2007-03-25 20:18:51 UTC
Still fails.

[watch_device_properties_modified_cb] libhal-gdevice.c:344 (21:15:06):  
property modified '/org/freedesktop/Hal/devices/pmu_battery_0_0'
[watch_device_property_modified] libhal-gdevice.c:315 (21:15:06):       
emitting property-modified : udi=/org/freedesktop/Hal/devices/pmu_battery_0_0,
key=battery.remaining_time, added=0, removed=0, finally=0
[hal_device_property_modified_cb] gpm-cell.c:239 (21:15:06):    
udi=/org/freedesktop/Hal/devices/pmu_battery_0_0, key=battery.remaining_time,
added=0, removed=0, finally=0
[watch_device_property_modified] libhal-gdevice.c:315 (21:15:06):       
emitting property-modified : udi=/org/freedesktop/Hal/devices/pmu_battery_0_0,
key=battery.charge_level.rate, added=0, removed=0, finally=1
[hal_device_property_modified_cb] gpm-cell.c:239 (21:15:06):    
udi=/org/freedesktop/Hal/devices/pmu_battery_0_0, key=battery.charge_level.rate,
added=0, removed=0, finally=1
[watch_device_properties_modified_cb] libhal-gdevice.c:344 (21:15:07):  
property modified '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
[watch_device_property_modified] libhal-gdevice.c:315 (21:15:07):       
emitting property-modified :
udi=/org/freedesktop/Hal/devices/computer_logicaldev_input_3,
key=button.state.value, added=0, removed=0, finally=1
[hal_device_property_modified_cb] gpm-button.c:357 (21:15:07):  
key=button.state.value, added=0, removed=0, finally=1
[hal_device_property_modified_cb] gpm-button.c:366 (21:15:07):   state of a
button has changed : /org/freedesktop/Hal/devices/computer_logicaldev_input_3,
button.state.value
[emit_button_pressed] gpm-button.c:331 (21:15:07):       emitting button-pressed
: lid-down
[button_pressed_cb] gpm-manager.c:630 (21:15:07):        Button press event
type=lid-down
[lid_button_pressed] gpm-manager.c:604 (21:15:07):       Performing AC policy
[manager_policy_do] gpm-manager.c:288 (21:15:07):        policy:
/apps/gnome-power-manager/ac/button_lid
[gpm_control_get_lock_policy] gpm-control.c:582 (21:15:07):      Using
ScreenSaver settings (0)
[button_pressed_cb] gpm-srv-screensaver.c:173 (21:15:07):        Button press
event type=lid-down
[gpm_screensaver_add_throttle] gpm-screensaver.c:298 (21:15:07):         adding
throttle reason: 'Laptop lid is closed': id 1078013481
[button_pressed_cb] gpm-backlight.c:411 (21:15:07):      Button press event
type=lid-down
[button_pressed_cb] gpm-info.c:507 (21:15:07):   Button press event type=lid-down
[gpm_info_event_log] gpm-info.c:402 (21:15:07):  Adding 7 to the event log
[button_pressed_cb] gpm-info.c:513 (21:15:07):   lid button CLOSED
[watch_device_condition_cb] libhal-gdevice.c:435 (21:15:07):     emitting
device-condition : /org/freedesktop/Hal/devices/computer_logicaldev_input_3,
ButtonPressed (lid)
[hal_device_condition_cb] gpm-button.c:387 (21:15:07):  
condition=ButtonPressed, details=lid
[emit_button_pressed] gpm-button.c:310 (21:15:08):       ignoring duplicate lid
event


Comment 14 Will Woods 2007-05-11 21:12:07 UTC
Is this going to be fixable for F7 final or should we move it to FC7Target and
try to fix with an update post-release?

Comment 15 Bug Zapper 2008-04-04 04:32:16 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 16 Bug Zapper 2008-05-06 16:45:17 UTC
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.