Summary: | upower does not update /org/freedesktop/UPower/devices/DisplayDevice state | ||
---|---|---|---|
Product: | upower | Reporter: | Eugenio <eugenio89> |
Component: | general | Assignee: | Richard Hughes <richard> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, peter |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
output
daemon: Split out updating on_battery and warning_level daemon: Update display device when battery is removed daemon: Split out updating on_battery and warning_level daemon: remove unused variable |
Description
Eugenio
2014-11-11 11:03:01 UTC
If the battery is removed from the list, it's probably a simple bug in the creation of the aggregate battery device. Can you run: killall -9 upowerd ; /usr/libexec/upowerd -v and capture the output when the battery is present and you unplug it? This should help check where the problem is exactly. Created attachment 109358 [details]
output
here is the output of "killall -9 upowerd ; /usr/lib/upower/upowerd -v".
Created attachment 109433 [details] [review] daemon: Split out updating on_battery and warning_level So that we can reuse this code. Created attachment 109434 [details] [review] daemon: Update display device when battery is removed When removing a battery, make sure to go through the batteries, and update the display device status. Can you please test those 2 patches on top of upower 1.0? I did not find upower 1.0 so I tested those patches on top of upower git. In the first patch I think you forgot to move gboolean ret; UpDaemonPrivate *priv = daemon->priv; UpDeviceLevel warning_level from up_daemon_device_changed_cb, so i added those lines to up_daemon_update_warning_level in order to compile. And now it works! DisplayDevice is updated and I get "battery-missing-symbolic". Thank you! Created attachment 109494 [details] [review] daemon: Split out updating on_battery and warning_level So that we can reuse this code. Thanks for testing! commit 2e87407eb91407e64f3d23de07b9dc91735a6a49 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Nov 14 23:07:25 2014 +0100 daemon: Use new warning update helper function Rather than the copy/paste code in commit: b9bd275890387fb35c185f37ec0ea1f2aa857818 This makes sure that the AC status is updated. https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 83ebd3eccbff589af0dc6d2f1978338cdfa10833 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Nov 13 19:20:12 2014 +0100 daemon: Update display device when battery is removed When removing a battery, make sure to go through the batteries, and update the display device status. https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 4fdb9cee21d0d862ed3b551bebb48cf90d645de4 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Nov 13 19:19:30 2014 +0100 daemon: Split out updating on_battery and warning_level So that we can reuse this code. https://bugs.freedesktop.org/show_bug.cgi?id=86144 Created attachment 109661 [details] [review] daemon: remove unused variable An unused variable was left. (In reply to Peter Wu from comment #10) > Created attachment 109661 [details] [review] [review] > daemon: remove unused variable > > An unused variable was left. Pushed. Please use full commit-id in the commit messages, don't add Signed-off-by, and either file new bugs or reopen the existing ones, if you don't want patches to be lost. (In reply to Bastien Nocera from comment #11) > Pushed. Please use full commit-id in the commit messages, Thanks, I learned about using the `git describe` output from the git people. A full commit hash is not human readable, and the git describe output contains both the human readable tag (base) and an abbreviated git hash. I do not mind either way, this is my motivation. > don't add Signed-off-by, and either file new bugs or > reopen the existing ones, if you don't want patches to be lost. This was a quick fix, I'll sent others to the devkit-devel list. (In reply to Peter Wu from comment #12) > (In reply to Bastien Nocera from comment #11) > > Pushed. Please use full commit-id in the commit messages, > > Thanks, I learned about using the `git describe` output from the git people. > A full commit hash is not human readable, and the git describe output > contains both the human readable tag (base) and an abbreviated git hash. I > do not mind either way, this is my motivation. > > > don't add Signed-off-by, and either file new bugs or > > reopen the existing ones, if you don't want patches to be lost. > > This was a quick fix, I'll sent others to the devkit-devel list. Bugzilla is better actually. (In reply to Bastien Nocera from comment #13) > (In reply to Peter Wu from comment #12) [..] > > This was a quick fix, I'll sent others to the devkit-devel list. > > Bugzilla is better actually. Okay, should I open a single "fix memleaks" bug with all patches attached? The patches are already availble at https://git.lekensteyn.nl/upower/log/?h=memleak-fixes About the S-o-b line, I was under the impression that this was preferred Richard Hughes (UPower maintainer) does this (git log). (In reply to Peter Wu from comment #14) > (In reply to Bastien Nocera from comment #13) > > (In reply to Peter Wu from comment #12) > [..] > > > This was a quick fix, I'll sent others to the devkit-devel list. > > > > Bugzilla is better actually. > > Okay, should I open a single "fix memleaks" bug with all patches attached? > The patches are already availble at > https://git.lekensteyn.nl/upower/log/?h=memleak-fixes Please. You can use "git-bz" to do that, it makes it easier. > About the S-o-b line, I was under the impression that this was preferred > Richard Hughes (UPower maintainer) does this (git log). Right. I don't, and a lot of other contributors don't, which makes its usage moot. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.