Ashish Panigrahi
आशिष पाणिग्राही

Easy fix for F4 mute LED light on ThinkPad laptops on GNU/Linux

05-09-2023

Recently I purchased a ThinkPad E14 Gen 5 laptop after spending 5 years with my previous workhorse machine, the HP Pavilion 14 with an Intel i5 (4 cores) CPU. The upgrade is quite significant, coming with an eight core AMD Ryzen 7 CPU... but I digress.

The Problem

With modern day laptops, often there are backlit keys on certain media keys like mute sound, mute mic, airplane mode and so on. The light being switched on, for obvious reasons indicates that the particular function is in operation. This is easy on Windows for which these machines are always tested against. The travesty being that laptop manufacturers being the profit oriented businesses that they are, cater to the masses which unfortunately sides with malicious, proprietary garbage like Windows. Similarly, macOS works well on Apple devices. With GNU/Linux Technically Linux is the kernel and not the operating system (the rest is supplied by the GNU operating system sans its own kernel). Here is a better explanation. however, almost all machines work but the tiny quality of life improvements like those media key lights can be a hit or miss.

As usual, I went ahead and installed Arch Linux on my machine with dwm as my window manager. After the installation and a test drive of my laptop, I see this...

The annoying led being always ON

At first I thought perhaps it's a driver issue but all my drivers were up-to-date. Looking through the Arch wiki didn't help with the issue. Knowing the vibrant thinkpad community, I ended up posting about my problem on r/thinkpad.

Simple Fix

I'd much rather have the backlight fully off than have it functional. So, a fellow redditor let me know to check for the output in a particular system file:

~: $ cat /sys/class/leds/platform::micmute/brightness
1

'1' here represents the light in the ON state, which is exactly the problem! Changing the value to '0' in the file instantly fixes the problem! Changing it to '0' only fixes it temporarily until the next time the machine is booted up. A rather simple "hack" is to make this change every time the user logs into the machine. This is done simply through the .xprofile or .xinitrc file (most people would use .xinitrc) by adding the following line in said file:

echo "0" > /sys/class/leds/platform::micmute/brightness

This line simply replaces whatever the file previously had, with '0'. This works rather well until I find a more permanent solution.

Edit

Unfortunately, the above method doesn't work anymore. I'm not exactly sure what changed but apparently it isn't supposed to work in the first place simply because /sys/class/leds/platform::micmute/brightness isn't a real directory.

In any case, here's an updated method for the same that is slightly more involved. It is adapted for any Linux distribution running systemd. For other init systems (openrc, runit, etc.), I assume it's fairly simply to make the relevant changes.

!#/bin/sh

echo 0 | tee /sys/class/leds/platform::micmute/brightness
[Unit]
Description=Disables the annoying mute light on keyboard
After=multi-user.target

[Service]
ExecStart=/bin/sh /home/ashish/.local/bin/disable-mute.sh
Type=simple

[Install]
WantedBy=multi-user.target

Late 2024 Update: This method works so far for the 6.6-LTS Kernel, NOT the bleeding edge one.