Battery state is unknown on lenovo laptop
Hi
For some time now, my battery state changes to `unknown` for long periods of time.
It returns to normal randomly.
When it happens, when I run
acpi -i
or
cat /sys/class/power_supply/BAT0/status
it shows `unknown`.
I don't know if it's connected, but something causes auto-cpufreq to think my battery is always discharging, causing it to always put me in powersave mode. (even when my battery state shows `Full`)
I'm using a Lenovo Ideadpad 330s, and I did a BIOS update recently (it didn't solve the problem)
What can I do to fix this?
About this post
- Posted
- Archived
- Score
- 28 · 90% up
- Kind
- Text
- ID
- p79ht0
4 comments
I have a Lenovo laptop too and to know if it's discharging or charging I use the status of the power supply instead of the actual battery:
cat /sys/class/power_supply/ACAD/onlineIf it outputs 1 then it's charging, 0 means it's discharging
For the actual battery percentage I use:
cat /sys/class/power_supply/BAT1/energy_now
PS: I get unknown from the battery's status too
Thanks, but I don't have another directory inside of
/sys/class/power_supplyfor my power supply, I only haveBAT0I have an Ideapad 340S, I don't use auto-cpufreq so I don't know if my PC goes into powersave mode or not but to see the battery charge percentage from the terminal I use cat /sys/class/power_supply/BAT1/capacity and it's right, if I try to change capacity with status it also gives Unknown.
I was going through the bios on my HP laptop the other day and I recall seeing an option that mentioned passing the battery state to the OS from the bios. Could try checking and seeing if your laptop has a similar option.