This script fixes the issue with the microphone LED indicator on the key, showing its state (on/off).
Copy the script to a system directory:
sudo cp mic-monitor.sh /usr/local/bin/Set the necessary permissions:
sudo chmod +x /usr/local/bin/mic-monitor.shIn this case, the code is for a systemd service.
Create the service file:
sudo nano /etc/systemd/system/mic-led.serviceService file code:
[Unit]
Description=Monitor microphone state and control LED
After=sound.target pipewire.service pulseaudio.service
Requires=sound.target
[Service]
Type=simple
ExecStart=/usr/local/bin/mic-monitor.sh
Restart=always
User=root
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.targetEnable the service for auto startup:
sudo systemctl enable mic-led.serviceStart the service:
sudo systemctl start mic-led.service