You are not logged in.

#1 2022-11-18 23:07:23

amr962
Member
Registered: 2021-02-11
Posts: 52

[SOLVED] Pipewire shat itself and took ALSA with it

Hello everyone,

I had been experiencing some popping and cracking using Pipewire after switching from pure ALSA. So I had the idea of changing the default sample rate from 48kHz to 44100Hz, as that was the default on ALSA. Using the wiki, I created ~/.config/pipewire/pipewire.conf with:

context.properties = {
    default.clock.rate          =  [ 44100 ]
}

and restarted. But then, I had no more audio. Running amixer or alsamixer just hangs indefinitely. Doing "pactl get-sink-volume @DEFAULT-SINK@" returns "Connection failure: Timeout". So then, I removed this configuration file and restarted, issue persisted. After a few more desperate restarts I've removed these packages and all their dependencies to go back to using ALSA:

pipewire-audio
pipewire-alsa
pipewire-pulse

Which worked, I could play a .wav audio file using aplay, cool. But reinstalling them breaks everything again. Oh, and for some reason tapping with two fingers inside of Firefox crashes it now? This also started with this audio issue, but they can be unrelated.

[amr@dell ~]$ systemctl status --user pipewire-pulse.service
● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; preset: enabled)
     Active: active (running) since Fri 2022-11-18 23:43:15 CET; 21min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 3339 (pipewire-pulse)
      Tasks: 2 (limit: 4521)
     Memory: 1.5M
        CPU: 54ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─3339 /usr/bin/pipewire-pulse

Nov 18 23:43:15 dell systemd[590]: Started PipeWire PulseAudio.
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: Can't find xdg-portal: (null)
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: found session bus but no portal
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: could not set nice-level to -11: No such file or directory
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Nov 18 23:43:15 dell pipewire-pulse[3339]: mod.rt: could not make thread 3347 realtime using RTKit: No such file or directory
Nov 18 23:43:45 dell pipewire-pulse[3346]: Connection failure: Timeout
[amr@dell ~]$ systemctl status --user pipewire.service 
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: enabled)
     Active: active (running) since Fri 2022-11-18 23:43:15 CET; 21min ago
TriggeredBy: ● pipewire.socket
   Main PID: 3343 (pipewire)
      Tasks: 2 (limit: 4521)
     Memory: 780.0K
        CPU: 19ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─3343 /usr/bin/pipewire

Nov 18 23:43:15 dell systemd[590]: Started PipeWire Multimedia Service.
Nov 18 23:43:15 dell pipewire[3343]: pw.context: 0x555b83261080: no modules loaded from context.modules
Nov 18 23:43:15 dell pipewire[3343]: default: acquire_rt thread:0x7fe65774b6c0 prio:-1 not implemented

These don't look out of the ordinary, except for the timeout error.
I appreciate your help smile

EDIT: Forgot the brackets in the config file.

Last edited by amr962 (2022-11-19 00:03:54)

Offline

#2 2022-11-19 00:03:33

amr962
Member
Registered: 2021-02-11
Posts: 52

Re: [SOLVED] Pipewire shat itself and took ALSA with it

The problem was I hadn't actually removed the configuration file, removing it then restarting the services solved the audio and the Firefox right click issue.
I've tried again to change the default sample rate correctly this time (without the brackets) and still broke the audio, that's another issue though, closing.

Offline

#3 2022-11-19 01:07:31

amr962
Member
Registered: 2021-02-11
Posts: 52

Re: [SOLVED] Pipewire shat itself and took ALSA with it

Turns out pipewire.conf needs to be "complete" so to say for it work. Which explains why the wiki has these placeholder dot lines.
The solution is to create a file with the desired changes .config/pipewire/pipewire.conf.d/10-sample-rate.conf:

context.properties = {
    default.clock.rate          = 44100
    default.clock.allowed-rates = [ 44100 ]
}

Offline

#4 Yesterday 00:54:25

quicho
Member
Registered: Yesterday
Posts: 1

Re: [SOLVED] Pipewire shat itself and took ALSA with it

Just wanted to drop a huge thank you to amr962, even years later!

I was currently developing a custom bit-perfect audio player in C++ and trying to allow my external DAC to switch to 96kHz dynamically. I fell into the exact same trap: creating a ~/.config/pipewire/pipewire.conf file with just the allowed-rates array, unknowingly shadowing the entire system's main configuration.

I experienced the exact same cascading failures you described: pactl info timing out, RTKit deadlocks, and even my browsers (Firefox/Zen) crashing on Wayland/Hyprland because their internal audio abstractions were hanging indefinitely waiting for the dead PipeWire socket.

Your follow-up about using the .conf.d/ drop-in directory was the exact puzzle piece I needed. It instantly restored the system's IPC while keeping the sample rates intact.

Offline

#5 Yesterday 12:34:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,194

Re: [SOLVED] Pipewire shat itself and took ALSA with it

Glad to hear, but please note our policy on necrobumping: https://wiki.archlinux.org/title/Genera … bumping%22

Closing this old thread.

Offline

Board footer

Powered by FluxBB