Hi, it seems that when refreshing ACPI battery info, the wrong path is taken. get_battery_zone_value() only takes the “battery name” (the “zone”) while it's currently given ACPI_DIR_BATTERY/devicename. ACPI_DIR_BATTERY is already concatenated in get_battery_zone_value() so one ends up trying to open: open("/proc/acpi/battery/battery/BAT0/state", O_RDONLY) = -1 ENOENT (No such file or directory) Attached patch fix that. The first one is against current svn, the second is with the patch for #4265 applied, in case that conflicts. Cheers,
Created attachment 1755 Fix battery path in acpi refresh
Created attachment 1756 Fix battery path in acpi refresh, with the “FAN” patch applied
Comment on attachment 1756 Fix battery path in acpi refresh, with the “FAN” patch applied Erf, both patchs are completely the same :)
(In reply to comment #0) Thanks for pointing out, now my battery state works again with 2.6.24; but not with 2.6.25 due to no entry /proc/acpi/battery.
(In reply to comment #4) > (In reply to comment #0) > > Thanks for pointing out, now my battery state works again with 2.6.24; but not > with 2.6.25 due to no entry /proc/acpi/battery. > Well, as I said on the other bug report, /proc/acpi/* begins to be deprecated, and will be removed at one time. So yes, time to switch to sysfs :)
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #0) > > > > Thanks for pointing out, now my battery state works again with 2.6.24; but not > > with 2.6.25 due to no entry /proc/acpi/battery. > > > > Well, as I said on the other bug report, /proc/acpi/* begins to be deprecated, > and will be removed at one time. So yes, time to switch to sysfs :) Done in current trunk
> Done in current trunk Close me?
"Done in current trunk"