PipeWire never gets realtime priority at boot when the user lingers (rtkit's polkit check runs before any active session)
Summary
With loginctl enable-linger on and SDDM autologin, PipeWire starts with no realtime scheduling on every boot, even with rtkit installed and the rtkit migration (1789747667) applied. Restarting the audio units after login fixes it until the next reboot.
Linger is not something Omarchy enables, so this only affects users who turned it on themselves. The failure is silent, though, and undoes the fix from #9390 for them.
Cause
With linger, the user's systemd manager starts at boot, before SDDM exists. PipeWire starts with it and asks rtkit for realtime once, at startup. rtkit checks org.freedesktop.RealtimeKit1.acquire-real-time with polkit. That action is allow_active=yes, allow_any=no, and at that moment the only session for the user is the systemd manager's session (class manager, not active), so the request is refused. PipeWire doesn't retry.
Last boot, from the journal:
09:34:51.668 systemd-logind: New session '1' of user ... with class 'manager'
09:34:51.763 systemd[1143]: Started PipeWire Multimedia Service.
09:34:51.852 sddm: Initializing...
rtkit logged no grant for PipeWire on any of the last four boots. After a manual systemctl --user restart pipewire pipewire-pulse wireplumber from the desktop it logs Successfully made thread ... RT at priority 20.
omarchy-realtime-repair restarts the audio units when the server isn't realtime, but it only runs from the migration, so the next boot is back to normal priority.
Reproduce
loginctl enable-linger $USER, SDDM autologin.- Reboot.
ps -L -o tid,cls,rtprio,comm -p $(systemctl --user show -p MainPID --value pipewire.service): every thread isTS, noFF/RR.
Workaround
sudo pacman -S realtime-privileges
sudo usermod -aG realtime $USER
After a reboot, PipeWire's module-rt uses the raised RLIMIT_RTPRIO directly (the rlimits path, no rtkit or polkit involved): data-loop.0 comes up FF 88, WirePlumber's at FF 83.
Possible fixes
- Ship
realtime-privilegesand add the user torealtimeat install, the setup the Arch wiki recommends. This works whatever the session state and also lifts rtkit's priority cap of 20. - Or, if rtkit stays the only path, restart PipeWire once the graphical session starts when its server isn't realtime, like
omarchy-realtime-repairalready does during the migration.
Environment
- omarchy-dev 4.0.0.r7614.g8acbf77 (quattro), linux-omarchy 7.2.15-2
- PipeWire 1.6.10, WirePlumber 0.5.18, rtkit 0.14
- x86_64, AMD Ryzen, SDDM autologin, linger on
Related: #9390, #16348.
I read this report, the linked reports #9390 and #16348, and the current realtime-repair code on quattro. I have not reproduced the boot-ordering failure on a worker.
GPT-6 High in Codex was the only model to review the report's substance. My initial classification was bug, but the classification check returned no second assessment, so the classification remains unsettled. No tests ran and no fix was made; this is waiting on the maintainer for review before a fix is pursued.
Reproduced on a disposable Omarchy worker at current quattro (1010f2f0b3a3784e1313084061e32356764b0865), with RTKit installed throughout. With linger enabled and SDDM delayed eight seconds to force PipeWire to start before a local login, all audio data-loop threads stayed SCHED_OTHER after the desktop started. Applying #18128's changes onto that same base restored SCHED_RR priority 20 at login; reverting those changes brought the failure back. This confirms the scheduling failure for that boot order; no audible glitch was measured.
The patched current-base tree passed 139 CLI checks and 45 realtime-repair checks. Running the login repair again left the already-realtime server running. #18128 already links this issue and fixes the measured case, so no competing fix was opened. It remains a draft and needs its own full PR review; these checks did not test its older head as a whole.
Checked by GPT-6 High in Codex, with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. Both agreed that the reproduction confirms this scheduling bug and the patch fixes the measured case; their independence from this review is not guaranteed. The installed RTKit policy permits inactive local sessions too, so the relevant ordering is before a local session exists, rather than simply before it becomes active. This waits on the draft's review and the maintainer's decision.