Note: This problem occurs because Pulsaudio ignores the settings set by user in the settings-sound menu.
How to force pulsaudio to default to correct audio device?
System:
- Ubuntu 21.10; NVidia gtx1050ti.
Configuration:
- 4k monitor plugged into DP port;
- hdmi2av adapter plugged into hdmi port;
- analogue stereo plugged into hdmi2av converter.
Desired outcome:
- 4k video on monitor;
- HD sound from stereo.
Actual outcome:
- have 4k video;
- have no sound from hdmi port after boot and resume.
Reason for no sound: The system does not default to the correct device. On boot and resume, the default is internal speaker.
Actions taken:
action, part 1: used 'Settings' to manually set the correct device.
action part 1 result: sound works. but upon resume or reboot, sound reverts to internal.
action, part 2:
- reboot
- added this line to /etc/pulse/default.pa... :
set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1
- command:
pulseaudio --kill
- command:
pulseaudion --start
action part 2 result: settings now shows the correct sound device, and audio coming from hdmi port.
PROBLEM:
At every reboot and resume, must enter commands pulseaudio --kill/--start
.
QUESTION:
How to force pulseaudio to default to the correct audio card, device, port, without always needing to: a/ enter the kill/start
commands; or b/ reboot or restart?