🔍 See Original Answer on Ask Ubuntu 🔗
How to prevent the keyboard backlight from turning on when the laptop is woken from sleep?
April 29, 2018
Edited: September 14, 2020
November 24, 2022
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
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: