I have a fresh ubuntu on iMac. I have managed to set up the sound from the native speakers, however, there is still no sound from the headphones. I have disabled automute in alsamixer, but this didn't help. Does anyone know what to do in this case?
21 Answer
The solution was found by adding a row of options snd-hda-intel model=imac27_122 to /etc/modprobe.d/alsa-base.conf as explained here.