Bug 177932 - gnome-power-manager doesn't survive haldaemon restarting
gnome-power-manager doesn't survive haldaemon restarting
Product: Fedora
Classification: Fedora
Component: gnome-power-manager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Depends On:
Blocks: FC5Target
  Show dependency treegraph
Reported: 2006-01-16 11:17 EST by Jonathan Blandford
Modified: 2013-04-02 00:20 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-13 18:36:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Blandford 2006-01-16 11:17:56 EST
Comment 1 Richard Hughes 2006-01-16 11:38:58 EST
Any ideas on how this can be done? Should g-p-m just wait around until hal is
started again, or is this a race? Or for a fixed timeout (say 5 seconds) --
ideas please.

Thanks, Richard.
Comment 2 Jonathan Blandford 2006-01-16 11:56:13 EST
NetworkManager seems to survive haldaemon dying; might make sense to take a look
at that code to see what it is doing.
Comment 4 Richard Hughes 2006-01-16 17:35:35 EST
Thanks for the link, I'll see what I can do. This sortof depends on
http://bugzilla.gnome.org/show_bug.cgi?id=327235, but I'll fix it in the currect
structure asap.
Comment 5 Leslie Satenstein 2006-01-26 22:50:01 EST
HalDaemon does not start after patch received for it (Test 2 vanilla version
worked OK)

As result, GNOME POWER MANAGER does not work. (CORE5 TEST2)
Comment 6 Leslie Satenstein 2006-01-26 22:53:19 EST
Hal Daemon appeared to work on my system with initial release of Core5 Test2.
Then a patch arrived, and as a result of applying patch, HalDaemon fails to start.

When it fails to start, GNOME POWER MANAGER (for UPS monitoring) fails to start
as well.
Comment 7 Christopher Aillon 2006-02-01 13:41:52 EST
Just curious what the status here is Richard.
Comment 8 Leslie Satenstein 2006-02-01 13:59:47 EST
Since I am not a linux internals man, I can only report what I see. My IT skills
are in other areas.

Is there a link between the HAL daemon and GNOME POWER MANAGER, or am I
detecting coincidences?

Comment 9 Richard Hughes 2006-02-01 18:54:42 EST
I'm working on this at the moment, but it required refactoring other parts of
the code.

And Leslie, checkout http://www.gnome.org/projects/gnome-power-manager/

Comment 10 Richard Hughes 2006-02-13 18:36:34 EST
Now fixed in CVS.

2006-02-13 Richard Hughes <richard@hughsie.com>
 * src/gpm-hal-monitor.c (gpm_hash_new_devices_cache,
gpm_hash_free_devices_cache): Add these so we can simplify our memory
management. We need to be more careful that what we were, as hal could be
restarted many times and we could loose lots of memory.
 (hal_monitor_stop): Inline into _finalize, as not called elsewhere.
 * src/gpm-hal.c (gpm_hal_enable_power_save): valgrind (quite rightly) warns of
use before set. Just initialise ret to zero.
 * src/gpm-power.c (battery_device_cache_entry_free) remove, as broken.
 (gpm_hash_new_kind_cache, gpm_hash_free_kind_cache, gpm_hash_new_device_cache,
gpm_hash_free_device_cache): Add these so we can simplify our memory management,
and not forget to free.
 (gpm_power_init): Listen for the hal-disconnected signal so we can clear the
caches, else the devices think they are initialised.
 Fixes bug #327234.

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