You are not logged in.

#1 2020-07-30 08:16:10

charlie_02
Member
Registered: 2018-12-24
Posts: 13

Change capacity level in uevent.

Hello,

I am trying to figure out what is the purpose of the capacity level attribute for batteries. On my laptop, It only have two states: normal and full. Is it possible to make it change a little bit more depending on the capacity of the battery (for example: full, almost full, normal, low, almost empty)?

I tried to set a udev rule:

KERNEL=="BAT1", SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[4-8][0-9]", ATTR{capacity_level}="Almost_Full"

but it did not work (but  also tested if the rule is triggered and it is, so I assume that the problem is not the conditions for triggering the rule)

Do you know if this is possible to do?
Thank you for your help.

Offline

Board footer

Powered by FluxBB