I’ve had this issue where my sound messes up. It seems to happen mostly when I have the Android emulator open. As you see below, I only have the option of using the headset plugged in through my docking station. The laptop speakers are not in the list. If I were to unplug the docking station, I would get “Dummy Output” in the list.
This command did the trick for me:
pulseaudio -k && sudo alsa force-reload
This saves me a reboot!
At one point, I had an issue where the settings app listed a bunch of Dummy Output devices along with the regular speakers. You can see the devices listed below because I have the Sound Input & Output Device Chooser extension installed.
I just restarted Gnome Shell. You can either use Alt+F2 and then type “r” as the command, or you can run this: