Content:
On certain models of laptops, Linux users will find that the status LED on the ‘microphone mute’ key is constantly illuminated. This is often part of the F4 key.
A small annoyance, but an annoyance nonetheless. Fortunately, it’s relatively simple to turn off this LED.
To test this on your system, simply run
echo 0 | sudo tee /sys/class/leds/platform::micmute/brightness
This command changes the status of the microphone brightness LED to ‘0’, to turn it off.
At present, this will be reverted when the system reboots.
If this works on your system, it can be activated automatically on boot using one of the following methods.
Systemd Timer
If you’re using one of the more common Linux distributions, such as Ubuntu or Fedora, your system will be using Systemd. Systemd handles the running of services on your system, managing everything from initialising the system and mounting drives to security control and error logging.
If you’re unsure, a modern Linux distribution is highly likely to be running Systemd. However, you can check by running the following command:
systemctl -h
If a list of options is returned, your system is running Systemd. Press q to exit the options list. If an error is returned, skip to the ‘cron job’ section.
A Systemd service can be created to automate the command to turn off the LED.
Service File
To set up a Systemd service, a file needs to be created to define what the service does. We’ll add this as a system service, so create the following file in the /etc/systemd/system folder. The file name should end in .service and will be needed later on – we’ll be using micled.service.
[Unit]
Description=Turn off the microphone mute LED
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 0 | tee /sys/class/leds/platform::micmute/brightness'
[Install]
WantedBy=default.target
The command on the ExecStart
line has been tweaked to ensure the command is executed by the system shell, as it would be when executed in a terminal.
Once the file is saved, it’s recommended to reload Systemd.
systemctl daemon-reload
To test the service file works correctly, the service needs to be enabled, and started. Before doing this, make sure the LED is currently illuminated – if it isn’t, reboot the system.
systemctl enable micled.service
systemctl start micled.service
The LED should now be extinguished. As before though, a reboot will cause the LED to illuminate again.
Systemd Timer
Systemd timers are designed to run Systemd services automatically, based on either system events or calendar times.
To run the service on boot, a Systemd timer needs to be created as defined below. This should be added to the /etc/systemd/system folder (the same as the service file), and we’ve named this micled.timer.
[Unit]
Description=Turn off the microphone mute LED on boot
[Timer]
OnBootSec=0
Unit=micled.service
[Install]
WantedBy=timers.target
If you chose a different name for the service file, substitute it for micled.service
.
The OnBootSec
value specifies the time after system boot that the timer should activate. In this case, a value of 0 corresponds to 0 seconds, meaning the timer will trigger once the system has booted.
As previously, the timer needs to be both enabled and started.
Reboot your system, and the LED should now be turned off.
Cron Job
If your system doesn’t use Systemd, you can use a cron job to accomplish the same result. It’s also a simpler method, though the Systemd option is preferable if you’re able to use it.
Open the cron file using
crontab -e
Add the following line to the bottom of this file.
@reboot echo 0 | tee /sys/class/leds/platform::micmute/brightness
The @reboot
directive ensures this command runs every time the system boots.
Save and exit the cron file, and on rebooting the LED should be turned off.