Consequence of battery status: Unknown

If none of the more specific forums is the right place to ask

Consequence of battery status: Unknown

Postby HankB » 2018-09-14 13:07

Hardware: Dell XPS 13 laptop (9370)
Debian Testing - up to date.

Battery charging configuration: In the BIOS I have this set to "custom" and have set the limits as 50%-65%. The result of this is that at about 64% capacity, the charging system stops charging the battery and the laptop essentially runs off the PSU. I think this is great for battery longevity. I wonder what the consequences of this are on operation.
Here is what I see reported:
Code: Select all
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT0/status
Unknown
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT0/capacity
64
hbarta@rocinante:~$

I'm pretty sure that things like the CPU governor may look at the status and decide how to run. Perhaps there are other things that also change. (I have screen brightness set to the same level for A/C and on battery.)
If I were coding something that operated differently on A/C vs. battery, I'd only choose the A/C mode only when the battery/charging status definitely indicated A/C power. Other status (including "unknown") would warrant operating in 'on battery' mode.
Is there an easy fix for this? A not so easy fix? I suppose it starts with kernel or modules that identify the battery/charging status and percolates up through the desktop environment that displays battery condition and perhaps makes decisions based on that condition. At present the Gnome battery indicator shows "Estimating..." for battery status. If I open "Power Settings" it provides the charge level and indicates "charging" while contents of /sys/class/power_supply/BAT0/status are "Unknown".

Thanks!
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: Consequence of battery status: Unknown

Postby debiman » 2018-09-15 10:35

is BAT0 the only one you have in there?

i seem to remember a situation where i had to use BAT1 although there was only 1 battery...
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Consequence of battery status: Unknown

Postby HankB » 2018-09-17 13:49

debiman wrote:is BAT0 the only one you have in there?

i seem to remember a situation where i had to use BAT1 although there was only 1 battery...

I have a recollection of a similar situation. No, this is the battery. To provide more detail
Code: Select all
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT0/status
Unknown
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT1/status
cat: /sys/class/power_supply/BAT1/status: No such file or directory
hbarta@rocinante:~$ # disconnect PSU
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT0/status
Discharging
hbarta@rocinante:~$ # wait a bit and reconnect PSU (to force charging.)
hbarta@rocinante:~$ cat /sys/class/power_supply/BAT0/status
Charging
hbarta@rocinante:~$ ls -d /sys/class/power_supply/BAT*
/sys/class/power_supply/BAT0
hbarta@rocinante:~$


Edit: On my Lenovo Y50
Code: Select all
hbarta@yggdrasil:~$ ls -d /sys/class/power_supply/BAT*
/sys/class/power_supply/BAT1
hbarta@yggdrasil:~$
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: Consequence of battery status: Unknown

Postby debiman » 2018-09-17 16:48

ok.
it seems like whichever piece of software does this, isn't able to recognize what you set up in bios.
i'm guessing it's the kernel.
you are on testing, but your hardware is brand-spanking-new (at least it's still being sold for well over 1000€) - maybe you can try a cutting edge kernel, maybe wait for a few upgrades, maybe tell the powers that be what's going on and they might want to add that functionality...
or maybe i'm totally off and it can be solved with some configuration right there.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Consequence of battery status: Unknown

Postby HankB » 2018-09-18 13:34

debiman wrote:..., maybe tell the powers that be what's going on and they might want to add that functionality...
or maybe i'm totally off and it can be solved with some configuration right there.

I think it starts with the kernel but there may be other layers up to the DE that also need to be aware of what seems like a new charging status. Perhaps if the kernel is tweaked to describe this as "charging" then other stuff would work w/out change.
I'm asking here in case there is an easy solution - as you suggest - or perhaps some of "the powers that be" will see this and recognize the need for a change.

But I am truly not certain if this is simply a cosmetic issue ("unknown" status) or has real impact (degraded operation to conserve battery when not desired.)

thanks,
hank
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: Consequence of battery status: Unknown

Postby debiman » 2018-09-19 04:56

HankB wrote:I'm asking here in case (...) perhaps some of "the powers that be" will see this and recognize the need for a change.
very unlikely to happen.
please at least post to the appropriate mailing lists or file a bug.
it might be prudent to first do some serious troubleshooting.
at least ascertain if this is a kernel or software issue.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable