Can't turn on backlight for Cooler Master Devastator II Keyboard on Ubuntu 18.04?
I have followed this link .
I used this command sudo xmodmap -e 'add mod3 = Scroll_Lock'
but it's showing me following msg xmodmap: unable to open display 'desktop:0'.
when I use xset led 3. it's not turning on backlit.
Can anyone tell me what's going on ?
4 Answers
I created a script "keyboardLedOn.sh" with:
#! /bin/sh
xset -led 2 led on
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable true
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable false Then in the end of my .profile file (~/.profile) put:
/path/to/script/keyboardLedOn.shI hope someone can help to improve, I know it's not a good answer, but it works
1I was breaking my head trying to solve this one, this is what I did:
sudo su
echo 3 > /sys/class/leds/input5::scrolllock/brightnessI created an script that toggles the on and off as a sudoer:
#!/bin/sh
TOGGLE=$HOME/.toggle
if [ ! -e $TOGGLE ]; then touch $TOGGLE echo 3 > /sys/class/leds/input5::scrolllock/brightness
else rm $TOGGLE echo 0 > /sys/class/leds/input5::scrolllock/brightness
fiStill no luck trying to bind it to the scroll lock key...
I don't know if you still looking for an answer but at lest in ubuntu 20.04 only put on terminal
xset led 3thats it
That's what it work for me, sorry if for you don't
1Check for empty map: (Most likely map3)
xmodmap -pmIn terminal type:
xmodmap -e "add mod3 = Scroll_Lock"