Bug#484264: yacpi: battery status 0% with kernel 2.6.25-2-686
reassign 484264 libacpi forcemerge 484264 479096 thanks Hi David, * David Bremner [EMAIL PROTECTED] [2008-06-03 12:04]: here is the output with AC plugged in (first) and not. 58 rocinante ~ ] yacpi -p | BAT0 = 0% charging | ac = on-line | THM1 = 58 C | THM0 = 58 C | gov = ondemand | cpu = 800/1601 mhz [ 59 rocinante ~ ] yacpi -p | BAT0 = 0% charging rtime 00:00 h | ac = off-line | THM1 = 58 C | THM0 = 58 C | gov = ondemand | cpu = 800/1601 mhz [ 60 rocinante ~ ] Since I am typing this with the AC unplugged, I guess 0% is a bit pessamistic. This is a bug in libacpi which still needs to be adapter for the new sysfs interface :/ Patches welcome :) Cheers Nico -- Nico Golde - http://www.ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF For security reasons, all text in this mail is double-rot13 encrypted. pgpUGi1GGbikj.pgp Description: PGP signature
Bug#484264: yacpi: battery status 0% with kernel 2.6.25-2-686
Package: yacpi Version: 3.0-2 Severity: normal here is the output with AC plugged in (first) and not. 58 rocinante ~ ] yacpi -p | BAT0 = 0% charging | ac = on-line | THM1 = 58 C | THM0 = 58 C | gov = ondemand | cpu = 800/1601 mhz [ 59 rocinante ~ ] yacpi -p | BAT0 = 0% charging rtime 00:00 h | ac = off-line | THM1 = 58 C | THM0 = 58 C | gov = ondemand | cpu = 800/1601 mhz [ 60 rocinante ~ ] Since I am typing this with the AC unplugged, I guess 0% is a bit pessamistic. FWIW, acpi and acpitool don't work with this kernel version either. cat /sys/class/power_supply/BAT0/energy_now works, but the interface could be friendlier :-) The host is a Lenovo Thinkpad X61s. I get the same results with thinkpad_acpi loaded or not. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages yacpi depends on: ii libacpi0 0.2-4 general purpose library for ACPI ii libc6 2.7-10 GNU C Library: Shared libraries ii libncurses5 5.6+20080419-2 Shared libraries for terminal hand yacpi recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#484264: yacpi: battery status 0% with kernel 2.6.25-2-686
Nico == Nico Golde [EMAIL PROTECTED] writes: Nico This is a bug in libacpi which still needs to be adapter for Nico the new sysfs interface :/ Patches welcome :) Hi Nico; A partial fix follows. This allows correct battery percentage on my box. The battery status is still wrong (reports charging when /sys/class/power_supply/BAT0/status contains Full. Fixing that looked like it required understanding more about the sysfs acpi interface that I do right now. --- libacpi.c.orig +++ libacpi.c @@ -536,17 +536,17 @@ return NOT_PRESENT; } - snprintf(sysfile, MAX_NAME, %s/charge_full_design, info-info_file); + snprintf(sysfile, MAX_NAME, %s/energy_full_design, info-info_file); if((buf = get_acpi_content(sysfile)) == NULL) return NOT_SUPPORTED; info-design_cap = strtol(buf, NULL, 10); - snprintf(sysfile, MAX_NAME, %s/charge_full, info-info_file); + snprintf(sysfile, MAX_NAME, %s/energy_full, info-info_file); if((buf = get_acpi_content(sysfile)) == NULL) return NOT_SUPPORTED; info-last_full_cap = strtol(buf, NULL, 10); - snprintf(sysfile, MAX_NAME, %s/charge_now, info-info_file); + snprintf(sysfile, MAX_NAME, %s/energy_now, info-info_file); if((buf = get_acpi_content(sysfile)) == NULL) return NOT_SUPPORTED; info-remaining_cap = strtol(buf, NULL, 10); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#484264: yacpi: battery status 0% with kernel 2.6.25-2-686
Hi David, * David Bremner [EMAIL PROTECTED] [2008-06-03 13:01]: Nico == Nico Golde [EMAIL PROTECTED] writes: Nico This is a bug in libacpi which still needs to be adapter for Nico the new sysfs interface :/ Patches welcome :) A partial fix follows. This allows correct battery percentage on my box. The battery status is still wrong (reports charging when /sys/class/power_supply/BAT0/status contains Full. Fixing that looked like it required understanding more about the sysfs acpi interface that I do right now. Thanks for the patch. But since the libacpi package in Debian already contains a partial fix I am not too happy with including another one. Especially this one overwrites the old one and I didnt had the time yet to look more deep into the new sysfs structure. I hope Ill have time to do that soon. In the meanwhile the xbattbar-acpi upstream is working on a patch as far as I know. Cheers Nico -- Nico Golde - http://www.ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF For security reasons, all text in this mail is double-rot13 encrypted. pgpo46A4mlHcM.pgp Description: PGP signature