Skip to content

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?

28 points4 comments
Open on Reddit
About this post
Posted
Archived
Score
28 · 90% up
Kind
Text
ID
p79ht0

Author

38
posts
78
comments
7
media
View profile

4 comments

unknown author1 hidden

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/online

If 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

5 points

Thanks, but I don't have another directory inside of /sys/class/power_supply for my power supply, I only have BAT0

5 points

I 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.

4 points

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.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.