Skip to content

Give session.slice CPU weight over app.slice so builds cannot stall input - #7651

Closed
tobi wants to merge 5 commits into
omacom:quattrofrom
tobi:feat/session-slice-cpuweight
Closed

tobi wants to merge 5 commits into
omacom:quattrofrom
tobi:feat/session-slice-cpuweight

Conversation

@tobi

@tobi tobi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

When a few things compile at once — which happens by accident all the time now: a Qt/QML app, a Rust rewrite, a couple of agents in worktrees behind a terminal multiplexer — the mouse starts stuttering and keys arrive late or in bursts. It feels like a hardware problem. It isn't.

Hyprland, the shell, PipeWire, the portals and D-Bus run in session.slice. Everything the user launches — browsers, terminals, and every cargo/ninja/cc1plus/rustc those terminals spawn — runs in app.slice. Both slices ship at systemd's default cpu.weight=100. Under saturation the compositor's input loop is just another runnable thread waiting for a CFS slot, and libinput says so:

ERR from aquamarine ]: [libinput] event10 - Keychron Keychron M3 4K: client bug: event processing lagging behind by 364ms, your system is too slow
ERR from aquamarine ]: [libinput] event10 - Keychron Keychron M3 4K: client bug: event processing lagging behind by 168ms, your system is too slow
ERR from aquamarine ]: [libinput] client bug: timer button-debounce-debounce-event7: scheduled expiry is in the past (-104ms), your system is too slow
DEBUG from aquamarine ]: [libinput] event7  - Keychron Keychron M3 4K: SYN_DROPPED event - some input events have been lost.

Anyone can check their own session for this signature (no root needed):

command grep -hoE 'lagging behind by [0-9]+ms|SYN_DROPPED|scheduled expiry is in the past' /run/user/$UID/hypr/*/hyprland.log | sed -E 's/[0-9]+ms/Nms/' | sort | uniq -c

Binned, from a ~36 h Hyprland session on a Dell XPS 14 / Panther Lake driving a 5K display while doing normal dev work (Hyprland C++ build, cargo builds, 40 Chrome renderers):

    92  <50ms
    62  50-99ms
    41  100-249ms
    10  250-499ms
   max  385ms
    33  SYN_DROPPED
   125  scheduled expiry is in the past

Every 250 ms+ entry and every SYN_DROPPED lines up with a load spike of 15–30 on 16 cores from builds in terminals. Memory, swap and GPU were healthy at those moments — this is CPU arbitration, and it's happening in the one cgroup that must never lose it.

Change

Ship /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf:

[Slice]
CPUWeight=1000

That gives the interactive tier a 10:1 share over app.slice (background.slice is already 30, so the ordering becomes session ≫ app > background, which is what GNOME/KDE sessions effectively do). CPU weight is work-conserving: it only arbitrates under contention. An idle machine is unchanged, and builds still get every core the compositor is not using at that instant — which is almost all of them. The compositor just stops losing the argument. Memory and IO are untouched; this is orthogonal to the oomd tiering in app.slice.d/10-oomd.conf and follows the same packaging pattern.

Why not the alternatives:

  • Nice= on Hyprland alone: per-thread, doesn't cover the shell/PipeWire/portals, and sched_autogroup flattens nice across sessions anyway.
  • SCHED_FIFO/RR on the compositor: a compositor that ever spins becomes a hard input lock; Hyprland upstream deliberately elevates only specific threads.
  • nice -n 19 on builds: opt-in, forgotten, doesn't cover Chrome.

Evidence (anecdotal, stated as such)

Applied live with systemctl --user set-property session.slice CPUWeight=1000 during a bad episode (load 31, CPU PSI some 60 %, Hyprland + cargo builds running). Subjectively: immediate. Mouse stopped stuttering, typing stopped hanging, while the builds kept going. "Huh, this really fixed things."

A short synthetic A/B (48 burners in app.slice, real uinput mouse at 400 Hz, 60 s each) measured Hyprland's cgroup CPU stall (cpu.pressure some) at +314 ms with weight 1000 vs +1150 ms at the default 100, and +540 ms vs +764 ms with a malloc/memset churn load. Synthetic load did not reproduce the 300 ms+ libinput stalls that real compiles cause in either configuration, so I'm not claiming this eliminates them — only that the compositor waits for CPU several times less, and that in daily use the difference is obvious.

Included

  • default/systemd/user/session.slice.d/10-cpuweight.conf (commented)
  • migration: systemctl --user daemon-reload so existing sessions pick it up live (same shape as the oomd migration; a TTY/SSH omarchy update gets it at next login)
  • test/shell.d/systemd-test.sh: asserts the drop-in, that nothing else under default/systemd/user carries a CPUWeight= (app scopes must stay default so the compositor out-ranks them), and that the migration reloads
  • docs/file-layout.md entry

Companion (after this lands): one install -Dm644 default/systemd/user/session.slice.d/10-cpuweight.conf "$pkgdir/usr/lib/systemd/user/session.slice.d/10-cpuweight.conf" in omarchy-settings' PKGBUILD in omarchy-pkgs, next to the oomd line. Happy to open that too.

Verified live: cat /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/cpu.weight → 1000, hyprctl configerrors clean, Hyprland/Quickshell/PipeWire all still in session.slice, apps in app-*.scope.

…nput

Hyprland, the shell, PipeWire, the portals and D-Bus all run in
session.slice. Everything the user launches lands in app.slice: browsers,
terminals, and whatever those terminals start. Both slices ship at
cpu.weight=100, so when a couple of builds pin every core the compositor's
input loop waits its turn like any compiler thread. libinput then logs
"event processing lagging behind by N ms, your system is too slow", the
pointer stutters, and key events queue up until the scheduler comes back
around.

Ship /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf with
CPUWeight=1000. Weight only arbitrates under contention, so an idle
machine is unchanged and builds still get every core the compositor is
not using at that instant. A migration reloads the user manager so
existing sessions pick it up live. Tests assert the drop-in, that only
session.slice is weighted, and that the migration reloads.
Copilot AI balanced review requested due to automatic review settings August 21, 2026 01:59

Copilot AI left a comment

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.

Pull request overview

Prioritizes interactive session processes over app workloads during CPU contention. Packaging must be coordinated before release so the migration reloads an installed drop-in.

Changes:

  • Sets session.slice CPU weight to 1000.
  • Reloads existing user managers through a migration.
  • Adds documentation and regression checks.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
default/systemd/user/session.slice.d/10-cpuweight.conf Defines the session CPU weight.
migrations/1787276689.sh Reloads the user systemd manager.
test/shell.d/systemd-test.sh Checks weighting and migration behavior.
docs/file-layout.md Documents the installed drop-in path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1787276689.sh Outdated
Comment on lines +3 to +5
# New installs get /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf
# with the package. Existing sessions only apply a slice drop-in when the user
# manager reloads, and the weight takes effect live -- no relogin needed.
…there yet

Migrations run once. If this lands before omarchy-settings ships
session.slice.d/10-cpuweight.conf, the daemon-reload has nothing to pick
up and the user waits for a relogin. Fall back to a --runtime
set-property for the current session; the packaged file takes over at
the next login. config-test now requires the PKGBUILD to install the
drop-in, coupling the two releases.
@tobi

tobi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the packaging-order point:

  • migrations/1787276689.sh now falls back to systemctl --user set-property --runtime session.slice CPUWeight=1000 when /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf is not installed yet. --runtime writes under /run only, so the session gets the weight immediately and the packaged drop-in takes over at the next login — no second migration needed, nothing persisted that could shadow the package later.
  • test/shell.d/config-test.sh package_defaults now lists the drop-in, so the suite fails until the omarchy-settings PKGBUILD installs it (verified: passes against the companion branch, fails against current omarchy-pkgs master).
  • systemd-test.sh asserts the runtime fallback.
  • Companion packaging PR: omarchy-settings: ship session.slice.d/10-cpuweight.conf omarchy-pkgs#183 (both omarchy-settings and -dev; must merge with the _commit bump that includes this, since install -Dm644 fails on a tree without the file).

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed on a disposable Omarchy VM with a live Hyprland session, plus an independent codex pass at xhigh. No code defect found — the mechanism does what the PR says it does, and I checked the two ways it could have quietly not worked.

Verified on the machine, not just read:

  • The cpu controller is delegated to the per-user manager on current Arch. systemctl show user@1000.service -p DelegateControllers reports cpu memory pids on systemd 261, and session.slice's cgroup exposes cpu.weight. Without that this drop-in would install, parse, and do nothing; it does not happen here.
  • Hyprland and Quickshell really are in session.slice. Both PIDs sit in /user.slice/user-1000.slice/user@1000.service/session.slice/wayland-wm@hyprland.desktop.service, and uwsm-app-launched programs land under app.slice/app-graphical.slice, so the split the PR describes is the split that exists.
  • The packaged drop-in takes effect live. Installed to /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf followed by systemctl --user daemon-reload, session.slice/cpu.weight went 100 → 1000 with no relogin, and DropInPaths named the packaged file.
  • The migration's runtime fallback works, and it works over SSH. Run as bash -euo pipefail migrations/1787276689.sh from an SSH session with no packaged file present, cpu.weight went 100 → 1000 and left /run/user/1000/systemd/user.control/session.slice.d/50-CPUWeight.conf. Re-run with the packaged file present it is a no-op and leaves no runtime drop-in, so it is idempotent on both paths.
  • test/shell.d/systemd-test.sh passes, 14 assertions, exit 0. The grep … | grep -q . && fail line is not tripped by set -euo pipefail: a failing pipeline as the non-final left operand of && is exempt from errexit, which I confirmed with a minimal probe rather than assuming.

Two written claims that do not hold. Neither changes behaviour, so I have not touched your branch:

  • migrations/1787276689.sh:6 — "An omarchy update from SSH or a TTY has no user manager to reload". There is one user manager per user, not per session, so a PAM-managed SSH or TTY login shares user@UID.service with the graphical session; that is how the fallback above applied the weight from an SSH session. The sentence is inherited verbatim from migrations/1785424256.sh:29, so it is repo-wide wording rather than something this PR introduced — worth fixing in both places or neither.
  • migrations/1787276689.sh:12 "nothing persists", and the follow-up comment's "nothing persisted that could shadow the package later". /run/user/$UID/systemd/user.control/ outranks /usr/lib, and 50-CPUWeight.conf sorts after 10-cpuweight.conf. It lives for the lifetime of the user manager, which a lingering session or an open SSH login can hold across a graphical logout. Both values are 1000 today so nothing differs now, but a later change to the packaged value would be shadowed for those users until their manager goes away.

Merge order, which is the maintainer's call. test/shell.d/config-test.sh fails against current omarchy-pkgs master, reproduced here: PKGBUILD does not explicitly install default/systemd/user/session.slice.d/10-cpuweight.conf -> /usr/lib/systemd/user/session.slice.d/10-cpuweight.conf, exit 1, where the same suite is green on quattro without this PR. Going the other way, omarchy-settings pins _commit=f0020448ca87329199de7cb12f2015ebc4a3e5e7 (tag v4.0.0), and that tree has no default/systemd/user/session.slice.d/ at all — so omacom/omarchy-pkgs#183 landing first makes install -Dm644 in package() fail and the release package stop building. There is no order that leaves both repositories green in between, which matches what you already wrote: they land together, and the omarchy-settings (non-dev) half is only safe alongside the _commit bump that includes this commit. omarchy-settings-dev builds from the quattro tip and is fine the moment this merges.

Copilot's earlier note about the migration completing before the drop-in exists is answered by the --runtime fallback in e94f507.

Nothing pushed. Waiting on the maintainer for the merge-order decision; nothing outstanding for you.

Second opinion: codex at xhigh agreed on the delegation, the slice placement, the set -e semantics and the ordering deadlock. Its independence is not currently guaranteed, so read that as agreement rather than confirmation. The user.control shadowing point above is its contribution — I had seen the drop-in and dismissed it as harmless without checking the claim it contradicts.

Review on omacom#7651 caught two claims that do not hold. A user manager is
per user, not per session, so an update from SSH or a TTY does reload the
graphical session's manager -- the same sentence was inherited from the
oomd migration, so correct it there too. And --runtime is not "nothing
persists": it writes a drop-in under /run/user/$UID/systemd/user.control
that outranks the packaged file for as long as that manager lives. Both
values are 1000 today, so behaviour is unchanged; only the comments are.
@tobi

tobi commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the two wording points from the review in 255e881 (comments only, no behaviour change):

  • migrations/1787276689.sh and migrations/1785424256.sh no longer claim an SSH/TTY update has no user manager to reload — it is one manager per user, so the reload reaches the graphical session either way.
  • migrations/1787276689.sh now states what --runtime actually does: writes /run/user/$UID/systemd/user.control/session.slice.d/50-CPUWeight.conf, which outranks the packaged drop-in for the life of that user manager and is gone after a full logout. Both say 1000, so nothing differs until then.

test/shell.d/systemd-test.sh still green. Merge order unchanged: this and omacom/omarchy-pkgs#183 need to land together (stable half with the _commit bump that includes this).

Two of the new assertions passed against a change that does nothing. Appending a second `CPUWeight=100` to the drop-in left the file with an effective weight of 100 -- systemd takes the last assignment -- while a match-anywhere grep still found the 1000 above it, and the same-file exclusion in the stray-weight check meant nothing else looked at it either. Commenting out both `systemctl` calls in the migration reduced it to a file of comments, and all three migration assertions still passed, because a substring grep matches a commented line as readily as a live one.

The weight check now compares the last `CPUWeight=` line against 1000, and the migration checks anchor to the start of a line. The stray-weight check drops its `grep -q` terminator for a captured variable, which reports the offending path in the failure and removes the case where `grep -q` closing the pipe early turns a real violation into a SIGPIPE status that `pipefail` reads as no violation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed with Opus 5 in Claude Code alongside an independent second opinion from Codex at xhigh effort. Every finding below was checked against the source, and every systemd claim against a live Omarchy session, rather than taken on either model's word. One commit is pushed to this branch — a3976cc — described under the tests below.

The diagnosis holds up, and it reproduces. session.slice and app.slice really do both sit at cpu.weight=100 on a running machine, with Hyprland, Quickshell, Xwayland, PipeWire and the portals in the former and app-Hyprland-*.scope in the latter. The lever is real rather than silently ignored: user@.service carries Delegate=pids memory cpu, and running the migration end to end under the actual bash -euo pipefail runner exits 0 and takes session.slice from 100 to 1000 live, writing exactly the 50-CPUWeight.conf the comment describes. The correction to 1785424256.sh is right as well — there is one user manager per user, so a daemon-reload over SSH does reach the graphical session.

The drop-in is never installed, and the migration hides that. A file under default/** only reaches a machine through an explicit install -Dm644 in omarchy-settings' PKGBUILD, next to the 10-oomd.conf line this PR points at as its pattern, and there isn't one. The generic cp -a default/. puts it at /usr/share/omarchy/default/systemd/user/session.slice.d/, which the user manager never reads, so it ships looking installed and does nothing. A new install then gets no fallback either, because omarchy-provision-user marks every migration complete on first install, so 1787276689.sh never runs on a fresh machine. An existing install does get the weight from the --runtime branch, but that lands in /run/user/$UID/systemd/user.control/, which does not outlive the user manager, and the completion marker stops the migration ever running again — so the setting works until the next reboot and is then gone for good, with nothing to say so. ./test/shell catches this already: the new package_defaults entry in config-test.sh asserts a PKGBUILD mapping that does not exist, and the suite fails on exactly that.

The packaging half is now open as a draft at omacom/omarchy-pkgs#191, against both the stable and the dev recipe — config-test.sh only falls back to the dev PKGBUILD when the stable one is absent, so a dev recipe left behind is invisible to that suite while edge-channel machines still get nothing. It is a draft deliberately: neither the pinned stable source nor today's quattro contains the drop-in yet, so merging it now aborts package() on install: cannot stat. This PR goes first, and the stable hunk belongs with the release commit that advances the pin.

Two of the four new assertions passed against a migration that does nothing. Appending a second CPUWeight=100 to the drop-in leaves an effective weight of 100, since systemd takes the last assignment, but grep -Fx 'CPUWeight=1000' still matched the line above it and the stray-weight check excluded that same file from its search, so nothing looked. And commenting out both systemctl calls reduced the migration to a file of comments while all three migration assertions still passed, because a substring grep matches a commented line as readily as a live one. a3976cc compares the last CPUWeight= line against 1000 and anchors the migration greps to the start of a line; it also captures the stray-weight search into a variable rather than ending the pipeline in grep -q, which names the offending path in the failure and drops the case where grep -q closing the pipe early turns a real violation into a SIGPIPE status that pipefail reads as no violation. Each assertion was checked against a mutation that defeats it, and against the unmutated tree.

A stock keybind puts a CPU-heavy encoder inside the slice being boosted. o.bind dispatches through a raw hl.dsp.exec_cmd rather than uwsm-app --, and the two land in different places:

raw hl.dsp.exec_cmd  ->  session.slice/wayland-wm@hyprland.desktop.service
uwsm-app --          ->  app.slice/app-graphical.slice/app-Hyprland-bash-*.scope

So SUPER + CTRL + PERIOD runs omarchy-transcode, and its ffmpeg -c:v libx265 -preset slow, at weight 1000 rather than 100, as does ALT + PRINT, whose gpu-screen-recorder call carries -fallback-cpu-encoding yes. A 4K transcode then takes the interactive tier's 10:1 share and competes with the compositor inside it, which is the inverse of the intent. Wrapping those two in o.launch would settle it, but it changes what a user-facing keybind does and wants verifying in the running UI, so it is left here as a recommendation rather than folded into this branch.

Scope worth naming rather than fixing. The weight only arbitrates inside user@$UID.service. Login session scopes are siblings of the whole user manager — user-1000.slice holds user@1000.service alongside the session-N.scopes, all at weight 100 — so a build started from an SSH or TTY login is untouched by the drop-in. Terminals launched from Hyprland are covered, which is the common case and the one the numbers in the description measure, but "a couple of agents in worktrees behind a terminal multiplexer" only counts when that multiplexer came from a keybind rather than a login.

One accuracy point for the description. It says both slices "ship at systemd's default cpu.weight=100", but upstream sets them explicitly: /usr/lib/systemd/user/session.slice and app.slice each carry a literal CPUWeight=100, and background.slice a literal 30. Departing from a deliberate upstream choice is a stronger claim than filling in an unset default, and the evidence here supports making it.

The weight assertion matched `^CPUWeight=` anywhere in the drop-in, so a file
whose effective weight is 100 passed: `[Slice] CPUWeight=100` followed by
`[Unit] CPUWeight=1000` is green, and systemd reports `CPUWeight=100` with
`cpu.weight=100` for it on a live session. A drop-in with no `[Slice]` section
at all passed the same way. Both are the case the previous assertion was
written to close, one section over.

The migration greps had no right-hand boundary, so `CPUWeight=10000` in the
migration satisfied a check for 1000 while the drop-in still said 1000 -- the
divergence the migration's own comment tells the next reader cannot happen --
and `daemon-reload-NOPE` satisfied the reload check.

Every assertion is verified against a mutation that defeats the old form and
against the unmutated tree, on a worker running a real user manager.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at a3976cc with Opus 5 in Claude Code and an independent second opinion from Codex at xhigh effort. Every systemd claim below was measured on a disposable Omarchy VM running a real user manager (systemd 261.2), not read off a man page. One commit pushed: c3cea07.

255e881a is comments-only, checked rather than taken on your word. Stripping comment lines from both migrations leaves byte-identical executable text, there is no line continuation or here-document in either file where a # could be something other than a comment, and Codex reached the same answer by a different route — parsing both revisions with a Bash grammar and comparing the trees with comment nodes removed.

The --runtime comment is accurate, and now checkable. systemctl --user set-property --runtime session.slice CPUWeight=1000 writes exactly /run/user/1000/systemd/user.control/session.slice.d/50-CPUWeight.conf, as the comment says. Precedence was proved by making the two values differ rather than by trusting that they agree: with the packaged drop-in at 1000 and the runtime one at 777, systemctl --user show session.slice -p CPUWeight reports 777 and the cgroup's cpu.weight is 777. So the runtime file does outrank the packaged one, and today both say 1000, so nothing differs.

One refinement worth having in the comment, because it changes what a future reader may rely on: the mechanism is filename ordering, not the user.control directory outranking /usr/lib. DropInPaths lists the packaged file first and the runtime file last, and adding a packaged 60-later.conf at 222 took the effective weight to 222 over the runtime 50-CPUWeight.conf. "Sorts after and outranks" is right; "because it is under /run" would not be.

"Gone once the user has fully logged out" holds for Omarchy: Linger=no on a machine built from the ISO, and nothing in the repo calls loginctl enable-linger.

Two of the four assertions still passed a drop-in that does nothing — pushed c3cea07. grep -E '^CPUWeight=' matches any section, so [Slice] CPUWeight=100 followed by [Unit] CPUWeight=1000 was green while the live session reported CPUWeight=100 and cpu.weight=100; a file with no [Slice] section at all passed the same way. That is the case the previous assertion was written to close, one section over. And the migration greps had no right-hand boundary, so CPUWeight=10000 in the migration satisfied a check for 1000 while the drop-in still said 1000 — precisely the divergence the migration's own comment tells the next reader cannot happen — and daemon-reload-NOPE satisfied the reload check. The weight is now read the way systemd reads it, the last CPUWeight= under [Slice], and both migration greps are anchored at both ends. Eleven mutations run on the worker: every one that breaks real behaviour now fails, and the unmutated tree is still 14 passed, 0 failed, exit 0.

Merge order has changed since the earlier comments, and not in the direction they assumed. They said the stable half needs "the _commit bump that includes this commit", with _commit=f0020448 (tag v4.0.0). That pin has since moved to 286b8c2b (4.0.1rc1) — and 286b8c2b is on v4-0-1, a backport branch that forked from quattro at f0020448 and has 22 cherry-picks on it, none from quattro. quattro is 72 commits past that fork point and is not an ancestor of v4-0-1. So merging this into quattro does not put the drop-in into the stable pin's tree, now or by any later bump along that line: it fixes omarchy-settings-dev, which sources #branch=quattro, and leaves omarchy-settings still building from a tree without the file. The stable half needs this backported to v4-0-1, or a release cut from a tree that contains quattro — a maintainer call, and the one thing left blocking omacom/omarchy-pkgs#183.

Also worth knowing: omacom/omarchy-pkgs#191 is a draft that adds the same two install -Dm644 lines as your #183. It was opened by this bot without noticing yours, which is our mistake and not yours; #183 has priority and #191 should be the one that closes. Closing it is the maintainer's call, so it is flagged here rather than done.

What this costs the build, since it is a system-wide scheduling change. SUPER + RETURN goes through omarchy-launch-terminal, which is exec setsid uwsm-app -- xdg-terminal-exec, so the terminal and everything started inside it land in app.slice/app-graphical.slice/app-*.scope at weight 100 — the build is on the side being deprioritised. Under full saturation the aggregate shares go from roughly 44/44/13 to 88/9/3 across session/app/background. That reads worse than it is, because CPU weight is work-conserving and the interactive tier is bursty and mostly idle, so the build keeps nearly every core except during the compositor's bursts, which is the trade the PR describes. The one thing it does not buy is what the title implies: the terminal is in app.slice alongside the compiler, so its own rendering can still be starved — the compositor's input loop is what stops losing the argument, not the terminal.

Nothing else outstanding for you. Waiting on the maintainer for the v4-0-1 backport-or-release-cut decision and the #183/#191 duplicate.

@omarchybot

Copy link
Copy Markdown
Collaborator

Closing this in favour of the BORE scheduler, at the maintainer's call. Omarchy has booted its own linux-omarchy kernel by default since 2026-09-14 (ff85faf), and it is built with BORE (0110-bore-7.0.0.patch, CONFIG_SCHED_BORE=y), full preemption and a 1000 Hz tick. BORE lowers the priority of tasks that burn long stretches of CPU, like the cargo, ninja and cc1plus runs here, so a woken input or compositor thread gets ahead of them. That is the stutter this pull request set out to fix, and your measurements came from before that kernel shipped.

For the record, BORE works on individual tasks and leaves session.slice and app.slice at the same cpu.weight, so it is not the same mechanism as this change. If the lag still shows up on linux-omarchy under a heavy build, the lagging behind by / SYN_DROPPED check from your description is the evidence to bring back, and this can be reopened.

Thank you for the careful write-up and the measurements.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants