skip nav

blog

Open RGB

I recently got a computer which came with some case LEDs. By default, they do a rainbow crawl which I find a bit tacky. (Ignore that my own product defaults to this. Truly; none of us are free of sin.) Since I'm running KDE Neon (an Ubuntu-based distribution), I can't use the software the manufacturers provide as it won't run. So, to change the colour to a more reasonable deep orange glow, I used OpenRGB. However, on my computer, this configuration is not persistent across reboots or suspends. My lights revert to the default rainbow crawl when I boot or sleep.

To fix this, I've set up Systemd with some assistance from Perplexity. This is how I've done it:

  1. Install OpenRGB from Thomas Pietrowski's PPA.

    sudo add-apt-repository ppa:thopiekar/openrgb sudo apt install openrgb

    When I was installing, I found Discover has a package for OpenRGB, but it was broken - it could only read the LEDs, not write to them. The .appimage I found wouldn't run, and the .deb files on the OpenRGB website were no longer compatible with my installation.

  2. Run the OpenRGB UI, adjust your RGB to your liking, and save a profile. I saved mine as ~/.config/OpenRGB/deep orange.orp. Test you can load this profile from the UI. You may need to run as root to be able to set all LEDs.

  3. When running OpenRGB as root, it will need access to our .orp file. We need to put it in /root/.config/OpenRGB so it can be loaded. (Thank you, strace!)

    sudo mkdir -p /root/.config/OpenRGB sudo ln -s /home/ddr/.config/OpenRGB/deep orange.orp /root/.config/OpenRGB/deep orange.orp

    I've used a soft link here so we always load the last version we saved, we don't have to copy it over every time we tweak it.

  4. To start OpenRGB on system start, we'll make a Systemd service file.

    /etc/systemd/system/OpenRGB.service [Unit] Description=Set LED colour using OpenRGB. After=basic.target [Service] Type=simple User=root ExecStart=/bin/openrgb --server --profile "deep orange.orp" [Install] WantedBy=multi-user.target

    Then enable it.

    sudo systemctl daemon-reload sudo systemctl enable OpenRGB.service sudo systemctl start OpenRGB.service
  5. Finally, to restore our RGB colours after sleep, we'll add script to the Systemd's system-sleep folder. It will be run on sleep and wake, but we'll only do stuff on wake. It should be owned by root and be executable.

    /usr/lib/systemd/system-sleep/RunOpenRGBOnWake.sh #!/bin/sh case $1 in post) /bin/openrgb --server --profile "deep orange.orp" ;; esac

Did this work for you? What changes did you have to make, if any?

tags: linux, led, cosmetic, rgb