7

I have been using Ubuntu since 16.04, with the CM Storm keyboard. When using this keyboard on Windows, pressing the Scroll Lock key enables/disables the backlight.

Previously on Ubuntu, the commands xset led (on) and xset -led (off) have worked to set the backlight. This is pretty important because the key labels are very hard to read without the backlight enabled.

Now that Ubuntu has switched from X to Wayland by default with 17.10, xset no longer works. While I can make it work by selecting an Xorg session on login, I'd like to use the default and what will be the future of Ubuntu, Wayland.

What I'm looking for are some terminal commands that accomplish the same function as xset led and xset -led.

  • 2
    As you know Wayland is not X , so many x functions / programs do not work. xrandr for example. You need to file a bug report / feature request with wayland. You can fall back to x (log into gnome with an X session). – Panther Oct 22 '17 at 3:45
  • FYI I would like to mention that xrandr works fine on my machine. $ xrandr "Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192 XWAYLAND0 connected 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1440x900 59.89*+" – Rolf Oct 23 '17 at 13:38
  • @Rolf does "works fine" mean you can switch to a different resolution, add new video modes, set up panning, DPI etc.? – Ruslan Nov 11 '17 at 10:37
  • @Ruslan It seems only the commands that query some state do work. You are right. – Rolf Nov 11 '17 at 16:32
  • Related: ask.fedoraproject.org/en/question/97720/… and reddit.com/r/linux_gaming/comments/51mdum/… – maybe try the xinput method mentioned in the latter? – dessert Nov 20 '17 at 20:36
0

I also struggled with this and finally came up with a solution:

https://gist.github.com/ps1dr3x/b15c62eafb388ddf8bb7d3896d1a1cee

Basically you can turn on/off the keyboard backlight by changing the brightness value in /sys/class/leds/input/brightness

e.g.

sudo sh -c 'echo 1 > /sys/class/leds/input0::scrolllock/brightness'

P.s. input might be different

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.