You are not logged in.
Pages: 1
Topic closed
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: FalseI'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
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
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
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
My compositor is Mutter.
I am using both br and us layouts, with grp_led:scroll.
Offline
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
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.
Install numlockx:
Ubuntu / Debian / Mint:
sudo apt install numlockxFedora / RHEL:
sudo dnf install numlockxArch / Manjaro:
sudo pacman -S numlockxPaste 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
fiBind Keyboard Shortcut:
Goto Keyboard
Add
/usr/local/bin/toggle_led.shPress Scroll Lock
Keep the Startup Notification turned off.
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 ledcommand. If you don't have numpad in your keyboard, you can skip the Step-1 and also remove the
numlockx onlines from the script.
Offline
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
Pages: 1
Topic closed