… submitted a bug report that describes an apparent problem in the USB support causing USB devices to be, in effect, umounted on waking from use of zzz. …
Yours may be a duplicate of 2012 bug 173722.
Fairly well known, but relatively poorly documented:
- FreeBSD use of USB does not yet allow things such as sleep and wake of the OS, if the OS (on UFS or ZFS) boots from and then runs from a USB drive
– anyone, please, correct me if I'm wrong.
From a 2013 blog post –
Home Server with FreeBSD and ZFS – before FreeBSD began using OpenZFS:
- …
- The system wakes up but often fails to resume the USB hard disk.
… a deal breaker, since my entire root partition was on a USB drive, and it would hang whenever I tried to invoke system commands. …
I might have expected failure (hangs)
always, not
often, although 2013 was before my time.
FreeBSD-based NomadBSD is a 64-bit live system for USB flash drives. It's reported that
Suspend and Resume using the Leave Menu works out of the box on a Dell Latitude E5570, however that was with the OS installed on a hard disk drive (presumably not on USB).
OS on USB aside
ZFS
In 2020 on the freebsd-current list, whilst discussing
suspend/resume versus OpenZFS on USB, the late HPS observed:
USB is not hanging.
It looks like a problem with USB resume, that no devices are recognized, until you re-plug them ...
Recommended subscriptions: issue 5242 and linked PR 11082.
I have a script at
/usr/local/sbin/suspend.sh
– called by customised /etc/rc.suspend, the script attempts to:
- export a named pool on a single HDD on USB
- take offline two removable cache devices on USB (Kingston DataTraveler 3.0, Verbatim STORE N GO).
USB in general for mass storage
Please don't quote me on this (I can't find my points of reference), IIRC:
- what's required for USB to work for storage, following wake from sleep, occurs too late in the FreeBSD wake routine
– or something like that …