A keyboard backlight gets disabled in BIOS on Fedora boot

For me it sounds like a nonsense, but.. I’ve noticed laptop keyboard backlight stopped working, while it worked well before. I went to BIOS and found the backlight setting set to “off”. I turned it back “on”, and it the backlight worked as expected. But immediately after that it completely turns off in the middiel of the boot process. But the biggest magic is that it sets to “off” in BIOS(?!) So every time I turn it “on”, it turns “off” in BIOS during OS boot.

Any ideas what is happening? And how is this even possible?

ilja@fedora:~$ inxi -Fzxx
System:
  Kernel: 7.0.6-200.fc44.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 16.1.1
  Desktop: GNOME v: 50.1 tk: GTK v: 3.24.52 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 44 (Workstation Edition)
Machine:
  Type: Laptop System: Dell product: XPS 13 9300 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 077Y9N v: A00 serial: <superuser required> part-nu: 096D
    Firmware: UEFI vendor: Dell v: 1.28.1 date: 12/24/2024
Battery:
  ID-1: BAT0 charge: 9.5 Wh (42.8%) condition: 22.1/51 Wh (43.4%) health: good
    temp: 35 C volts: 7.38 min: 7.6 model: LGC-LGC6.5 DELL 2XXFW06
    serial: <filter> charging: status: discharging control: start: 75%
    end: 80% cycles: N/A
CPU:
  Info: quad core model: Intel Core i7-1065G7 bits: 64 type: MT MCP
    arch: Ice Lake rev: 5 cache: L1: 320 KiB L2: 2 MiB L3: 8 MiB
  Speed (MHz): avg: 1300 min/max: 400/3900 cores: 1: 1300 2: 1300 3: 1300
    4: 1300 5: 1300 6: 1300 7: 1300 8: 1300 bogomips: 23961
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Iris Plus Graphics G7 vendor: Dell driver: i915 v: kernel
    arch: Gen-11 ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4
    bus-ID: 00:02.0 chip-ID: 8086:8a52
  Device-2: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-9:3 chip-ID: 0bda:58fe
  Display: wayland server: Xwayland v: 24.1.11 compositor: gnome-shell
    driver: gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: Sharp 0x14cb res: 1920x1200 dpi: 169
    diag: 340mm (13.4")
  API: OpenGL v: 4.6 vendor: intel mesa v: 26.0.6 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Iris Plus Graphics (ICL GT2)
    device-ID: 8086:8a52 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: gputop, intel_gpu_top, lsgpu x11: xdriinfo,
    xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:34c8
  API: ALSA v: k7.0.6-200.fc44.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.6.4 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:34f0
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:4 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 476.94 GiB used: 97.58 GiB (20.5%)
  ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNS512G NVMe KIOXIA 512GB
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 38.9 C
Partition:
  ID-1: / size: 475.35 GiB used: 97.22 GiB (20.5%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 335.9 MiB (34.5%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 33.5 MiB (5.6%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 475.35 GiB used: 97.22 GiB (20.5%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 49.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 15.2 GiB used: 3.26 GiB (21.5%)
  Processes: 325 Power: uptime: 20m wakeups: 0 Init: systemd v: 259
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 33
    Compilers: gcc: 16.1.1 Shell: Bash v: 5.3.9 running-in: ptyxis-agent
    inxi: 3.3.40

I made a video, and found that it turns off somewhere here:

VIdeo: https://photos.app.goo.gl/w7t3yRLi48aX4tto7

The dmesg output is a bit different, but I pasted is here as well:

~$ journalctl -b 0 |grep kbd
May 14 22:41:38 fedora systemd[1]: Starting systemd-backlight@leds:dell::kbd_backlight.service - Load/Save Screen Backlight Brightness of leds:dell::kbd_backlight...
May 14 22:41:38 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-backlight@leds:dell::kbd_backlight comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 14 22:41:38 fedora systemd[1]: Finished systemd-backlight@leds:dell::kbd_backlight.service - Load/Save Screen Backlight Brightness of leds:dell::kbd_backlight.

Is there a keyboard key that can turn it back on?

My guess would be that firmware between OS and Bios can be toggled by keyboard, mediated by Systemd going by your screenshot.

This discussion that the boot process is able to change bios settings we had in a other topic with the num lock key.

Can it be that you have the “Power Saver” profile on in the Settings? Could imagine that this overwrites this setting to save power.

There is a man page for the systemd-backlight command. It says that it is supposed to save the backlight brightness setting on shutdown. But I’m not sure how you get the brightness turned back up if it is off/low. Maybe the light command could turn the brightness back up?

@theprogram Yes, there is Fn+Space shortcut on Dell to toggle between 0/50/100% brightness, but that is stops working as well.

@ilikelinux No, it’s Balanced power mode and even AC connected. Regardless that, previously the power mode had no effect on keyboard backlight.
I found later, that now Dell make it possible to change BIOS settings from an OS. Probably missed that innovation in the past :slight_smile: Nevermind about that.

@glb There is no light command. It is always a Fn+Space for Dells as mentioned above. Normally it works this way: the backlight turns off automatically if no key touched in 5 seconds, but lights up once any key press.. But now it’s dead in OS. But works while in BIOS setup :person_shrugging:

light is a program you can download, it controls screen brightness, but might have a setting for keyboards also. If not light, there might be another light like program to expose the systemd interface.

I think it is in the Fedora repos? sudo dnf install light should work.

What is the contents of your /var/lib/systemd/backlight/ ?

And you should be able to set is via a

KERNEL COMMAND LINE         

       systemd-backlight understands the following kernel command line
       parameter:

       systemd.restore_state=
           Takes a boolean argument. Defaults to "1". If "0", does not
           restore the backlight settings on boot. However, settings will
           still be stored on shutdown.

Sorry for some delay - a night happened.

Interestingly, installing and removing light made backlight work back normally. I now doubt if the issue was real. I likely mixed up backup Dell’s Fn+F5 and daily driver’s Fn+Space (ThinkPad) key combos to turn on light. Maybe was too tired :slight_smile:

However I did some tests today and as @glb and @theprogram mentioned systemd-backlight writes the setting to the BIOS on shutdown. It seems however it does not respect BIOS setting on the boot and overrides the value from the last OS session. This looks inconsistent (what’s the point to writing the value and ignore it later) and likely that was what confused me (tired) yesterday. What do you think is this a bug or there is a reason?

Many thanks to everyone for help anyway, even though the issue is was partially false alarm :face_with_peeking_eye:

If you changed a kernel parameter, you probably just need to write it back to the initramfs. Otherwise it gets overwritten with the settings before the change.

Sounds confiusing,I know :roll_eyes:

No, no, I haven’t set kernel params. Everything is by default.

In the manual it says it restores the state on boot. But not clear if it restores the value from the BIOS and falls back to OS stored value (not sure how it is called). Or viceversa first looks for OS value, then BIOS.

As those can be different, for example BIOS says - disabled, but last OS session was enabled. It seems OS wins here.

However the more I think the more I feel this issue is too minor :slight_smile: