You are not logged in.

#1 2016-12-11 10:53:08

bleaver
Member
Registered: 2016-12-05
Posts: 18

How to make Thinkpad power button light blink when battery is low?

Hello, I would like the power button light on my Thinkpad to blink when the battery is getting dangerously low. What is the proper way to do this? Perhaps something in /sys/class/leds/tpacpi::power/trigger? Is there a better way to do this than writing a script that periodically checks the battery level and blinks the light if it is low?

Offline

#2 2016-12-11 11:27:16

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: How to make Thinkpad power button light blink when battery is low?

I can change the power button led with this:

echo 1 | sudo tee /sys/class/leds/tpacpi::power
echo 0 | sudo tee /sys/class/leds/tpacpi::power

combine that with a udev rule
https://wiki.archlinux.org/index.php/Ud … ing_events
For example:

# Poweroff the system when battery level drops to 3%
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="3", RUN+="/usr/bin/systemctl hibernate"

Either that or install the KDE component that notifies you about low battery :-)

Last edited by teateawhy (2016-12-11 11:28:41)

Offline

Board footer

Powered by FluxBB