Skip to content

Install the session.slice CPU weight drop-in into /usr/lib/systemd/user - #191

Closed
omarchybot wants to merge 1 commit into
masterfrom
session-slice-cpuweight
Closed

omarchybot wants to merge 1 commit into
masterfrom
session-slice-cpuweight

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

omacom/omarchy#7651 adds default/systemd/user/session.slice.d/10-cpuweight.conf — a CPUWeight=1000 drop-in for the user manager's session.slice — along with the migration that applies it live, the docs entry and the tests. A file under default/** only reaches a machine through an explicit install line here, and there isn't one, so the generic cp -a default/. puts it at /usr/share/omarchy/default/systemd/user/session.slice.d/ and nowhere the user manager reads. It would ship looking installed and do nothing — the shape of 2aa5c50, where omarchy-crash-watch.service reached the template tree and never the search path.

The gap is worse than a missing feature, because the migration hides it. A new install never runs that migration at all, since omarchy-provision-user marks every one complete on first install, so it gets neither the drop-in nor the runtime fallback. An existing install does get the weight from the fallback, but that lands in /run/user/$UID/systemd/user.control/session.slice.d/50-CPUWeight.conf, which does not outlive the user manager, and the completion marker then stops the migration ever running again. The setting would work until the next reboot and be gone for good afterwards, with nothing to say so.

Both recipes need the line. They carry identical default/systemd/user install sets today, and test/shell.d/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 get no drop-in, and edge is where this lands first.

That the destination is right is not taken on faith: the adjacent app.slice.d/10-oomd.conf line installs to the same shape, and the user manager reports DropInPaths=/usr/lib/systemd/user/app.slice.d/10-oomd.conf with its properties in effect. The same package already owns both that file and its template copy, so the second copy is the established pattern rather than a conflict.

Merge order — this cannot land on its own. Neither the pinned stable source (_commit=f0020448) nor today's quattro contains the drop-in, so package() aborts on install: cannot stat 'default/systemd/user/session.slice.d/10-cpuweight.conf'. omacom/omarchy#7651 has to merge first, and the stable hunk belongs with the release commit that advances _commit/pkgver; bumping pkgrel before then would only trigger a build that fails. Draft until that ordering is available.

🤖 Generated by Opus 5 in Claude Code. Reviewed by Codex XHigh.

omacom/omarchy#7651 adds `default/systemd/user/session.slice.d/10-cpuweight.conf`, the migration that applies it live, the docs entry and the tests, but a drop-in under `default/**` only reaches a machine through an explicit install line here. Without one the generic `cp -a default/.` puts the file at `/usr/share/omarchy/default/systemd/user/session.slice.d/`, which systemd never reads, so it looks shipped and does nothing -- the same shape as 2aa5c50, where omarchy-crash-watch.service landed in the template tree and never in the search path.

The consequence is worse than a missing feature. New installs get nothing at all, because `omarchy-provision-user` marks every migration complete on first install and the migration's runtime fallback therefore never runs. Existing installs do get the weight from that fallback on `omarchy update`, but it is written to `/run/user/$UID/systemd/user.control`, so it dies with the last session and the completion marker stops it ever being applied again.

Both recipes carry identical `default/systemd/user` install sets and both need the line. `test/shell.d/config-test.sh` only falls back to the dev PKGBUILD when the stable one is absent, so it cannot catch a dev recipe left behind -- patching stable alone would turn that suite green while edge-channel machines still had no drop-in.

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 Author

Closing this as a duplicate. Same session.slice CPU weight drop-in install as #183 (older); this one is a bot draft and both conflict. #183 is the one being kept.

If this is wrong, and it still does something the current branch does not, say so here and it can be reopened.

Checked by Claude Opus 5.5, reading this change against the repository; no second model reviewed it.

@omarchybot omarchybot closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants