I recently wanted to solve this issue of having the wrong device be my default sound output every time I booted up my laptop. I used this extension found below:
Successfully installed it, however, after doing so I then had the new problem of my laptop no longer playing any sound through my Bluetooth-enabled headset.
Now, in the pulse audio settings,even though my laptop recognizes and connects to the headset, It seems to refuse to use it as a output or input audio device, EVEN WHEN SELECTED.
Upon using the "Test" button in settings, despite having the headset connected and chosen as the output device, when I test the left and right speakers, the sound instead plays through the in-built speakers of my laptop.
Super strange.
I have since uninstalled the extension and restarted my laptop but the issue persists.
You may try to see if on AlsaMixer and system settings it's correctly chosen as on the extension. The problem can be that you set an audio device on the extension settings but on the system settings and AlsaMixer the audio device is still the default. To access AlsaMixer settings, enter alsamixer on the terminal.
The issue has been solved. Although I'm not exactly sure how it was fixed.
Here's what I can tell you,
The issue persisted until I connected my laptop to a Smart TV via a HDMI cable, played some sound using the in-built speakers of the Smart TV (ehich the laptop decided to actually recognise) and then after having done that, I restarted the computer.
Afterward, voila, the issue magically vanished.
Summary: Try connecting your device to a audio output device via a WIRED connection, then restart device.
Another case of sound issue magically fixed by
I think I will in future suggest waving a magic wand and shouting "abracadabra" at the offending machine.
Glad you got it working and hope it stays working.