Skip to content

Keyboard backlight timeout ignored after setting keyboard brightness through Linux (instead of Fn+F5) #153

@Lurux

Description

@Lurux
System: Fedora 42
Kernel: 6.15.4

So, I'm not sure this is the right place to ask, but this is the only repo I found when researching this.

As per #48 and #65, it seems smbios-keyboard-ctl is not supported on newer kernel versions, and it is preferred to write values directly to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/ as suggested by @superm1, the person who wrote the related kernel driver.

My keyboard timeout in the BIOS is set to 10s, and when I change the illumination setting through the Fn+F5 keyboard shortcut, which I reckon is directly handled at the firmware level rather than Linux, I can set my keyboard brightness to any desired value and the timeout will still work.

However, if I write anything under /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/ while the backlight is on or is to be turned on by said action, the timeout configured in the BIOS stops working and my keyboard just stays lit forever.

  • Specifically, writing any value higher than 0 to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness will cause the timeout to stop function until next reboot, even though cat /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/stop_timeout still reports the correct value (10s, in my case). This also causes the system to freeze for half a second.
  • Writing to other files under /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/ also seem to break the timeout if the keyboard backlight is on
  • However, writing 0 to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness or writing to other files under that folder while the backlight is off does not break the configured timeout
  • Interestingly, it seems writes made to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness are saved for next boot in the BIOS, while writes made to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/stop_timeout are not saved or reflected in the BIOS settings
  • Finally, I noticed writing "0" or "0s" to /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/stop_timeout will prevent any further writes/changes to said file until next reboot

At some point I managed to enable the backlight by writing to these file without breaking the timeout, but it seems to have been a fluke, as I was not able to reproduce this, and no changes were made to the system between these tests. It just worked once, on one boot, but that is the only time ever I was able to enable the backlight in such a way without breaking the timeout. Again, further attempts to change the brightness during said boot broke the timeout, and all other tests I did on further boots, without any changes to the system, also failed.

In case that might have been helpful, I do not get anything in dmesg - not even any info or debug line - upon writing values into these files.

Any pointers or help in debugging this would be greatly appreciated !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions