Fucking Sleep/Hibernate in Linux

1. Your hardware (CPU, mobo, laptop model if applicable)
2. Does Linux suspend mode work on your hardware?
I'm sick and tired of this shit. I either have to shut my computers all the way down, or keep them turned completely on. My old Intel and AMD hardware both give me this problem. I'm thinking of buying a Ryzen CPU+mobo, but I'd like to get one that actually supports this feature in Linux if such a thing exists.

Other urls found in this thread:

wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Instantaneous_wakeups_from_suspend
wiki.archlinux.org/index.php/Power_management#Power_management_with_systemd
twitter.com/NSFWRedditImage

Sleep/hibernate works fine in linux as long as you use fully FOSS components like a thinkpad x200. Stop being such a nigger OP.

Do more research.

The info on this topic is very sparse. Most people who run Linux are just happy that the shit boots up and runs (pretty much a given these days), and never even think of reporting whether suspend mode works.

You're a delusional cuck if you think any commercially-available hardware is "fully FOSS"

Libreboot, and even a Russian re-implementation of the EC is available. Fuck off officer FUD

just install Microsoft Windows if you want hibernation to work

They can't even get hibernate working on popular i3/i5 chips, you think Ryzen stands any chance?

use systemd wew

Problem is youll likely end up in data corruption with linux file systems so you have to shutdown every once in a while

My x220 works with both, and my desktop works for sleep and maybe hibernation (I never use it on either).
I did see a PC that crashed when you tried to hibernate and wouldn't wake up from sleep, don't know what that was about.

One of the reasons I'm so happy with the Void is the hibernation.
It's just a small script:
#!/bin/sh# zzz - really simple suspend scriptUSAGE="Usage: ${0##*/} [-nSzZR] -n dry run (sleep for 5s instead of suspend/hibernate) -S Low-power idle (ACPI S0) -z suspend to RAM (ACPI S3) [DEFAULT for zzz(8)] -Z hibernate to disk & power off (ACPI S4) [DEFAULT for ZZZ(8)] -R hibernate to disk & reboot -H hibernate to disk & suspend (aka suspend-hybrid)"fail() { echo ${0##*/}: 1>&2 "$*"; exit 1; }export ZZZ_MODE=suspendexport ZZZ_HIBERNATE_MODE=platformcase "$0" in *ZZZ) ZZZ_MODE=hibernate;;esacwhile getopts hnSzHRZ opt; do case "$opt" in n) ZZZ_MODE=noop;; S) ZZZ_MODE=standby;; z) ZZZ_MODE=suspend;; Z) ZZZ_MODE=hibernate;; R) ZZZ_MODE=hibernate; ZZZ_HIBERNATE_MODE=reboot;; H) ZZZ_MODE=hibernate; ZZZ_HIBERNATE_MODE=suspend;; [h?]) fail "$USAGE";; esacdoneshift $((OPTIND-1))case "$ZZZ_MODE" in suspend) grep -q mem /sys/power/state || fail "suspend not supported";; hibernate) grep -q disk /sys/power/state || fail "hibernate not supported";;esactest -w /sys/power/state || fail "sleep permission denied"(flock -n 9 || fail "another instance of zzz is running"printf "Zzzz... "for hook in /etc/zzz.d/suspend/*; do [ -x "$hook" ] && "$hook"donecase "$ZZZ_MODE" in standby) printf freeze >/sys/power/state || fail "standby failed";; suspend) printf mem >/sys/power/state || fail "suspend failed";; hibernate) echo $ZZZ_HIBERNATE_MODE >/sys/power/disk printf disk >/sys/power/state || fail "hibernate failed";; noop) sleep 5;;esacfor hook in /etc/zzz.d/resume/*; do [ -x "$hook" ] && "$hook"doneecho "yawn.") 9

Yes:
No:
Buy known-good stuff online, or go to a store and make sure there's not a single Broadcom chip in anything bought new. Broadcom is what Theo de Raadt warned us of: an OEM-friendly early-to-market company that does it at the cost of doing it in badly, in software that then needs firmware updates to actually work properly.

Some HP 15" with an A10 9600p, R7m 340, 8GB DDR4, 2TB seagate HDD and a shit 768p TN screen
Just werks out of the box on KDE Neon, Solus and just about every other distro I tried so far

You're fucked with x86, it's inherently backdoored.

On topic: gonna try Debian on my ThinkPad X31 soon-ish, making a USB stick for it atm.

Has worked fine on 2 Dell Inspirons for me, with both i5 and i7.

I've never had any issues with sleep on my systems, most OSes got that together awhile ago

Intel ME is wiped completely off with libreboot being flashed externally. What are you on about.

That's nice and all, and it IS an improvement, but it's not "Fully FOSS components."

I don't think you know the definition of the word "inherent".

Libreboot doesn't support any systems with ME. It's one of the main reasons it's stuck on ancient hardware.

Maybe this will change soon, people have supposedly found a vuln to run user code on ME.

Seems like HP and Dell are more reliable than modern Thinkpads, at least from my experience. I have a Thinkpad with a 4th gen i5, and suspend is fucked. However, apparently Haswell specifically had a suspend bug.
wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Instantaneous_wakeups_from_suspend

I have a Haswell / GTX750ti with proprietary drivers installed. I've never had issues with the Nvidia hardware, but a couple of times when using Haswell GPU I've had to Ctrl+Alt+F3 and kill lightdm to get control back. If you're on a desktop machine, you can just disable sleep suspend and hibernate.

systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Works for me. I'm using a standard Dell Latitude E6530 (you can google the specs)

And I installed Manjaro linux on it.

I second this. I want to hibernate and reboot into win10 for vidyagames. Then come back to where I left off.

I just wonder if having FDE encryption will throw a monkey wrench into these plans.

What the fuck?

Hibernate Loonix, restart into Win10 for gamezz, done with games? shutdown Win10, resume Loonix.

Blame (((them))) for inherently backdooring x86.

Do you change boot sequence in between or can you set the some BIOS to always ask what to boot from?

try in terminal:
pm-suspend

sometimes with gnome the ui breaks and suspend, shutdown, restart don't work.

Hibernating is for faggots tbqh

KVM, run Windows with the beefy GPU, use Linux simultaneously.

that's never how hibernate works dumbass

My X230 worked with everything out of the box, from the suspend to the fingerprint reader.

systemctl suspend

Enjoy your exposed swap partition with all keys, cucks.

There are many driver writers for Linux that are also fans of the Thinkpad. This is the reason why Thinkpads are well supported in Linux.

Yes. I haven't encountered an issue in a decade.
Well I did have a winxp BSOD on hibernate if that counts?

Yes, on Lenovo Yoga 300. It's some Bay Trail, I can dump lspci if you care.
Actually, for a while I haven't used a laptop where suspend/resume failed.

...

Laptop, Dell Vostro 1520: suspend just werks; both under Windows XP and 7 as well as Linux (any kernel >=3)
Hibernation "works" as well, but takes forever to restore from on both OSs.
Self build desktop with Phenom II X6 CPU : suspend just werks, though Windows sometimes decides to wake up in the middle of the night. Hibernate on Linux doesn't work, the monitor gets turned off, then immediately back on, and I'm back at the login screen.
On Windows, Hibernate just crashes the system (monitor off, computer still running, doesn't accept ANY input whatsoever, have to hard reset)

So, suspend good, hibernate crap, regardless of the OS.

Linux allows you to keep swap in file.
With basic secure FDE your swap is encrypted with random key on every boot and key is erased on power off, with hibernate you choose to keep this key persistent. It's not secure though since if attacker accidentally decrypts your file system, xe will also get access to random struff in your ram moments before suspend. However, I suppose, you can save random swap key on an external drive alongside with general encrypted partition key and have more security overall.

Works fine for me, used to screw up network manager a while back but it stopped doing that months ago

I never had problems with sleep or hibernation under Linux until Debian switched to systemd, then hibernation stopped working.

I said 'fuck this' and moved to Devuan and now it works again.

...

If you're using systemd, check this out:

wiki.archlinux.org/index.php/Power_management#Power_management_with_systemd

I set up my hibernation flawlessly with info from here. And this is on a shitty HP not-free-software-friendly laptop

Slightly off-topic, how can I make display sleep/screensaver work properly?
Desired behavior:
Actual behavior:

Don't ever touch HP hardware, be it a prebuilt or a printer.
Out of the big names there's not a single worse manufacturer than them.

Mobo: ASUS M5A99FX PRO R2.0
CPU: FX-8320
GPU: GTX 970
Sound card: Asus Xonar DSX

It all works after suspend: Video, audio, everything. Audio functionality also restored just fine with the onboard.

As for laptops:
Lenovo Y50 4k (last model with 860M).
It jest werks.