Skip to content

omamobile-device-husky 0.1.14: one sleep state, so a refused sleep isn't tried twice (#619) - #806

Merged
derekross merged 1 commit into
derekross:mainfrom
Somnius:husky-suspendstate-1115
Nov 18, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
Somnius:husky-suspendstate-1115

Conversation

@Somnius

@Somnius Somnius commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

This is husky's half of #619, the same change #654 made for tegu: SuspendState=freeze in the sleep config, so a refused sleep isn't tried a second time with another state. The 8 Pro only does s2idle (mem_sleep_default=s2idle is on its command line, and /sys/power/mem_sleep reads [s2idle] deep on my unit today), so freeze is the state it uses anyway.

Husky's test/all compared its sleep settings with cheetah's, and cheetah has no such line, so as in #654 it now checks the file's own five settings. Version 0.1.14, which is main's 0.1.13 plus one.

Tested: husky's test/all and tools/pr-check origin/main on the desktop; the new check fails if the line is removed, set to mem or if a setting is added. Not run: the on-phone test @derekross asked for on #619 (one systemctl suspend, suspend_stats success +1, fail unchanged, systemd-analyze cat-config showing the line). My 8 Pro has omamobile-device-husky 0.1.9 installed and I haven't put this on it yet. I've never seen a refused sleep on the 8 Pro (the Wi-Fi -5 in #619 is the 9a's), so I can only say this matches what #654 does, not that it fixes something here. I'll run that sleep and post the result on #619.

@derekross, one question: I have two other husky package changes waiting (Wi-Fi power save on by default, and the USB rescue loop). If this lands first as 0.1.14, I'll rebase them to the next free numbers.

…n't tried twice (derekross#619)

The Pixel 8 Pro's part of derekross#619, as derekross#654 did for the Pixel 9a:
SuspendState=freeze in the sleep.conf drop-in. systemd's default 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 a driver refuses is tried twice. "freeze" and not
"mem", because it stays suspend-to-idle whatever mem_sleep says.

It applies to the 8 Pro: on my phone (omamobile-device-husky 0.1.9,
7.3.0-rc6-omamobile-push1-g596d44e5bd5e, mem_sleep_default=s2idle on
the command line) /sys/power/mem_sleep reads "[s2idle] deep" and
systemd-analyze cat-config systemd/sleep.conf shows
MemorySleepMode=s2idle and no SuspendState line. A refused sleep has
not been seen on the 8 Pro, and on the 9a one state alone did not
save Wi-Fi, so this only removes the second try.

test/all compared the settings with the Pixel 7 Pro's copy, which
doesn't have the line yet. It now checks the file's own five settings,
the way derekross#654 changed the 9a's test. README row updated.

Version 0.1.14, one above main's 0.1.13.

Tested on the desktop only: packages/omamobile-device-husky/test/all,
tests/packages for the husky, akita, tegu and cheetah device packages,
and tools/pr-check origin/main pass. Not run yet: the test derekross#619 asks
for, one systemctl suspend on the phone with suspend_stats success up
by one, fail unchanged and cat-config showing the line.
@derekross

Copy link
Copy Markdown
Owner

Thank you, Lef. This is the same change as the 9a's in #654, and it's right. With SuspendState=freeze systemd writes one state, s2idle whatever mem_sleep says, so a refused sleep isn't tried a second time. The 7 Pro's file is untouched, and the test now checks husky's own five settings and fails when the line is changed. I ran it on today's main with this merged. 0.1.14 is free, and it works with Colin's suspend runbook in #724: its pm_test levels are the three the kernel honours for suspend-to-idle.

What it still needs is the one-sleep test I asked for on #619 for each device. Could you install this branch's package on your 8 Pro (tools/phone-install-package packages/omamobile-device-husky from this branch, then check that pacman -Q omamobile-device-husky says 0.1.14)? Then run one attended systemctl suspend on the charger, woken by the RTC alarm or by Power as on 11-10, and post:

  • suspend_stats success and fail before and after (success +1, fail unchanged);
  • systemd-analyze cat-config systemd/sleep.conf, showing SuspendState=freeze;
  • the journal's PM: suspend entry (s2idle) and PM: suspend exit lines for that sleep, and whether Wi-Fi was loaded.

Your phone is on device-husky 0.1.9, which has no sleep drop-in at all, the state behind the 11-12 critical-battery suspend into deep. So installing this closes that path anyway, whatever the test shows.

On your other two husky changes: open them whenever you like. I set the versions at merge, so the numbers in the branches don't matter.

@Somnius

Somnius commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Ran it this morning. I built the package from this branch on the phone itself (makepkg from packages/omamobile-device-husky) and installed it with pacman -U, so the same package tools/phone-install-package would build. pacman -Q omamobile-device-husky says 0.1.14-1. Kernel 7.3.0-rc6-omamobile-push1-g596d44e5bd5e, cable in, Charging.

One thing I found first: my phone had a hand copy at /etc/systemd/sleep.conf.d/10-omamobile.conf from 11-13 (no package owns it, MemorySleepMode=s2idle only). Same name in /etc, so it hid the package's file and cat-config showed no SuspendState. I moved it to /root and then cat-config shows the package's drop-in:

# /usr/lib/systemd/sleep.conf.d/10-omamobile.conf
[Sleep]
SuspendState=freeze
MemorySleepMode=s2idle
AllowHibernation=no
AllowHybridSleep=no
AllowSuspendThenHibernate=no

Then one systemctl suspend with the RTC alarm at +120 s:

  • suspend_stats before success=0 fail=0, after success=1 fail=0
  • 07:25:23 kernel: PM: suspend entry (s2idle)
  • 07:27:21 kernel: PM: suspend exit
  • brcmfmac loaded before and after, Wi-Fi back to connected and pinging the router 15 s after the wake. wpa_supplicant logged Failed to create interface p2p-dev-wlp1s0: -5 after resume, the main interface was fine.

Also to be honest about the setup: the phone still has /etc/systemd/system/service.d/10-test-765.conf (WatchdogSec=0) from the #765 run B, so this sleep had the watchdogs off, no watchdog timeouts in the journal.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Lef. That is exactly the test I asked for: the package from this branch at 0.1.14-1, suspend_stats from 0 / 0 to 1 / 0, the entry and exit lines 118 s apart for a 120 s alarm, and Wi-Fi back 15 s after the wake. Thanks also for saying what else was on the phone: the hand copy in /etc/systemd/sleep.conf.d/ and the watchdog drop-in left from #765.

The hand copy is worth remembering. A file in /etc/systemd/sleep.conf.d/ with the same name replaces the package's file, so the package's settings never applied on your phone until you moved it. Please keep it out (and remove the #765 drop-in when you're done with those runs), and I'll ask Colin to run systemd-analyze cat-config systemd/sleep.conf once before his H2.

Merging this as 0.1.14. #836 uses the same number and touches the README row right above this one, so it will need a rebase onto main afterwards (keep both rows) and becomes 0.1.15; I'll say the rest there.

@derekross
derekross merged commit ff6889b into derekross:main Nov 18, 2026
2 checks passed
gitColinX added a commit to gitColinX/omarchy-mobile that referenced this pull request Nov 18, 2026
From the review on derekross#835:

- H1's status line and heading say what was not checked: touch, the
  display and a played haptic effect, carried into H2, whose Pass line
  now names them.
- Section 2 names the one UFS line that is expected at resume
  (dme-set: attr-id 0x4021, the peer device ID ufs-exynos sets when
  the link comes back) and says any other UFS error is a stop. The
  recovery bullet, the stop conditions and H1's Pass line say the same.
- Section 3's brcmfmac noise list has the two other lines the H0b run
  printed, which this kernel also prints at boot.
- The two results say "attended"; the package versions are the ones
  the stages ran on (0.1.13) and will run on (0.1.14 or later, derekross#806);
  the H1 loop sleeps 25 s, as the run's script did, and the reconnect
  comment matches.
- Section 2 says whose go-ahead a stage waits for.
- Section 4 records systemd-analyze cat-config systemd/sleep.conf on
  this unit: no /etc/systemd/sleep.conf.d/, so nothing hides the
  package's drop-in.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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