GNOME Bugzilla – Bug 748592
issue with a dual-battery laptop
Last modified: 2015-06-04 16:33:02 UTC
we are testing a hybrid laptop/tabled machine here, which has two batteries, one in the keyboard part and one in the screen part. They show up as BAT1 and BAT2 in the firmware and upower, and just get both labeled as "Extra" in the power panel. It would be great if we could arrange things so that they are labeled "Screen" and "Keyboard", then you could see if you will be out of power when you disconnect the screen before doing so. Suggestion from irc: bentiss> can't we just have a hwdb entry that relabels the batteries? mclasen> you still need to know which is which... bentiss> mclasen: if "toshiba X20t & BAT1" -> screen, if BAT2 -> keyboard there will not be any heuristic behind hadess> mclasen, 13987 Name (_EJD, "\\_SB.PCI0.DOCK") // _EJD: Ejection Dependent Device• hadess> BAT2 has a dock eject method
What's the output of "upower -d" on this machine? You should be getting the composited battery as the primary, and both the small ones showing up as "Extra". Apparently that's not what happens. About the keyboard battery being dock dependent, could do a "find /sys/class/power_supply/BAT2/" and get the content of any file that look like they are dock related? (the ACPI sub-system should tag them as docks)
(In reply to Bastien Nocera from comment #1) > What's the output of "upower -d" on this machine? You should be getting the > composited battery as the primary, and both the small ones showing up as > "Extra". Apparently that's not what happens. Thats exactly what happens. I get a composited and two 'Extra'. > About the keyboard battery being dock dependent, could do a "find > /sys/class/power_supply/BAT2/" and get the content of any file that look > like they are dock related? (the ACPI sub-system should tag them as docks) /sys/class/power_supply/BAT1/ /sys/class/power_supply/BAT1/type /sys/class/power_supply/BAT1/power_now /sys/class/power_supply/BAT1/alarm /sys/class/power_supply/BAT1/power /sys/class/power_supply/BAT1/power/control /sys/class/power_supply/BAT1/power/async /sys/class/power_supply/BAT1/power/runtime_enabled /sys/class/power_supply/BAT1/power/runtime_active_kids /sys/class/power_supply/BAT1/power/runtime_active_time /sys/class/power_supply/BAT1/power/autosuspend_delay_ms /sys/class/power_supply/BAT1/power/runtime_status /sys/class/power_supply/BAT1/power/runtime_usage /sys/class/power_supply/BAT1/power/runtime_suspended_time /sys/class/power_supply/BAT1/device /sys/class/power_supply/BAT1/capacity /sys/class/power_supply/BAT1/subsystem /sys/class/power_supply/BAT1/capacity_level /sys/class/power_supply/BAT1/status /sys/class/power_supply/BAT1/voltage_now /sys/class/power_supply/BAT1/uevent /sys/class/power_supply/BAT1/energy_now /sys/class/power_supply/BAT1/model_name /sys/class/power_supply/BAT1/manufacturer /sys/class/power_supply/BAT1/technology /sys/class/power_supply/BAT1/cycle_count /sys/class/power_supply/BAT1/energy_full_design /sys/class/power_supply/BAT1/voltage_min_design /sys/class/power_supply/BAT1/serial_number /sys/class/power_supply/BAT1/energy_full /sys/class/power_supply/BAT1/present /sys/class/power_supply/BAT2/ /sys/class/power_supply/BAT2/type /sys/class/power_supply/BAT2/power_now /sys/class/power_supply/BAT2/alarm /sys/class/power_supply/BAT2/power /sys/class/power_supply/BAT2/power/control /sys/class/power_supply/BAT2/power/async /sys/class/power_supply/BAT2/power/runtime_enabled /sys/class/power_supply/BAT2/power/runtime_active_kids /sys/class/power_supply/BAT2/power/runtime_active_time /sys/class/power_supply/BAT2/power/autosuspend_delay_ms /sys/class/power_supply/BAT2/power/runtime_status /sys/class/power_supply/BAT2/power/runtime_usage /sys/class/power_supply/BAT2/power/runtime_suspended_time /sys/class/power_supply/BAT2/device /sys/class/power_supply/BAT2/capacity /sys/class/power_supply/BAT2/subsystem /sys/class/power_supply/BAT2/capacity_level /sys/class/power_supply/BAT2/status /sys/class/power_supply/BAT2/voltage_now /sys/class/power_supply/BAT2/uevent /sys/class/power_supply/BAT2/energy_now /sys/class/power_supply/BAT2/model_name /sys/class/power_supply/BAT2/manufacturer /sys/class/power_supply/BAT2/technology /sys/class/power_supply/BAT2/cycle_count /sys/class/power_supply/BAT2/energy_full_design /sys/class/power_supply/BAT2/voltage_min_design /sys/class/power_supply/BAT2/serial_number /sys/class/power_supply/BAT2/energy_full /sys/class/power_supply/BAT2/present Couldn't spot anything dock-related here.
Created attachment 303028 [details] [review] power: Describe batteries properly when not called BAT0 When the main battery isn't called BAT0, as happens on a dual-battery, convertible Toshiba laptop, we would tag both batteries as "Extra". Mark the first one as being the main battery. In the longer-term, we'll have UPower exporting the exact information about which is in the "dock" and which is in the same package as the processing unit, when the kernel exports it. See https://bugzilla.kernel.org/show_bug.cgi?id=97841
Review of attachment 303028 [details] [review]: sure
Attachment 303028 [details] pushed as f31c3b1 - power: Describe batteries properly when not called BAT0