Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions packages/hyprland/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@
# refused DPMS commit once, so DPMS off was lost whenever a client kept
# a page flip in flight (device/cheetah/DISPLAY-PLAN.md, D3b-1). Drop it
# once upstream retries.
# - pkgrel 3.1: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's
# (0.57.0-3) release plus .1, so it sorts above both; [omamobile] comes
# before [omarchy] and [extra] in pacman.conf, so pacman takes this build
# either way.
# - 0002-render-hold-the-last-frame-across-a-rotation.patch: after a
# rotation, Hyprland drew the clients' old buffers stretched over the
# turned output until each redrew (stripes, half-empty pages, for 200 ms
# to a second on a Pixel 7). The output now keeps its last frame until
# every layer surface has drawn at its new size, then turns the new
# frame in as Android does (283 ms, the old frame fading out over it).
# Only with OMAMOBILE_ROTATION_HOLD=1 in Hyprland's environment, which
# device-panther sets; other phones rotate as before.
# - pkgrel 3.2: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's
# (0.57.0-3) release plus .1, so it sorts above both, and .2 for the
# rotation hold (3.1 is published); [omamobile] comes before [omarchy] and
# [extra] in pacman.conf, so pacman takes this build either way.
# - arch=(aarch64) only.
# - build() runs the two cmake steps of `make release` itself, with
# CMAKE_SKIP_RPATH (Arch's Makefile sed) and the job count from MAKEFLAGS
Expand All @@ -25,8 +33,8 @@

pkgname=(hyprland hyprpm)
pkgver=0.57.0
pkgrel=3.1
pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry)'
pkgrel=3.2
pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry, rotation hold)'
arch=(aarch64)
url="https://github.com/hyprwm/Hyprland"
license=(BSD-3-Clause)
Expand Down Expand Up @@ -92,12 +100,14 @@ source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.g
nvidia-egl-teardown.patch
wl-output-global-grace.patch
monitor-rule-vrr.patch
0001-dpms-keep-retrying-a-refused-dpms-commit.patch)
0001-dpms-keep-retrying-a-refused-dpms-commit.patch
0002-render-hold-the-last-frame-across-a-rotation.patch)
sha256sums=('82d006ba9264fe67266c7d583c16f1a6c64d51424dbdc472c3e9c9d5ddfcd559'
'26d62139b8ae55e286bcdff1838a6bc01a021d8f1039b40b8fa523df83f61610'
'8fa0f57dc1b3246ab4e30ae81419150f4af7767fb31e739e36c824c6d99fab73'
'c14fb0ec02d97100bcfa4e5c8daaf524972fa5c665e04960619744ba01c73c39'
'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836')
'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836'
'0f3ff13540c40d993943064916332d79ebd34b6d61e41481c86f92bb6413e91b')

prepare() {
ln -sf hyprland-source "$_archive"
Expand All @@ -110,6 +120,8 @@ prepare() {
patch -Np1 --fuzz=0 -i "$srcdir/monitor-rule-vrr.patch"
# Omarchy Mobile: retry a refused DPMS commit for up to a second
patch -Np1 --fuzz=0 -i "$srcdir/0001-dpms-keep-retrying-a-refused-dpms-commit.patch"
# Omarchy Mobile: hold the last frame across a rotation until the layers have drawn, then turn it in as Android does
patch -Np1 --fuzz=0 -i "$srcdir/0002-render-hold-the-last-frame-across-a-rotation.patch"
sed -i -e '/find_package.glaze/s/7...<8 //' {.,hyprpm,start}/CMakeLists.txt
}

Expand Down
20 changes: 17 additions & 3 deletions packages/hyprland/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# hyprland (Omarchy Mobile build)

This is Omarchy's Hyprland 0.57.0-2 recipe (`hyprland` and `hyprpm`), built
for aarch64 with one change. Hyprland gave up on a refused DPMS commit after
for aarch64 with two changes. Hyprland gave up on a refused DPMS commit after
a single retry, and aquamarine refuses commits while a page flip is in
flight. So when a client kept rendering, DPMS off was lost: Hyprland
reported the screen off, but the CRTC never turned off. See
Expand All @@ -13,14 +13,28 @@ reported the screen off, but the CRTC never turned off. See
| `PKGBUILD` | Omarchy's `pkgbuilds/hyprland/PKGBUILD` at `347f3d791489` (omacom-io/omarchy-pkgs), changes in its header |
| `nvidia-egl-teardown.patch`, `wl-output-global-grace.patch`, `monitor-rule-vrr.patch` | Omarchy's patches from the same commit, unchanged (what they fix: their comments in `prepare()`) |
| `0001-dpms-keep-retrying-a-refused-dpms-commit.patch` | The Omarchy Mobile change to `src/output/Monitor.cpp` |
| `0002-render-hold-the-last-frame-across-a-rotation.patch` | The Omarchy Mobile change to `src/render/Renderer.cpp` and `src/render/OpenGL.cpp` (the rotation hold, below) |

## What differs from Omarchy's `hyprland` 0.57.0-2

- The DPMS patch. A refused DPMS commit is retried every two frames for up
to a second instead of once.
- `pkgrel=3.1`: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's
- The rotation hold (0002). After a transform change the output keeps its
last frame until every mapped layer surface has drawn at its new size
(its buffer too, and a second buffer or 50 ms more), or 500 ms; layers
and the active workspaces get their frame callbacks once per refresh
meanwhile. Then the new frame turns in over 283 ms on Android's
(0.2, 0, 0, 1) curve, and the old one, kept where it was on the glass,
turns with it and fades out over 116 ms. On a Pixel 7 the holds took
106 to 228 ms; without the patch the old buffers showed stretched for
200 ms to a second. It is off unless `OMAMOBILE_ROTATION_HOLD=1` is in
Hyprland's environment (read once at startup): `omamobile-device-panther`
sets it in `environment.d`, and the other phones rotate as before until
it has run on them.
- `pkgrel=3.2`: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's
(`extra/hyprland` 0.57.0-3, a rebuild for aquamarine 0.16.0 and
hyprgraphics 0.6.0) release, plus `.1`, so it sorts above both.
hyprgraphics 0.6.0) release, plus `.1`, so it sorts above both; `.2` for
the rotation hold, since 3.1 is published.
- `arch=(aarch64)` only.
- `build()` runs the two cmake steps of `make release` itself:
- with Arch's `-DCMAKE_SKIP_RPATH=ON` (Arch's PKGBUILD seds it into the
Expand Down
1 change: 1 addition & 0 deletions packages/omamobile-device-panther/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 7 (codename panthe

| Path | Installs to | What it does |
| --- | --- | --- |
| `vendor/environment.d/40-omamobile-rotation.conf` | `/usr/lib/environment.d` | `OMAMOBILE_ROTATION_HOLD=1`: Hyprland (packages/hyprland, 0002) holds the last frame across a rotation and turns the new one in as Android does. Off in the shared build until it has run on the other phones |
| `vendor/udev/rules.d/10-omamobile-storage.rules` | `/usr/lib/udev/rules.d` | Hides `sda` and every Android partition except `userdata` from desktop tools. Same rule as the Pixel 7 Pro. The initramfs stops its guard loop before `switch_root`; the kernel's read-only flags are what remain |
| `vendor/udev/rules.d/20-omamobile-gpu-always-on.rules` | `/usr/lib/udev/rules.d` | Keeps the Mali-G710 powered while Panthor drives it: powering its domain back up needs a secure call our kernel doesn't make yet. Same rule as the Pixel 7 Pro |
| `vendor/udev/rules.d/72-omamobile-feedbackd.rules` | `/usr/lib/udev/rules.d` | Lets feedbackd drive the CS40L26 haptics (`cs40l26_vibra`). Same rule as the Pixel 7 Pro; the driver needs the phone's own `cs40l26.wmfw` (`tools/extract-vendor-firmware -d panther`) |
Expand Down
2 changes: 2 additions & 0 deletions packages/omamobile-device-panther/install
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ for rules in 20-omamobile-gpu-always-on.rules 72-omamobile-feedbackd.rules \
done
install -Dm644 vendor/systemd/network/20-usb-gadget.network \
"$destination/usr/lib/systemd/network/20-usb-gadget.network"
install -Dm644 vendor/environment.d/40-omamobile-rotation.conf \
"$destination/usr/lib/environment.d/40-omamobile-rotation.conf"
install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \
"$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf"
install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \
Expand Down
3 changes: 3 additions & 0 deletions packages/omamobile-device-panther/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ for f in usr/bin/reboot-to \
usr/lib/udev/rules.d/72-omamobile-feedbackd.rules \
usr/lib/udev/rules.d/70-omamobile-dma-heap.rules \
usr/lib/systemd/network/20-usb-gadget.network \
usr/lib/environment.d/40-omamobile-rotation.conf \
usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf \
usr/lib/systemd/sleep.conf.d/10-omamobile.conf \
usr/lib/modprobe.d/omamobile-display.conf \
Expand Down Expand Up @@ -126,6 +127,8 @@ grep -q 'ATTRS{name}=="cs40l26_vibra"' "$tmp/root/usr/lib/udev/rules.d/72-omamob
|| fail "feedbackd gets the CS40L26 haptics"
grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" \
|| fail "usb0 keeps the initramfs address"
grep -qx 'OMAMOBILE_ROTATION_HOLD=1' "$tmp/root/usr/lib/environment.d/40-omamobile-rotation.conf" \
|| fail "the Pixel 7 turns on Hyprland's rotation hold"
power="$tmp/root/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf"
grep -qx '\[Login\]' "$power" \
|| fail "the power-key drop-in needs a [Login] header"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: MIT
# Omarchy Mobile: Hyprland holds the last frame across a rotation and turns
# the new one in as Android does (packages/hyprland, 0002). Off by default
# in the shared Hyprland build; the Pixel 7 turns it on, where it has run.
# Read once, when Hyprland starts.
OMAMOBILE_ROTATION_HOLD=1
2 changes: 1 addition & 1 deletion packages/omamobile-device-panther/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.11
0.1.12