GNOME Bugzilla – Bug 331655
should perform battery lid action once AC is removed and lid is closed
Last modified: 2010-07-29 21:50:24 UTC
As I stated in bug 329512, we should suspend if AC is removed while the lid is closed.
Confirming the bug and changing the title as we want to perform the action the user specified while on battery.
This is well worth having, +1 to any solution which implements this from me :-)
I'm working on this now.
2006-02-20 Richard Hughes <richard@hughsie.com> src/gpm-manager.c (lid_button_pressed): Keep track of the lid state internally in the manager state. (power_on_ac_changed_cb): We do the lid close on battery action if the ac_adapter is removed when the laptop is closed and on battery. This should fix (#331655). This works well on my laptop. Please re-open if this does not work for you or the fix is unsuitable. Richard.
This worked well in the 2.14 series, but does not work anymore in 2.15.91. I really miss this feature, as right now if my laptop is closed and I want to take it and go I have to unplug it, open the lid, wait about 3 seconds and then close the lid again. The wait is necessary because I found out the hard way (battery died while in transport) that if I just open the lid momentarily and close it immediately then g-p-m doesn't catch it.
Oded, just enable /apps/gnome-power-manager/battery_event_when_closed (which is default off as it does bad things if you have a broken laptop).
Huh ?!? why is a useful feature, which works well in 2.14 was made to be disabled by default and the only way to reenable it is to edit gconf keys manually ? I think this clearly fails the "least surprise" criteria of UI design - a user who had a working laptop upgrades to the new stable release, and things she knwos to work break in invisible and unexpected ways. If you are going to change a default that made sense and worked, then please provide some user visible notification of the change and means to change it back for people who need that functionality (i.e. - anyone with non-broken laptop, which I sincerely hope is the majority of GNOME laptop users).
Because I was getting *lots* of bugzillas about unexpected behavior. Also, broken laptops (i.e. ones that do not give correct lid events) make g-p-m suspend the computer when it shouldn't which is really bad. The HAL refresh bug made this 400% worse. When gnome-power-manager can depend on HAL 0.5.7.1 or 0.5.8 (with the correct refresh fixes) we can turn the default back to TRUE, but until then it stays as false.
I appologise for being rude. I have no idea about the number of users with this issue, nor how hard it is to autodetect these bad laptops and disable the option only for those laptops. When do you expect that the resolution you detailed would become possible ?
In the next couple of weeks, when HAL 0.5.8 is released. The new version (2.17.1) of g-p-m will depend on this version of HAL. Richard.
BTW - after setting the gconf key you mentioned above, g-p-m still doesn't suspend the laptop when the AC is removed while the lid is closed. I even restarted g-p-m, but it behaves the same.
Reopening. When this is fixed for good, it can get closed again.
https://bugzilla.redhat.com/214404 Looks like this is fixed this again in >= 2.19.2. Closing. Thanks, Richard!
*** Bug 625621 has been marked as a duplicate of this bug. ***