How can I change audio output to HDMI from command line?

24,285

The OP posted the solution in his question:

While writing this I found the solution:

This command makes it easier to see what my actual output options are:

pacmd list-cards | grep output\:

That way of looking at the output of pacmd list-cards made me realize that the actual wording for my output is not output:hdmi-output but instead output:hdmi-stereo

This command is what worked for me:

pactl set-card-profile 0 output:hdmi-stereo

This is how I switched back to my laptop's internal speakers:

pactl set-card-profile 0 output:analog-stereo

This is how I changed the volume via command line:

amixer -D pulse sset Master 50%

This is just a smiley face:

:)
Share:
24,285

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    Backstory

    This thread suggests pacmd list-sinks and switching to a different sink with pacmd set-default-sink "SINKNAME", but my laptop only appears to have 1 sink, so that didn't help me.

    This thread suggests pacmd list-cards which shows hdmi-output-0: HDMI / DisplayPort right at the bottom of the output, and that looks right, but it still says Failure: No such entity when I run pactl set-card-profile 0 output:hdmi-output or pactl set-card-profile 0 output:hdmi-output-0

  • Mohammad Etemaddar
    Mohammad Etemaddar almost 4 years
    I have two cards. So I changed the 0 to 1 to change the default to analog stereo.