If you have your NVIDIA X.org drivers installed you should be able to run the config panel. There, when your external monitor is connected via HDMI port, you can detect displays and configure X server behaviour, eg. arrange displays in a way you need them to be.
Unfortunately, if you connect a TV to your VAIO you may not have any sound going to your TV, due to some problems with ALSA drivers.
Are the correct drivers installed?
First of all, check that you actually have the correct nvidia drivers installed (this will check whether they are installed and install them if they aren't already):
Fire up a terminal, and then:
- If you want the stable (tested, but old) drivers, do:
sudo apt-get install nvidia-current
- If you want the latest (possibly untested, but fresh from nVidia) drivers, do:
sudo apt-get install nvidia-current-updates
Once you're done with that, restart your computer to check that the drivers are working correctly (check the bottom of the post if they aren't).
Now, shut down your computer (or just shut down the X server(s)), and then remove the VGA cable. Then, plug in the HDMI cable.
Now start up your computer. Is it working?
If not, check that the monitors you have work with another HDMI output (ie: X360, PS3, DVD Player, etc.). If they don't, it might just be your monitors.
If the monitors work but the card isn't working, it may be a defect with the card, or an alternate setup may be required.
If the (newly installed) drivers weren't working:
Hit Ctrl + Alt + F1
You will be shown a terminal. Log in using your username and password.
Stop whatever display manager you're using:
LightDM (Default): sudo service lightdm stop
GDM (GNOME): sudo service gdm stop
KDM (KDE Plasma Workspaces): sudo service kdm stop
Any other display manager (custom/other desktop environments): sudo service [display manager name] stop
Then, uninstall the nvidia drivers:
sudo apt-get remove nvidia-current nvidia-current-updates
Once this is finished, reinstall the nvidia drivers as shown at the top of the post.
Restart the computer:
sudo reboot now
Did it work out in the end?
If all of the above doesn't solve the problem, tell us what didn't work.
If it did work, mark the solution, and upvote it.
Best Answer
just in case it may help others:
I couldn get any sound using HDMI (graphic card: Nvidia Geforce GT 220) on Ubuntu11.10.
I clicked on System Settings/Additional Drivers.
Then select "NVIDIA accelerated graphics driver" and click activate.
After it's been downloaded and installed, reboot.
Then System Settings/Sound - Hardware: Select HDMI. Profile: Digital Stereo (HDMI) nr 2 Output -->>Important to select the profile. - Output: HDMI.