Hi everyone,
I’m running Manjaro (testing branch) on an AMD 7840HS laptop with PipeWire. After resuming from S0ix sleep, I consistently experience audio buzzing. I suspect this is caused by buffer underruns due to insufficient scheduling priority.
Upon checking, I found that PipeWire processes are running with nice = -11 instead of the expected realtime priority (rt = 88).
What I’ve checked and tried:
-
Configuration:
- No custom overrides; only the default
/usr/share/pipewire/pipewire.confis in use. - The
realtime-privilegespackage is installed. - My user is added to the
realtimegroup. rtkitis running normally without errors.
- No custom overrides; only the default
-
Expected behavior:
- According to
/usr/share/pipewire/pipewire.conf, PipeWire should preferrt.prio = 88. If privileges not satisfied, then to benice = -11. - But it always prefer nice = -11. Pipewire ignores rt.prio setting and chose
nice = -11.
- According to
-
Workaround:
-
I manually set realtime priority by editing both
pipewire-pulse.serviceandpipewire.servicevia:systemctl --user edit pipewire-pulse.service systemctl --user edit pipewire.serviceAdded:
[Service] CPUSchedulingPolicy=rr CPUSchedulingPriority=88 -
After this change,
ps -eo user,pid,cls,rtprio,ni,pri,pcpu,comm | grep pipewireconfirms the correctrtpriority is applied. -
The buzzing issue is resolved after resuming from S0ix.
-
Questions:
- Is this a PipeWire bug or a compilation/configuration issue?
- Why does PipeWire ignore the
rt.priosetting in the default config? - Is there a better way to enforce realtime priority without manually editing systemd services?
Any insights or suggestions would be greatly appreciated!
More details
If I run pipewire in the console, not by systemd.
It also ignores rt privilege and choose nice = -11.
e.g.
systemctl --user stop pipewire.socket
systemctl --user stop pipewire
systemctl --user stop pipewire-pulse
Then run pipewire -v in console
Pipewire ignores rt.prio = 88again.
This is a wired issue, really. As it default to
{ name = libpipewire-module-rt
args = {
nice.level = -11
rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
#uclamp.min = 0
#uclamp.max = 1024
}
flags = [ ifexists nofail ]
condition = [ { module.rt = !false } ]
}
condition = [ { module.rt = !false } ]
And Pipewire indeed read the conf and apply the settings except rt.prio = 88