Edit: Thanks to everyone that has been leaving comments at the end of the post, you guys rock. Also, I added at the end of the post how to get the back-lights to turn on while booting, thanks to Mik for posting it in the comments. The CM Storm Devastator (Price and details here [Click Here] ) is a very cheap keyboard and mouse gaming bundle ranging at $30 which includes back-lighting and other features that make it comparable to more pricey alternatives, but there is one problem, under Linux there are no drivers provided by Cooler Master or support built in the Linux kernel for the key back-light to work out of the box (The mouse back-light works properly, the problem is with the keyboard). In this tutorial, we are going to get the keyboard back-light working under Linux and we are also going to make them switch on when we login (Something that you can't do under Windows). Warning: Even if this tutorial was made under Linux Mint (Cinnamon), the core ideas are the same, you just need to apply it to your distribution of choice and it should work perfectly. Edit: Thank you all for the lovely feedback that you all have left in the comments, this post has been the post that I have been getting the most feedback about. Making the back-lights turn on/off with the keyboard While doing some research, I found, digging through forums that there are two different commands to get the keyboard back-lights to be able to switch on or off. In order for the back-lights to turn on the command that you need to use is: xset led 3 In order for the back-lights to turn off the command that you need to use is: xset -led 3 Now that we know this, we can even test this in the terminal if we want to, but it is supposed to work. Now, we need to make it so we can turn it on and off by only using the keyboard, which can be achieved by binding these commands to the keys. In order to do this, you need to open an app in your distribution called "Keyboard shortcuts" or "keybindings" or "keyboard" (For me, under Linux Mint Debian Edition it was under Settings > Keyboard > Keyboard Shortcuts, but for something like Ubuntu it might be different, if a lot of people are struggling applying this tutorial under Ubuntu or other distributions, I might make an updated version including those distributions). When we have the application open, we want to click on "Add custom shortcut", give a name to the shortcut (in my case i named it "Keyboard LED On"), and in the command field we want to add that command that will turn the back-lights on, which is "xset led 3". When we are done, we want to click the "Add" button and it will add the key-binding to the list, now we need to bind the physical key to it. Click the rectangle below where it says "Keyboard bindings" and when the text in it changes and shifts to the left, press the key in your keyboard labeled as "SCR LK". Now here is where we encounter a small problem, there is no way for us to be able to toggle between on and off using this type of key bindings, because the system thinks that each binding is supposed to perform only one action, in our case, the one that we did before will only turn on the keyboard when pressing the "SCR LK" key. In order to solve this problem, what I decided to do was to bite the bullet and bind the "xset -led 3" command to the "Pause" key which is next to the "SCR LK" key. Now, as before, we are going to click the "Add custom shortcut" button and give it a name, in my case I named it "Keyboard LED Off" and in the command field you need to add the command "xset -led 3" and then click "Add". Now, as we did before, we need to bind the key to the command itself, in my case I decided to use the "Pause" key. Now we are done, your keyboard back-lighting should be working. The good thing about this is that if we want to, we can change the key binding to any other that we would like to and not be forced to use the "SCR LK" or "Pause" keys, for instance you could make it use "INS" or any other key that we would like, as long as it does not conflict with any other system function. Turning on the back-lighting at Login Something cool that we can also is to make the keyboard back-lights to turn on automatically when we log into our session. To do this, we need to open an application called "Startup Applications", which allow us to configure the applications that start automatically when we log into our session, but we can also set commands to be executed when we log in as well. When you have the application open, click "Add", this will bring up a small window. In the name field, you can name it whatever you want to, in my case I didn't give a name to it at all. In the commands field you need to type the command that turns the keyboard back-light on which is "xset led 3". You can give a comment to it if you want, which is just a description of what it will do and then click "Save". Now we are done and the Devastator should turn on by default when we log in! If you enjoyed this post, please be sure to check out my other Linux related posts. If you have any questions, please leave them in the comments section or contact me directly, my contact information is in the "Contact tab". Turning the Back-Lights on while booting up (Ubuntu only) Thanks to Mik in the comments for posting this in the comments, I have seen that some people wanted to know how to do this, and I was researching how to do it, but gladly Mik posted it first saving me some research time.
Edit the following file with nano or any other text editor : /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf Example: sudo gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf add the line: greeter-setup-script= xset led 3 And it should work properly. Again, thanks to Mik for posting it in the comments, make sure to say thank you to him too.
36 Comments
Anonymous
8/19/2014 10:13:02 pm
Yo , it helped. Thanks a lot man. Great Documentation , and hey Linux Mint <3 very nice.
Reply
Eph
9/21/2014 12:24:48 pm
Thanks man!
Reply
Gottbiber
10/3/2014 10:35:17 pm
Thanks mate. The tutorial is really helpful.
Reply
paul lethbridge
4/7/2015 07:11:44 am
The keyboard works ever time. I turn the computer on the keyboard lits up. just what I need. Now I'm having mouse issues. it wont stay on a page but goes some-place else. I solved that by switching to a gearhead mouse The CM mouse will be gone soon.I have a policy if it don't work store it in the circular file. I don't have much room to spare
Reply
Stifro
10/15/2014 05:26:35 am
Great tutorial, thanks.
Reply
William Jaramillo
10/16/2014 07:08:30 pm
Thank you for the tutorial, tried it in Ubuntu and worked perfectly.
Reply
L
12/9/2014 04:10:43 pm
Great Job! Really needed this thanks
Reply
aca
12/13/2014 09:54:27 pm
Really nice and clear... thought I think would be easier to simplify giving in the first 5 lines the best answer, in this case is at the end.
Reply
konstantinos
12/19/2014 11:09:04 am
works fine on ubuntu!!!!!Great Job!
Reply
Omi
12/25/2014 03:04:06 pm
This site was referred to me by a friend and it solved the led light up problem for this particular keyboard on my xubuntu:) Thank you for this post...
Reply
Beau
12/26/2014 06:55:58 am
Thank you so much! You rock!
Reply
Darvath
1/1/2015 02:36:57 am
Thanks alot dude :)
Reply
Antony
1/10/2015 07:39:34 am
As if it lights up at boot! That's better than when I was running windows. Nice one for sharing.
Reply
mik
1/24/2015 01:12:46 pm
Hello people, dropping my 2 cents here: as for how to get the keyboard to light up BEFORE the login screen in ubuntu 14.04:
Reply
Justin
2/23/2015 07:39:33 am
This directory doesn't exist under Linux Mint 17.1 Cinnamon 64-bit.
Reply
Admin
2/23/2015 09:06:22 am
I believe it is because Linux mint does not use lightdm, I think they use gym or some other variant. In that case, it is harder to do, and I do not have a mint install to test it out...
Angel (The admin)
4/7/2015 10:01:00 am
It won't work on any other distro other than Ubuntu because it is only made to work on the lightdm unity greeter which Mint and other distros do not use.
kip
2/15/2015 05:35:04 am
thx man
Reply
Jean
2/22/2015 04:01:54 am
I'm sorry, but I just want to know if this is going to work for my Mac?
Reply
Admin
2/22/2015 06:30:35 am
I am not really sure, since I do not know if macs use the X.org server as their default display server. You could always try though, but chances are it won't work.
Reply
Bill
2/24/2015 03:17:45 am
Just bought a Devastator for my Raspberry Pi that uses Linux. Could your solution to the back light problem be modified for the Pi?
Reply
Angel (The Admin)
4/7/2015 09:56:48 am
Yes, it should work with the Pi, since it uses the x server too. However, be mindful that the raspberry pi is a very low powered device, so maybe the leds might end up drawing too much power from the pi itself, in some cases it might make it reboot or shutdown and corrupt the filesystem. Be sure you have a power supply of 2 amps or higher if you do this just to be sure.
Reply
michael
3/13/2015 12:39:40 pm
Is there a way to do this on KDE environment desktop?
Reply
Angel (The admin)
4/7/2015 09:59:25 am
Yes, it should work the same way. Nothing changes other than the part which says "Turning the Back-Lights on while booting up" because it was only tested on Ubuntu. KDE should have a keyboard shortcuts application, as well as a startup application, which you can use to follow the same procedure and get the lights working. I think I tried it before and it did worked.
Reply
Kirby
3/25/2015 04:41:27 pm
This doesn't seem to work on Zorin. the "xset led 3" command works in terminal, but I set the keyboard shortcut up the same way and nothing.
Reply
Angel (The admin)
4/7/2015 09:54:30 am
That is very odd, I have done this same thing on Ubuntu, Mint, Debian, Opensuse and Arch Linux and it works every time. It might be some flaw in the keyboard shortcuts app provided by Zorin.
Reply
paul lethbridge
4/7/2015 08:16:29 am
don't use the short-cuts try using the start up application
Reply
4/7/2015 09:52:31 am
Well the thing is that at some point you might want to turn the leds on or off, that's where the shortcuts come in handy. Having them as startup is good so you don't have to turn them on when you login.
Reply
Redeby
5/10/2015 06:24:16 am
Thanks for the tips!, This helped me get the light working with my Arch Linux system :-)
Reply
Admin
5/10/2015 03:53:54 pm
Thank you my friend. It is good to see another Arch user around. I will try it right away, for before the login screen it becomes really hard to type your password if you can't see the keyboard. Again, may the Gnu/Linux gods bless your soul.
Paramvir Phagura
5/29/2015 05:30:50 pm
Very helpful tutorial, exactly what I was looking for. Thank you!
Reply
Mark D
6/17/2015 04:29:28 pm
Thanks a million!
Reply
newlinuxuser
6/25/2015 08:28:59 am
Danke dir, das war sehr hilfreich!!!!!!
Reply
chris80502
9/10/2015 12:51:51 pm
Just what I needed, thanks!!
Reply
Leave a Reply. |
Angel MercedesElectrical Engineering student and lover of all things Open Source, 3D Printing, Electronics and Linux. Categories
All
Archives
May 2017
|