Skip to content

Cap swap on zram at half the RAM before the image moves past Omarchy 4.0.6 #528

Open

Description

@derekross

#515 builds the zram driver into our kernel config as a module. Under the pinned Omarchy 4.0.6 that changes nothing: 4.0.6 ships no zram settings and our image doesn't install zram-generator, so no device is ever created.

Omarchy 4.5.0 changes that. Its default/systemd/zram-generator.conf.d/90-omarchy.conf sets zram-size = ram, and install/omarchy-aarch64.packages adds zram-generator. With the driver in, the move past 4.0.6 (#471 and the 4.5 migration) would turn on RAM-sized zram on every phone. That is the setting that hung the Pixel 9a in #515's own test (6 GB allocated, the phone hung until a restart), while half the RAM (stock Android's setting on the 9a) ran 5 GB more with no OOM kill and SSH still answering. Both runs are in device/tegu/NOTES.md.

What's needed: an omamobile drop-in in zram-generator.conf.d/ that sorts after 90-omarchy.conf and sets zram-size = ram / 2, shipped in the same release that brings Omarchy 4.5's zram settings. A first boot with it on the 7 Pro and on the 9a should then show /dev/zram0 at half the RAM (zramctl, swapon --show).

This is a condition of the 4.5 move: don't publish an image or package set past 4.0.6 without it.

Found in the review of #515.

🤖 Generated with Claude Code

Activity

  1. only21mil commented on Nov 10, 2026

    @only21mil
    Contributor

    Note

    🤖 Opus 5.5 replying on behalf of Victor.

    A candidate for this is ready on a branch, not yet opened as a pull request: omamobile-omarchy 0.1.39 adds /usr/lib/systemd/zram-generator.conf.d/95-omamobile.conf with [zram0] and zram-size = ram / 2.

    • Why 95: zram-generator sorts drop-ins by filename across /usr/lib, /usr/local/lib, /etc and /run. 95 sorts after Omarchy’s 90-omarchy.conf and before the /etc/.../99-local.conf Omarchy points users to, so a user’s setting still wins.
    • Under 4.0.6: inert, since nothing installs zram-generator.
    • Tested off the phone only: zram-generator’s sizing over Omarchy 4.5.0 gives 4096 MB on 8 GiB and 6144 MB on 12 GiB, versus 8192 MB and 12288 MB without the drop-in.

    Nothing has run on a phone. Would you run this on your 7 Pro and 9a once they are on Omarchy 4.5 with this package and a kernel containing #515’s zram options:

    • zramctl and swapon --show, expecting /dev/zram0 at half of MemTotal;
    • tools/phone-smoke, with its full report.

    If you agree, I’ll wait for those reports, add them to the pull request body, and then open it.

  2. only21mil commented on Nov 10, 2026

    @only21mil
    Contributor

    Note

    🤖 Opus 5.5 replying on behalf of Victor.

    A correction to the comment above: main has since used omamobile-omarchy 0.1.39 for #471, so the candidate is rebased onto current main as 0.1.40, with the drop-in, its test and its install step unchanged. It is on the branch build/zram-half-ram in our fork (https://github.com/only21mil/omarchy-mobile/tree/build/zram-half-ram, head ddc03a1), so it can be installed from there. It is still not opened as a pull request, nothing has run on a phone yet, and the earlier ask for zramctl, swapon --show and tools/phone-smoke on the 7 Pro and 9a is unchanged.

  3. derekross commented on Nov 10, 2026

    @derekross
    OwnerAuthor

    Reopening: #599 set the drop-in, but the check on a 4.5 phone's first boot (swapon --show) is still open. I'll close this when that's recorded here.

  4. latentoperator commented on Nov 13, 2026

    @latentoperator
    Contributor

    Supplemental Pixel 6a activation result, November 13:

    On Omarchy 4.5.0-3 with omamobile-omarchy 0.1.44-1, the existing half-RAM configuration needed the missing zram-generator package installed. With distro-signed zram-generator 1.2.1-1 and the revised kernel 7.3.0-rc6-omamobile-bluejay-review-20261111 (CONFIG_ZRAM=m), /dev/zram0 was active swap with zstd and size 2,868,379,648 bytes, approximately 49.993% of kernel-visible RAM.

    This verifies activation and the effective half-RAM policy on this 6a; no pressure test or performance result is claimed. It supplements rather than substitutes for the requested 7 Pro/9a evidence. The restored historical desktop kernel has no ZRAM support, so a local lab override currently disables zram there; it must be removed when returning to the revised kernel for swap work. No request to close this issue is implied.

  5. derekross commented on Nov 13, 2026

    @derekross
    OwnerAuthor

    Thanks for the 6a run. The size is exactly what the drop-in should give, and your note that zram-generator was missing turned out to matter.

    I looked at why. A fresh install of 2026.11.12 gets zram-generator, because the image adds Omarchy 4.5's aarch64 package list. But Omarchy's update is a plain pacman -Syu, and the only Omarchy migration that installs zram-generator does it on N1x machines alone. So a phone that went from 2026.11.08 to Omarchy 4.5 through Updates has our half-RAM drop-in and a kernel with zram, but no generator, and so no swap. rtkit is missing the same way. I'll add both to omamobile-omarchy's dependencies so the next update brings them in, and check swapon --show on my Pixel 7 Pro (installed fresh from the release) for the record here. This stays open until both are in.

  6. derekross commented on Nov 14, 2026

    @derekross
    OwnerAuthor

    omamobile-omarchy 0.1.46 (#768) depends on zram-generator, so a phone that updated from 2026.11.08 gets it with its next update, and swap at half the RAM after the restart. A fresh 2026.11.12 install already had it (the reference phone: /dev/zram0, 5.6 GB, zstd). This stays open until a 4.5 phone's first boot after the update shows swapon --show at half the RAM.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions