Page 1 of 1

[SOLVED]Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 09:56
by fredk
Keyboard backlight not working in Mageia 9
===============================================
New keyboard in use which has a backlight with all keys.
The backlight can be turned on or off with the 'scroll Lock key, but turns on automatically when starting Windows.
However with Mageia when starting the PC., I can turn on the backlighting, but as soon as Mageia gets started it turns automatically off and I can't turn it on thereafter.

Is such use of keyboad/key backlighting supported in Mageia, and if so, how to possibly/potentially activate it..?

The keyboard type is SBK-251U-BK from Smartbuy.

Thanks in advance,

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 15:29
by microchip
Which desktop environment? If KDE, it can be set to turn it on after login. No idea how you do that during boot process

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 16:06
by doktor5000
Hi there, can you check if it exposes any brightness setting?
Please also post the product/vendor IDs.
Code: Select all
brightnessctl -l
lsusb

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 17:50
by fredk
microchip wrote:Which desktop environment? If KDE, it can be set to turn it on after login. No idea how you do that during boot process

The environment is Plasma....

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 17:54
by fredk
doktor5000 wrote:Hi there, can you check if it exposes any brightness setting?
Please also post the product/vendor IDs.
Code: Select all
brightnessctl -l
lsusb


The product/vendor IDs = The keyboard type is SBK-251U-BK from Smartbuy (vendor)

will post the requested code output a bit later...

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 18:05
by fredk
Output as follows:
Code: Select all
fred@localhost ~]$ su
Password:
[root@localhost fred]#
[root@localhost fred]# brightnessctl -l
lsusb
bash: brightnessctl: command not found
Bus 004 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 0461:4d0f Primax Electronics, Ltd HP Optical Mouse
Bus 002 Device 003: ID 2a7a:9597  CASUE USB KB
Bus 002 Device 002: ID 0557:7000 ATEN International Co., Ltd Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[root@localhost fred]#

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 18:16
by fredk
As to the keyboard - bought it cheap here in Russia in a supermarket as I needed a keyboard with Russian caracters.
Smartbuy seems some megastore when searching on line - and eventhough shown as the vendor,
it will be not the original manufacturer - nut no clue as no indications to produces the keyboard...

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 18:31
by doktor5000
fredk wrote:The product/vendor IDs = The keyboard type is SBK-251U-BK from Smartbuy (vendor)

Nope, those are the vendor/product IDs, from the lsusb output
2a7a:9597


Didn't find anything about your particular keyboard, but there are some solutions for keyboards where scroll lock is used to turn on backlights:
https://unix.stackexchange.com/question ... y-keyboard

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 19:10
by fredk
Thanks - have looked at the link and scripts, but slightly confused now...
This keyboard indeed uses the scrollkey for on or of setting of the background leds - clicking it once is either on or off.
Are these scripts meant as final solution..ie. hit scrollkey is either backlit leds out or on - or a solution per session..?
In case of a ''permanent'' solution what to copy/paste where..?

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 4th, '24, 23:39
by doktor5000
fredk wrote:Are these scripts meant as final solution..ie. hit scrollkey is either backlit leds out or on - or a solution per session..?

They mostly add a toggle for scroll lock key per session.

Although this enables it on every boot: https://unix.stackexchange.com/a/337299/83329

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 9th, '24, 14:53
by fredk
Sorry for not coming back earlier - got caught in vaious issues...
Have tried the several scripts, but what only seems to work are the following command lines:
set led named "Scroll Lock" // xset -led named "Scroll Lock" - when typed into the command window (note: the scrolllock buttion itself does nothing)
So I can either use the manual solution as per above - ot automate it in for example a keyboard short cut using key combinations...
Concerning the last option any ideas how to do this easely without going to deep into the OS structure..?
Thanks

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 9th, '24, 17:54
by doktor5000
After defining the shortcut to some button you can use something like xdotool to simulate that button press. See e.g. https://superuser.com/a/585415/365864

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 11th, '24, 15:58
by fredk
Thanks downloaded and installed:[fred@localhost ~]$ xdotool --version = xdotool version 3.20211022.1

Now trying to understand how to use it as there's no direct explanation I could find on adding a command string to a keyboard short cut I would like to impement, like:

xdotool key ctrl+l for using xset led named "Scroll Lock" (backlit on)
and
xdotool key ctrl+o for using xset -led named "Scroll Lock" (backlit off)

Any sugestion on how the correct command using xdotool should look like.?

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 11th, '24, 17:47
by doktor5000
xdotool is used for sending button presses, not for defining keyboard shortcuts or rebinding keys.
Also the link above directly links to the man page for xdotool which basically explains everything there is about xdotool: https://manpages.ubuntu.com/manpages/tr ... ool.1.html

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 19th, '24, 19:23
by fredk
Finally some feedback from my side:
FYI. the several suggested solutions didn't work...
But was able to use the 2 scripts as mentioned earlier through Magaia's built-in solution to create keyboard-customized shortcuts,
and assign a key combination for respectivy backlit on or off.
So for now case closed and thanks for the provided sugions.

Re: Keyboard backlight not working in Mageia 9

PostPosted: Oct 19th, '24, 19:53
by doktor5000
Please don't forget to mark the thread as solved, by editing the subject of the first post and prefix it with [SOLVED], thanks in advance.