{"id":3055,"date":"2026-11-06T15:36:15","date_gmt":"2026-11-06T20:36:15","guid":{"rendered":"https:\/\/wordpress.forensicpath.us\/?p=3055"},"modified":"2026-11-06T15:36:15","modified_gmt":"2026-11-06T20:36:15","slug":"keyboard-backlights-for-kubuntu-on-a-msi-stealth-18-hx-ai-a2xw","status":"publish","type":"post","link":"https:\/\/wordpress.forensicpath.us\/index.php\/2026\/11\/06\/keyboard-backlights-for-kubuntu-on-a-msi-stealth-18-hx-ai-a2xw\/","title":{"rendered":"Keyboard backlights for Kubuntu on a MSI Stealth 18 HX AI A2XW"},"content":{"rendered":"<p>I recently got a refurbished MSI Stealth 18 so I could do a little more intensive AI stuff with the NVIDIA 5090 card.\u00a0 Setup with Kubuntu for dual boot with Windows 11 was pretty easy (though I&#8217;ll post about that next), but there was one little problem &#8212; the keyboard backlights didn&#8217;t work.<\/p>\n<p>This laptop uses the Steele Series keyboard controllers and allows assigning colors on a per-key basis.\u00a0 However, the current installation does not have anything about backlights in \/sys\/class\/leds\/.\u00a0 Sigh.\u00a0 So, F8 (the normal keyboard backlight key) doesn&#8217;t work.<\/p>\n<p>The backlights exist at :<\/p>\n<p>$ lsusb | grep -iE &#8216;steelseries|1038&#8217;<br \/>\nls \/sys\/class\/leds\/<br \/>\nBus 003 Device 002: ID 1038:1122 SteelSeries ApS SteelSeries KLC<br \/>\nBus 003 Device 005: ID 1038:1165 SteelSeries ApS SteelSeries ALC<br \/>\nenp131s0-0::lan enp131s0-2::lan input3::capslock input3::scrolllock<br \/>\nenp131s0-1::lan enp131s0-3::lan input3::numlock phy0-led<\/p>\n<p>Which tells us:<\/p>\n<p>Device\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 USB ID\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Function<br \/>\nSteelSeries KLC 1038:1122\u00a0 \u00a0 \u00a0 \u00a0Keyboard RGB lighting<br \/>\nSteelSeries ALC 1038:1165\u00a0 \u00a0 \u00a0 \u00a0Auxiliary RGB lighting controller<\/p>\n<p>But I can&#8217;t talk to it directly.<\/p>\n<p>The default go-to for this is <a href=\"https:\/\/openrgb.org\/index.html\">OpenRGB<\/a> .\u00a0 \u00a0They have a nice app for this.\u00a0 However, this particular MSI box is not supported.\u00a0 I downloaded it and installed, but it couldn&#8217;t find a device.<\/p>\n<p>The next fallback is msi-<a href=\"https:\/\/github.com\/Askannz\/msi-perkeyrgb\">perkeyrgb\u00a0 <\/a>This *does* work.<\/p>\n<p>I had to install the dependencies:<\/p>\n<p>$ sudo apt install git python3-venv libhidapi-hidraw0<\/p>\n<p>Then install:<\/p>\n<p>$ mkdir -p ~\/src<br \/>\n$ git clone https:\/\/github.com\/Askannz\/msi-perkeyrgb.git ~\/src\/msi-perkeyrgb<\/p>\n<p>$ python3 -m venv ~\/src\/msi-perkeyrgb\/.venv<\/p>\n<p>$ ~\/src\/msi-perkeyrgb\/.venv\/bin\/pip install ~\/src\/msi-perkeyrgb<\/p>\n<p>My model was not listed under supported models : &#8220;~\/src\/msi-perkeyrgb\/.venv\/bin\/msi-perkeyrgb &#8211;list-models&#8221;\u00a0 so I chose GE75 at random.<\/p>\n<p>It worked first time out.<\/p>\n<p>So, I created a little bash script:<\/p>\n<p>#!\/bin\/bash<\/p>\n<p>sudo ~\/src\/msi-perkeyrgb\/.venv\/bin\/msi-perkeyrgb \\<br \/>\n&#8211;id 1038:1122 \\<br \/>\n&#8211;model GE75 \\<br \/>\n&#8211;steady ffffff<\/p>\n<p>And that worked fine.<\/p>\n<p>Now, I need to get rid of the need for using sudo:<\/p>\n<p>$ sudo tee \/etc\/udev\/rules.d\/70-msi-keyboard-rgb.rules &gt; \/dev\/null &lt;&lt;&#8216;EOF&#8217;<br \/>\nSUBSYSTEM==&#8221;hidraw&#8221;, KERNEL==&#8221;hidraw*&#8221;, ATTRS{idVendor}==&#8221;1038&#8243;, ATTRS{idProduct}==&#8221;1122&#8243;, TAG+=&#8221;uaccess&#8221;<br \/>\nEOF<\/p>\n<p>and reload the rules:<\/p>\n<p>$ sudo udevadm control &#8211;reload-rules<br \/>\n$ sudo udevadm trigger &#8211;subsystem-match=hidraw<\/p>\n<p>So now the script doesn&#8217;t need sudo:<\/p>\n<p>~\/src\/msi-perkeyrgb\/.venv\/bin\/msi-perkeyrgb \\<br \/>\n&#8211;id 1038:1122 \\<br \/>\n&#8211;model GE75 \\<br \/>\n&#8211;steady 00ff00<\/p>\n<p>Now that that&#8217;s working, I can add it to the KDE menu.<\/p>\n<p>Install kdialog if necessary:<\/p>\n<p>$ sudo apt install kdialog<\/p>\n<p>Make a directory for my utilities:<\/p>\n<p>$ mkdir -p ~\/.local\/bin<\/p>\n<p>Now a script that will bring up a color picker and get the numbers:<\/p>\n<p>cat &gt; ~\/.local\/bin\/keyboard-rgb &lt;&lt;&#8216;EOF&#8217;<br \/>\n#!\/usr\/bin\/env bash<\/p>\n<p>RGB=&#8221;$HOME\/src\/msi-perkeyrgb\/.venv\/bin\/msi-perkeyrgb&#8221;<\/p>\n<p>if [[ ! -x &#8220;$RGB&#8221; ]]; then<br \/>\nkdialog &#8211;error &#8220;Cannot find msi-perkeyrgb at $RGB&#8221;<br \/>\nexit 1<br \/>\nfi<\/p>\n<p># Open KDE&#8217;s graphical color selector<br \/>\ncolor=$(kdialog &#8211;title &#8220;Keyboard RGB&#8221; &#8211;getcolor) || exit 0<\/p>\n<p># Remove leading # from HTML-style color<br \/>\ncolor=&#8221;${color#\\#}&#8221;<\/p>\n<p># Validate hexadecimal RGB color<br \/>\nif [[ ! &#8220;$color&#8221; =~ ^[[:xdigit:]]{6}$ ]]; then<br \/>\nkdialog &#8211;error &#8220;Invalid RGB color: $color&#8221;<br \/>\nexit 1<br \/>\nfi<\/p>\n<p># Apply color to MSI keyboard<br \/>\nif ! output=$(&#8220;$RGB&#8221; &#8211;id 1038:1122 \\<br \/>\n&#8211;model GE75 \\<br \/>\n&#8211;steady &#8220;$color&#8221; 2&gt;&amp;1); then<br \/>\nkdialog &#8211;error &#8220;Unable to set keyboard color: $output&#8221;<br \/>\nexit 1<br \/>\nfi<br \/>\nEOF<\/p>\n<p>chmod +x ~\/.local\/bin\/keyboard-rgb<\/p>\n<p>Now I\u00a0 can create a Laucher entry so I can choose it from the menu or panel:<\/p>\n<p>mkdir -p ~\/.local\/share\/applications<\/p>\n<p>cat &gt; ~\/.local\/share\/applications\/keyboard-rgb.desktop &lt;&lt;EOF<br \/>\n[Desktop Entry]<br \/>\nType=Application<br \/>\nName=Keyboard RGB<br \/>\nComment=Set MSI SteelSeries keyboard backlight color<br \/>\nExec=$HOME\/.local\/bin\/keyboard-rgb<br \/>\nIcon=input-keyboard<br \/>\nTerminal=false<br \/>\nCategories=Settings;Utility;<br \/>\nEOF<\/p>\n<p>And, finally, add a keyboard shortcut.<\/p>\n<p>Note: the standard<\/p>\n<p>System Settings \u2192 Keyboard \u2192 Shortcuts\u00a0 method *does not work* for me in Plasma 6.6.6.\u00a0 I get the error &#8220;&#8221;Error while communicating with the global shortcuts service.&#8221;.\u00a0 Instead, I had to do it using the KDE Menu Editor.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently got a refurbished MSI Stealth 18 so I could do a little more intensive AI stuff with the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155],"tags":[],"class_list":["post-3055","post","type-post","status-publish","format-standard","hentry","category-computer-stuff"],"_links":{"self":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/3055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/comments?post=3055"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/3055\/revisions"}],"predecessor-version":[{"id":3056,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/3055\/revisions\/3056"}],"wp:attachment":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/media?parent=3055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/categories?post=3055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/tags?post=3055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}