You are not logged in.

#1 2017-02-13 14:28:14

Mladia
Member
Registered: 2016-04-30
Posts: 59

[SOLVED] Battery procentage not read properly

Hallo,

I am trying to configure some battery saving mode on my laptop with Laptop-mode tools. I have a problem, that is not connected to it though.
When I am on full battery, everything seems fine. I am using GNOME, I check the status of the battery from the UI there. I get something like 95% left, 2 and a half hours hours left. That seems fine. Then I keep checking it every 5 minutes the next 50-70 minutes. The battery gets empty normally at first.
When it hits around 40%, the percentage drops immediately to 3-4 % and I get the message: Critical battery, please plug in AC supply. Just like that, from nothing.
I have enabled battery polling in laptop mode tools, thinking that the charged state is not read properly or smth like taht, but that didn't fix it. Does anybody have any idea what might be the problem here?

Last edited by Mladia (2017-02-14 14:07:15)

Offline

#2 2017-02-13 16:43:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Battery procentage not read properly

LMT is notoriously unreliable/useless.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-02-13 18:19:29

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] Battery procentage not read properly

What happens if you do the following?

cat /sys/class/power_supply/BAT0/capacity

This should tell you battery remaining as a percentage if I recall correctly. To build a CLI battery monitor in one line...

watch -n60 cat /sys/class/power_supply/BAT0/capacity

The above query's your battery state once per minute. If the erratic behavior described in your original post is the same as shown from my CLI method, then I would suspect that your battery may be going bad.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#4 2017-02-14 14:06:47

Mladia
Member
Registered: 2016-04-30
Posts: 59

Re: [SOLVED] Battery procentage not read properly

Yep, the battery is not working right.

Thanks! Nice that one can read the battery in this manner, I have never seen also the watch command, it's pretty neat.

Offline

#5 2017-02-14 19:57:15

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] Battery procentage not read properly

Your welcome. smile And watch is great for repeating timed tasks, such as this battery monitor. But you can also use watch to verify that files are being copied over to a directory correctly, by watching the size of your directory grow/shrink, among other things. Check the watch man page out. smile

Last edited by JohnBobSmith (2017-02-14 19:57:34)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

Board footer

Powered by FluxBB