How can I change audio output to HDMI from command line?
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 notoutput:hdmi-output
but insteadoutput: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:
:)
Related videos on Youtube
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
Backstory
This thread suggests
pacmd list-sinks
and switching to a different sink withpacmd 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 showshdmi-output-0: HDMI / DisplayPort
right at the bottom of the output, and that looks right, but it still saysFailure: No such entity
when I runpactl set-card-profile 0 output:hdmi-output
orpactl set-card-profile 0 output:hdmi-output-0
-
Mohammad Etemaddar almost 4 yearsI have two cards. So I changed the 0 to 1 to change the default to analog stereo.