# [SOLVED] sensors missing BAT0-acpi-0

## charles17

The sensors output on my Dell Latitude E7450 is missing the battery information.

This is what I found on linux.hardware.org:

```
BAT0-acpi-0

Adapter: ACPI interface

in0:          12.80 V  

curr1:       114.00 mA

```

Where can this be enabled? 

I cannot find it in the kernel configuration and lm_sensors doesn't tellLast edited by charles17 on Mon Jun 01, 2020 3:21 pm; edited 1 time in total

----------

## Anon-E-moose

That's usually under the acpi stuff, acpi config options - there's a battery option or do a / search for battery

----------

## charles17

That was my first idea, but CONFIG_ACPI_BATTERY=y has always been enabled. 

Here is the .config file.

----------

## Anon-E-moose

lspci -nnk and paste it.  :Smile: 

----------

## charles17

 *Anon-E-moose wrote:*   

> lspci -nnk and paste it. 

 

lspci -nnkv

----------

## Jaglover

Not sure what PCI has to do with it. 

Anyhow, where is this sensor located? Is it inside of battery? Does your battery have it? Can some good mainstream distro (*buntu) detect it? Just to make sure we are not on a wild goose chase here.

----------

## charles17

The link in OP  was from Ubuntu

----------

## Jaglover

So you posted the information at linux-hardware.org from your Dell?

----------

## charles17

 *Jaglover wrote:*   

> So you posted the information at linux-hardware.org from your Dell?

 

Not yet.  Probe #f3e9ca7a40 is for comparison.  

It is from one of those Latitude E7450 using the same BIOS as mine has.

----------

## Jaglover

It is your DELL which does not show battery information in Gentoo. I'd make sure it has a working sensor before investing more time in troubleshooting. Don't you agree?

----------

## Anon-E-moose

Do you have /proc/acpi/battery/

Is there a listing for battery under /sys/class/power_supply/

And are there messages in /var/log/dmesg 

```
 ) grep -i batt dmesg 

[    5.077094] battery: ACPI: Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared

[    5.077098] battery: ACPI: Battery Slot [BAT1] (battery present)
```

----------

## charles17

 *Anon-E-moose wrote:*   

> Do you have /proc/acpi/battery/

 

No. This is all I have in /proc/acpi

```
/proc/acpi/

├── button

│   └── lid

│       └── LID0

│           └── state

└── wakeup

```

 *Anon-E-moose wrote:*   

> Is there a listing for battery under /sys/class/power_supply/

 

Yes, there is:

```
/sys/class/power_supply/

├── AC -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC

└── BAT0 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0

```

 *Anon-E-moose wrote:*   

> And are there messages in /var/log/dmesg 
> 
> ```
>  ) grep -i batt dmesg 
> 
> ...

 

Full dmesg is here.

Edit:

Could it depend on those Deprecated procfs I/F for battery as from your post??

----------

## Anon-E-moose

Try setting 

# CONFIG_ACPI_PROCFS_POWER is not set

to turn on the depreciated stuff, but as they say it will go away one day.

I have two aliases for my laptop

alias bat="cat /proc/acpi/battery/BAT1/state"

alias batp='perl -E "print sprintf(\"%.2f%%\n\", `cat /sys/class/power_supply/BAT1/charge_now`/`cat /sys/class/power_supply/BAT1/charge_full`)"'

so evidently I still use the depreciated stuff for at least one of them.

----------

## charles17

Enabling the deprecated stuff does not help. So I guess it might even depend on some acpi daemon runing.

At least I can see values of capacity, voltage_now and current_now changing in /sys/class/power_supply/BAT0/. so the sensor seems to be ok for me.

I will stop this here hand mark the topic [SOLVED]

Thank you both very much for your help

----------

## Ant P.

Your kernel is ancient. lm-sensors power supply support was added in 5.3.

----------

## charles17

 *Ant P. wrote:*   

> Your kernel is ancient. lm-sensors power supply support was added in 5.3.

 

Thanks for the hint.  Yes, I am on LTS kernel and will move when 4.19 gets EOLed.  I'll keep it in mind for that update.

Anyway, lxpanel has a battery monitor working well without CONFIG_ACPI_PROCFS_POWER and without acpid installed.

----------

## Hu

5.4.x is also a longterm kernel, and is new enough that the feature Ant P. identified should be available.

----------

