After using NixOS for some time on my desktop (and loving it), yesterday I decided to install it on my laptop (a Dell XPS 9315) as well. The installation process and transfer of my config files went smoothly as expected.
There’s just one very minor issue - or annoyance rather: the indicator light on my mute key is always on (see attached image). It should work like the caps-lock key, where pressing the key toggles the function on and off and the corresponding indicator light on and off as well. But for the mute key, the light is always on. (With the previously installed Fedora Silverblue the key indicator light worked as expected but after replacing Silverblue with NixOS it turns on right after booting the machine and stays on no matter what.)
Interestingly, the key works as expected, i.e. if I press it I get an on-screen GNOME popup saying “SoundWire microphones” with an X mark and the mic is indeed turned off (the Audio section in GNOME Settings confirms that the input volume for “SoundWire microphones - Alder Lake Smart Sound Technology Audio Controller” is set to 0). Pressing the key again, the mic is turned on again. That’s why I was referring to this as an annoyance rather than an issue at the beginning. Still, I would like to solve it somehow, if possible. Please let me know if you need more information about my configuration, I’m not sure which sections might be relevant here. Any help is much appreciated!
Probably worth exploring the current value and effect of changing the sysfs interface, e.g.:
$ cat /sys/class/sound/ctl-led/mic/mode
$ <<<off sudo tee /sys/class/sound/ctl-led/mic/mode
I’m still puzzled by it; with
follow-mute the light is always on and with
follow-route it’s always off.
Something in the BIOS? I feel like I had a similar problem on a ThinkPad but the fact the button works seems to me nothing in the BIOS seems incorrectly set. My issue was the button never toggling and always staying on. Anyway, perhaps worth a gander?
Thanks for taking the time to reply, @_Andrew . I also get
$ cat /sys/class/sound/ctl-led/mic/mode
Unfortunately, I’m not knowledgeable enough to fully understand the linked post from the mailing list. Do you have any suggestions how I could investigate further? Thanks in advance!
I doubt it’s an issue with BIOS/UEFI settings. Before I installed NixOS I had Fedora Silverblue on this machine and the key as well as the indicator worked perfectly fine. I only turned off Secure Boot in BIOS/UEFI for NixOS, the rest of the settings are unchanged. Thanks for the suggestion, though, Ryan!
I further investigated my issue and now I’m even more puzzled than before. I searched the Internet and found a few people having a similar issue (old and new) with their machines (different brands and different distros though). Unfortunately, I was unable to find a working solution for me.
But I found a Knowledge Base Article for Dell Latitude machines (mine is an XPS, though), titled “F4 Function Key LED Is Always on Even If Pressed on Some Latitude Systems” . There it’s stated: “This is working as designed, and the light remains on as an indication that it has been disabled in the system BIOS. To restore the functionality of the F4 key, re-enable the microphone in the BIOS.”
So, I checked my UEFI settings and tried various combinations - with no luck. There is a global setting “Enable Audio” and then there are two more separate settings “Enable Microphone” and “Enable Internal Speakers” (see image below).
If I completely turn off “Enable Audio” and reboot, audio and mic are not available, as expected. And the indicator light of the mute key is off! (Yay, small success, although having no audio at all isn’t a solution.)
Turning on or off either one or even both of “Enable Microphone” and/or “Enable Internal Speaker” doesn’t have any effect at all: after rebooting I can still always (!) use the mic and hear audio. So maybe it’s a UEFI bug? If so, what puzzles me is that it worked with Fedora Silverblue before.
I don’t know how to proceed from here on. Do you guys have any suggestions? Or recommendations where else I could ask for help? Any hint is much appreciated! Thanks in advance for your help.
(@_Andrew , you said you were able to turn off the light completely. May I ask, how do you do that? If I’m unable to find a proper solution, I would at least prefer the light being always off instead of on.)
off actually turns it off on my machine. ThinkPad T14 Gen 2 AMD 20XK0008US, NixOS 23.11.4117.6832d0d99649, Linux 6.1.77
I now keep a light-dimming sticker on the underside of the keycap but before learning of the sysfs interface used a cutting of foil sticker to block the light completely.
Thanks for your quick reply, @_Andrew ! Would you mind posting the complete command to achieve that
off ? Sorry for asking newbie questions, I don’t know much about this stuff. Thanks again for your help!
This turns it off once:
echo 'off' | sudo tee '/sys/class/sound/ctl-led/mic/mode'
To persist the effect you have to find some way to write that on every boot. I’ve been using a systemd service but wonder if there’s a nicer way to do it.
That’s a usable workaround for the time being. Thanks for your help! I’ll poke around, maybe also contact Dell support about the weird ineffective UEFI settings that I mentioned above, and see if I can get more information later. Apart from this oddity, NixOS has been a real pleasure to use on both of my machines so far.
I’ve got one more question, @_Andrew . (Sorry!) How do I determine the correct device entry for the systemd service that you suggested?
wantedBy = [ "sys-devices-pci0000:00-0000:00:08.1-0000:07:00.6-sound-card1-controlC1.device" ];
I think I did it by looking at
systemctl list-units --type device. It occurs to me now though that
sound.target is probably a better choice. With that in place:
$ systemctl list-dependencies sys-devices-pci0000:00-0000:00:08.1-0000:07:00.6-sound-card1-controlC1.device
This works like a charm and the indicator light is permanently turned off now. Thanks a bunch for your help!