Bug 8404 - Alsa audio broken by default on modern distributions
Summary: Alsa audio broken by default on modern distributions
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Sound (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-01 10:58 CEST by Pierre Ossman
Modified: 2024-08-13 13:46 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2024-08-01 10:58:57 CEST
Fedora and Ubuntu have now started configuring ALSA to talk directly to PipeWire by default, rather than use the PulseAudio protocol. This bypasses ThinLinc's redirection, and means that you do not get any audio.

Fortunately, many (most?) applications use the PulseAudio API, rather than the ALSA API. Those applications work fine with ThinLinc.

You can see that you are affected by listing the default ALSA device:

> $ aplay -L
> ...
> default
>     Default ALSA Output (currently PipeWire Media Server)
Comment 1 Pierre Ossman cendio 2024-08-01 11:05:57 CEST
You can fix the issue by removing the PipeWire ALSA plugin and installing the PulseAudio plugin instead. On Ubuntu that means installing libasound2-plugins and removing pipewire-alsa.
Comment 2 Pierre Ossman cendio 2024-08-01 11:11:06 CEST
Another option is to tell the PipeWire server to talk to our PulseAudio server:

> PULSE_SERVER=/run/user/1000/pulse/native pactl \
>    load-module module-tunnel-sink \
>    server=/var/opt/thinlinc/sessions/cendio/11/pulse/native \
>    cookie=/var/opt/thinlinc/sessions/cendio/11/pulse-cookie

Haven't tested this to see how robust it is. I'm also concerned that this documentation suggests that it has a fixed (semi-large) latency:

https://docs.pipewire.org/page_module_pulse_tunnel.html
Comment 3 Pierre Ossman cendio 2024-08-01 13:00:36 CEST
The tunnel workaround does not seem to be very stable. It breaks when disconnecting, and it has problems with video sync and audio getting dropped.

Note You need to log in before you can comment on or make changes to this bug.