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 331655 - should perform battery lid action once AC is removed and lid is closed
should perform battery lid action once AC is removed and lid is closed
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: general
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 625621 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-18 09:37 UTC by Christopher Aillon
Modified: 2010-07-29 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christopher Aillon 2006-02-18 09:37:05 UTC
As I stated in bug 329512, we should suspend if AC is removed while the lid is closed.
Comment 1 Jaap A. Haitsma 2006-02-19 21:17:12 UTC
Confirming the bug and changing the title as we want to perform the action the user specified while on battery.
Comment 2 Daniel Silverstone 2006-02-20 16:37:18 UTC
This is well worth having, +1 to any solution which implements this from me :-)
Comment 3 Richard Hughes 2006-02-20 16:38:56 UTC
I'm working on this now.
Comment 4 Richard Hughes 2006-02-20 17:03:29 UTC
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.
Comment 5 Oded Arbel 2006-08-20 10:29:40 UTC
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.
Comment 6 Richard Hughes 2006-08-20 10:37:43 UTC
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).
Comment 7 Oded Arbel 2006-08-20 11:01:51 UTC
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).
Comment 8 Richard Hughes 2006-08-20 17:32:42 UTC
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.
Comment 9 Oded Arbel 2006-08-20 18:24:28 UTC
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 ?
Comment 10 Richard Hughes 2006-08-20 19:23:47 UTC
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.
Comment 11 Oded Arbel 2006-08-20 20:34:26 UTC
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.
Comment 12 Christopher Aillon 2006-11-10 21:36:40 UTC
Reopening.  When this is fixed for good, it can get closed again.
Comment 13 Christopher Aillon 2007-06-03 23:05:35 UTC
https://bugzilla.redhat.com/214404

Looks like this is fixed this again in >= 2.19.2.  Closing.  Thanks, Richard!
Comment 14 Martin Pitt 2010-07-29 21:50:24 UTC
*** Bug 625621 has been marked as a duplicate of this bug. ***