Repository navigation
Narrow Ally TDP, autologin, and the masked power-profile path - #79
Conversation
Hardware used to install allow_active=yes with no rules.d file, so a desktop-only Ally could set TDP. The deny rule is written before the policy, and removing the session puts that deny rule back. The session step is the only YES, and the username is substituted as text rather than used as a printf format. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
Once power-profiles-daemon is masked, a profile switch was a silent reassert that still recorded the request. power-saver, balanced, and performance now ask the capped writer for its live floor, battery SPL policy, and AC SPL policy, and the profile is recorded only after that write succeeds. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
Three fail stamps restarted SDDM even off the handheld variant. The greeter restart and pointer load now run only there. The wheel NOPASSWD grant leaves the base sudoers tree and is installed by omarchy-gaming-session. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
The enabled marker started steamos-manager and omarchy-ally-power, neither of which exists, and a missing unit aborted session start. The marker, the unit list, and its cleanup are gone. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
DanielJBurbridge
left a comment
There was a problem hiding this comment.
dev-red review: FAIL (mechanical only) at ddcc634
Blocker B1: this head conflicts with integ a478c5f (#77 and #78 merged) in docs/rog-ally-gaming-session.md. Re-merge integ. Tests also has to go green on the new head; it was still running on this one. Once both are done, I'll pass it on a narrow delta check (merge plus CI only).
The code is otherwise sound:
- A3:
write_deny_rulelands before the policy ininstall_hardware, the session install writes the user's YES rule before copying the policy, andremove_sessionrestores the deny rule. Every caller (install/hardware/asus/ally-tdp.sh,migrations/1794842519.sh,omarchy-gaming-session.install) runs hardware before session when the gaming session is present, so the YES rule isn't overwritten. On a desktop-only Ally the end state is the policy plus the NO rule. - printf low: fixed. The name goes in by
${template//@USER@/$user}and is validated byhandheld_user. - A4:
restart_greeterandload_greeter_pointerare now gated onhandheld_variant. The sudoers file moves to the gaming-session PKGBUILD withinstall -Dm440andvisudo -cfwhen it's available. - A5: profiles map to the writer's floor and its battery and AC SPL policies. It writes with
--set, and an apply failure exits before the profile is recorded. - A6: the dead block and
started_power_unitsare deleted. - All 4 commits have a Model trailer (grok-4.7).
ally-tdp-testgives 20/20 andsudoers-test7/7 locally.handheld-autologin-testandgaming-setup-testcan't run on my box (nonewuidmap), so CI decides those.
Medium follow-up (needs a line in the follow-ups and in DEPLOY, L200 if free): /etc/sudoers.d/omarchy-handheld-autologin changes owner from omarchy-settings(-dev), which cp -a etc/. in omarchy-pkgs, to omarchy-gaming-session. Two ways that can break:
- If
omarchy-gaming-session1.0.0-5 is installed while the old settings package still owns the file, pacman refuses it as a file conflict. - If the settings package is upgraded alone, the grant vanishes, the relogin fallback's
sudo -nis refused, and you get the L145 black-screen relogin loop when desktop-lock is on.
Nothing in the tree upgrades the gaming-session package, so install both packages in one pacman -U transaction, and say so in the deploy steps.
Keep the #78 TDP paragraph, and record that session-start no longer names the missing ally-power units. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
L200: the sudoers file moves from omarchy-settings to omarchy-gaming-session 1.0.0-5, so the two packages have to be installed in one pacman -U or the grant conflicts or disappears. Model: grok-4.7 Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
DanielJBurbridge
left a comment
There was a problem hiding this comment.
dev-red delta review: PASS at 5e41cf5
- B1 is fixed. Integ a478c5f is an ancestor of this head, and the
docs/rog-ally-gaming-session.mdconflict is resolved. - L200 is added in its own L200–L209 range. HANDOFF has the one-
pacman -Urule for both deploy and rollback. No other follow-ups lines are removed compared with integ. - All new commits have a
Model: grok-4.7trailer. - Actions
testandi18n-checkare both green on this head.
The code for A3–A6 is unchanged since the review at ddcc634 (5931524047). Cleared to merge at this sha.
e742281
into
feat/ally-parity-integration-20261111
What changes
The integration audit found four places where the Ally path was wider or quieter than it should be.
allow_active=yes) was installed at hardware time, while the rules.d narrowing rule was written only in the session step. A desktop-only Ally, and the window before the session install, could set TDP. Hardware now writes a NO rule before the policy. The session step is the only YES, and only for the handheld user. Removing the session puts the NO rule back while the policy remains. Migration 1794842519 is unchanged and still runs hardware, then session when the gaming-session package is present, so both desktop-only and gaming-session Allys end correct.write_ruleused the rule template as a printf format. The username is now substituted as text (printf '%s'), so a%or\in the template stays literal.handheld_variantis true. The%wheelNOPASSWD grant moved out ofetc/sudoers.dintopackages/omarchy-gaming-session1.0.0-5, installed at/etc/sudoers.d/omarchy-handheld-autologinmode 0440 and checked withvisudo -cfwhen visudo is present.omarchy-powerprofiles-setreasserted TDP and still recorded the requested profile. power-saver, balanced, and performance now map to the writer's live floor, battery SPL policy, and AC SPL policy. The profile is recorded only after that write succeeds. Unmasked and non-Ally behaviour is unchanged.omarchy-session-startno longer startssteamos-manager.serviceandomarchy-ally-power.servicefrom the dead ally-power marker, and the matching cleanup is gone.Integ
a478c5fc(#78) is merged. The gaming-session doc keeps that TDP paragraph, and records that session-start no longer names the missing units.L200.
/etc/sudoers.d/omarchy-handheld-autologinchanges owner fromomarchy-settings(-dev), which copies it withcp -a etc/., toomarchy-gaming-session1.0.0-5. Install both packages in onepacman -U. Separate installs either conflict on that file or drop the grant and recreate the L145 relogin loop. The same line is in the handoff deploy and rollback steps.Model: grok-4.7
Verification
bash test/shell.d/ally-tdp-test.sh— hardware-only and desktop-only migration leave a NO rule and no YES; a root-owned handheld user after the migration is YES, with%sand\nleft literal; a masked profile applies the mapped tuple and a refused apply does not change the recorded profile; the shim still applies 20/20/25 on battery.bash test/shell.d/powerprofiles-set-test.sh— unmasked profile set still records through powerprofilesctl.bash test/shell.d/handheld-autologin-test.sh— three fails off the handheld variant write the stop file and do not restart SDDM; the grant is absent frometc/sudoers.dand the gaming-session PKGBUILD installs it at 0440.bash test/shell.d/sudoers-test.sh— the base drop-ins still match, with the autologin grant removed.bash test/shell.d/gaming-setup-test.sh— session-start has no ally-power references; the supervisor cases pass.bash test/shell.d/pizzarchy-port-test.sh— the install script still has no NOPASSWD.shell/plugins/lockwas not touched.Screenshots
No visible change: polkit rules, sudoers packaging, profile recording, and a dead session-start branch. The panel and greeter look the same.