Celeb Glow
news | March 26, 2026

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.sh

I hope someone can help to improve, I know it's not a good answer, but it works

1

I was breaking my head trying to solve this one, this is what I did:

sudo su
echo 3 > /sys/class/leds/input5::scrolllock/brightness

I 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
fi

Still 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 3

thats it

That's what it work for me, sorry if for you don't

1

Check for empty map: (Most likely map3)

xmodmap -pm

In terminal type:

xmodmap -e "add mod3 = Scroll_Lock"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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