Repository navigation
omamobile-omarchy 0.1.40: swap on zram at half the RAM (#528) - #599
Merged
Merged
Conversation
Omarchy 4.5 moves its zram tuning to /usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf, with zram-size = ram, and installs zram-generator on aarch64. With the zram driver in our kernel config (derekross#515), the move past 4.0.6 would give every phone RAM-sized zram: the setting that hung the Pixel 9a under a 6 GB load in derekross#515's test, where half the RAM took 5 GB more with no OOM kill. The package now ships zram-generator.conf.d/91-omamobile.conf, which sets only zram0's size to ram / 2. Drop-ins are read in name order across /usr/lib, /run and /etc, so it overrides Omarchy's size and keeps its zstd and swap priority; a leftover /etc/systemd/zram-generator.conf decides nothing, and a local 99-local.conf (the name Omarchy's migration suggests) still wins. Under Omarchy 4.0.6 an image has no zram-generator, so nothing changes there; where it was installed by hand, the drop-in alone makes a half-RAM device. test/zram.sh checks the staged file and, where zram-generator is installed, runs it on a made-up root (ZRAM_GENERATOR_ROOT, 8 000 000 kB): 7812 MB with Omarchy's drop-in alone, 3906 MB with ours, 3906 MB with a leftover /etc file, 2048 MB with a local 99-local.conf. With the drop-in set to ram the test fails. test/all on the Pixel 9a (zram-generator 1.2.1): 167 ok, none failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 of 9 tasks
Owner
|
Thanks, this is exactly what #528 asked for, and well checked. I I'll merge it as 0.1.40. One note: #528 also asks for a first boot under |
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
Part of derekross#528. Omarchy 4.5 sizes swap on zram at the whole RAM; on a phone that is too much. A drop-in sets it to half the RAM, checked with zram-generator against 8, 12 and 2 GB cases. On today's 4.0.6 phones the drop-in is in place for the move to 4.5. Still open in derekross#528: the check on a 4.5 phone's first boot.
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.
What and why
Fixes #528. Omarchy 4.5 moves its zram tuning to
/usr/lib/systemd/zram-generator.conf.d/90-omarchy.confwithzram-size = ram, and installs zram-generator on aarch64. With the zram driver in our kernel config (#515), the move past 4.0.6 would give every phone RAM-sized zram. That is the setting that hung the Pixel 9a under a 6 GB load in #515's test; with half the RAM, the same test allocated 5 GB more with no OOM kill.omamobile-omarchy now ships
zram-generator.conf.d/91-omamobile.conf, which sets only zram0's size, toram / 2. Drop-ins are read in name order across/usr/lib,/runand/etc, so:/etc/systemd/zram-generator.confdecides nothing;/etc/systemd/zram-generator.conf.d/99-local.conf(the name Omarchy's own migration suggests) still wins.Under Omarchy 4.0.6 an image has no zram-generator, so nothing changes there. Where zram-generator was installed by hand, the drop-in alone makes a half-RAM device.
Device and build
uname -r): 7.3.0-rc6-omamobile-push1-gcbb1a7eb0a78 (a local build; unrelated to this change)Checks (no phone needed)
tools/pr-check upstream/mainpassestests/all: not runpackages/omamobile-omarchy/test/allpasses on the phone (167 ok, none failing)Co-Authored-By:trailer, noSigned-off-by:New
test/zram.shchecks the staged file. Where zram-generator is installed, it also runs the real generator on a made-up root (ZRAM_GENERATOR_ROOT, MemTotal 8 000 000 kB):90-omarchy.confalone91-omamobile.conf/etc/systemd/zram-generator.conf(ram)/etc/.../99-local.conf(2048)With the drop-in set to
ram, the test fails.On the phone
/proc/meminfo(7.4 GB), with Omarchy 4.5's drop-in and this one in a made-up root:/dev/zram0 with 3719MB; with Omarchy's alone: 7438 MB. The phone's live zram (alreadyram / 2from a local/etcfile since omamobile.config: swap on zram, and the 9a's zram notes #515's test) was not touched.userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)🤖 Generated with Claude Code