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
13 changes: 13 additions & 0 deletions device/tegu/MODEM-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,19 @@ the CP is idle when a sleep starts; one sleep state in the device's
`sleep.conf`; then the qualification itself (RTC wakes, a call and a text
waking the palmtop).

The sleep state is in `omamobile-device-tegu` 0.2.15: `SuspendState=freeze`
in its `sleep.conf` drop-in, so systemd writes `/sys/power/state` once per
sleep (omarchy-mobile#619). Tested on 2026-11-10 with the modem off, the
line coming from a drop-in in `/run/systemd/sleep.conf.d` (removed after
the test), on `7.3.0-rc6-omamobile-push1-dbg-gff4fdf58035e`:
`systemd-analyze cat-config systemd/sleep.conf` showed
`MemorySleepMode=s2idle` and `SuspendState=freeze`, and one
`systemctl suspend` with a 25 s RTC alarm logged
`PM: suspend entry (s2idle)`, lasted 30 s by the RTC and woke on the alarm
(wake irq 53), with `suspend_stats` success 0 to 1, fail 0 to 0 and no UFS
error lines. It doesn't settle the Wi-Fi loss above, which also happened
with one state.

### M2: the link only (modem link driver, `allow_hw=1`; risk: medium)

One step per run, the CPIF overlay not applied, the link overlay applied
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-device-tegu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ packaged yet. What is here is what runs on in-tree drivers.
| `vendor/systemd/system-sleep/omamobile-tegu-nfc` | `/usr/lib/systemd/system-sleep` | Stops neard's poll loop before a sleep (polling through s2idle reset the palmtop; with it stopped, 35 of 35 cycles woke), reads `Polling` back and logs it, and starts the loop again after the wake if it was on. Powering the ST54L off as well, the workaround for a controller that did not answer on I2C after a wake (issue #132; fixed by linux-omarchy-mobile #131), runs only while `/etc/omamobile/nfc-power-off-across-sleep` exists: off by default, since its record is one wake that needed the power key and one that worked. Log: `/var/log/omamobile/nfc-sleep.log` |
| `vendor/systemd/system-sleep/omamobile-tegu-cpuidle` | `/usr/lib/systemd/system-sleep` | Keeps the cores out of the core power-down state (C2) through a sleep: with every core in C2 during s2idle the palmtop sometimes never woke (6 to 135 sleeps), and with C2 off for the sleep 300 of 300 came back. Disables every idle state deeper than state0 before the sleep and enables the ones it disabled after the wake, so the cores still power down while awake; does nothing on a kernel without deeper states, or while `/etc/omamobile/cpuidle-keep-across-sleep` exists (for testing C2 in the sleep). A sleep written straight to `/sys/power/state` skips it. [SLEEP-PLAN](../../device/tegu/SLEEP-PLAN.md) S1 |
| `vendor/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf` | `/usr/lib/systemd/system` | Holds off Arch's old-module cleanup: our kernels come as module tarballs, not pacman packages, and the next-boot and rollback trees must stay |
| `vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf`, `sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd` | A hung shutdown resets the phone after a minute; suspend means s2idle (no SoC sleep sequence yet, and `deep` does not wake) |
| `vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf`, `sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd` | A hung shutdown resets the phone after a minute; suspend means s2idle (no SoC sleep sequence yet, and `deep` does not wake), written to the kernel as one state (`SuspendState=freeze`), so a sleep a driver refused isn't tried a second time |
| `vendor/udev/rules.d/10-omamobile-storage.rules` | `/usr/lib/udev/rules.d` | Continues the initramfs storage guard: Android partitions stay hidden and the whole-disk node unusable |
| `vendor/udev/rules.d/20-omamobile-torch.rules`, `70-omamobile-dma-heap.rules`, `72-omamobile-feedbackd.rules` | `/usr/lib/udev/rules.d` | The torch tile may set the LED's brightness; libcamera's software ISP gets the DMA-BUF heaps; feedbackd gets the haptics |
| `vendor/systemd/network/20-usb-gadget.network`, `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/systemd/network`, `/usr/lib/NetworkManager/conf.d` | USB networking to a host (172.16.42.1, the host as a fallback route behind Wi-Fi); NetworkManager stays off the link |
Expand Down
13 changes: 9 additions & 4 deletions packages/omamobile-device-tegu/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ if [[ -f ../omamobile-device-cheetah/src/reboot-to.c ]]; then
../omamobile-device-cheetah/omamobile-device-cheetah.install \
|| fail "the pacman install script drifted from the cheetah package"
pass "the pacman install script matches the cheetah package"
cmp -s vendor/systemd/sleep.conf.d/10-omamobile.conf \
../omamobile-device-cheetah/vendor/systemd/sleep.conf.d/10-omamobile.conf \
|| fail "the sleep drop-in drifted from the cheetah package"
pass "the sleep drop-in matches the cheetah package"
fi
# The sleep drop-in: suspend-to-idle only, one state so a refused sleep isn't
# tried a second time (#619), and nothing that hibernates. Checked by its
# settings: the 7 Pro's copy gets SuspendState in a change of its own.
sleepconf=vendor/systemd/sleep.conf.d/10-omamobile.conf
[[ $(grep -v '^#' "$sleepconf" | grep -c .) -eq 6 && $(grep -v '^#' "$sleepconf" | head -1) == "[Sleep]" ]] || fail "the sleep drop-in has other lines than its five settings"
for line in SuspendState=freeze MemorySleepMode=s2idle AllowHibernation=no AllowHybridSleep=no AllowSuspendThenHibernate=no; do
grep -qx "$line" "$sleepconf" || fail "the sleep drop-in lacks $line"
done
pass "the sleep drop-in: one sleep state (freeze), s2idle, no hibernation"
grep -q 'omamobile-keyring' PKGBUILD || fail "pacman needs omamobile-keyring"
grep -q '^install=omamobile-device-tegu.install$' PKGBUILD \
|| fail "the pacman install script is not named"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
# one doesn't wake. Suspend means suspend-to-idle until SYS_SLEEP exists
# (device/cheetah/SUSPEND-PLAN.md, sections 1 and 5). There is no swap to
# hibernate to.
#
# SuspendState: systemd's default is "mem standby freeze", written to
# /sys/power/state one after the other until a write succeeds. With
# mem_sleep at s2idle a second write is the same sleep again, so a sleep a
# driver refused was tried twice, and the second try's failure (brcmfmac,
# -5) cost Wi-Fi (#619). One state, one try. "freeze" rather than "mem": it
# is suspend-to-idle whatever mem_sleep says.
[Sleep]
SuspendState=freeze
MemorySleepMode=s2idle
AllowHibernation=no
AllowHybridSleep=no
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-device-tegu/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.14
0.2.15