Bug 152658 - gnome power management
gnome power management
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: battery
git master
Other All
: Normal enhancement
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2004-09-14 19:23 UTC by Richard Hughes
Modified: 2011-08-05 13:58 UTC (History)
0 users

See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments

Description Richard Hughes 2004-09-14 19:23:39 UTC
To reproduce:
1. install gnome-applets-2.7.3 onto your laptop
2. remove power cord
3. watch as laptop runs out of battery and just laptop just dies

Actions expected:
At 1% battery life shutdown the system using a command (entered like the suspend
command, in a textbox)

Extra points for dimming the screen at say, 50% :)
Comment 1 Danielle Madeley 2004-10-31 02:00:36 UTC
I'm of two minds about this, one says this should be handled by acpid, where is
can be run with all the correct permissions and such, except that I can't work
out how to do this with acpid without adding another process to read battery
information.

Of course, since we've already got a process reading the battery information
(ie. battstat) perhaps it should go in there, or perhaps battstat should send
out a dbus event that something can use.

I wonder how this is done in Ubuntu if at all.
Comment 2 Richard Hughes 2004-10-31 17:57:01 UTC
I figured that the battstat applet should be easy to add a second textbox, say
"Shutdown" that contains by default "shutdown -h now" - changes to the core code
should be minimal. You wouldn't need the shutdown command if you were say a
desktop user, and wouldn't have the applet running.

Certainly a DBUS event would be an OK way of doing this, but then we need to
design a listener for this event, and therefore another service. Surely the
applet should just issue a shutdown -h now (after a warning) and let shutdown
decide whether to use APM or ACPI.

A better way to solve this is using the ideas from project utopia:

http://mail.gnome.org/archives/utopia-list/2004-May/msg00019.html

This would send a DBUS event to any application (such as battstat, or
lcdbrightness applet) which decouple the actions from the GUI so that other
programs can use the DBUS bindings for power management. This could be expanded
for other things that use ACPI, like setting the screen brightness, querying the
battery levels, and processor speeds. 

Then the applet can concentrate on the UI side of things, and not have to worry
about the "shutdown -h now" type of thing. I'm not sure what sort of thing the
Gnome community wants - DBUS acpi implementation to power-management or just a
quick bodge that quickly does the job. 
Comment 3 Danielle Madeley 2005-01-04 03:08:36 UTC
The comments here led me to envision a all encompasing power management daemon,
PowerManager.

http://live.gnome.org/PowerManager
Comment 4 Richard Hughes 2005-01-04 13:04:49 UTC
Wow, this is exactly like I thought. If you want any help with UI, or backend
code give me a shout. This link may be of help :
http://article.gmane.org/gmane.comp.freedesktop.hal/1341

Thanks!!
Comment 5 Allison Lortie (desrt) (extended vacation) 2005-04-23 06:02:10 UTC
This shouldn't be handled by GNOME.  What if the user isn't logged in or doesn't
have a battery status applet loaded?

Closing.
Comment 6 Richard Hughes 2011-08-05 13:58:22 UTC
Fixed in gnome-settings-daemon :-)

Note You need to log in before you can comment on or make changes to this bug.