TLDR: I added a GTX 1080 in addition to my current graphics card, and now default audio is not working.
I had a working sound on Ubuntu 16.04, 4.15.0-38-generic. I had a GTX 740 graphics card and an NVidia driver (for CUDA). And a sound was working (from whatever is on the motherboard). Headphones worked, back audio jack worked. I installed a second graphics card GTX 1080 (which has an hdmi output), (no upgrade to software).
Now I currently have 1 graphics card for gui/rendering and another graphics card (1080) for tensorflow (aka not used for visuals).
*****~$ pacmd list-cards 0 card(s) available.
*****:~$ lspci | grep -i audio 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) 00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller 01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1) 02:00.1 Audio device: NVIDIA Corporation Device 10f0 (rev a1)
Bios does not have an option for auto detecting sound card.