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:
gnome-shell --replace
You are my hero! After upgrading my notebook from Ubuntu 18.04 to Ubuntu 20.04 I had no sound on the speakers (only USB headset). Tried several things that where suggested here: https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/ but without success. The command you presented above did it! Thank you so much!