Hi there. I just installed Kubuntu 25.04 running KDE Plasma 6.3.4
Here is my problem:
I have weak eyesight and cannot easily see the letters on my keyboard keys unless the keyboard backlight is turned on.
My keyboard backlight circuit is wired to the scroll lock indicator LED, so to turn on the keyboard backlight in DOS or Windows, I press Scroll Lock. I can find this key by feeling its position - top row, second key from the right, so when using Windows, I can easily turn on the backlight by just pressing one key on the keyboard. It just works.
Although Linus Torvalds wrote the Linux Kernel initially for the 80386 CPU, a CPU most commonly found in IBM-compatible PCs, which use IBM-compatible PC keyboards with a Scroll Lock key and indicator LED, for some reason Linux does not support the Scroll Lock LED on IBM-compatible PC keyboards by default. Thus, after installing any Linux distro, I have great difficulty seeing the keys on the keyboard in order to type the password to log into it as I cannot turn on the Scroll Lock LED and thus the keyboard backlight, by pressing the Scroll Lock key.
In Desktop Environments using the Xorg / X11 display software, there is a command,
, that will turn on the Scroll Lock LED and the keyboard backlight, and they will stay on until I use
to turn them off. This command does not need sudo to run. I can thus write a shell script to run it, and bind it to a hotkey, and I can add it to the display manager setup script so that it runs at the login screen, switching on the backlight so that I can see the keys to type the password to log in. It is a much more clunky and difficult thing to do than just pressing the Scroll Lock button under Windows, but at least there is a workaround for Linux not supporting Scoll Lock.
In KDE Plasma when using Wayland (I have not tried Wayland on other DEs), I cannot find any reliable method to do the same thing. I can run KDE Plasma with an X11 session instead of Wayland, but I read that Ubuntu is dropping support for X11 in new versions so that may not be possible in future.
What I have tried so far:
I have tried installing brightnessctl and using it to set the brightness of the Scroll Lock LED to maximum (1). This requires sudo, so I have to type the password without being able to see the keys, and the LEDs only stay on until I have to press Num Lock or Caps Lock, whereupon the Scroll Lock light and keyboard backlight turn off. Furthermore, the SDDM display manager will not run setup scripts as root when running in Wayland, so I cannot get it to turn on the LED at the login screen.
The same problem applies to
as the brightnessctl method is basically doing the same thing. It requires sudo to run, so I have to type the password without being able to see the keys, and SDDM will not run it at the login screen.
Does anyone know a way to reliably turn on the Scroll Lock LED when using KDE Plasma under Wayland that does not require root privileges, and that keeps the LED on even if I press Caps Lock or Num Lock?
Thanks in advance.
Beng
PS: For those who find this page in a search engine and want to know how to turn on the keyboard backlight at the login screen when using the SDDM display manager (usually comes with distros using KDE or LXQT), when using X11 and NOT Wayland:
Open a terminal window and type: whereis sddm
Search through the directories it reports until you find the one that contains the script that is run at the login screen. In Kubuntu it is:
/usr/share/sddm/scripts/
The script is Xsetup
Edit Xsetup and below the line saying '# Xsetup - run as root before the login dialog appears', add the following line:
Save the file.
- The version/release of Kubuntu you are using. - 25.04
- Whether Kubuntu is actually installed, or is running "live" from a bootable USB Flash Drive or LiveCD. - installed bare metal
- If Kubuntu is installed, is it the only OS on the PC, or is it installed alongside another OS (Windows or ...) or is it installed in a VM (Virtual Machine)? - running on bare metal alongside Windows 10, Debian 12, Mint 22.1, Tuxedo OS, MX Linux
- The version of KDE Plasma installed. - 6.3.4
- Open a konsole and type: inxi -F --xxx
Code:
beng@aorus:~$ apt list inxi inxi/plucky,plucky,now 3.3.37-1-2 all [installed,automatic] beng@aorus:~$ inxi -F --xxx Error 22: Unsupported option: --xxx Check -h for correct useage.
Here is my problem:
I have weak eyesight and cannot easily see the letters on my keyboard keys unless the keyboard backlight is turned on.
My keyboard backlight circuit is wired to the scroll lock indicator LED, so to turn on the keyboard backlight in DOS or Windows, I press Scroll Lock. I can find this key by feeling its position - top row, second key from the right, so when using Windows, I can easily turn on the backlight by just pressing one key on the keyboard. It just works.
Although Linus Torvalds wrote the Linux Kernel initially for the 80386 CPU, a CPU most commonly found in IBM-compatible PCs, which use IBM-compatible PC keyboards with a Scroll Lock key and indicator LED, for some reason Linux does not support the Scroll Lock LED on IBM-compatible PC keyboards by default. Thus, after installing any Linux distro, I have great difficulty seeing the keys on the keyboard in order to type the password to log into it as I cannot turn on the Scroll Lock LED and thus the keyboard backlight, by pressing the Scroll Lock key.
In Desktop Environments using the Xorg / X11 display software, there is a command,
Code:
xset led on
Code:
xset led off
In KDE Plasma when using Wayland (I have not tried Wayland on other DEs), I cannot find any reliable method to do the same thing. I can run KDE Plasma with an X11 session instead of Wayland, but I read that Ubuntu is dropping support for X11 in new versions so that may not be possible in future.
What I have tried so far:
I have tried installing brightnessctl and using it to set the brightness of the Scroll Lock LED to maximum (1). This requires sudo, so I have to type the password without being able to see the keys, and the LEDs only stay on until I have to press Num Lock or Caps Lock, whereupon the Scroll Lock light and keyboard backlight turn off. Furthermore, the SDDM display manager will not run setup scripts as root when running in Wayland, so I cannot get it to turn on the LED at the login screen.
The same problem applies to
Code:
echo 1 > /sys/class/leds/input3::scrolllock/brightness
Does anyone know a way to reliably turn on the Scroll Lock LED when using KDE Plasma under Wayland that does not require root privileges, and that keeps the LED on even if I press Caps Lock or Num Lock?
Thanks in advance.
Beng
PS: For those who find this page in a search engine and want to know how to turn on the keyboard backlight at the login screen when using the SDDM display manager (usually comes with distros using KDE or LXQT), when using X11 and NOT Wayland:
Open a terminal window and type: whereis sddm
Search through the directories it reports until you find the one that contains the script that is run at the login screen. In Kubuntu it is:
/usr/share/sddm/scripts/
The script is Xsetup
Edit Xsetup and below the line saying '# Xsetup - run as root before the login dialog appears', add the following line:
Code:
# Keyboard backlight /usr/bin/xset led on