Ubuntu HDMI Sound Configuration

Very recently, I built my very first PC from the ground up. It was fun but somewhat challenging experience. On my new PC, I’ve been running Ubuntu 8.10 intrepid ibex. I’ve really enjoyed using Ibex but getting everything to work the way I want has been a bit of a challenge.

One such challenge was getting my HD-TV to play sound while connected via a HDMI cable to my HIS HD 4850 IceQ4 Turbo. After a fair amount of searching and configuration changes, I got it to work.

Since the solution I found was spread across a couple of different forum posting that were not directly related to my problem, I thought I’d write a short tutorial for others who may run into the same situation as I did.

Install ATI HD 4850 Catalyst Drivers
Before I begin explaining the sound settings, I should also explain the process I used to install the ATI Catalyst drivers. I can’t remember all the pages I referenced to learn how to install the drivers, so I won’t be able to give credit to the websites that helped my like I’d like to.

To install the ATI HD 4850 Catalyst drivers, you need to go to System > Administration > Synaptic Package Monitor and install the envyng-core package. EnvyNG is an application written in Python which will download the latest ATI or NVIDIA driver or the Legacy driver (for older cards) (according to the model of your card) from ATI or Nvidia’s website and set it up for you handling dependencies (compilers, OpenGL, etc.) which are required in order to build and use the driver. If you don’t find the envyng-core package when you search, check to make sure that “Proprietary drivers for devices (restricted) is checked on the software sources menu.

Synaptic Package Manager - EnvyNG

Once this package is installed, you should restart you computer. Once you’ve restarted, the Hardware Drivers application located under System > Administration should find the ATI/AMD proprietary FGLRX graphics driver. This driver should be installed and activated. The driver is required to fully utilize the 3D potential of some ATI graphics cards, as well as provide 2D acceleration of newer cards. Once installed, it’s probably a good idea to restart you PC once more.

ATI/AMD proprietary FGLRX graphics driver

With the ATI Catalyst driver installed, you should be able to fully enjoy the Compiz-Fusion effects in Ubuntu 8.10. The driver version I’m using is 8.54.3 with Catalyst Control Center Version 2.1.

Update System Sound Settings
For your system to play sounds through your graphics card’s HDMI port, you need to tell Ubuntu to use the graphics card sound system VS your motherboard’s. This is the intuitive change. Go to System > Preferences > Sound. On the Devices tab, change all of the options excluding sound capture (e.g., Sound Events, Music and Movies, Audio Conferencing, and Default Mixer Tracks) to HDA ATI HDMI ATI HDMI (ALSA).

Ubuntu Sound Preferences - HDA ATI HDMI ATI HDMI (ALSA)

The next sound change is less intuitive; it requires you to double click on the speaker icon in your top panel to bring up the Volume Control menu. On this menu, change the Device drop down list option to “HDA ATI HDMI (Alsa mixer) and then select the Preferences button near the bottom right. On the preferences menu, check the IEC958 Switches track to be visible and then close the preferences screen. Back on the Volume Control screen, you should now have an IEC958 option on a Switches tab. Check this option and close the Volume Control menu.

HDA ATI HDMI (Alsa mixer) - IEC958

The sound tests available on the System > Preferences > Sound should now play sounds. If it works, you’ll be hearing the tests sounds on your TV using only the HDMI out cable on the HD 4850.

I owe a big thank you to the MediaBox Blog posting titled “HOWTO: Audio over HDMI with the HD3200 \ RS780 in Ubuntu” for these sound setting tips.

VLC Sound Settings
I prefer the VLC media player over Ibex’s default Totem movie player. However, in this particular case, Totem played the sounds through my video card without requiring any additional changes while VLC did not.

Finding the appropriate audio settings in VLC proved a bit more challenging than I expected. To save you the time, I’ll outline exactly what you need to change. Open up VLC preferences by selection preferences from the tools menu. Near the bottom left of the preferences screen, be sure to select all as the show settings option.

Expand the Audio menu and then the Output modules option. On the Output Modules option, select ALSA audio output form the drop down menu.

VLC Output Module ALSA

Then go to the ALSA option under the expanded Output modules section. Here you need to refresh the ALSA Device Name list. Once the list has refreshed, select HDA ATI HDMI: ATI HDMI (hw:1,3) and save all your settings.

VLC ALSA Preferences

VLC should now also play sounds through an HDMI cable.

For this VLC tip, I owe a big thank you to tie_dyed_sox on the Ubuntu forums.

22 Responses to “Ubuntu HDMI Sound Configuration”

  1. Hazrul Nizam Sidek says:

    Thanks for the tutorial!

    I just bought a HD4670 and thanks to you my HTPC is now working perfectly.

  2. Matt says:

    When I realized how complicated it was to get the HD 4850 to play nice with my TV, I knew I had to write a detailed tutorial to help others. I’m glad to know that at least it benefited one person. Thanks.

  3. Edward says:

    Thanks for the great post got my HD 4850 up and running like I wanted thanks for your info. I do have a question about dual screens, I been attempting to use the ATI Control Center to display out to two HDMI devices. One Samsung 32 LCD and one Panasonic 42 Plasma. Both capable of displaying 1280×720 but when I hook both up, it must mirrors everything to both screens. I’ve tried to use amdcccle to set both screen as single devices but after rebooting it messes everything up. Any help would be great. Thanks

  4. Matt says:

    Hey Edward. I’m glad my post helped you out. Unfortunately, I don’t have a solution for your two monitor problem. I don’t have two video devices which take HDMI so I can’t even hook my PC up to see if I can figure out a solution for you.

    I did some quick searching online and this seems to be a fairly common problem. This forum post seems to have a lot of into about the subject. I didn’t read it close enough to see if it’s got an answer for you or not but it’s worth checking out.

    Have you tried changing the display options available via the ATI Catalyst software?

    When you do find the solution, do you care to come back to my site and post the solution in a comment to help out future readers? Thanks Edward.

  5. Frank says:

    Thank you very much!
    Your blog post saved me hours and hours of web-searching, trials and errors.

    I was surprised that getting sound out through the HDMI port actually works in Linux, to often have I tried equal kind of tricks just to realize it just could not work.

    Even in XBMC for Linux it works, not by default but by following this XBMC forum post: http://xbmc.org/forum/showpost.php?p=214844&postcount=7

    Best regards
    Frank

  6. Davuth says:

    Thanks for the post! I didn’t have to DL a new driver, but the sound settings you walked through finally got my HDMI audio output working.

  7. Matt says:

    Thanks Davuth. The changes aren’t hard to make just hard to find. Glad my post helped. I found the settings on a couple of sites so I thought it would be easier for everyone if HDMI sound was fully explained on a single page.

  8. Matt says:

    Frank, thanks for sharing that tip about XBMC!

  9. Trab says:

    Hey,

    I was wondering if you had any experience getting HDMI to work with amarok? aparently it’s a pain, but some people suggested using asoundconf-gtk to switch default sound cards…unfortunately this isn’t working for me. I continue to get this error:

    trab@cobra:~$ asoundconf is-active
    trab@cobra:~$ asoundconf-gtk
    You need to make sure asoundconf is active!
    By default, asoundconf’s configuration file is ~/.asoundrc.asoundconf
    and must be included in ~/.asoundrc. Open this file to make sure it is!
    trab@cobra:~$

  10. Kevin says:

    Hey man,

    Thanks for this. This is one of the only places that clearly listed what to do – I had tried everything (latest ati drivers, alsa, etc) and it turned out the IEC958 (how in the heck would anyone know this?) switch was key.

  11. Matt says:

    Trab, I have absolutely no experiences with HDMI and amarok. Wish I could help. Just keep scouring the web, I’m sure someone else needs to know the same thing. If you find out, please post the solution in a comment on my site so others can benefit from your knowledge.

    Kevin, glad this post helped you. You’re right, no other place (that I’ve found) has all of the instructions on a single page…thus once I pieced them all together after reading lots of forum posts, I thought I document all here with clear instructions. I have no idea how someone would know to change IEC958 and I’m not sure how the guy that I found out from knew but I’m glad he did :)

  12. sushil says:

    hi all, Quick question, I have been looking for a solution to my hdmi dilemma for awhile. I have an asus m3n78 pro with onboard nvidia graphics card with hdmi. Audio works fine in vista, win xp etc. This solution should work for nvidia too rite? i cannot try it rite now since im at work, but will do when i reach home. any help would be much appreciated, esp if method is different for nvidia. cheers guys!

  13. Matt says:

    suschil, I’m not sure the solution would work for nvidia or not–one would think it would. Of course, the drivers for Nvidia would be different. Typically, Nvidia offers better Linux support than ATI so that shouldn’t be a problem. I’m not sure how having an onboard vs discrete graphics card affects the drivers. Just try it out when you get home…and hope that it works. Let us know if it does or not because if it works it will be beneficial for other users to know how to work with nvidia and HDMI. If not, maybe someone will have an answer for you.

  14. Dave says:

    This process worked fine to get Totem and VLC to play the sound via HDMI but I still do not get system sounds over HDMI. Does anyone know how to get that working. Some say it is because of an incompatability between Pulseaudio and ALSA. I have no way to verify that.

  15. Gopal says:

    I have a different problem. I am using the 4670 to use as a regular PC and after installing the 4670, I dont get the sound out through the Southbridge sound card. I am guessing its coming out of the hdmi.
    Is there a way to turn off the hdmi sound out completely?

  16. rg says:

    thanks for the excellent post. I wish I would have seen it hours ago :) so all audio (vlc, totem, the tests in sound preferences) seems to be working through HDMI except for firefox. any ideas here? I have been specifically trying to play Flash through youtube etc). I have the Shockwave Flash 10.0.r22 plugin active
    thanks in advance… rg

  17. peter says:

    Trab – To configure Amarok to work with the HDMI go into Amarok, click settings, then configure Amarok.

    Go to the engine TAB on the left, and for the output device change that to Alsa

    Click Apply, then Alsa Device configuration will appear. Now to get this to work you need to enter for Mono and Stereo something like this:

    hw:2,3

    Mine is soundcard 2 and device 3 hence the above senttings.

    To get what your device is for the HDMI open a terminal window and run this command:
    aplay -l

    the following lists the cards as well as the surround devices
    aplay -l && aplay -L

    For 4 channels and 6 channels I am not sure what to put in there… but I have at least mono and stereo working for now.

    Cheers,
    Peter

  18. Matt says:

    peter, thanks for answering Trab’s question. I’m glad someone knows how to get HDMI to work with Amarok. I’m sure many others will be thanking you as well.

  19. Matt says:

    rg, I honestly don’t know what to tell you to do to get flash to play sounds through HDMI. I did come across the a site which mentions having sound problems with Flash. The solution looks to be installing alsa-oss. Alsa seems to be a common theme to fixing HDMI sound problems so it’s worth a shot.

  20. Mark says:

    Thank you.

    Worked on my Toshiba M300 Laptop running Ubuntu 9.04 Jaunty, with the following modifications:

    I started at the step to activate the Hardware Drivers, as the “ATI/AMD proprietry FGLRX graphics driver” was already listed under System>Administration>Hardware Drivers.

    But the driver wasn’t activated, so I clicked the Activate button and a “Downloading and Installing” info window opened up. Took a couple of minutes to complete, then I was requested to reboot to complete installation.

    I then followed the rest of the original procedure as laid out above.

    Thanks again

    Mark

  21. Matt says:

    Mark, thanks for sharing the changes required for Ubuntu 9.04 Jaunty. I’m sure others will appreciate hearing about your experience.

  22. Tim says:

    Thanks Matt and Mark!! I now have sound through HDMI on my HTPC. I have Ubuntu 9.04, ASUS EN9400GT with Nvidia.

    I just followed Marks comments from 8-Sep-2009, and it worked perfectly.

  • Recent Comments

    • Ubuntu HDMI Sound Configuration (22)
      • Tim: Thanks Matt and Mark!! I now have sound through HDMI on my HTPC. I have Ubuntu 9.04, ASUS EN9400GT with Nvidia....
      • Mark: Thank you. Worked on my Toshiba M300 Laptop running Ubuntu 9.04 Jaunty, with the following modifications: I...
    • Tomato Firmware Option for WRT54GL (9)
      • junn: I just upgrade my brand new wrt54gl to dd-wrt. Do have compare dd-wrt with tomato ? Which is fast and stable ?...
      • brianko: FWIW, after having a year of 1500/300 speeds with Time-Warner (supposedly after the RR-Turbo free upgrade),...
  • All About Me

    I'm a recent college graduate with a degree in information systems and work as an IS Internal Auditor. I enjoy creating websites and learning about new technology. The best way to get me away from the PC is a good camping trip or mountain bike ride. Want to learn more?