[HN Gopher] FreeBSD Suspend/Resume
       ___________________________________________________________________
        
       FreeBSD Suspend/Resume
        
       Author : vermaden
       Score  : 62 points
       Date   : 2025-01-11 01:47 UTC (2 days ago)
        
 (HTM) web link (vermaden.wordpress.com)
 (TXT) w3m dump (vermaden.wordpress.com)
        
       | palata wrote:
       | > I leave You with a dilemma on how a Windows or macOS or Linux
       | system running on the laptop/desktop behaves differently then
       | FreeBSD here...
       | 
       | Not sure what the point is? Is it better, or is it as good as
       | those other systems?
        
         | vermaden wrote:
         | In terms of suspend/resume case I believe the experience is
         | generally the same - it just works on FreeBSD.
        
           | timcambrant wrote:
           | I have had very mixed experiences when suspending a laptop
           | using Windows, various Linux distributions, MacOS and Windows
           | 7-11. MacOS is the most polished yet, but Linux (kernel 2.4
           | to 6.8) has never nailed this. Often times the kernel refuses
           | to sleep and the laptop will hotbox in the bag until the
           | battery runs out. The same has happened on the other OSes,
           | but less often.
           | 
           | It looks like this particular FreeBSD installation (we don't
           | know if it's out of the box or customized, and haven't seen
           | it side by side with another hardware setup) works very well.
           | Wonder if the results are the same if they closed the lid
           | rather than remembering to press the button. Also, I wonder
           | why this doesn't trigger any authentication when starting
           | back up. Anyone could snatch that laptop and still be logged
           | in.
        
             | johnea wrote:
             | Having been on linux laptops for ~20 years, I've found this
             | to be really h/w dependent.
             | 
             | I've mostly run thinkpads, and they've mostly worked. My
             | current T16 not only suspendds/resumes well, I also
             | successfully use full disk encryption recovery on boot from
             | hibernate.
        
               | bityard wrote:
               | Concur. I have seen issues with suspend on Linux in the
               | past, but my last three Dell laptops suspend just fine.
               | Usually the only weirdness is with laptops that don't
               | have an S3 state anymore, or when you add/remove hardware
               | in between being awake and asleep.
               | 
               | That said (and it pains me to say it), the experience is
               | still nowhere near as flawless as MacOS on Silicon
               | hardware.
        
               | jandrese wrote:
               | This is my experience too. Even though we don't hand off
               | control to the (often buggy) BIOS anymore, there is still
               | a fair bit of hardware support that needs to be in place
               | to have a smooth suspend/resume. Even on the Windows
               | install that shipped with the laptop I've had machines
               | that fail to suspend properly and turn into bagwarmers or
               | that fail to restore the graphics when waking back up or
               | any number of potential issues. I've even had machines
               | that brick their SSDs the first time you put them to
               | sleep. Permanently bricked, can't even be wiped or
               | factory reset bricked.
        
               | vermaden wrote:
               | For the record - this FreeBSD installation from videos
               | also uses _Full Disk Encryption_ in the form of GELI
               | under the ZFS - its really brain dead simple to setup -
               | just use  'Auto (ZFS)' option in the FreeBSD
               | _bsdinstall(8)_ installer and set _Encrypt Disks_ to
               | _YES_ - nothing else required.
        
             | yjftsjthsd-h wrote:
             | To echo the other comments - I'm reasonably confident that
             | the Linux kernel is perfectly capable of handling sleep,
             | the problem is varied hardware support. Consider that every
             | Chromebook and Android device on the planet is running a
             | Linux kernel, and they have no trouble. Likewise, I don't
             | think I've ever had Linux struggle with sleeping on a
             | thinkpad, and the best suspend/resume experience I've ever
             | had was Linux on a random Lenovo laptop a while back.
        
             | vermaden wrote:
             | Hi,
             | 
             | > _It looks like this particular FreeBSD installation (we
             | don 't know if it's out of the box or customized, and
             | haven't seen it side by side with another hardware setup)
             | works very well._
             | 
             | All the settings I use are documented here - and its
             | nothing special really - most people using FreeBSD on
             | laptops use them:
             | 
             | -
             | https://vermaden.wordpress.com/2022/04/14/freebsd-13-1-on-
             | th...
             | 
             | - https://vermaden.wordpress.com/2018/11/28/the-power-to-
             | serve...
             | 
             | > _Wonder if the results are the same if they closed the
             | lid rather than remembering to press the button._
             | 
             | I often just close the lid and DO NOT want the laptop to go
             | to sleep - that is why I do not use it - but it works the
             | same with _hw.acpi.lid_switch_state=S3_ in _/
             | etc/sysctl.conf_ file - it does not matter for FreeBSD if
             | _zzz(8)_ commands triggers S3 state or something else.
             | 
             | > _Also, I wonder why this doesn 't trigger any
             | authentication when starting back up. Anyone could snatch
             | that laptop and still be logged in._
             | 
             | The purpose of this videos were to show only the
             | suspend/resume process of FreeBSD system.
             | 
             | In my daily life I have two shortcuts related to this:
             | 
             | - [SUPER] + [L] - locks the system and leaves it running -
             | and it requires to enter password
             | 
             | - [SUPER] + [CTRL] + [ALT] + [L] - locks the system AND
             | PUTS IT INTO S3 SLEEP - and it requires to enter password
             | if you wake it up
             | 
             | Hope that helps.
             | 
             | Regards,
             | 
             | vermaden
        
         | freekh wrote:
         | Login?
        
           | vermaden wrote:
           | The purpose of this videos were to show only the
           | suspend/resume process of FreeBSD system.
           | 
           | In my daily life I have two shortcuts related to this:
           | 
           | - [SUPER] + [L] - locks the system and leaves it running -
           | and it requires to enter password
           | 
           | - [SUPER] + [CTRL] + [ALT] + [L] - locks the system AND PUTS
           | IT INTO S3 SLEEP - and it requires to enter password if you
           | wake it up
           | 
           | Hope that helps.
           | 
           | Regards,
           | 
           | vermaden
        
       | yxucjcjc wrote:
       | What are those games being run?
        
         | vermaden wrote:
         | In the background its _Balatro_ game running on WINE64.
         | 
         | Rally game is _Colin McRae Rally 2.0_ on WINE32.
         | 
         | Top left is _Sensible World of Soccer 96 /97_ game running on
         | DOSBox.
        
       | ohazi wrote:
       | RIP S3 sleep... Took years to get it to work reliably under
       | Linux, then we had a good decade+ run of it "just working" like
       | this, now back to trying to weed out all the wacky platform
       | quirks and weird hardware/firmware behavior that make the S0ix
       | states be just barely unusable.
       | 
       | Maybe in another five years...
        
       | com2kid wrote:
       | Windows used to work about this well back in the XP days,
       | possibly Windows 7 as well. Plenty of times I hit the "sleep"
       | button that Logitech put right next to the esc key (....) and
       | resumed the system to find everything working as expected.
       | 
       | Not sure if the embedded video is suspend to RAM or disk. Also
       | not sure why there wasn't a PW prompt upon resume, but I'm not a
       | BSD person, just someone who is paranoid about PW prompts.
        
       | maybeben wrote:
       | feel lucky. s3 suspend quit working on my thinkpad in -CURRENT
       | some months ago after having worked for like a decade. i didn't
       | notice until i pulled a molten hot slab of locked up laptop out
       | of my bag
        
         | bboygravity wrote:
         | The only laptop I ever had in my entire life where sleep works
         | is my current XPS 17 running win10.
         | 
         | I want to update my hardware to a Lenovo. Not looking forward
         | to new "sleep won't work no matter what you try" adventures.
         | 
         | That sht is like printers: should always work, never does.
        
       | v1ne wrote:
       | 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.
        
         | margana wrote:
         | 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.
        
       ___________________________________________________________________
       (page generated 2025-01-13 23:00 UTC)