msi-perkeyrgb icon indicating copy to clipboard operation
msi-perkeyrgb copied to clipboard

I can't get the keyboard backlight to work on my MSI GS76

Open OuttaBody opened this issue 2 years ago • 2 comments

Hi folks,

I'm running Manjaro Linux (KDE Plasma Version: 5.24.5, Kernel Version: 5.18.0-1-rt11-MANJARO 64-bit) on MSI GS76 laptop. I've been trying to get the keyboard backlight to work on my laptop. And I keep getting the message below when I run msi-perkeyrgb -s ff0000, and don’t know how to resolve the issue in the message below. Any help would be greatly appreciated.

No laptop model specified, using GE63 as default. No MSI keyboards with a known product/vendor IDs were found. However, if you think your keyboard should work with this program, you can try overriding the ID by adding the option “–id VENDOR_ID:PRODUCT_ID”. In that case you will also need to give yourself proper read/write permissions to the corresponding /dev/hidraw* device.

When I run sudo pacman -S --needed python-setuptools hidapi, it looks like everything needed (dependencies) are installed and updated as I get the message below.

warning: python-setuptools-1:60.6.0-1 is up to date – skipping warning: hidapi-0.12.0-1 is up to date – skipping there is nothing to do

I also installed MSIKLM. When I run sudo msiklm list , I get the information below, which I think it is the information, pertaining to the keyboard of my laptop.

Device: SteelSeries KLC Device Vendor ID: 4152 Device Product ID: 4410 Device Serial Number: (null) Device Manufacturer: SteelSeries Device Path: 3-12:1.0 Device Interface Number: 0 Device Release Number: 258

Device: SteelSeries KLC Device Vendor ID: 4152 Device Product ID: 4410 Device Serial Number: (null) Device Manufacturer: SteelSeries Device Path: 3-12:1.1 Device Interface Number: 1 Device Release Number: 258

Thank you!

OuttaBody avatar Jun 17 '22 11:06 OuttaBody

I'm having the same problem

jorgee@jorgee-GS76-Stealth-11UG:~/Applications/msi-perkeyrgb$ ls -la /dev/hidraw*
crw-rw---- 1 root jorgee 240, 0 jul  9 18:05 /dev/hidraw0
crw-rw---- 1 root jorgee 240, 1 jul  9 18:04 /dev/hidraw1
crw-rw---- 1 root jorgee 240, 2 jul  9 18:04 /dev/hidraw2
jorgee@jorgee-GS76-Stealth-11UG:~/Applications/msi-perkeyrgb$ msi-perkeyrgb --model GS75 --id 4152:4410
No USB device with ID 4152:4410 found.

JorgeSivil avatar Jul 09 '22 21:07 JorgeSivil

sudo msi-perkeyrgb --model GS75 --id 1038:113a -s ff0000 works on a Stealth GS77 after having followed the install instructions.

pecastro avatar Jul 09 '22 22:07 pecastro

Maybe a bit late but I just came across this issue. I also own a MSI GS76 and installed Linux a couple days ago. I was missing the backlight so much that i decided to investigate. After several hours of looking for a solution I came across with the key for my case:

  1. Find your device identifier under /sys/bus/usb/drivers/usb/. In my case i run mesg -T | grep -i usb and found that the steelseries keyboard had the identifier 3-12.

  2. Once you have the identifier get superuser privileges and run this command (change with your identifier):

sudo su
echo '3-12' |sudo tee /sys/bus/usb/drivers/usb/unbind

By doing this i was able to see the keyboard lights on again, which was nice but i could not change the blinking mode. Playing a little more, in the same superuser terminal i accidentally did:

echo '3-12' |sudo tee /sys/bus/usb/drivers/usb/unbind

Then i could execute this command without any problems and change the blinking mode:

sudo msi-perkeyrgb --model GS75 --id 1038:113a -p aqua

All the commands also work well now. Don't forget to create a script or something to run at boot. Otherwise you'll have to do it manually

ulrickpsp avatar Jun 16 '23 00:06 ulrickpsp

Thank you ulrickpsp for responding to my post. I appreciate it. When I typed the 3 lines below in terminal, the keyboard backlight finally worked! I could not believe my eyes. Wow! You truly made my day. Thank you so much.

I used the value, "ffffff" below for the aqua color.

sudo msi-perkeyrgb --model GS75 --id 1038:113a -s ffffff sudo su echo '3-12' |sudo tee /sys/bus/usb/drivers/usb/unbind

I have 2 questions. First question: How can I create a script file and insert the commands above? Second question: How can I run the script (I created) at boot-up.

Thank you so much for your help, ulrickpsp.

OuttaBody avatar Jun 16 '23 20:06 OuttaBody

Glad it helped!

Once you've set the desired color it would persist if the kernel did not override your settings. So, if you did:

sudo msi-perkeyrgb --model GS75 --id 1038:113a -s ffffff

then, the aqua settings will persist and there's no need of repeating the command each time, so you need only this script:

#!/bin/bash
echo '3-12' |sudo tee /sys/bus/usb/drivers/usb/unbind

STEPS:

  1. Open a terminal and execute the following commands to create the script in your favourite directory and give it execution permissions:
cd <your_target_directory>
sudo nano activate_leds.sh
  1. Paste the script i gave you above and hit control + O and control + X to save and exit. Then give the script execution permissions
sudo chmod 775 activate_leds.sh
  1. Add the script to cron so that it gets executed at each boot:
$ crontab -e

Add this content to the opened file @reboot <your_target_directory>/activate_leds.sh

Don't forget to replace <your_target_directory> with your real directory. i.e. /home/outtabody/boot_scripts

Good luck.

ulrickpsp avatar Jun 16 '23 20:06 ulrickpsp

Hi ulrickpsp. I'm sorry to bother your again.

When entering the line in crontab, I had a problem. Crontab is not like "nano". crontab looks like a different environment. Having said that, crontab doesn't let me paste properly. When i pasted, it only pasted half of what i wanted to paste. Then, I tried to type, but it didn't let me type. Can you tell me please 1) how I can type a line in crontab and 2) save it? Thank you so much for your help.

OuttaBody avatar Jun 16 '23 22:06 OuttaBody

I guess that's more a linux related issue. Have a look at this link and try one of the proposed solutions:

https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup

ulrickpsp avatar Jun 17 '23 09:06 ulrickpsp

I just edited my comment. With the live Manjaro cd, I fixed the problem I ran into. I had to boot up with the live Manjaro cd and delete the script file, in which I noticed that I made a mistake which caused the problem that I experienced with the screen.

I also solved the problem with "crontab". Crontab was using vi editor. I looked up some tutorial on how to use vi editor and I was able to enter the line below in crontab and saved it.

@reboot /home/zolat/activate_leds.sh

When I restart Manjaro, the keyboard backlight doesn't turn on at boot-up. I don't understand why!?! When I run the script (activate_leds.sh) in terminal, it works fine. The keyboard backlight turn on. Any idea?

OuttaBody avatar Jun 17 '23 10:06 OuttaBody

Actually I can't tell what's going on your machine as I'm not running Manjaro but Zorin OS. I would double check the path of the script and the cron command to check everything is fine.

If it is.. Let's try another approach. Leave the system OK by reverting the cron steps and then create a systemd service

https://www.golinuxcloud.com/run-script-at-startup-boot-without-cron-linux/

ulrickpsp avatar Jun 17 '23 12:06 ulrickpsp

Hi ulrickpsp! I just wanted to report back to you to let you know that everything works fine with my MSI GS76 laptop. The keyboard backlight works perfectly fine with Manjaro now. And I was able to run the script automatically at boot-up, using the systemd service. I think Crontab didn't work for me, probably because the "@reboot" function is not available with some versions of Crontab.

Drum roll please! :-) If it weren't for your help, my laptop keyboard would be in pitiful "darkness" :-) and I would have never gotten my keyboard backlight to work! I give you all the credit! Thanks again!

As a side note, I used Zorin and many other Linux distros in the past. When I tried Manjaro, I loved it and never looked back. It is very "rich" and customizable. For some reason, Zorin appeared to me a bit "plain". I highly recommend Manjaro.

OuttaBody avatar Jun 18 '23 11:06 OuttaBody

Glad I could help.

Enjoy your fully working Gs76! Best laptop I've ever owned.

ulrickpsp avatar Jun 18 '23 11:06 ulrickpsp

Absolutely agree with you on that! It's blazing fast. My GS76 came with Windows 10. I turned my laptop into a dual boot system and installed Manjaro. I pretty much no longer use Windows "for obvious reasons". Manjaro boots up to desktop environment in 15 seconds. Windows boots up to desktop in 35 seconds.

OuttaBody avatar Jun 18 '23 12:06 OuttaBody