Repository navigation
Install rtkit on all platforms to prevent RLIMIT_RTTIME=0 kills (#16348) - #16353
szaidi-code wants to merge 1 commit into
Conversation
…om#16348) Without `rtkit` installed, `xdg-desktop-portal` reports a realtime budget of `RTTimeUSecMax = 0`. PipeWire's client `libpipewire-module-rt` (`rtportal.enabled`) applies that budget as a hard `RLIMIT_RTTIME` of `0/0` in every PipeWire client, including `quickshell` (`omarchy-shell`). Every application launched from `omarchy-shell` inherits `RLIMIT_RTTIME = 0/0`, causing the kernel realtime CPU watchdog to send `SIGKILL` (`RT Watchdog Timeout (hard)`) whenever a thread uses a per-thread CPU-time timer (`CLOCK_THREAD_CPUTIME_ID`), as Chromium and Electron processes do. Move `rtkit` from `install/omarchy-aarch64.packages` into `install/omarchy-base.packages` so every platform (`x86` and `aarch64*`) installs it by default, and add a migration that installs `rtkit` if missing and restarts `xdg-desktop-portal.service` before the post-update shell reload. Fixes omacom#16348
[Medium impact] The change reaches default installs and update runs across supported architectures. Fix the skipped portal restart and remove the prohibited package assertion before merging. FindingsSummaryThis PR moves
Reviews (1) · Last reviewed commit: "Install rtkit on all platforms to preven..." · Reviewed by Greptile |
| if omarchy-pkg-missing rtkit; then | ||
| omarchy-pkg-add rtkit | ||
| # xdg-desktop-portal caches the realtime budget when it starts; restart it so | ||
| # the shell reload that follows migrations picks up the RTKit budget. | ||
| systemctl --user try-restart xdg-desktop-portal.service >/dev/null 2>&1 || true |
There was a problem hiding this comment.
On an older N1x install, 1790984500.sh installs rtkit earlier in the same migration run without restarting the portal. This migration then skips its whole block because the package is present. If the portal started without rtkit, it keeps its cached zero budget, so the replacement shell and launched apps can still be killed.
Keep the package install conditional, but move the portal restart outside that condition. Update the already-installed test case to expect the restart.
Knowledge Base Used: Restore direct RTKit access for speaker tuning
| printf '%s\n' "$defaults" >"$work/$platform.packages" | ||
|
|
||
| grep -Fxq superwhisper-bin "$work/$platform.packages" || fail "$platform: Superwhisper is a default package" | ||
| grep -Fxq rtkit "$work/$platform.packages" || fail "$platform: rtkit is a default package" |
There was a problem hiding this comment.
Package assertion repeats configuration
This assertion checks only that the newly added package-list entry appears in the output. AGENTS.md explicitly forbids tests for package-list entries and checks that restate edited configuration. The existing base-list comparisons already cover the resolver's behavior. Remove this package-specific assertion before merging to satisfy that requirement.
| grep -Fxq rtkit "$work/$platform.packages" || fail "$platform: rtkit is a default package" |
File Used: AGENTS.md (source)
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!
|
This fixes the same bug as #12428, which was opened first and is still open against
What this one adds is dropping the Since #12428 is the one going forward, this pull request was not run on a worker. It stays open, and which of the two lands is the maintainer's decision. Checked by Claude Opus 5.5 in Claude Code, reading both diffs against |
|
Thanks @szaidi-code and @chessing234! omacom/omarchy#16824 · Give PipeWire realtime with… merged and includes your aarch64 change. rtkit is now in the base list for every platform. Closing this in favour of it. |
Summary
Fixes #16348.
On systems without
rtkitinstalled (rtkitwas previously listed only ininstall/omarchy-aarch64.packages, notinstall/omarchy-base.packages),xdg-desktop-portalreportsRTTimeUSecMax = 0. PipeWire's clientlibpipewire-module-rt(rtportal.enabled) applies that zero budget as a hardRLIMIT_RTTIME = 0/0in every PipeWire client, includingquickshell(omarchy-shell).Every application started from the Omarchy launcher inherits
RLIMIT_RTTIME = 0/0, and the kernel RT watchdog sends an unconditionalSIGKILL(RT Watchdog Timeout (hard)) when a thread arms a per-thread CPU-time timer (CLOCK_THREAD_CPUTIME_ID), silently killing Electron/Chromium apps such asclaude-desktop.Changes
rtkitfrominstall/omarchy-aarch64.packagestoinstall/omarchy-base.packagesso all platforms (x86andaarch64*) includertkitin their default package set.migrations/1792716821.shto installrtkitwhen missing and restartxdg-desktop-portal.service(which caches the realtime budget at startup) before the post-update shell restart.test/shell.d/platform-packages-test.shand addtest/shell.d/rtkit-migration-test.sh.Test Plan
./test/shell.d/platform-packages-test.sh./test/shell.d/rtkit-migration-test.sh