Views:
3,959β
Votes: 2β
Tags:
16.04
thinkpad
keyboard-backlight
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1029549
Title:
How to prevent the keyboard backlight from turning on when the laptop is woken from sleep?
ID:
/2018/04/29/How-to-prevent-the-keyboard-backlight-from-turning-on-when-the-laptop-is-woken-from-sleep_
Created:
April 29, 2018
Edited: September 14, 2020
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
From this reddit post OP had opposite problem with lights always being turned off when resuming from suspend.
You can follow the same approach but change the 1
(on) to a 0
(off).
Find the folder /etc/systemd/system/sleep.target.wants/
and create kb_backlight_resume.service
with these contents:
[Unit]
Description=Switch on keyboard backlight after resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target
[Service]
ExecStart=/bin/echo 0 > "/sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight/brightness"
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
I donβt have a Thinkpad and my Dell backlight keyboard has different directory structures. Iβm unable to test this for your environment. You might have to manually tweak the code if the directory names above are off.
Donβt forget to reboot before testing suspend / resume.
If you have a Dell that doesnβt have /etc/systemd/system/sleep.target.wants/
it can be enabled. For example see: