Repository navigation
omamobile-omarchy 0.1.14: keep the next boot's kernel modules, and prune old ones - #162
Merged
Merged
Conversation
Owner
Author
|
An independent review of this found one real bug and two wrong claims, now fixed in the latest commit:
Still to do before merge: #134 (0.1.13) lands first, then one run on the 7 Pro ( |
This was referenced Oct 30, 2026
derekross
added a commit
that referenced
this pull request
Oct 30, 2026
…is enrolled Omarchy 4.0.6's lock and omarchy-apply-lock decide fingerprint is set up with `fprintd-list "$USER" | grep -qi finger`, which also matches "User ... has no fingers enrolled ...". omamobile-fingerprint installs /etc/pam.d/omarchy-lock-fingerprint and pulls in fprintd, so on a phone with nothing enrolled only that grep decides, and it says yes. The lock then starts a pam_fprintd attempt that fails at once (PAM_AUTHINFO_UNAVAIL, code 9) and retries 250 ms later for as long as it is up: 130,164 failed attempts in one night on a Pixel 7 Pro, about 3.4 a second, each reaching fprintd and polkit, and 55-62 mA (roughly 12 % of the phone's draw) in an A/B run against the PAM file moved aside (#170). Upstream fixed this in 879d6583d ("Fix fingerprint enrollment and lock-screen recovery", omacom/omarchy#7158), which is only in the 4.5 pre-releases. Patch 0022 backports its probe half: - the lock's probe becomes `LC_ALL=C fprintd-list "$USER" 2>&1`, read by FingerprintModel.classifyProbe(): yes only for an enrolled-print row (" - #0: ..."), no for "has no fingers enrolled" (or no PAM file), unknown otherwise; an unknown answer never turns fingerprint off and is asked again after 1 s, doubling to 40 s, while the lock is up; - omarchy-apply-lock matches the same row, removes the fingerprint PAM file only on a definite no, and keeps it when the probe fails. The rest of 879d6583d (the attempt backoff and "reader unavailable" notice, the fprintd resume hook, the enrollment changes) is left out, so a phone with a finger enrolled behaves as before: a mismatch still retries at 250 ms. omamobile-fingerprint keeps owning the PAM file (TOUCH-PLAN 0.1); with the probe fixed, the file's presence no longer counts as setup on its own. test/patches.py runs the patched lock's own probe command against a fake fprintd-list with the issue's "has no fingers enrolled" text, an enrolled print and a failed call, and puts the output through classifyProbe; it runs the patched omarchy-apply-lock the same way. The series applies with --fuzz=0 to the real aarch64 omarchy 4.0.6-1. 0.1.13 and 0.1.14 are taken by open #134 and #162 (and patch 0021 by Fixes #170 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross
added a commit
that referenced
this pull request
Oct 30, 2026
…is enrolled (#171) Omarchy 4.0.6's lock and omarchy-apply-lock decide fingerprint is set up with `fprintd-list "$USER" | grep -qi finger`, which also matches "User ... has no fingers enrolled ...". omamobile-fingerprint installs /etc/pam.d/omarchy-lock-fingerprint and pulls in fprintd, so on a phone with nothing enrolled only that grep decides, and it says yes. The lock then starts a pam_fprintd attempt that fails at once (PAM_AUTHINFO_UNAVAIL, code 9) and retries 250 ms later for as long as it is up: 130,164 failed attempts in one night on a Pixel 7 Pro, about 3.4 a second, each reaching fprintd and polkit, and 55-62 mA (roughly 12 % of the phone's draw) in an A/B run against the PAM file moved aside (#170). Upstream fixed this in 879d6583d ("Fix fingerprint enrollment and lock-screen recovery", omacom/omarchy#7158), which is only in the 4.5 pre-releases. Patch 0022 backports its probe half: - the lock's probe becomes `LC_ALL=C fprintd-list "$USER" 2>&1`, read by FingerprintModel.classifyProbe(): yes only for an enrolled-print row (" - #0: ..."), no for "has no fingers enrolled" (or no PAM file), unknown otherwise; an unknown answer never turns fingerprint off and is asked again after 1 s, doubling to 40 s, while the lock is up; - omarchy-apply-lock matches the same row, removes the fingerprint PAM file only on a definite no, and keeps it when the probe fails. The rest of 879d6583d (the attempt backoff and "reader unavailable" notice, the fprintd resume hook, the enrollment changes) is left out, so a phone with a finger enrolled behaves as before: a mismatch still retries at 250 ms. omamobile-fingerprint keeps owning the PAM file (TOUCH-PLAN 0.1); with the probe fixed, the file's presence no longer counts as setup on its own. test/patches.py runs the patched lock's own probe command against a fake fprintd-list with the issue's "has no fingers enrolled" text, an enrolled print and a failed call, and puts the output through classifyProbe; it runs the patched omarchy-apply-lock the same way. The series applies with --fuzz=0 to the real aarch64 omarchy 4.0.6-1. 0.1.13 and 0.1.14 are taken by open #134 and #162 (and patch 0021 by Fixes #170 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…une old ones Omarchy's base packages include kernel-modules-hook, and its installer enables linux-modules-cleanup.service, which at every boot moves each /usr/lib/modules/<release> that isn't the running kernel and that no package owns into /usr/lib/modules/.old. A phone's kernels never come from pacman: bin/omamobile modules-push unpacks the next boot's tree ahead of the reboot. So any boot between a push and the reboot into the new kernel took that tree away, and the new kernel came up with no drivers (cheetah NOTES, 2026-10-27). Every replaced tree (about 94 MB) also piled up in .old for good. fix belongs here (review lesson L-233). omamobile-omarchy is on every phone: - a drop-in holds linux-modules-cleanup off while this package's version file exists; - omamobile-modules-cleanup.timer (enabled by a staged timers.target.wants link) runs lib/modules-cleanup ten minutes after boot, at idle priority with a timeout, so nothing on the boot path waits for it. It keeps the running release, every tree that arrived during this boot (marker or tree mtime, or the tree's ctime, after /proc/stat's btime: the next boot's kernel, even mid-push), every pacman-owned tree and the two newest others by marker mtime (rollback), and rm -rf's the rest. Only direct [0-9]* children are candidates; symlinks, .old and dot-dirs (a push's .<release>.new) are never touched, and nothing is removed when pacman can't read its database. --dry-run (or OMAMOBILE_MODULES_CLEANUP_DRY_RUN=1) shows what it would do. A removed tree is recoverable: push re-sends a tree whose marker is missing. test/modules-cleanup.sh runs it against a scratch module root with stub uname and pacman; test/all also checks the staged drop-in, units, script and wants link, and runs systemd-analyze verify on the units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ees stamped by a reset clock Review found that the boot after a push, the case the cleanup exists for, protected the pushed tree only by its rank, and a marker written while the phone's clock read 1970 ranked it oldest and removed it. modules-push now names the release it pushed in /usr/lib/modules/.omamobile-next, and the cleanup keeps that release and any tree stamped before 2026. Also corrects two claims: the incident was on the Pixel 7, not in cheetah's NOTES, and .old doesn't pile up, because kernel-modules-hook's own tmpfiles rule empties it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross
force-pushed
the
omarchy-modules-cleanup
branch
from
October 31, 2026 15:10
157488b to
11c3ff5
Compare
This was referenced Oct 31, 2026
Closed
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
…is enrolled (derekross#171) Omarchy 4.0.6's lock and omarchy-apply-lock decide fingerprint is set up with `fprintd-list "$USER" | grep -qi finger`, which also matches "User ... has no fingers enrolled ...". omamobile-fingerprint installs /etc/pam.d/omarchy-lock-fingerprint and pulls in fprintd, so on a phone with nothing enrolled only that grep decides, and it says yes. The lock then starts a pam_fprintd attempt that fails at once (PAM_AUTHINFO_UNAVAIL, code 9) and retries 250 ms later for as long as it is up: 130,164 failed attempts in one night on a Pixel 7 Pro, about 3.4 a second, each reaching fprintd and polkit, and 55-62 mA (roughly 12 % of the phone's draw) in an A/B run against the PAM file moved aside (derekross#170). Upstream fixed this in 879d6583d ("Fix fingerprint enrollment and lock-screen recovery", omacom/omarchy#7158), which is only in the 4.5 pre-releases. Patch 0022 backports its probe half: - the lock's probe becomes `LC_ALL=C fprintd-list "$USER" 2>&1`, read by FingerprintModel.classifyProbe(): yes only for an enrolled-print row (" - #0: ..."), no for "has no fingers enrolled" (or no PAM file), unknown otherwise; an unknown answer never turns fingerprint off and is asked again after 1 s, doubling to 40 s, while the lock is up; - omarchy-apply-lock matches the same row, removes the fingerprint PAM file only on a definite no, and keeps it when the probe fails. The rest of 879d6583d (the attempt backoff and "reader unavailable" notice, the fprintd resume hook, the enrollment changes) is left out, so a phone with a finger enrolled behaves as before: a mismatch still retries at 250 ms. omamobile-fingerprint keeps owning the PAM file (TOUCH-PLAN 0.1); with the probe fixed, the file's presence no longer counts as setup on its own. test/patches.py runs the patched lock's own probe command against a fake fprintd-list with the issue's "has no fingers enrolled" text, an enrolled print and a failed call, and puts the output through classifyProbe; it runs the patched omarchy-apply-lock the same way. The series applies with --fuzz=0 to the real aarch64 omarchy 4.0.6-1. 0.1.13 and 0.1.14 are taken by open derekross#134 and derekross#162 (and patch 0021 by Fixes derekross#170 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
…une old ones (derekross#162) Arch's linux-modules-cleanup pruned every module tree but the running kernel's at boot, so a kernel pushed to slot B lost its modules before it ever booted. omamobile-omarchy now keeps the tree of the kernel slot B will boot next as well as the running one, and prunes the rest. Dry run on the Pixel 7 Pro (2026-10-30) kept the running kernel's tree and listed only old ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Omarchy's
kernel-modules-hookrunslinux-modules-cleanup.serviceat every boot. It moves each/usr/lib/modules/<release>that isn't the running kernel and that no package owns into/usr/lib/modules/.old. A phone's kernels never come from pacman:bin/omamobile modules-pushunpacks the next boot's tree. So on every phone:modules-pushand the reboot into the new kernel takes the new kernel's drivers away, and it comes up with no modules (recorded on the Pixel 7, device/panther: the touchscreen (FT3658 kernel option, T6) and the touch notes #149's NOTES, 10-27);#152 holds the unit off for the 9a only; this does it once, in the package every phone has (review lesson L-233).
What changes (omamobile-omarchy 0.1.14):
A drop-in holds Arch's unit off while this package is installed (
ConditionPathExists=!/usr/share/omamobile/omarchy/version).omamobile-modules-cleanup.timerruns/usr/lib/omamobile-omarchy/modules-cleanup10 minutes after boot, at idle priority, sandboxed (only/usr/lib/moduleswritable), with a 5-minute timeout. It keeps:btime): the next boot's kernel;and deletes the others. Only direct
[0-9]*children are candidates; symlinks,.oldand a push's in-progress.<release>.neware never touched; if pacman can't read its database nothing is removed. A deleted tree is recoverable:bin/omamobile pushre-sends a tree whose marker is missing.--dry-run/OMAMOBILE_MODULES_CLEANUP_DRY_RUN=1log without deleting.Existing
.oldcontents are left alone (RELEASES §5.4 says they can be deleted by hand).Tests: new
test/modules-cleanup.shintest/all(scratch root, stubuname/pacman, fake/proc/stat): every keep rule, removal of older trees, dot-dirs and symlinks untouched, both dry runs, a broken pacman database, an empty root; staging checks andsystemd-analyze verifyon the units. Three mutations each made it fail.tools/pr-checkpasses.Not yet run on a phone. After the upgrade, the drop-in and the timer take effect from the next boot. Once this merges, #152's tegu-only drop-in is redundant.
🤖 Generated with Claude Code