This post is in reference to my previous post about automatically running a script at boot-up. The previous post is here.
With dmt’s help, I was able to create a systemd service to run a script at boot-up to turn on the keyboard backlight on my laptop.
The systemd service works 100% of the time to successfully execute the script file. There is no problem there.
The script file runs this configuration tool called “msi-perkeyrgb
” with the parameters below to turn on the keyboard backlight. “--model”
and “--id”
below include a specific information particular to my laptop.
msi-perkeyrgb --model GS75 --id 1038:113a -s f22c46
and the following command below turns on the keyboard backlight.
echo ‘3-12’ > /sys/bus/usb/drivers/usb/unbind
90% of the time, it works and keyboard backlight lights up at boot-up. But 1 out of 10 boot-ups, the keyboard backlight does not light up, most probably, due to a problem with the configuration tool, “msi-perkeyrgb
”. Who knows!?! When that happens, I reset the “bind” state running the command below.
sudo su
echo '3-12' > /sys/bus/usb/drivers/usb/bind
and then “unbind” again as shown below to manually turn on the keyboard backlight .
echo ‘3-12’ > /sys/bus/usb/drivers/usb/unbind
Here is my question; since 1 of out 10 boot-ups, I run into this problem that the keyboard backlight doesn’t light up. Is there a way to automatically run the commands below right after “login” (after Manjaro boots up to desktop environment)?
sudo su
echo ‘3-12’ > /sys/bus/usb/drivers/usb/bind
echo ‘3-12’ > /sys/bus/usb/drivers/usb/unbind
Under “Startup and Shutdown”, there is an option to add applications to auto-start them. And “Autostart” works with applications, but even though there is an option to add a “Login Script” to “Autostart”, the login script does not work. Any help, solution or workaround is greatly appreciated. Thank you.