:~$ acpi -abi Battery 0: Charging, 9%, charging at zero rate - will never fully charge. Battery 0: design capacity 42180 mWh, last full capacity 29050 mWh = 68% Adapter 0: on-line :~$ dmesg | grep Sony DMI: Sony Corporation VPCEB13FX/VAIO, BIOS R0230Y8 01/26/2010 As listed above, my battery is not charging in Linux, and charged fine with a previous installation of Windows7. I wiped the Windows partition for more HD space. Would you help get the battery to charge under Linux? Original bug posted: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1169727 :~$ upower --monitor-detail /** battery removed, and put back to obtain the following result. */ native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0 vendor: Sony Corp. power supply: yes updated: Wed Apr 17 12:07:23 2013 (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: charging energy: 2.61 Wh energy-empty: 0 Wh energy-full: 29.05 Wh energy-full-design: 42.18 Wh energy-rate: 0 W percentage: 8.98451% capacity: 68.8715% technology: lithium-ion History (charge): 1366222037 8.985 charging 1366222037 0.000 unknown History (rate): 1366222037 0.000 unknown
Please provide acpidump, dmesg and the output of "grep . /sys/class/power_supply/BAT0/*"
Created attachment 99111 [details] acpidump for 3.9.0-999-generic
Created attachment 99121 [details] dmesg for 3.9.0-999-generic
Created attachment 99131 [details] contents of BAT0 folder for 3.9.0-999-generic operation returned: grep: /sys/class/power_supply/BAT0/voltage_now: No such device
Comment on attachment 99131 [details] contents of BAT0 folder for 3.9.0-999-generic /*command return = */ grep: /sys/class/power_supply/BAT0/voltage_now: No such device
Hi, the bios acpi table doesn't provide actual voltage_now int _BST method of DSDT and give the value of 0xffffffff back. So battery driver return nodev error. Please try the following patch. It assign design_voltage to voltage_now. diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index f223018..0a80522 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -521,6 +521,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery) battery->capacity_now = battery->capacity_now * 10000 / battery->design_voltage; } + battery->voltage_now = battery->design_voltage; return result; }
Where is the file to update "static int acpi_battery_get_state"? Where is battery.c? I found line 67: obj-$(CONFIG_ACPI_BATTERY) += battery.o in /usr/src/linux-headers-3.9.0-999/drivers/acpi/Makefile or, maybe the contents of /lib/modules/3.9.0-999-generic/kernel/drivers/acpi/ would help? If so, see attached.
Created attachment 99241 [details] contents of /lib/modules/3.9.0-999-generic/kernel/drivers/acpi/
Lan, thanks for your help in looking at this and offering the first patch. Fortunately, I found battery.c (with the following steps): sudo apt-get source linux-image-<version> sudo apt-get build-dep linux-image-<version> git clone git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git cd <working directory of linux_<version>.tar.gz> tar -xzvf linux_<version>.tar.gz <working directory of linux tarball>/ubuntu-<release>/drivers/acpi/battery.c After updating and compiling the new kernel: :~$ cat /proc/version Linux version 3.2.0-40-generic (root@toddh) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #64 SMP Fri Apr 19 11:14:03 MDT 2013 Unfortunately: :~$ acpi -abi Battery 0: Charging, 7%, charging at zero rate - will never fully charge. Battery 0: design capacity 356 mAh, last full capacity 245 mAh = 68% Adapter 0: on-line What will help the battery to charge again? Attached are the new acpidump, and dmesg, along with other information that may prove helpful in solving this issue. Would you let me know if anything else would be helpful in troubleshooting this issue?
Created attachment 99381 [details] acpidump for 3.2.0-40-generic (toddh)
Created attachment 99391 [details] dmesg for 3.2.0-40-generic (toddh)
Created attachment 99401 [details] contents of BAT0 folder for 3.2.0-40-generic (toddh)
Created attachment 99411 [details] proc-cpuinfo_20130419
Created attachment 99421 [details] proc-modules
Created attachment 99431 [details] ver_linux
For ease, a comparison of outputs from: "grep . /sys/class/power_supply/BAT0/*" :~$ diff -it grep20130417.dat grepBAT0_20130419.dat 2d1 < /sys/class/power_supply/BAT0/capacity:8 6c5 < /sys/class/power_supply/BAT0/energy_now:2610000 --- > /sys/class/power_supply/BAT0/energy_now:2320000 18c17,18 < /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_MIN_DESIGN=118300000 --- > /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_MIN_DESIGN=118250000 > /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_NOW=118250000 22,23c22 < /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_NOW=2610000 < /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY=8 --- > /sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_NOW=2320000 27c26,27 < /sys/class/power_supply/BAT0/voltage_min_design:118300000 --- > /sys/class/power_supply/BAT0/voltage_min_design:118250000 > /sys/class/power_supply/BAT0/voltage_now:118250000
A re-installation of Windows7 didn't solve the battery charging issue as hoped. Fortunately, it allowed the BIOS update from Sony for improved fan control: DMI: Sony Corporation VPCEB13FX/VAIO, BIOS R0300Y8 07/20/2010. The current kernel version I'm troubleshooting with: Linux version 3.2.0-40-generic (root@toddh-VPCEB13FX) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #64 SMP Mon Apr 22 01:46:03 MDT 2013 (Ubuntu 3.2.0-40.64-generic 3.2.40). Look for updates to the attachments about the currently compiled kernel.
Created attachment 99761 [details] ver-linux_20130422
Created attachment 99771 [details] dmesg for 3.2.0-40-generic (toddh)
Created attachment 99781 [details] grep BAT0 for 2.3.0-40-generic (toddh)
Created attachment 99791 [details] acpidump for 3.2.0-40-generic (toddh) 20130422
(In reply to comment #17) > A re-installation of Windows7 didn't solve the battery charging issue as > hoped. > Fortunately, it allowed the BIOS update from Sony for improved fan control: > DMI: Sony Corporation VPCEB13FX/VAIO, BIOS R0300Y8 07/20/2010. I found /sys/class/power_supply/BAT0/power_now always returned 0 which is from Bios. This will affect the charging/discharging rate. Windows also can not make it work. So this should be a Bios or hardware issue. So close this bug. > > The current kernel version I'm troubleshooting with: > Linux version 3.2.0-40-generic (root@toddh-VPCEB13FX) (gcc version 4.6.3 > (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #64 SMP Mon Apr 22 01:46:03 MDT 2013 (Ubuntu > 3.2.0-40.64-generic 3.2.40). > > Look for updates to the attachments about the currently compiled kernel.