Skip to content

Document the realtime budget and the zero RLIMIT_RTTIME kill - #16624

Open
mauseJavier wants to merge 1 commit into
omacom:quattrofrom
mauseJavier:docs/realtime-priority
Open

mauseJavier wants to merge 1 commit into
omacom:quattrofrom
mauseJavier:docs/realtime-priority

Conversation

@mauseJavier

Copy link
Copy Markdown

Adds docs/realtime-priority.md: where the realtime budget comes from (rtkit-daemon → xdg-desktop-portal → libpipewire-module-rt), what a zero budget does to RLIMIT_RTTIME, and why that surfaces as random SIGKILLs in apps launched from the shell.

The failure mode is worth writing down because nothing reports it: the kernel sends the signal in the victim's own context, so there is no journal line naming a sender, no core dump, systemd-oomd and the cgroup OOM counters stay at zero, and Chromium/Electron report reason: 'killed', code: 9 — the same 9 a crashed Chrome tab shows.

Since omarchy-shell is a PipeWire client, the zero limit is inherited by everything the launcher starts (and by what those apps start, a menu-launched terminal included), so browsers, editors and Electron apps die at random while keybinding-launched apps survive.

The page also records the check (busctl for the portal budget, /proc/<pid>/limits for the shell) and the non-root workaround of keeping module-rt out of the client when rtkit cannot be installed yet.

Reproduced on Omarchy 4.0.6 (x86, Intel TigerLake, Hyprland/Wayland) with Google Chrome 156 and VS Code: rtkit not installed, portal answered RTTimeUSecMax=0, MaxRealtimeTimeout was 0 for quickshell, chrome and code, and Chrome tabs and VS Code windows died with killed, code 9 with no core and no OOM involved.

Refs #16348, #12443, #9390. Related fix: #16353.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[High impact] The reviewed diff reaches a wide range of desktop features and system setup.

The documentation appears safe to merge, with a non-blocking correction needed for the checks after the workaround.

Findings

  1. P2 Successful workaround looks broken ▶

Summary

Adds docs/realtime-priority.md to explain the realtime budget, inherited process limits, and recovery steps.

  • A new guide explains how a missing realtime budget can affect apps launched from the shell.

Reviews (1) · Last reviewed commit: "Document the realtime budget and the zer..." · Reviewed by Greptile

Comment thread docs/realtime-priority.md
grep 'Max realtime timeout' /proc/"$(pgrep -x quickshell | head -1)"/limits
```

Both should report `200000`, or `unlimited` from the workaround below. A `0` in either place means every app launched from the menu is exposed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Successful workaround looks broken

The non-root workaround only stops clients from applying the portal budget; the portal can still report 0. Saying both checks should report unlimited, and that either zero means apps remain exposed, makes a successful workaround look broken. Describe the results separately: the portal may still report 0, while the restarted shell should show unlimited.

Suggested change
Both should report `200000`, or `unlimited` from the workaround below. A `0` in either place means every app launched from the menu is exposed.
With `rtkit` installed and the portal and shell restarted, both checks should report `200000`. With the non-root workaround below, the portal may still report `0`, but the shell's limit should be `unlimited`. A `0` in the shell's limits means it still carries the zero budget.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@omarchybot omarchybot added the documentation Improvements or additions to documentation label Nov 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for writing this up, @mauseJavier. This failure is hard to diagnose, and your reproduction matches what was later measured in #16824.

I read docs/realtime-priority.md at dfe9243 and checked what it says against quattro as it is now (c2818bb). Since this was opened, #16824 has merged and fixed the bug the page describes, and #17103 followed it. Because of that, the page now describes the system as it was before the fix, and some of its steps would cause harm if someone followed them:

  • docs/realtime-priority.md:28-36, the install steps. Running sudo pacman -S rtkit and then restarting the portal is the order that kills apps. rtkit accepts a hard RLIMIT_RTTIME of 0, so as soon as it is installed it can make a thread realtime in a process that still holds the zero, and the kernel kills that process. In Give PipeWire realtime with rtkit and stop the silent app kills #16824's control run, this order killed 33 such processes. quattro now ships omarchy-realtime-repair, which runs from migration 1789747667.sh and from omarchy-upgrade-to-quattro. It raises those zeros first, keeps rtkit masked while it installs, and then restarts any portal that still reports 0.
  • :36, prlimit --rttime=unlimited:unlimited. This removes the watchdog altogether. rtkit also refuses realtime to a process whose hard limit is unlimited. The repair raises zeros to rtkit's own budget (200000) instead.
  • :3-10 and :38. rtkit is now in install/omarchy-base.packages, and install/omarchy-aarch64.packages no longer lists it. Also, etc/pipewire/client.conf.d/50-omarchy-rtkit.conf and its jack.conf.d twin set rtportal.enabled = false. Native clients, the shell included, now ask rtkit directly, so the portal is no longer where their budget comes from. Only Flatpak apps still read it from the portal.
  • :48, the expected output. After the workaround, the portal still reports 0. The text says both checks should then show 200000 or unlimited, so it reads a working workaround as broken. Greptile's inline note says the same. On a quattro install, a portal at 0 also no longer means menu-launched apps are exposed.
  • :16, the kernel mechanism. With a hard limit of 0, the kill happens when the thread goes through check_thread_timers. That only happens once the thread runs realtime or has a CPU-time timer armed, not merely because it holds the limit. That condition explains why some apps with a zero survive and others die.
  • :24, keybinding launches. Launching from a keybinding doesn't by itself mean an app keeps unlimited. An app that loads libpipewire runs module-rt in its own process, and omarchy-launch-browser starts the browser through systemd-run, not as a child of whatever launched it.
  • :50-61, the drop-in. The module.rt = false drop-in is valid PipeWire config. On quattro it is no longer needed, and it switches off realtime for every PipeWire client the user runs until someone removes it.

Nothing ran for this check. It is Markdown only, so I checked it by reading it against the repository. The second opinion came from Codex Medium and muse-wonder via pi (thinking high). Both found the same staleness and the unsafe install order, and I checked each point above against quattro myself. They also raised the prlimit and :24 points, and I confirmed those in the code. One more point, that module-rt does not set RLIMIT_RTPRIO as :3 says, I could not check here, so it is not in the list above.

What happens next is up to you. The page could be reworked to describe what quattro ships now: the base-list rtkit, the rtportal.enabled = false drop-ins and omarchy-realtime-repair, plus a check that reads the shell's limit. Whether a page like that belongs in docs/ now that the fix has landed is for the maintainer to decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants