RHEL 8.4 battery threshold issue - BAT1 is not configurable

Posted on

Hello,
in our company (unfortunately) we had to migrate our Lenovo laptops from Fedora to RHEL8 Workstation. After small tweaks everything works except the Battery 1 (BAT1) threshold setting. OS sees two batteries (BAT0 and BAT1) but only BAT0 is configurable:

root:~# tlp-stat -b
--- TLP 1.2.2 --------------------------------------------


+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = 01AV489
/sys/class/power_supply/BAT0/cycle_count                    =     29
/sys/class/power_supply/BAT0/energy_full_design             =  23940 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  18590 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  12920 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Unknown (threshold effective)

/sys/class/power_supply/BAT0/charge_start_threshold         =     60 [%]
/sys/class/power_supply/BAT0/charge_stop_threshold          =     80 [%]


+++ ThinkPad Battery Status: BAT1 (Ultrabay / Slice / Replaceable)
/sys/class/power_supply/BAT1/manufacturer                   = Celxpert
/sys/class/power_supply/BAT1/model_name                     = 01AV424
/sys/class/power_supply/BAT1/cycle_count                    =     58
/sys/class/power_supply/BAT1/energy_full_design             =  24050 [mWh]
/sys/class/power_supply/BAT1/energy_full                    =  20710 [mWh]
/sys/class/power_supply/BAT1/energy_now                     =  12340 [mWh]
/sys/class/power_supply/BAT1/power_now                      =      0 [mW]
/sys/class/power_supply/BAT1/status                         = Unknown (threshold effective)

/sys/class/power_supply/BAT1/charge_start_threshold         =     95 [%]
/sys/class/power_supply/BAT1/charge_stop_threshold          =     100 [%]

Error when trying to change values for BAT1:

root:~# echo 60 > /sys/class/power_supply/BAT1/charge_start_threshold 
-bash: echo: write error: No such device

According to this info:
TLP BAT1 kernel 4.18 issue
it is a bug in kernel 4.18. Is there any chance to get a fix in RHEL8 like in other Linux distributions?

root:~# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 (Ootpa)
root:~# uname -a
Linux xxx 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Mon Jun 14 17:25:42 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

Responses