Summary: | upower is very confused by two batteries | ||
---|---|---|---|
Product: | upower | Reporter: | Lennart Poettering <lennart> |
Component: | general | Assignee: | Richard Hughes <richard> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, domen, kai.heng.feng, libreoffice, thunderbirdtr |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Lennart Poettering
2012-09-24 09:11:44 UTC
I connect my Keyboard&Touchpad Mini Keyboard via bluetooth and Gnome indicator and upower try get Keyboard battery information and yes good things I can see my keyboard batter info but labe as "Laptop Battery" which It must be fix first then when I try to disconneted. Upower also try re-calculate my battries and then It will be crash 2 times. backtrace_rating: 4 Package: upower-0.9.18-2.fc18 OS Release: Fedora release 18 (Spherical Cow) I found another problem about for upower when I try get power info always show and terminal results [23:17:24.106] device changed: /org/freedesktop/UPower/devices/battery_hid_XXXXXXXXXXXXXXXXX_battery native-path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/bluetooth/hci0/hci0:4/0005:0A5C:8502.0009/power_supply/hid-XX:XX:XX:XX:XX:XX-battery model: Macro Keyboard power supply: no updated: Tue Nov 6 23:17:24 2012 (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging energy: 0 Wh energy-empty: 0 Wh energy-full: 0 Wh energy-full-design: 0 Wh energy-rate: 0 W percentage: 100% capacity: 100% grep . /sys/class/power_supply/*/* /sys/class/power_supply/ADP0/type:Mains /sys/class/power_supply/ADP0/uevent:POWER_SUPPLY_NAME=ADP0 /sys/class/power_supply/ADP0/uevent:POWER_SUPPLY_ONLINE=0 /sys/class/power_supply/BAT0/alarm:0 /sys/class/power_supply/BAT0/capacity:54 /sys/class/power_supply/BAT0/charge_full:4860000 /sys/class/power_supply/BAT0/charge_full_design:5200000 /sys/class/power_supply/BAT0/charge_now:2672000 /sys/class/power_supply/BAT0/cycle_count:0 /sys/class/power_supply/BAT0/manufacturer:Clevo CO. /sys/class/power_supply/BAT0/model_name:X51 /sys/class/power_supply/BAT0/present:1 /sys/class/power_supply/BAT0/serial_number: /sys/class/power_supply/BAT0/status:Discharging /sys/class/power_supply/BAT0/technology:Li-ion /sys/class/power_supply/BAT0/type:Battery /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_NAME=BAT0 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_STATUS=Discharging /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_PRESENT=1 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_TECHNOLOGY=Li-ion /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CYCLE_COUNT=0 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_NOW=14800000 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CHARGE_FULL_DESIGN=5200000 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CHARGE_FULL=4860000 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CHARGE_NOW=2672000 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY=54 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_MODEL_NAME=X51 /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_MANUFACTURER=Clevo CO. /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_SERIAL_NUMBER= /sys/class/power_supply/BAT0/voltage_min_design:14800000 /sys/class/power_supply/BAT0/voltage_now:14800000 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/capacity:100 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/model_name:Macro Keyboard /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/online:1 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/present:1 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/scope:Device /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/status:Discharging /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/type:Battery /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_NAME=hid-DC:2C:26:A9:57:61-battery /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_PRESENT=1 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_ONLINE=1 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_CAPACITY=100 /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_MODEL_NAME=Macro Keyboard /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_STATUS=Discharging /sys/class/power_supply/hid-DC:2C:26:A9:57:61-battery/uevent:POWER_SUPPLY_SCOPE=Device Same here with Lenovo Helix. When first battery is empty, upower suspends the machine. Quite annoying, what extra logs would you need? It's not UPower suspending the machine, but whatever runs in your session, handling power events. For GNOME, that's gnome-settings-daemon. Please file a bug against your desktop environment with information such as version of the component, and the output of "upower -d" when (or rather, just before) the problem happens. There should be a "battery low" warning before the battery critical warning and the suspend/switch off. What desktop environments are others using? I'm experiencing this at XFCE 4.10. Reported upsteam to XFCE: https://bugzilla.xfce.org/show_bug.cgi?id=10641 I'd like to reopen this. It's annoying and I believe an upstream bug. Output of upower -d: http://paste.ofcode.org/ZcEyNLTWRRMC33z2DfQUSq In BAT0 history you can clearly see how it's changing state from charging to discharing although the power cable has been disconnected for nearly half an hour. All notifications and actions are based on upower api, including suspend action. Let me know if you want more information, I'm using Lenovo Helix model (first edition). Please test this with newer versions of UPower, at least version 0.99.2. I'm running Ubuntu 17.10 on a Lenovo T460s. UPower is at version 0.99.6 and the problem is still there. Whenever one of the two batteries is empty my laptop simply powers off. I am shocked to see that this is a 6 year old bug. The main recommendation seems to simply uninstall upower (see https://forums.lenovo.com/t5/Linux-Discussion/How-to-get-dual-battery-to-switch-without-powering-off-in-Linux/td-p/3890605). I don't know enough about what upower exactly does so I am very reluctant to simply kick it to the curb. (In reply to Christoph from comment #8) > I'm running Ubuntu 17.10 on a Lenovo T460s. UPower is at version 0.99.6 and > the problem is still there. Whenever one of the two batteries is empty my > laptop simply powers off. > > I am shocked to see that this is a 6 year old bug. The main recommendation > seems to simply uninstall upower (see > https://forums.lenovo.com/t5/Linux-Discussion/How-to-get-dual-battery-to- > switch-without-powering-off-in-Linux/td-p/3890605). > > I don't know enough about what upower exactly does so I am very reluctant to > simply kick it to the curb. Seeing as it took 3 years for somebody to test with a newer version as requested, and that we don't have access to any hardware to test this, it's not really surprising. Edit /lib/systemd/system/upower.service to "--verbose" to the upowerd command-line, and reboot your system. Send us the output of "journalctl" after the problem happens (use "journalctl -b" to get just the current boot's journal). We also have a test for multi-battery setups which doesn't show the problem: https://cgit.freedesktop.org/upower/tree/src/linux/integration-test#n410 -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/upower/upower/issues/62. |
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.