Skip to content
Open
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
15 changes: 15 additions & 0 deletions device/panther/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ Findings from real hardware, newest first. [BRINGUP-M1.md](BRINGUP-M1.md) is the

The board file (`gs201-panther.dts`) was merged as [linux-omarchy-mobile#108](https://github.com/derekross/linux-omarchy-mobile/pull/108), and the FT3658 driver as [#109](https://github.com/derekross/linux-omarchy-mobile/pull/109); the test kernels below add one local commit each on top.

## 2026-11-04: Hyprland needs CAP_SYS_NICE for 90 frames a second

With a client keeping the GPU busy, the screen stopped at about 63 frames a second at 90 Hz. Hyprland asks panthor for a high-priority context, and panthor only grants it with `CAP_SYS_NICE` (or to the DRM master of panthor itself; Hyprland is master of gs-decon): its log said "Failed to get a high priority context", so its groups ran at the client's priority and its frames could wait a scheduler tick.

Measured on kernel `7.3.0-rc6-omamobile-push1-g44048a9aa795` (local branch with the 90 Hz mode, not on `omamobile`), mpv playing `testsrc2` at 1080x2400@90 for 10 s, counting gs-decon's flips, each case after a reboot, twice:

| Hyprland | flips a second |
| --- | --- |
| as installed | 62, 63 |
| `setcap cap_sys_nice+ep /usr/bin/Hyprland` | 89, 90 |
| capability removed again (control) | 63, 63 |
| capability back | 90, 90 |

With it the log says "Got a high priority context". Hyprland also switches itself to SCHED_RR, priority 1, with SCHED_RESET_ON_FORK. No flip timeouts or late flips in any run; the panel ran at 90 Hz throughout. The package's pacman hook re-applies the capability after each Hyprland upgrade (an upgrade replaces the binary and drops it). Not checked: power use, 60 Hz, and the Pixel 7 Pro.

## 2026-11-02: AVB footers on boot and init_boot

A second Pixel 7 (issue #342), with stock CP3A.261005.002.A1 sideloaded as a full OTA on both slots, never started slot B. The screen stayed black, no USB gadget appeared, and after about 72 s it was back in stock recovery on slot A. This was the case with the published kernel too. It's the Pixel 7 Pro's issue #11 (device/cheetah/NOTES.md, 2026-10-28):
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-device-panther/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pkgdesc="Omarchy Mobile support for the Google Pixel 7 (panther): storage guard,
arch=(aarch64)
url="https://github.com/derekross/omarchy-mobile"
license=(MIT)
depends=(bash systemd omamobile-keyring i2c-tools)
depends=(bash systemd omamobile-keyring i2c-tools libcap)
provides=(omamobile-device)
conflicts=(omamobile-device)
backup=(etc/pacman.d/omamobile-mirrorlist)
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 @@ -7,6 +7,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 7 (codename panthe
| `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`) |
| `vendor/libalpm/hooks/90-omamobile-hyprland-nice.hook` | `/usr/share/libalpm/hooks` | After every install or upgrade of Hyprland (or of this package), gives `/usr/bin/Hyprland` `cap_sys_nice+ep`, so panthor grants its high-priority GPU context and the compositor's frames don't wait behind a busy client (62-63 to 89-90 frames a second at 90 Hz, [NOTES.md](../../device/panther/NOTES.md)). Hyprland then also runs SCHED_RR priority 1 with SCHED_RESET_ON_FORK. Uses `setcap` (`libcap`). Removing this package leaves the capability until Hyprland's next upgrade |
| `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover |
| `bin/omamobile-usb-rescue`, `vendor/systemd/system/omamobile-usb-rescue.service` | `/usr/bin`, `/usr/lib/systemd/system` (enabled for `multi-user.target`) | Brings USB back after a replug: the MAX77759 opens its USB2 data switch on unplug, and with no Type-C driver nothing closes it. While VBUS is valid, puts the switch back to 0x09 on the chip's I2C bus (USI13, which the board file enables). Reads two registers and writes that one; stands aside once a Type-C driver owns the chip. Same script and unit as the Pixel 7 Pro; needs `i2c-tools` |
| `vendor/systemd/logind.conf.d/10-omamobile-power-key.conf` | `/usr/lib/systemd/logind.conf.d` | A short power press does not power the phone off. Same drop-in as the Pixel 7 Pro. The long press stays the PMIC reset |
Expand Down
4 changes: 4 additions & 0 deletions packages/omamobile-device-panther/install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \
"$destination/usr/lib/systemd/sleep.conf.d/10-omamobile.conf"
install -Dm644 vendor/modprobe.d/omamobile-display.conf \
"$destination/usr/lib/modprobe.d/omamobile-display.conf"
install -Dm644 vendor/libalpm/hooks/90-omamobile-hyprland-nice.hook \
"$destination/usr/share/libalpm/hooks/90-omamobile-hyprland-nice.hook"
install -Dm644 vendor/libalpm/hooks/90-omamobile-hyprland-nice-remove.hook \
"$destination/usr/share/libalpm/hooks/90-omamobile-hyprland-nice-remove.hook"
install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \
"$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf"
install -Dm644 device.conf \
Expand Down
30 changes: 30 additions & 0 deletions packages/omamobile-device-panther/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ for f in usr/bin/reboot-to \
usr/lib/systemd/sleep.conf.d/10-omamobile.conf \
usr/lib/modprobe.d/omamobile-display.conf \
usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \
usr/share/libalpm/hooks/90-omamobile-hyprland-nice.hook \
usr/share/libalpm/hooks/90-omamobile-hyprland-nice-remove.hook \
usr/share/omamobile/device.conf \
usr/share/omamobile/device-panther/version \
usr/share/licenses/omamobile-device-panther/LICENSE \
Expand Down Expand Up @@ -126,6 +128,34 @@ for absent in usr/bin/omamobile-boot-success usr/bin/omamobile-bootctl \
[[ ! -e $tmp/root/$absent ]] || fail "install includes $absent"
done
pass "install stages the udev rules, the USB link and its rescue, and the mirrorlist, and nothing that marks a slot or starts hardware"
# Hyprland's CAP_SYS_NICE (a high-priority panthor context): re-applied by a
# pacman hook after every Hyprland install or upgrade, and after this package's.
hook=$tmp/root/usr/share/libalpm/hooks/90-omamobile-hyprland-nice.hook
grep -qx 'Type = Package' "$hook" && grep -qx 'Target = hyprland' "$hook" && grep -qx 'Target = omamobile-device-panther' "$hook" \
&& grep -qx 'Operation = Upgrade' "$hook" && grep -qx 'When = PostTransaction' "$hook" || fail "the hook runs after Hyprland's and this package's installs and upgrades"
exec_line=$(sed -n 's/^Exec = //p' "$hook")
[[ $exec_line == *"/usr/bin/setcap cap_sys_nice+ep /usr/bin/Hyprland"* ]] || fail "the hook gives Hyprland cap_sys_nice and nothing more"
grep -q 'libcap' PKGBUILD || fail "the hook needs setcap (libcap)"
# the Exec line itself: no Hyprland, nothing done; with one, setcap runs on it
mkdir -p "$tmp/hk/usr/bin"; printf '#!/bin/sh\necho "$*" >> "%s"\n' "$tmp/hk/setcap.log" > "$tmp/hk/usr/bin/setcap"; chmod +x "$tmp/hk/usr/bin/setcap"
sh -c "$(eval "printf %s ${exec_line#/bin/sh -c }" | sed "s#/usr/bin/#$tmp/hk/usr/bin/#g")" || fail "the hook passes without Hyprland"
[[ ! -e $tmp/hk/setcap.log ]] || fail "no setcap without Hyprland"
: > "$tmp/hk/usr/bin/Hyprland"
sh -c "$(eval "printf %s ${exec_line#/bin/sh -c }" | sed "s#/usr/bin/#$tmp/hk/usr/bin/#g")" || fail "the hook runs setcap"
[[ $(cat "$tmp/hk/setcap.log") == "cap_sys_nice+ep $tmp/hk/usr/bin/Hyprland" ]] || fail "setcap gets cap_sys_nice+ep on Hyprland"
# and the remove hook takes it off again before this package goes
rhook=$tmp/root/usr/share/libalpm/hooks/90-omamobile-hyprland-nice-remove.hook
grep -qx 'Operation = Remove' "$rhook" && grep -qx 'Target = omamobile-device-panther' "$rhook" && grep -qx 'When = PreTransaction' "$rhook" \
|| fail "the remove hook runs before this package is removed"
grep -c '^Target' "$rhook" | grep -qx 1 || fail "the remove hook runs only for this package"
rexec=$(sed -n 's/^Exec = //p' "$rhook")
: > "$tmp/hk/setcap.log"
sh -c "$(eval "printf %s ${rexec#/bin/sh -c }" | sed "s#/usr/bin/#$tmp/hk/usr/bin/#g")" || fail "the remove hook runs setcap -r"
[[ $(cat "$tmp/hk/setcap.log") == "-r $tmp/hk/usr/bin/Hyprland" ]] || fail "the remove hook drops Hyprland's capabilities"
rm -f "$tmp/hk/usr/bin/Hyprland" "$tmp/hk/setcap.log"
sh -c "$(eval "printf %s ${rexec#/bin/sh -c }" | sed "s#/usr/bin/#$tmp/hk/usr/bin/#g")" || fail "the remove hook passes without Hyprland"
[[ ! -e $tmp/hk/setcap.log ]] || fail "no setcap -r without Hyprland"
pass "a pacman hook gives Hyprland CAP_SYS_NICE after its installs and upgrades, and this package's; removing the package takes it off"
# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi
# it sent IPv4 into a dead cable (seen on raven, 2026-10-28).
net=vendor/systemd/network/20-usb-gadget.network
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT
# Take CAP_SYS_NICE off Hyprland again when this package is removed: the
# install hook (90-omamobile-hyprland-nice.hook) gave it, and nothing else
# would drop it before Hyprland's next upgrade replaced the binary. Runs
# before the removal, while this hook is still installed.
[Trigger]
Operation = Remove
Type = Package
Target = omamobile-device-panther

[Action]
Description = Taking CAP_SYS_NICE off Hyprland...
When = PreTransaction
Exec = /bin/sh -c '[ ! -e /usr/bin/Hyprland ] || /usr/bin/setcap -r /usr/bin/Hyprland 2>/dev/null || true'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT
# Give Hyprland CAP_SYS_NICE after every transaction that installs or
# upgrades it (an upgrade replaces the binary and drops the capability) or
# this package. Without it panthor refuses Hyprland's high-priority GPU
# context ("Failed to get a high priority context"), and with a client
# keeping the GPU busy at the same priority the compositor's frames wait a
# scheduler tick: 62-63 frames a second at 90 Hz instead of 89-90
# (device/panther/NOTES.md). Hyprland then also runs SCHED_RR, priority 1,
# with SCHED_RESET_ON_FORK, so its children start as normal tasks.
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = hyprland
Target = omamobile-device-panther

[Action]
Description = Giving Hyprland CAP_SYS_NICE for a high-priority GPU context...
When = PostTransaction
Exec = /bin/sh -c '[ ! -e /usr/bin/Hyprland ] || /usr/bin/setcap cap_sys_nice+ep /usr/bin/Hyprland'