I'm running Linux Mint Cinnamon 22.3 64-bit with a Creative Sound Blaster AE-7. After each reboot, the card selects the wrong output, so I currently open alsamixer and manually switch to the Creative HDA device, navigate to the output control, and change it from Headphones to Speakers. I'd like to automate this when I log in, but I'm not sure whether I should use an alsactl configuration, an ALSA settings file, a shell script, or a desktop autostart entry. Saving the mixer state has not seemed to persist after reboot, so I'm looking for a reliable approach.
2 Answers
Rather than automating key presses in alsamixer, first set the card exactly as you want and try saving its mixer state with `sudo alsactl store`. That writes the ALSA state, which is normally restored during boot. If it still does not persist, something higher-level such as PulseAudio or PipeWire may be changing the output after ALSA restores it. In that case, a login-time command or desktop autostart entry may be more appropriate than repeatedly launching the terminal mixer.
A shell script that drives the interactive alsamixer interface would be fragile, especially with fixed arrow-key counts. It is better to identify the actual mixer control and change it directly with a command such as `amixer`, or configure the default output through the sound server. You can place a noninteractive script in your desktop environment’s user autostart settings and add a short delay if the audio service initializes after login. An `/etc/asound.conf` file may also help for ALSA defaults, but it will not necessarily control which output PipeWire or PulseAudio selects.
I previously tried configuration files and startup commands, but the card’s relay switched between outputs and the setting did not remain stable. I had to reinstall after encountering other system problems, so I’m hoping to avoid another trial-and-error setup.

I’ve tried saving the state several times, but it still returns to the wrong output after reboot. It seems as though another audio service may be overwriting the setting.