Bug 60519
Summary: | Wrong battery information reported on Samsung NP540U3C | ||
---|---|---|---|
Product: | ACPI | Reporter: | Jan Hoffmann (jan) |
Component: | Power-Battery | Assignee: | Lan Tianyu (tianyu.lan) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | aaron.lu, fcr |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.34 and newer | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
Output of acpidump
debug.patch Output of acpidump on NEC LZ750/LS |
v2.6.34 adds support for extended battery, I think that caused this problem, but I don't see why. Tianyu, maybe you have some idea. Sorry for later response, could you check whether this issue takes place on the latest upstream kernel(v3.10)? Yes, the problem occurs on kernel 3.10, as well. How about unloading and then reloading acpi battery driver? I tried unloading and loading the module battery, but that didn't change anything. I only tried with kernel 3.9, though, as I don't have another kernel with the battery driver compiled as module right now. I can try again with 3.10 later. There's no change either on 3.10 when unloading/reloading the battery module. Created attachment 107031 [details]
debug.patch
Please try this patch.
With this patch applied, the battery info seems to be correct: $ cat /sys/class/power_supply/BAT1/uevent POWER_SUPPLY_NAME=BAT1 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CYCLE_COUNT=11 POWER_SUPPLY_VOLTAGE_MIN_DESIGN=7500000 POWER_SUPPLY_VOLTAGE_NOW=8427000 POWER_SUPPLY_CURRENT_NOW=841000 POWER_SUPPLY_CHARGE_FULL_DESIGN=6890000 POWER_SUPPLY_CHARGE_FULL=6800000 POWER_SUPPLY_CHARGE_NOW=6460000 POWER_SUPPLY_CAPACITY=95 POWER_SUPPLY_MODEL_NAME= POWER_SUPPLY_MANUFACTURER=SAMSUNG Electronics POWER_SUPPLY_SERIAL_NUMBER= Yes, these info looks correct compared with the output from _BIF on 2.6.33. The _BIX is used instead of _BIF above 2.6.34. The parsing of _BIX is wrong in the acpi battery driver. I will send fix patch to acpi maillist. Thanks for test. The fix patch has been merged into Linux upstream tree. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=016d5baad04269e8559332df05f89bd95b52d6ad However this "fix" breaks the battery support for my laptop, a NEC LZ750/LS, logging the error: [ 2.273992] ACPI Warning: For \_SB_.PCI0.LPCB.EC__.BAT1._BIX: Return Package is too small - found 19 elements, expected 20 (20121018/nspredef-679) [ 2.274007] battery: probe of PNP0C0A:00 failed with error -14 Created attachment 110471 [details]
Output of acpidump on NEC LZ750/LS
|
Created attachment 106809 [details] Output of acpidump The battery information reported in sysfs is wrong since kernel 2.6.34. In older versions the information is correct. The affected device is a Samsung NP540U3C. The output of acpidump is attached. These are the contents of /sys/class/power_supply/BAT1/uevent: Correct information on 2.6.33: POWER_SUPPLY_NAME=BAT1 POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Full POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_MIN_DESIGN=7500000 POWER_SUPPLY_VOLTAGE_NOW=8638000 POWER_SUPPLY_CURRENT_NOW=0 POWER_SUPPLY_CHARGE_FULL_DESIGN=6890000 POWER_SUPPLY_CHARGE_FULL=6800000 POWER_SUPPLY_CHARGE_NOW=6800000 POWER_SUPPLY_MODEL_NAME= POWER_SUPPLY_MANUFACTURER=SAMSUNG Electronics POWER_SUPPLY_SERIAL_NUMBER= Wrong information on 2.6.34: POWER_SUPPLY_NAME=BAT1 POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Unknown POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Unknown POWER_SUPPLY_CYCLE_COUNT=204 POWER_SUPPLY_VOLTAGE_MIN_DESIGN=1000 POWER_SUPPLY_VOLTAGE_NOW=8638000 POWER_SUPPLY_CURRENT_NOW=0 POWER_SUPPLY_POWER_NOW=0 POWER_SUPPLY_ENERGY_FULL_DESIGN=1000 POWER_SUPPLY_ENERGY_FULL=6890000 POWER_SUPPLY_ENERGY_NOW=6800000 POWER_SUPPLY_MODEL_NAME= POWER_SUPPLY_MANUFACTURER=LION POWER_SUPPLY_SERIAL_NUMBER=