If all your sound devices disappear on Ubuntu (especially after upgrading the kernel), then run this:
sudo apt-get install linux-modules-extra-`uname -r`
On Linux at random times I get static from any audio playback. It's exactly the symptoms here: https://askubuntu.com/questions/1066565/static-noise-when-playing-sound (staticy, random, lingers). The fix is pulseaudio -k.