I have a setup with AUX speakers and USB headphones connected to my Ubuntu 23.10 machine. I can set the default audio output device to the headphones, and some apps, like Spotify, seem to respect this choice. However, other apps like Chrome or Rhythmbox keep using the speakers instead.
I have tried installing pavucontrol
as suggested in this question and switching application output devices from there. However, certain actions (e.g. switching a video to fullscreen) keeps changing back the audio output device from the headphones to the speakers. It's really frustrating.
Things I've tried:
- Control audio with
pavucontrol
and resetting PulseAudio config (rm -r ~/.config/pulse
) (question 1, question 2) - Various variations of disabling certain PulseAudio modules (question 1, question 2, this Reddit post)
- Setting default PulseAudio sink (I only did this through
pavucontrol
, the headphones are selected as fallback in the "Configuration" tab, also selected through Gnome Settings). Runningpactl get-default-sink
also correctly shows the headphones:alsa_output.usb-Kingston_HyperX_7.1_Audio_00000000-00.analog-stereo
- Restarting PulseAudio:
pulseaudio -k && pulseaudio --start
- Reinstalling PulseAudio:
sudo apt install --reinstall pulseaudio; rm -r ~/.config/pulse; sudo reboot
However, none of this seems to work. I can select the headphones from Gnome Settings or pavucontrol, and e.g. Spotify works, but when I open a new video in Chrome for example, it just starts playing on the speakers. The only way of changing it to the headphones is through pavucontrol, or by going to the Gnome audio settings, selecting the speakers (now everything plays through the speakers) and then re-selecting the headphones (now everything plays through the headphones). Again, switching the video to fullscreen reverts the Chrome output back to the speakers (but not Spotify).
Notes
- My system is pretty old and has gone through many updates. I believe the first Ubuntu version installed was 17.04.
- The USB headphones are pretty old too (HyperX Cloud II), they seem to work fine (e.g. on Windows) but the DAC is pretty banged up at this point. Maybe a hardware problem?
Has anyone else encountered this issue before and has pointers on how to fix this? Or suggestions on what logs I should look at / debugging steps to take? Any help is much appreciated.
Edit
Adding some more system information that might help.
$ pactl list short cards
pactl list short cards
44 alsa_card.pci-0000_00_1b.0 alsa # Built-in audio
45 alsa_card.pci-0000_05_00.1 alsa # HDMI audio (disabled)
46 alsa_card.usb-0c76_USB_PnP_Audio_Device-00 alsa # USB microphone
47 alsa_card.usb-Kingston_HyperX_7.1_Audio_00000000-00 alsa # USB headphones
48 alsa_card.usb-046d_C922_Pro_Stream_Webcam_60A9E5DF-02 alsa # Webcam microphone (disabled)
$ pactl list short sinks
49 alsa_output.pci-0000_00_1b.0.analog-stereo PipeWire s32le 2ch 48000Hz IDLE # Speakers
52 alsa_output.usb-Kingston_HyperX_7.1_Audio_00000000-00.analog-stereo PipeWire s16le 2ch 48000Hz RUNNING # Headphones
$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 247
Tile Size: 65472
User Name: myname
Host Name: myname-pc-ubuntu
Server Name: PulseAudio (on PipeWire 0.3.79)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.usb-Kingston_HyperX_7.1_Audio_00000000-00.analog-stereo
Default Source: alsa_input.usb-0c76_USB_PnP_Audio_Device-00.mono-fallback
Cookie: 5042:06db