I'm looking for a way to configure HDMI audio output via the command line using pulseaudio. I was able to get it running by using pavucontrol and changing it in the configuration tab, but I need a way to automate the process. I haven't been able to find any documentation at all so far. The system is a lucid install.

Edit: From what I've found, I can use pacmd set-card-profile to do this. However, whenever I try, I get an error like the following (using the default profiles as defined in /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf)

# pacmd set-card-profile 0 hdmi-stereo
Welcome to PulseAudio! Use "help" for usage information.
>>> Failed to set card profile to 'hdmi-stereo'.

# pacmd set-card-profile 0 analog-stereo
Welcome to PulseAudio! Use "help" for usage information.
>>> Failed to set card profile to 'analog-stereo'.

Why can't I change these from command line when pavucontrol works to change them?


3 Answers 3


I was using the tool wrong. The correct way to do it was pactl set-card-profile 0 output:hdmi-audio. You can get a list of avilable profile names by running pacmd list-cards.

  • the 2nd argument (0) is the index of the card (>>> 1 card(s) available. index: 0). the 3rd argument (output:hdmi-audio) is the part before the second semicolon under "profiles:" (e.g. it's "output:hdmi-stereo" from the line output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400))
    – Elvis
    Nov 4, 2012 at 2:31
  • 1
    it's pactl list cards at least in pulseaudio-utils 1:4.0-0ubuntu22
    – int_ua
    Nov 7, 2014 at 9:31
  • @int_ua: pactl list cards and pacmd list-cards are both correct, the two tools use different syntax but provide most of the same functionality. In theory, the command to change the output profile could be pacmd set-card-profile 0 output:hdmi-audio (or ... output:hdmi-stereo or whatever), either will work.
    – FeRD
    Aug 19, 2015 at 12:21

Open a terminal and type:

sudo apt-get install alsamixergui

Then run it (Alt+F2 or press super key):


A window will open for sound cofiguration...

  • 1
    I'm not looking to edit mixer levels, I'm looking to configure the audio to use HDMI. I also said I'm not looking for a GUI tool, I need something that I can automate.
    – Daenyth
    Sep 30, 2011 at 16:51
  • alsamixergui solution by @decent worked for me on Nvidia ION with 10.04 and now with 12.04, I just launched the command and unmute the channel IEC 958 1 now I have audio...
    – user69005
    Jun 7, 2012 at 8:54

I found a simpler way to do this - on the Hardware tab of the System Settings Sound control, right-click on the profile drop down and select Digital Stereo (HDMI) Output + Analog Stereo input from the list.

  • 2
    It needs to be from the command line.
    – Daenyth
    Dec 17, 2011 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.