Created
October 30, 2021 15:20
-
-
Save donthorp/91eddc3af0fc3e43074aa252f6d9ff73 to your computer and use it in GitHub Desktop.
Move Audio to HDMI on Pop OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# pactl set-default-sink \$(pactl list short sinks | grep hdmi-stereo | cut -f 1) | |
cat /etc/pulse/default.pa | grep "load-module module-stream-restore restore_device=false" > /dev/null | |
if [ $? -ne 0 ] | |
then | |
echo | |
echo "You may need to edit /etc/pulse/default.pa and add change:" | |
echo " 'load-module module-stream-restore' to" | |
echo " 'load-module module-stream-restore restore_device=false'" | |
echo | |
echo " https://askubuntu.com/questions/71863/how-to-change-pulseaudio-sink-with-pacmd-set-default-sink-during-playback/72076#72076" | |
echo | |
fi | |
CHAN=$(pactl list short sinks | grep hdmi-stereo | cut -f 1) | |
pactl list short sinks | cut -f 1,2,5 | |
echo "HDMI Channel: $CHAN" | |
pactl suspend-sink $CHAN false | |
pactl set-default-sink $CHAN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment