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 492132 - policy timeout prevents computer from suspend
policy timeout prevents computer from suspend
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.20.x
Other All
: Normal critical
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 524252 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-31 18:53 UTC by bugreports
Modified: 2008-06-03 12:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
test with ac remove power button press (34.04 KB, text/plain)
2007-11-11 19:26 UTC, bugreports
Details
test ac remove lid close (61.81 KB, text/plain)
2007-11-11 19:27 UTC, bugreports
Details

Description bugreports 2007-10-31 18:53:04 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:
Comment 1 Richard Hughes 2007-11-02 18:04:34 UTC
If you set /apps/gnome-power-manager/general/policy_suppression_timeout to zero, does this work for you?
Comment 2 bugreports 2007-11-02 18:07:33 UTC
no. I changed it to zero and removed power plug and pressed the powerbutten quickly afterwards - same thing policy timeout...
Comment 3 Richard Hughes 2007-11-02 19:03:20 UTC
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.
Comment 4 bugreports 2007-11-11 19:26:55 UTC
Created attachment 98930 [details]
test with ac remove power button press
Comment 5 bugreports 2007-11-11 19:27:41 UTC
Created attachment 98931 [details]
test ac remove lid close
Comment 6 bugreports 2007-11-11 19:28:58 UTC
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
Comment 7 Jerone Young 2008-01-06 07:56:35 UTC
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. 
Comment 8 Scott Robinson 2008-06-02 18:10:36 UTC
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
Comment 9 Scott Robinson 2008-06-02 18:17:49 UTC
*** Bug 524252 has been marked as a duplicate of this bug. ***
Comment 10 Richard Hughes 2008-06-03 12:50:36 UTC
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