I have a new Galago Ultrabook from System76. The folks at System76 suggested filing this bug. Here is the problem: The file /sys/class/power_supply/BAT0/current_now does not report the current current when the battery is discharging. Instead, $ cat /sys/class/power_supply/BAT0/current_now cat: /sys/class/power_supply/BAT0/current_now: No such device The file reports a reasonable value only when running on AC. The contents of the battery sysfs files follow. They were taken while running on battery power: /sys/class/power_supply/BAT0/alarm: 0 /sys/class/power_supply/BAT0/capacity: 93 /sys/class/power_supply/BAT0/charge_full: 5149000 /sys/class/power_supply/BAT0/charge_full_design: 4800000 /sys/class/power_supply/BAT0/charge_now: 4793000 cat: /sys/class/power_supply/BAT0/current_now: No such device /sys/class/power_supply/BAT0/current_now: /sys/class/power_supply/BAT0/cycle_count: 0 cat: /sys/class/power_supply/BAT0/device: Is a directory /sys/class/power_supply/BAT0/device: /sys/class/power_supply/BAT0/manufacturer: Notebook /sys/class/power_supply/BAT0/model_name: BAT cat: /sys/class/power_supply/BAT0/power: Is a directory /sys/class/power_supply/BAT0/power: /sys/class/power_supply/BAT0/present: 1 /sys/class/power_supply/BAT0/serial_number: 0001 /sys/class/power_supply/BAT0/status: Discharging cat: /sys/class/power_supply/BAT0/subsystem: Is a directory /sys/class/power_supply/BAT0/subsystem: /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 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CYCLE_COUNT=0 POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11100000 POWER_SUPPLY_VOLTAGE_NOW=12140000 POWER_SUPPLY_CHARGE_FULL_DESIGN=4800000 POWER_SUPPLY_CHARGE_FULL=5149000 POWER_SUPPLY_CHARGE_NOW=4793000 POWER_SUPPLY_CAPACITY=93 POWER_SUPPLY_MODEL_NAME=BAT POWER_SUPPLY_MANUFACTURER=Notebook POWER_SUPPLY_SERIAL_NUMBER=0001 /sys/class/power_supply/BAT0/voltage_min_design: 11100000 /sys/class/power_supply/BAT0/voltage_now: 12140000 $ uname -a Linux mrbessel.localdomain 3.15.10-200.fc20.x86_64 #1 SMP Thu Aug 14 15:39:24 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux I have also tried stable kernel versions 3.0.0, 3.0.101, 3.5.7, 3.15.7 from git with the same result. I am currently running Fedora 20, but same results on Ubuntu 14.04. The folks at System76 think this is a software issue. Let me know if you need any more information.
Could you provide the output of acpidump?
Created attachment 148651 [details] acpidump -o acpidump.out
Is this the output you were looking for?
Created attachment 159511 [details] customized UPBS method please follow the step 5/6/7 in https://01.org/linux-acpi/documentation/overriding-dsdt to make your kernel run with this customized DSDT. And then reboot and run "echo 1 > /sys/module/acpi/parameters/aml_debug_output" and then re-cat the current_now sysfs file. please attach the dmesg output after the above steps.
Created attachment 159961 [details] dmesg with new dsdt OK, I think I did it right.
It seems to be a BIOS bug to me. the "No such device" error is caused by the follow ASL code If (^^AC.ACFG) { If (LEqual (And (^^PCI0.LPCB.EC.BST0, 0x02), 0x02)) { Or (Local0, 0x02, Local0) And (^^PCI0.LPCB.EC.BPR0, 0xFFFF, Local1) } } Else { Or (Local0, One, Local0) And (^^PCI0.LPCB.EC.BPR0, 0xFFFF, Local1) } And (Local1, 0x8000, Local7) If (LEqual (Local7, 0x8000)) { Store (0xFFFFFFFF, Local1) } the return value of BPR0 is 0xFC2D, and the ASL checks bit 15 of BPR0, and if it is set, Local1 is set to 0xFFFFFFFF, and Local1 is the value that OS reads to get the "current_now". I don't know why the ASL code is written in this way. Bug closed because this is apparently a BIOS issue and we can do nothing in kernel/userspace. Sorry that we can not help you about this issue.
(In reply to Zhang Rui from comment #6) > It seems to be a BIOS bug to me. > ... > Sorry that we can not help you about this issue. OK, thank you for looking into this.