Close

Sleep mode on Linux

A project log for Silly software wishlist

Motivation to do some software projects by writing them down.

lion mclionheadlion mclionhead 03/31/2020 at 20:470 Comments

After 23 years of either leaving Linux boxes on 24/7, running them in virtual machines, or turning them off at the end of every day, the lion kingdom finally got a lucky combination that supported suspend mode.  It was the Ubuntu 16 + Ryzen 7 2700x + Prime X470 Pro motherboard.  What a joy it is to not have to reopen all the programs of the previous day.

The command to suspend it is pm-suspend.  The mane problem is uninterruptible sleep processes.  It has to SIGSTOP all processes for some reason.  If it runs into an uninterruptible sleep process, it gives up.  Uninterruptible sleep happens to lions because a kernel module died.

The pm-hibernate command just shuts it down.  pm-hibernate is useful if the shutdown command gets to "power down" but doesn't turn off the power.  pm-hibernate is the 1st command that turns off the power in over 20 years.

It was then that the limitations began.  pm-suspend disconnects all network connections so vnc & ssh die.  It disconnects ADB, but doesn't disconnect USB storage devices.  That is a real pane for those of us doing complicated builds remotely.  Our only reprieve is being able to scroll back.  Finally, pm-suspend only works maybe 9 out of 10 times.  The other time, it never wakes up.  Linux is still not as reliable as macos in this department.  Fortunately, it syncs the filesystems.

Discussions