Bug 177932

Summary: gnome-power-manager doesn't survive haldaemon restarting
Product: [Fedora] Fedora Reporter: Jonathan Blandford <jrb>
Component: gnome-power-managerAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: ddumas, lsatenstein, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-13 23:36:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150221    

Description Jonathan Blandford 2006-01-16 16:17:56 UTC
SSIA

Comment 1 Richard Hughes 2006-01-16 16:38:58 UTC
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 16:56:13 UTC
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 22:35:35 UTC
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-27 03:50:01 UTC
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-27 03:53:19 UTC
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 18:41:52 UTC
Just curious what the status here is Richard.

Comment 8 Leslie Satenstein 2006-02-01 18:59:47 UTC
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?

Leslie

Comment 9 Richard Hughes 2006-02-01 23:54:42 UTC
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/

Richard.

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

2006-02-13 Richard Hughes <richard>
 * 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.