Skip to content

omamobile-device-tegu 0.2.15: one sleep state, so a refused sleep isn't tried twice (#619) - #654

Merged
derekross merged 1 commit into
derekross:mainfrom
W4HO-ham:tegu-suspend-state-freeze
Nov 11, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
W4HO-ham:tegu-suspend-state-freeze

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

The Pixel 9a's part of #619: SuspendState=freeze in omamobile-device-tegu's sleep.conf drop-in, so systemd writes /sys/power/state once per sleep and a sleep a driver refused isn't tried a second time half a second later.

Test

One sleep through the hooks on the palmtop, 2026-11-10, modem off for the boot, on 7.3.0-rc6-omamobile-push1-dbg-gff4fdf58035e (the published tip plus kernel #224, the build of that evening's series). The line came from a drop-in in /run/systemd/sleep.conf.d with the same SuspendState=freeze, not from the installed package (the palmtop runs a hand-built 0.2.17 from the bring-up branches). The drop-in was removed after the test.

cat-config: MemorySleepMode=s2idle SuspendState=freeze
mem_sleep: [s2idle] deep; state: freeze mem disk
rtc 30 s; suspend_stats success 1 (was 0), fail 0 (was 0); wake irq 53; ufs errs 0
[   53.774388] PM: suspend entry (s2idle)
[   78.562429] PM: suspend exit
sleep[3125]: System returned from sleep operation 'suspend'.

cat-config is systemd-analyze cat-config systemd/sleep.conf without its comment lines; the wake was the 25 s RTC alarm (irq 53 is the PMIC's line on that build).

What it doesn't show: a refused sleep. That needs the modem up, so it waits for an attended run, as #619 says, and the Wi-Fi loss there also happened with one state, so this line alone isn't claimed to fix it.

packages/omamobile-device-tegu/test/all and tools/pr-check origin/main pass here. tests/packages passes except omamobile-omarchy, which this doesn't touch and which fails on this laptop on main too.

…'t tried twice

systemd's default SuspendState is "mem standby freeze", written to
/sys/power/state one after the other until a write succeeds. With mem_sleep
at s2idle the second write is the same sleep again, so on the Pixel 9a a
sleep the modem's link refused was tried a second time half a second later,
and in that second try brcmfmac failed to suspend and Wi-Fi was lost
(derekross#619). The sleep drop-in now says SuspendState=freeze: one state, one try,
and suspend-to-idle whatever mem_sleep says.

The package test compared the drop-in byte for byte with the 7 Pro's, which
gets the line in a change of its own; it now checks the five settings.

Tested on the palmtop on 2026-11-10 with the modem off and the line in a
runtime drop-in (7.3.0-rc6-omamobile-push1-dbg-gff4fdf58035e): cat-config
showed SuspendState=freeze and MemorySleepMode=s2idle, one systemctl suspend
with an RTC alarm logged "PM: suspend entry (s2idle)" and woke after 30 s,
suspend_stats success 0 to 1, fail 0 to 0, no UFS error lines. The result is
in MODEM-PLAN, "Suspend with the modem on, with the sleep fixes".
@derekross

Copy link
Copy Markdown
Owner

Thank you, this is what I asked for on #619, and it is as small as it should be.

I checked it against today's main: only the 9a's package changes, the 7 Pro's drop-in is untouched, and the two packages that still compare their copy with the 7 Pro's are not affected. Replacing the byte-for-byte comparison with a check of the file's own five settings is right, since the 7 Pro's copy gets the line after its own test. CI is green and tools/pr-check passes here.

The test is the one I described: one systemctl suspend through the hooks, cat-config showing the line, suspend_stats success up by one and fail unchanged, the alarm wake and no UFS line, with the kernel release. Thank you for saying that the line came from a runtime drop-in and not the installed package, and that a refused sleep isn't shown yet. That keeps the record honest, and the brcmfmac question stays open on #619 as you say.

I'm merging this as 0.2.15, and #590 takes 0.2.16. One thing for the palmtop: it runs your hand-built 0.2.17, so it won't pick this up by itself. When the tegu PRs are in, please install omamobile-device-tegu from the repository so the palmtop has the setting from the package.

@derekross
derekross merged commit 01cb00a into derekross:main Nov 11, 2026
2 checks passed
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…'t tried twice (derekross#619) (derekross#654)

systemd's default `SuspendState` is "mem standby freeze", written to `/sys/power/state` in turn until one is accepted; with `mem_sleep` at s2idle the second write is the same sleep again, so a sleep the modem's link refused was tried a second time half a second later. The 9a's sleep drop-in now sets `SuspendState=freeze`, and the package test checks the drop-in's own settings in place of comparing it with the 7 Pro's. Tested with one hook-run sleep on the palmtop (runtime drop-in, modem off); a refused sleep isn't shown yet.
derekross pushed a commit that referenced this pull request Nov 18, 2026
…n't tried twice (#619)

The Pixel 8 Pro's part of #619, as #654 did for the Pixel 9a: `SuspendState=freeze` in the sleep.conf drop-in, so systemd writes one state to `/sys/power/state` and a sleep a driver refuses isn't tried a second time; it stays suspend-to-idle whatever `mem_sleep` says. The test now checks the drop-in's own five settings instead of comparing with the Pixel 7 Pro's copy, which is unchanged. Tested on one 8 Pro (`7.3.0-rc6-omamobile-push1-g596d44e5bd5e`, the package built from the branch): one `systemctl suspend` woken by the RTC alarm, `suspend_stats` success 0 to 1, fail 0, Wi-Fi loaded and back after the wake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants