OS resume occasionally troublesome, again, since main-n274579-50c1e179b584 (2025-01-05)

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Fri, 10 Jan 2025 05:14:38 UTC
FreeBSD 15.0-CURRENT using pkgbase, not built from source.

Beginning around the end of July 2024: wake from sleep was troublesome, 
for around three months.

Then good, close to 99% reliable, for around two months. (At the end of 
October: someone helped me to correct a script that was intended to take 
offline, before sleep, ZFS L2ARC devices (USB memory sticks). I assumed 
that the previously poor script, which I had used since long before 
troubles began in July/August, was an aggravating factor.)

----

I suspect that troubles began again around 5th January 2025. A handful 
of failures.

With debug.acpi.resume_beep=1:

- when wake fails, there's darkness and an endless beep, so
   I press and hold the power button to force off the computer.

 From recent archives of /var/log/messages:

…
Jan  6 20:28:52 mowa219-gjp4-zbook-freebsd acpi[55201]: suspend at 
20250106 20:28:52
…
Jan  7 03:56:10 mowa219-gjp4-zbook-freebsd kernel: ---<<BOOT>>---
…

– with no reboot between the suspend and the BOOT. That was probably the 
first of the recent handful of failures.

nvidia-driver-470, if that's relevant. HP ZBook 17 G2, nearly always 
docked with one or two displays on DisplayPort.


The script that (a) takes three L2ARC devices offline, and (b) exports a 
pool 'Transcend' that's on a mobile hard disk drive:

grahamperrin:~ % head -n 1 /usr/local/sbin/suspend.sh ; grep -v \# 
/usr/local/sbin/suspend.sh | uniq
#!/bin/sh

zpool offline -t august gpt/cache1-august &
zpool offline -t august gpt/cache2-august &
zpool offline -t august gpt/cache3-august &

while mount | grep -q Transcend ; do
    zpool export Transcend
    sleep 5
done

grahamperrin:~ %


/etc/rc.suspend includes this line:

/usr/local/sbin/suspend.sh


See also: today's 
<https://lists.freebsd.org/archives/freebsd-wireless/2025-January/002709.html>, 


> iwm(4) occasionally troublesome since main-n274579-50c1e179b584 
> (2025-01-05)