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 682912 - Handle UPower crashing
Handle UPower crashing
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
3.10
Depends on:
Blocks:
 
 
Reported: 2012-08-29 02:48 UTC by William Jon McCann
Modified: 2013-10-19 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description William Jon McCann 2012-08-29 02:48:14 UTC
Don't lie about the system battery level. When you don't know what it is - say so.

This week on F17 upower has been crashing a lot. When it does the battery icon in the shell stops right where it left off. However, my physical battery keeps on draining. This has caused a few unexpected power offs.

We should show something like a "?" battery icon when we don't know what it is.
Comment 1 Giovanni Campagna 2012-08-29 11:07:39 UTC
The shell shows what gnome-settings-daemon says.
Reassigning.
Comment 2 Richard Hughes 2012-09-03 08:05:13 UTC
(In reply to comment #0)
> This week on F17 upower has been crashing a lot.

Got a backtrace? I've not had any other reports of upower crashing.

> We should show something like a "?" battery icon when we don't know what it is.

Is upower being started and crashing over and over? Can you start "upowerd --verbose" on the command line and tell me what's happening please.
Comment 3 William Jon McCann 2012-09-04 13:32:40 UTC
This isn't a bug about upower crashing. The problem here is that we aren't detecting it.

Unfortunately, the only place I saw that upower crashed was a segv message in dmesg. Abrt isn't catching it for some reason.
Comment 4 Bastien Nocera 2012-09-04 19:11:14 UTC
(In reply to comment #3)
> This isn't a bug about upower crashing. The problem here is that we aren't
> detecting it.
> 
> Unfortunately, the only place I saw that upower crashed was a segv message in
> dmesg.

iPhone plugged in? I've seen that too, no idea why.

> Abrt isn't catching it for some reason.

It wasn't for me neither.
Comment 5 Richard Hughes 2012-09-05 08:46:14 UTC
(In reply to comment #4)
> iPhone plugged in? I've seen that too, no idea why.

This was reported and debugged in https://bugzilla.redhat.com/show_bug.cgi?id=834359
Comment 6 Bastien Nocera 2013-01-23 21:41:02 UTC
upower-glib uses dbus_g_proxy_new_for_name() which means that it will not know when the daemon disappears for whatever reason.

I think upower-glib should monitor the name coming and going, and put all the batteries in an "unknown" state when it disappears for longer than, say, 5 seconds, to avoid the UI changing when UPower is restarting behind the scenes.
Comment 7 Bastien Nocera 2013-10-19 18:25:31 UTC
Committed in UPower master for GNOME 3.12.

commit 21ecc70ccd4aee8bf25183837dc3276a4f51e934
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sat Oct 19 20:19:11 2013 +0200

    daemon: Restart upowerd when it crashes
    
    When UPower crashes, we would never notice the battery going flat
    because UPower clients aren't polling UPower, so won't autostart it.
    
    Instead we rely on systemd to restart us when we crash. libupower-glib
    also supports the client coming and going.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682912