Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Consequence of battery status: Unknown

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
HankB
Posts: 53
Joined: 2012-03-07 15:15

Consequence of battery status: Unknown

#1 Post by HankB »

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!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Consequence of battery status: Unknown

#2 Post by debiman »

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

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: Consequence of battery status: Unknown

#3 Post by HankB »

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:~$ 

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Consequence of battery status: Unknown

#4 Post by debiman »

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.

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: Consequence of battery status: Unknown

#5 Post by HankB »

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

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Consequence of battery status: Unknown

#6 Post by debiman »

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.

Post Reply