You are not logged in.

#1 2024-06-17 00:57:07

fgallois
Member
Registered: 2024-06-17
Posts: 3

Scroll lock doesn't toggle keyboard backlights after upgrade

Hello, everyone

I have an issue where my keyboard backlights aren't turning on when I press the Scroll Lock key, even though it used to behave like that since some weeks ago.

I have done some tests with xev that prove that the key events are being picked up:

KeyPress event, serial 38, synthetic NO, window 0x600001,
    root 0x374, subw 0x600002, time 23858337, (36,37), root:(86,156),
    state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x600001,
    root 0x374, subw 0x600002, time 23858409, (36,37), root:(86,156),
    state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

I've also figured out that I can manually turn the backlights on by using the following command, which I got from here:

sudo bash -c "echo 1 > /sys/class/leds/input3::scrolllock/brightness"

Some recent upgrade must have caused the issue, but I haven't figured out how to pinpoint where it is coming from.

My keyboard is a Cooler Master Devastator II.

Offline

#2 2024-06-17 05:57:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,008

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

If the keys are printed in xev that means they're not bound to any global shortcut.
You could add one to toggle the brightness and bind it to the scroll-lock key.

As for what could have changed:
- Fn lock
- Dual boot condition (is there a parallel windows?)
- Kernel "regression"  (while an ancient relic, the scroll-lock actually does something in the userspace that might conflict with the desire to just abuse it to toggle the scroll-lock LED)
- the "3" there (bb. that the input number is subject to change when the keyboard re-attaches, you want to glob it if you're adding a shortcut)
- Did you change the display server (x11/wayland)?

Offline

#3 2024-06-17 19:06:11

fgallois
Member
Registered: 2024-06-17
Posts: 3

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

Hi! Sorry for the delay.

About your suggestions:

As for what could have changed:
- Fn lock

My keyboard doesn't have a Fn key.

- Dual boot condition (is there a parallel windows?)

I'm not dual-booting either.

- Did you change the display server (x11/wayland)?

No, I have been using Wayland since installation. I tried changing my session type to X11 and setting

xmodmap -e 'add mod3 = Scroll_Lock'

, which actually made scroll-lock work as expected, but I really wanted a solution that worked with Wayland.

Also, I have tried binding the scroll-lock key as in this post, but I didn't succeed. Instead, it just messed with my keyboard layout.

Offline

#4 2024-06-17 19:23:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,008

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

xev under wayland isn't all that authorative - also "wayland" isn't really a thing, which compositor specifically?
Also, are you using multiple layouts and "grp_led:scroll" ?

Offline

#5 2024-06-17 20:11:26

fgallois
Member
Registered: 2024-06-17
Posts: 3

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

My compositor is Mutter.
I am using both br and us layouts, with grp_led:scroll.

Offline

#6 2024-06-17 20:20:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,008

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

I am using both br and us layouts, with grp_led:scroll.

In case the cold guess wasn't indicative enough: what if you don't?

Offline

#7 2026-07-10 15:56:32

fahim.chuchu
Member
Registered: 2026-07-10
Posts: 3

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

Use Scroll Lock to turn on/off Keyboard Backlight

Finally, I have got the exact solution after suffering and trying many methods for 2 years. This method works on XFCE system without any problem. For other DEs, try and see if it works.

  1. Install numlockx:
    Ubuntu / Debian / Mint:

    sudo apt install numlockx

    Fedora / RHEL:

    sudo dnf install numlockx

    Arch / Manjaro:

    sudo pacman -S numlockx
  2. Paste the script:

    cd /usr/local/bin/
    sudo nano toggle_led.sh
    #!/bin/bash
    if xset q | grep -q "Scroll Lock: off"; then
        xset led named "Scroll Lock"
        numlockx on
    else
        xset -led named "Scroll Lock"
        numlockx on
    fi
  3. Bind Keyboard Shortcut:

    • Goto Keyboard

    • Add

      /usr/local/bin/toggle_led.sh
    • Press Scroll Lock

    • Keep the Startup Notification turned off.

  4. Log out & Relogin your session.

Now, pressing the Scroll Lock will turn on/off the keyboard light.

Extra Note: numlockx is required to keep the numpad working after executing

xset led

command. If you don't have numpad in your keyboard, you can skip the Step-1 and also remove the

numlockx on

lines from the script.

Offline

#8 2026-07-10 17:59:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: Scroll lock doesn't toggle keyboard backlights after upgrade

Using this opportunity to close this old thread


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB