I'm facing a really strange issue that has existed on various versions of Mint(from 17.x to 18.2) and even on Ubuntu 18.04 currently. I have an iMac 21.5 running 18.04 with Kernel 4.16.12 with the following Audio Device settings. Audio Device Options
Here are the details of the machine
The issue is that in-spite of "Speakers - Built in Audio" being selected as the default device, I don't hear any sound coming out of the iMac speakers most of the time. It works sometimes. Chrome seems to be having this issue more often than Firefox or any other media software. When it doesn't work, looks like the sound goes through to HDMI - Display Port 3.
Can someone please help me in how to make sure the default option of "Speakers - Built in Speakers" can be made to 'stick'?
Here are the outputs of aplay -l and pacmd list-cards.