# FreeBSD and the state of Suspend-to-Disk / Hibernation (STD/S4OS)?



## MasterOne (Jan 6, 2020)

The FreeBSD Wiki says:


> We don't yet have the necessary infrastructure in place to make suspend to disk work on amd64 or i386.



The FreeBSD Manual explains Suspend/Resume and mentions S4BIOS and S4OS, but doesn't tell any more.

So I assume this is still valid, no Suspend-to-Disk (STD/S4OS) available in FreeBSD?

I have already tried, *acpiconf -s 4* seemingly puts my laptop into hibernation, but wake-up doesn't work, it just performs a regular boot.

It's not a show stopper for me, because Suspend-to-RAM is the important one, but Suspend-to-Disk was always nice to have (in the Linux world) and if only for the rare occasion when running out of power while working, which was also the reason why I always had the disk configured with a swap partition in the size of RAM.

Since my laptop has 32GB RAM (and a 512GB NVMe SSD), without Suspend-to-Disk this should give me no reason to arrange for swap at all, or is swap nevertheless recommended? With Root-on-ZFS the installer defaults to 2G swap, but I have seen installation instructions (like from vermaden) that simply omit swap.


----------



## vermaden (Jan 6, 2020)

Even suspend/resume is most of the times broken, forget about suspend-to-disk (so called hibernation).


----------



## MasterOne (Jan 7, 2020)

vermaden said:


> Even suspend/resume is most of the times broken, forget about suspend-to-disk (so called hibernation).


Do you mean that either generally suspend/resume works or doesn't on a given hardware, or that it breaks/unbreaks from one release to another?

Because I can only speak for 12.1R, on which it seems to be working as supposed to after installing graphics/drm-kmod and disabling TPM in BIOS (which made me curious, because this is not a ThinkPad, but a Clevo laptop).

Using a desktop or laptop I can't really imagine getting along without suspend/resume, because it's not running all day long and having to shutdown and freshly boot several times a day really is not a process I would want to be going through.

So how do you do it? Do you have suspend/resume working? Do you use FreeBSD on a laptop, desktop or both?


----------



## vermaden (Jan 7, 2020)

I have used FreeBSD on desktop for years, then I moved to laptops. I of course also use FreeBSD on servers.

The suspend/resume worked for most of the time on my ThinkPad W530/T520/X220/T420s and recently got broken - and no one wants to fix it - and not one know what broken it. It got broken somewhere between 11.2 and 11.3.

The hibernation on FreeBSD never worked from what I know.

Currently I also use 12.1 with graphics/drm-kmod module, but suspend/resume still does not work. TPM is disabled.


----------



## MasterOne (Jan 7, 2020)

From what I've read, the code for handling hibernation is just not implemented at all, so that does not come as a surprise (if that info is still accurate, I haven't seen any recent updates on that matter, which is why I was asking).

I assume you have still disabled Bluetooth in BIOS? I will have to do some more testing here, but from what I have seen so far, TPM was the only thing preventing resume from suspend, but I have only tested it from the console so far (but with graphics/drm-kmod built from ports, it didn't work without it).

I'm really curious though what your workflow without suspend/resume not working on your laptop looks like.


----------



## vermaden (Jan 7, 2020)

MasterOne said:


> From what I've read, the code for handling hibernation is just not implemented at all, so that does not come as a surprise (if that info is still accurate, I haven't seen any recent updates on that matter, which is why I was asking).
> 
> I assume you have still disabled Bluetooth in BIOS? I will have to do some more testing here, but from what I have seen so far, TPM was the only thing preventing resume from suspend, but I have only tested it from the console so far (but with graphics/drm-kmod built from ports, it didn't work without it).
> 
> I'm really curious though what your workflow without suspend/resume not working on your laptop looks like.



Yes I have Bluetooth disabled.

The suspend part works. The resume part does not work. The laptop just blinks with lights and indicators and nothing more happens until I hard reset it.

If you need hibernation, then OpenBSD supports it (and it works).

There is also bigger chance of working suspend/resume on the OpenBSD land.


----------

