Before install Audacity, audio worked fine. I can play music to external speakers just by plugging them into the laptop.
But after installing, then running Audacity, the external speakers become completely disabled in all software. Audio only goes to the laptop’s internal speakers. Changing the settings in alsamixer does nothing. I’ve confirmed that the speakers and laptop are not broken.
I have found the cause of this. When running Audacity, it changes some settings related to capture, which prevents other software from using the headphones, even after reboot. I went into AlsaMixer, chose F5 and switched the “L R Capture” setting and audio now works fine in other software.
If you want other software to share the audio device with Audacity, it is recommended to choose the “pulse” or “default” devices in Audacity’s Device Toolbar.