Every time I log in to my PC, my sound volume is too low and the correct input device is no longer selected.
I am able to select the correct input device (which is actually a pipewire/wireplumber module) from the volume control in the KDE panel. As for the volume, the volume slider in the panel shows Digital Output (S/PDIF) and it’s set to 100% even though it’s quiet. To increase the volume, I have to run alsamixer , which displays “Pipewire” as the card by default, then I press F6 and select PRO (Chip: USB Mixer, Item: PCM) and turn the gain up. Once I do that, I can control the volume from the panel just fine and 100% volume is at a good spot.
So I have to select input and change that gain setting every time I log in. How can I get it to remember these settings?
I’ve tried alsactl store, as well as making sure that alsa-state.service is running. I also tried switching to alsa-restore.service, making sure to delete /etc/alsa/state-daemon.conf.
I removed ~/.config/pulse
I selected the default input device in pavucontrol
Removed alsa-utils hoping I could remove a layer from this confusing setup and just deal with Pipewire, but the settings still reverted so I put it back how it was.
I noticed the output volume gain resets as soon as I log in. If I leave alsamixer open, then click “switch user” and then log right back in to the same user, I see the bar at 100% for a fraction of a second before it lowers itself to 35%.
The input setting doesn’t reset with “switch user”, it only resets once I fully log out.
GDM with GNOME/Workstation does its own conf in ~gdm/.local/state/wireplumber but I’m not sure if SDDM/KDE does something similar. I don’t believe the different confs would cause issue, but when wiping wireplumber I also cover GDM’s:
I also recall some oddity on Plasma 6 when selecting a Pro audio profile. I’m not sure if Pro offers anything worthwhile outside of Professional audio needing the hard-separation of devices, so it’s possible using Pro is causing incompatible config somewhere by exposing the extra stuff.
If the audio device is external USB or a PCI-E card, it might be loading late in the boot process and KDE does its conf sooner than the audio device arrives. I haven’t run into this, but early-loading the audio device driver with dracut/initramfs might help.
Admittedly I’m not 100% sure what fixed this because I also uninstalled a bunch of packages and re-installed anything alsa / pulseaudio related, but I’m happy to call this the solution because I did this too and now it’s working lol.
I spoke too soon
So after uninstalling any alsa/pulse/wireplumber/pipewire things I could without messing up my system too bad (didn’t go through with pipewire uninstall bc it wanted to uninstall gnome), then installing again to get sound working, the settings seemed to be remembered for a reboot or two while also the volume control in the Plasma panel was broken. Now the panel volume control fixed itself and the volume gets reset once again.
Honestly I might just re-install Fedora at this point as I think I’ve got some jank from installing Workspace edition and then switching to KDE afterwards.
If the problem is in your user profile, reinstalling the whole OS might not be necessary. Have you tried creating another local user account to see if that works around the problem?
journalctl -u
Jan 12 16:08:17 Marvin kded6[6014]: org.kde.pulseaudio: No object for name "alsa_output.usb-Logitech_PRO_000000000000-00.iec958-stereo"
Jan 12 16:08:17 Marvin plasmashell[6030]: file:///usr/share/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:91: TypeError: Cannot read property 'description' of undefined
Jan 12 16:08:17 Marvin plasmashell[6030]: file:///usr/share/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:91: TypeError: Cannot read property 'description' of undefined
Jan 12 16:08:17 Marvin kded6[6014]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Jan 12 16:08:17 Marvin plasmashell[6030]: org.kde.pulseaudio: No object for name "alsa_output.usb-Logitech_PRO_000000000000-00.iec958-stereo"
Jan 12 16:08:17 Marvin plasmashell[6030]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Jan 12 16:08:17 Marvin kded6[6014]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Jan 12 16:08:17 Marvin plasmashell[6030]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
pactl subscribe during switch user which results in lower volume:
george@Marvin:~$ pactl subscribe
Event 'remove' on card #784
Event 'remove' on source #790
Event 'remove' on sink #789
Event 'remove' on source #789
Event 'change' on server #4294967295
Event 'remove' on card #783
Event 'remove' on sink #788
Event 'remove' on source #788
Event 'change' on source-output #38
Event 'change' on sink-input #118
Event 'new' on sink #804
Event 'new' on source #804
Event 'change' on server #4294967295
Event 'new' on card #811
Event 'new' on card #812
Event 'remove' on sink #804
Event 'remove' on source #804
Event 'change' on server #4294967295
Event 'change' on card #811
Event 'new' on sink #816
Event 'new' on source #816
Event 'change' on server #4294967295
Event 'new' on source #817
Event 'change' on card #812
Event 'new' on sink #818
Event 'new' on source #818
Event 'change' on sink #816
Event 'change' on source #816
Event 'change' on card #811
Event 'change' on source #817
Event 'change' on card #812
Event 'change' on sink #818
Event 'change' on source #818
Event 'change' on source-output #38
Event 'change' on sink-input #118
The No object for name error sounds like the potential problem that Sean suggested earlier. You might try searching the web for that error string. Or maybe you could work around the problem by using a different connector (e.g. S/PDIF)?
I’m getting the same results with power settings set to performance.
Editing dracut/initramfs doesn’t make sense to me here. We’ve isolated the problem to my profile, and the audio does work, the volume and input settings just reset.
Sorry, I’m out of ideas. If it were me, at this point, I’d probably try to hack together a script to fix things the way I want and set it to auto run when I sign in. Maybe someone else has some ideas about how to fix it.
Maybe something along the lines of the following would work as a hack (untested)?
[Unit]
Description=Reinitialize audio devices to their defaults
[Service]
Type=oneshot
ExecStart=-/usr/bin/sleep 5
ExecStart=-/usr/sbin/alsactl init
[Install]
WantedBy=default.target
Put the above in ~/.config/systemd/user/alsa-reinit.service and then enable it with systemctl --user enable alsa-reinit.service. It should then run whenever you sign in.