Hacker News new | past | comments | ask | show | jobs | submit login

FreeBSD and Suspend/Resume… About 10 years ago, I switched from FreeBSD to Linux because I couldn't get suspend/resume to work reliably (i.e. suspend/resume cycle succeeds and it doesn't drain my laptop battery in between) on FreeBSD on my Thinkpad. And this was only Suspend to RAM. Suspend to Disk is really nice to have, especially if coupled with hybrid standby, as on macOS and Windows by default.

I really appreciate that people still maintain FreeBSD on the desktop, though.






I recently bought a new laptop because I could only resume to work on OpenBSD, but not Linux. Suspend worked great under Linux, but without resume, the experience was sub-par.

It's unfortunate that I needed Linux to get some of my work done.


Odd that you would say "only Suspend to RAM", because that is far more difficult to reliably implement in terms of hardware compatibility than Suspend to Disk.

AFAICT "Suspend to RAM" is basically stopping the CPU, powering down the peripherals, and keeping the DRAM unchanged and refreshed. It should be the easier option since very little state needs to be saved explicitly, the OS and apps should just receive a signal that they were interrupted, so some peripherals have to be re-initialized, and things like network and USB connections need to be re-established.

What am I missing?


> powering down the peripherals

> some peripherals have to be re-initialized

AIUI, these things actually way more hard than it sounds because hardware developers live in their own world, apparently. There's been articles here on HN from mjg59's blog (who's one of the guys maintaining all this power management stuff in the Linux kernel) like this one [0] about how some hardware simply chooses to do things that make this "re-initialization" impossible to do reliably.

[0] https://news.ycombinator.com/item?id=38095276


The main difference is that in S3 many (internal) peripherals are put to sleep but not entirely unpowered. So when the system is resumed, it's not an entirely clean slate like it would be from a fresh power up from hibernation. Unfortunately sometimes pulling down the reset line doesn't always do as thorough job as a power cycle.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: