linux-thinkpad / tp_smapi

173 stars 13 forks source link

Charge thresholds confuse kernel #17

Open haarp opened 10 years ago

haarp commented 10 years ago

This is on a W701:

When charge thresholds are set, the kernel does not know about the current battery state. While the battery is idling at the threshold with AC attached for example, I get this:

$ cat /sys/class/power_supply/BAT0/status Unknown

I am aware that tp_smapi exports its own interface under /sys/devices/platform/smapi, but many tools and daemons such as Upower are unaware of it and will not implemented driver-specific interfaces. The result is that Upower assumes that the battery is charging, while it is not.

It would be very useful if tp_smapi could also override the power_supply entries in sysfs to provide the correct status, among other things.

Thanks!

evgeni commented 10 years ago

Hi,

yes I think I have seen this before. Overriding power_supply sounds like a bad plan to me, but maybe we can trigger some update or supply additional information to the original interface? Will have a closer look when I have some spare time.

Greets

caadar commented 7 years ago

Unknown bat status confuses laptop-mode with errors:

You have a broken battery. Cannot determine actual state Please report this to the linux-acpi developers Not determining any state from this device: /sys/class/power_supply/BAT0

Rubenzahl commented 5 years ago

Same problem here.

You have a broken battery. Cannot determine actual state Please report this to the linux-acpi developers Not determining any state from this device: /sys/class/power_supply/BAT0

$ cat /sys/class/power_supply/BAT0/status Unknown

Ubuntu 18.04.1 LTS - Ubuntu 7.3.0-16ubuntu3 gcc version 7.3.0 Kernel: 4.15.0-36-generic

What can be done? Regards

Rubenzahl commented 5 years ago

Same problem here.

You have a broken battery. Cannot determine actual state Please report this to the linux-acpi developers Not determining any state from this device: /sys/class/power_supply/BAT0

$ cat /sys/class/power_supply/BAT0/status Unknown

Ubuntu 18.04.1 LTS - Ubuntu 7.3.0-16ubuntu3 gcc version 7.3.0 Kernel: 4.15.0-36-generic

What can be done? Regards

Rubenzahl commented 5 years ago

Now, after upgrading to kernel: 4.15.0-38-generic the error messages still apear in syslog.