I connected my laptop running Ubuntu 12.04 to my Samsung TV through a HDMI cable. I used extended monitor and everything (in terms of display) looked fine. The problem occurred with sound. I expected the sound to play through the TV (or say monitor), but it was still coming through the laptop’s inbuilt speakers.
I saw a number of forum posts with trouble on the audio problem in extended monitor in Ubuntu. Thankfully this problem was not complex, at least in this case. The reason in my case was that the default sound setting was “built-in speaker audio”. Changing it to HDMI saved my day.
Open the sound setting. Type “sound” in Unity dash (by pressing the Super/Windows key) or from the top right corner choose the system settings and then look for sound setting.
In the sound settings, in Output tab the built-in-audio was set to Analog Stereo Duplex. Change the mode to HDMI output Stereo. Note that you must be connected to an external monitor through a HDMI cable to see HDMI output option. When you change it to HDMI, a new icon for HDMI pops up in the left sidebar. Click on it and enjoy the sound of music.
Feel free to ask questions in the comment section. I’ll try to help. Cheers