No sound after unplugging the headphones from the computer

Solution 1:

Running

mv  ~/.config/pulse/ ~/.config/pulse_old/

and restarting my machine did the trick.

Solution 2:

I'm also on a HP Zbook G5 Studio and what worked for me was following these steps:

  1. Uninstall pulseaudio using: $ sudo apt-get remove pulseaudio alsa-base
  2. Reboot, now there won't be any sound info since there is no driver, but don't worry.
  3. Install pulseaudio again: $ sudo apt-get install pulseaudio alsa-base
  4. Reboot again and it should be fine, at least it was for me.

I should also note that I did this process after updating from Ubuntu 20.04 to 21.04