Microphone re-enables and resets on its own

This is what I do to disable microphone:

I also try to reduce gain to 0%:

This is how it reverts to enabled state and 100% gain every time I reboot system:

Why can’t this applet remember my preference and how to fix? is it a bug?

Additional info, there is no microphone attached, it’s unplugged but it’s annoying that the setting reverts:

Agreed. I think it has been this way for as long as I can remember.

Short version: KDE puts the lovely buttons and sliders and stuff on the underlying audio system. What you’re seeing is done by ALSA/UCM, and wireplumber, not KDE. You might have more success asking about it elsewhere. But I’ll try to help.

Longer version:

Wireplumber should store your settings like mute, volume, default output, etc, and restore them on restart.

The files are stored in ~/.local/state/wireplumber/

There was a bug in wireplumber, a long time ago, which corrupted these files for some users. You may see success by simply stopping wireplumber (eg `systemctl --user stop --now wireplumber) and deleting them before restarting wireplumber. This is pure guesswork but it’s surprisingly common, and quick and easy to try. If you like you can move them, so that if it doesn’t work you can just move them back.

Check that wireplumber is stopped with sudo systemctl status wireplumber before removing them, or they will magically reappear exactly as they were.
After that you will need to set the sound system as you want it, and reboot the PC to see if that is remembered.

Prior to wireplumber seeing the devices at bootup, pipewire gets them. It will use UCM profiles and they can set volumes/mute states/etc on your card. Solving this is complex as you need to fix the UCM profile. Usually, wireplumber should override anything done there, anyway. (In theory. Sometimes not.)

Prior to pipewire seeing them, you may have a service running at boot. You can check them for example with sudo systemctl status alsa-restore.service and sudo systemctl status alsa-state.service
If you have something like that, and it has a broken state saved, you can overwrite it manually with sudo /usr/sbin/alsactl store. You probably want to make sure it’s correct in alsamixer prior to storing it.

Every time I’ve seen this problem of “it doesn’t remember my sound thing when I reboot” it’s been one or more of these three (and I had all three). The first and last are easy to fix, the middle one kinda sucks and I could help with identifying and working around that but it is best to report it upstream for a proper fix.

So try the first one and the last one and see how you go. Take backups before you change anything, just to be safe. Good luck!

1 Like

If I stop wireplumber there are no options to set in the KDE applet.

Not sure why but nothing in alsamixer adjusts the mic slider in KDE applet, and I’ve switched from playback to capture and set all mic to 0.

Also levels set in alsamixer don’t correspond to KDE levels, they’re slightly off.

But I appreciate your insights, I’ll troubleshoot this in detail later, there is a lot to read about how audio works.

That’s why you restart it first

Just set them and run the command to store them, if the service is active.

The idea is to stop everything, reset it, start it, configure it, reboot, and see if it worked. If you have wireplumber and pipewire running so you can compare sliders they’re gonna mess with the settings and you’re not really resetting them.

1 Like

I’ve managed to reset wireplumber files to desired states (mute + volume) and noticed an entry for mic was added however it’s not respected.

To regenerate files I had to do it in system settings (screenshot below), by selecting items from drop down.

However upon reboot the the values from files are not read/respected until I re-select profiles in system settings from drop down, when I do this the files are read and the mic is muted.

I’ve also used wpctl command to set values in freshly regenerated files but the KDE audio applet doesn’t restore this upon reboot unless profiles are manually set in system settings.

There is now “input” (standing for mic) defined in both files, but it’s not reflected in KDE.

OK so it all worked as expected until the reboot, and when you started up it was in what state?
I mean like, you said that the values from those files were not in effect, so what was in effect?

Your last image there shows that you have muted the mic and wireplumber remembers this. It will now attempt to mute the mic for you on startup.

Your first image shows that the mic is not connected. It won’t work like that. You need to have the hardware connected and functional.

All volumes at 100%, both playback (output) and capture (input)

That’s what I suspected however I’ve found the issue on gitlab, that suggests to switch to “Pro Audio” profile, I did that, regenerated the files and now audio state is correctly restored as set by wireplumber.

Thank you very much for help, this is now solved, although the issue with other profiles is still there.

Pro Audio profile has lots of drawbacks (I know because I actually do need to use it) and that is just a workaround for an ACP/UCM bug which I suspected might be causing this (that was the second of the three things I mentioned)

It’s fine if you are satisfied with that workaround but please don’t think of it as a solution. It might cause other issues later, so if you have any audio problems you should remember that you have a workaround in place and your audio problem is not solved.

You should probably report this to wireplumber. But at least you have something that will get it to behave in the meantime :slight_smile:

1 Like