How to Configure Logitech Keyboard Lighting in Linux

G810 Led Featured

Logitech makes some of the most popular keyboards, but they still don’t seem to support the Linux side of things properly. It might be unofficial and not supporting all keyboards under the sun, but the g810-led project can probably help you control your Logitech keyboard’s lighting, making it useful instead of looking like a disco ball.

Installation

g810-led is available in the official repositories of most Debian-compatible distributions. Thus, if you are using something like Debian, Ubuntu, or Mint, you can install it with:

sudo apt install g810-led
G810 Led Apt Install

If you are on Arch Linux, Manjaro or another distribution with access to Aur, you can use something like the following to bring it on board:

sudo yay -S g810-led-git

Red Hat and Fedora fans will first have to enable its repository with:

sudo dnf copr enable lkiesow/g810-led

Then, install it with:

sudo dnf install g810-led

g810-led doesn’t offer a graphical front-end, so we will need to run it via the terminal.

Note: for the rest of this tutorial we’ll be using g810-led on a Mint installation. Although everything we see should apply on Ubuntu and Debian, some things (like the location of files) may change on other distributions.

Playing with Lights

Run the program to check out the basics on how to use it:

g810-led
G810 Led Check Options

Many Logitech keyboards insist on displaying continuously changing light shows, trying to impress with their mastery of colors. However, this can be extra-annoying when you’re trying to use them for typing.

With g810-led, to stop any color shifts, moving patterns, and set every key to white, use:

g810-led -a ffffff
G810 Led Set To White

What this command does is change the color of all keys on the keyboard (-a) to white (#ffffff).

If you want to turn every key a bright red, you can use the command:

g810-led -a ff0000
G810 Led Set To Red

As you can see, g810-led uses RGB color codes. You can find the color you want here.

To set every key to a bright green instead, use:

g810-led -a 00ff00
G810 Led Set To Green

Likewise, to turn all keys to the bluest possible blue, use:

g810-led -a 0000ff
G810 Led Set To Blue

Keys and Key Groups

Let’s start with a little taste of what you can achieve by trying out the following command:

g810-led -k w ff0000

With this command, we instructed g810-led to change the color for the w key only. Repeat the command above another three times, replacing the “w” with the letters a, s, and d, and you’ll have a red-colored WASD setup to show everyone how much you love FPS games.

Thankfully, you don’t have to change every single key on its own. g810-led comes with some predefined groups that bundle many keys together. To check them out, use the command:

g810-led --help-keys
G810 Led Help Keys

You can then use the -g parameter to choose a key group for which you want to set the color. For example, to set the Fn keys to a bright yellow:

g810-led -g fkeys ffff00
G810 Led Set Group Color

You can replace “fkeys” with any of the groups g810-led reported when you used the --help-keys parameter.

Make It Everlasting

The changes you made are temporary and will be lost after a reboot. To make them permanent, you will have to add them to g810-led’s default profile. The program will load when you log in to your desktop and apply this profile to your keyboard automatically.

To edit your profile, use the command:

sudo nano /etc/g810-led/profile
G810 Led Edit Profile

The profile will initially be empty. Copy the commands you used in your terminal to style your keyboard as you like and paste them into the profile. Then, remove the actual “g810-led” command and the dash before each parameter from every one of them, leaving only the parameters and values. For example, the commands:

g810-led -k w ff0000
g810-led -g fkeys ffff00

should be changed to:

k w ff0000
g fkeys ffff00

Finally, add a single c character (without the quotation marks) on its own line after everything else to mark the end of your settings. As an example, my profile for a g512 keyboard looks like this:

a aaaaaa
g fkeys 444488
g modifiers 884444
g arrows 330000
g functions 337733
g numeric 224422
c
G810 Led Profile 1

Save your profile, and after your next reboot, your keyboard’s LED lights will automatically change to the defined colors after you log in to your desktop.

Of course, nobody stops you from using the command in your scripts. If you’re creative, the sky’s the limit. Why not take the output from programs that read your computer’s temperature sensors’ status and have some keys change from green to red as a visual indicator?

Once you have configured your keyboard lighting, you may want to start creating your own shortcut keys and automation tool in Linux.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.