Keyboard Backlight is reset after login

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nooryani84

Keyboard Backlight is reset after login

Post by nooryani84 »

Hi,

Running Cinnamon mint 17 on a Asus UX32LN (similar to ux32vd i believe)

I'm able to manually change the brightness via FN-keys though it resets after logging in again. So i've added a line to /etc/rc.local:

Code: Select all

sleep 7
echo 0 > /sys/class/leds/asus\:\:kbd_backlight/brightness
This works only if I have the sleep 7 in the script. At the login screen the keyboard backlight is off, though after logging in without this script it will turn on full brightness. Even with the script it momentarily turns on and then off.

This feels like a hack of sorts, so if possible could someone provide a better solution? Is there any way to allow systemd or another service to control and remember my keyboard backlight settings?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: Keyboard Backlight is reset after login

Post by Buzzsaw »

I've never known a recent laptop to remember brightness settings automatically. The only ones I've had that remembered brightness automatically were a 2006 Dell Inspiron 1300 and a 2010 Dell Inspiron 15R. Even though the Inspiron 15R remembered the brightness setting, it was always at full brightness immediately after booting, then the brightness decreased a few seconds later. I suspect the problem might be because of the recent change from flourescent tube backlights to LED backlights.

If after using the function keys (or any other software method) to change the brightness, you then look in your brightness files in /sys, you'll find that the files have been edited the same as when you edit them manually. So obviously all methods of changing brightness ultimately result in the files in /sys being edited. So it's not really a 'hack'; all that's happening is that you're bypassing the software and editing the files yourself. The end result is the same.

You need to use 'sleep 7' because you need to wait until the /sys file has been created before you can write to it. If you write to the file too early, you will be creating it yourself using the command, and then it will subsequently be overwritten with the default file when the system finally creates it. Files in /sys and /proc aren't on the hard drive; they're created and stored in RAM at every boot.
nooryani84

Re: Keyboard Backlight is reset after login

Post by nooryani84 »

Thank you for a very informative answer :-) I guess I am already using a proper solution afterall. I will be reading up on systemd since i have read it handles these things differently
Locked

Return to “Hardware Support”