GNOME Bugzilla – Bug 492132
policy timeout prevents computer from suspend
Last modified: 2008-06-03 12:50:36 UTC
Please describe the problem: g-p-m almost killed my computer, as it did not make my notebook enter suspend mode on lid close (although configured to do so for both AC and battery power). while tracing this down, I recognized that I can trigger the problem when I quickly remove the power cable and press the power button (which is supposed to make the machine suspend) or by closing the lid. Steps to reproduce: 1. remove ac cable 2. immediately press suspend button Actual results: no suspend Expected results: compu suspending Does this happen every time? yes Other information:
If you set /apps/gnome-power-manager/general/policy_suppression_timeout to zero, does this work for you?
no. I changed it to zero and removed power plug and pressed the powerbutten quickly afterwards - same thing policy timeout...
Ahh, this could be a bios thing. A few questions. * Does windows XP do the same? * does "lshal -m" give you any output when you open the lid and press the button? Also, please could you grab me the output of: killall gnome-power-manager gnome-power-manager --verbose --no-daemon and then trying the open and press combo thing please. Thanks, and sorry for the delay. Richard.
Created attachment 98930 [details] test with ac remove power button press
Created attachment 98931 [details] test ac remove lid close
Sorry for the delay on my side. This is on a macbook pro 1,1 ... and I don't understand understand all your questions, but I am trying my best to answer: $ lshal -m 20:22:24.568: computer_logicaldev_input_0 property button.state.value = true 20:22:24.571: computer_logicaldev_input_0 condition ButtonPressed = lid 20:22:28.717: computer_logicaldev_input_0 property button.state.value = false 20:22:28.718: computer_logicaldev_input_0 condition ButtonPressed = lid gnome power manager logs are attached: one for removing ac adapter and quickly pressing the power button (which did not put the machine asleep although polictimeout = 0) and one for removing ac and closing the lid which actually after a couple of seconds made the machine sleep?!? Soeren
I am using two laptops. A Thinkpad T41p & a Thinkpad T61. This policy should be set to 0 seconds after the power is unplugged by default. I do not appear to have the path /apps/gnome-power-manager/general/policy_suppression_timeout under my .gonf directory. I do have /apps/gnome-power-manager .. but no general directory. I see this exact same thing and it has caused my battery to die when I throw my laptop into my bag. Because the behavior under Windows is: 1) unplug 2) immediately close and it suspends (this is instantly after I unplug from the wall and close the lid) But often now Gnome has this policy set so I close and I think. I will suspend but it doesn't because gnome power manager is telling it not too.
This is a duplicate of #524252. #496915 is also a duplicate and it has the one-line patch required to fix the problem. http://bugzilla.gnome.org/attachment.cgi?id=99120&action=view
*** Bug 524252 has been marked as a duplicate of this bug. ***
2008-06-03 Richard Hughes <richard@hughsie.com> * src/gpm-manager.c: (ac_adapter_changed_cb): Allow events a few seconds after the ac unplug. Fixes #492132