You are not logged in.

#1 2024-09-07 15:08:41

miko c
Member
Registered: 2022-12-14
Posts: 10

Audio output automatically switches to built-in speakers on laptop

Hi everyone, I'm having trouble with audio output on my laptop that uses PipeWire and WirePlumber. My setup includes a monitor with a 3.5mm audio jack connected via HDMI. In pavucontrol, I've selected the profile "Digital Stereo (HDMI) out + Analog Stereo Input" to route audio output through HDMI. Recently I've been experiencing frequent issues where the audio output automatically switches to the laptop’s built-in speakers. I can manually switch it back to HDMI via pavucontrol, and sometimes it switches back to the HDMI output on its own. The logs in journalctl during these switching events are as follows:

Sep 07 22:47:04 ***hostname*** pipewire[1082]: pw.node: (alsa_output.pci-0000_00_1f.3.analog-stereo-105) graph xrun not-triggered (0 suppressed)
Sep 07 22:47:04 ***hostname*** pipewire[1082]: pw.node: (alsa_output.pci-0000_00_1f.3.analog-stereo-105) xrun state:0x761329425008 pending:2/3 s:0 a:0 f:0 waiting:0 process:0 status:triggered

Does anyone have suggestions on how to fix this?

Offline

#2 2024-09-14 04:26:23

Julia
Member
From: Belgium
Registered: 2024-09-14
Posts: 11

Re: Audio output automatically switches to built-in speakers on laptop

This doesn't really solve the problem, but you can run this one-liner at startup as a temporary fix until you do find a real solution.

while : ;do pacmd set-default-sink <n> ;sleep 10m ;done

Replace <n> with the index number of the HDMI device which can be found with "pacmd list-sinks".  Also maybe replace the duration of the sleep command with whatever seems suitable for your situation.


if [[ $yourProblem = "fixed" ]] ;then
    sed -i 's/Title/[SOLVED] Title/g' your.thread | please --thank-you
fi

Offline

#3 2024-09-19 14:35:06

miko c
Member
Registered: 2022-12-14
Posts: 10

Re: Audio output automatically switches to built-in speakers on laptop

Julia: Thanks for the reply. Since I'm using pipewire, there is no `pacmd` command. I tried `pactl list sinks` instead, but found that there was always only one sink listed, and each time the switching happened, the sink id will increase (from 272 to 299, and then to 451, for example).

Offline

Board footer

Powered by FluxBB