Consistent Wake from Sleep Issues on Linux Edit:(5x Distros Tested)

@nomb85 I’ve been running the SN750 for ~ 30d now after switching from the P5. I’m having other issues with Linux (mostly graphical glitches), but I haven’t been haven’t had any sleep issues since switching (other than the long time to wake that comes from enabling deep sleep).

Once I figured out that the P5 was causing the issue, I didn’t go back and re-test the distros I initially tested, but Pop!_OS 21.04 is working great thus far.

Out of curiosity, do you have a thunderbolt dock / use your Framework in clam-shell mode?

I know you asked BesselFunct your last question, but I’ll respond too: I have not yet used a dock, or an external monitor, or clamshell mode. My sleep issues happened without any of those things.

EndeavourOS, kernel 5.15.6, just did about a half dozen sleep/wake cycles since yesterday, shortest about 4 minutes, longest about 18 hours (~32% battery loss). No issues with wifi, BT, ssd (Hynix P31 in my setup), etc on wake.

Also tested deep sleep mode, again no issues in eOS, and like .2 or .3% battery per hour loss in deep sleep.

Thanks to everyone for the information in this thread! I had some success this morning and thought I would share. I have the DIY edition from batch 5 and was having the same issues described in this thread with Pop!_OS and Fedora 35 (the only distros I tried).

In both cases, s2idle was working fine, it was just draining the battery quickly. I tried switching to “deep”, but things would crash on wake every time.

@BesselFunct’s comments about switching to the Western Digital SN750 got me curious. I was running a cheap 1TB Inland Platinum when things were crashing. I Switched to a 500GB WD SN750 this morning and deep sleep has been working perfectly since then with no crashes yet. In my case, the hard drive I originally installed seems to have been the culprit.

2 Likes

This is happening with me after I switched to a Crucial P5 NVMe drive (CT500P5SSD8) on Fedora, Arch, and Ubuntu all latest versions. Before had, I was running a WD SN750 and had no problems with sleeping and waking my laptop after closing the lid.

Just a follow-up post to say that kernel 5.15.5 on Pop!_OS 21.10 appears to have fixed the issue for me. I can now suspend and wake right away (without hibernate, which took about 5-8 seconds to load from disk)!

@Duane_Johnson Excellent news! Was this a fresh install or an upgrade from 21.04? Are you using the mem_sleep_default=deep boot parameter?

This was an upgrade from 21.04. I removed the mem_sleep_default=deep boot param that I had to use previously.

Just want to ditto this . Recently got the WD SN850 NVME and I no longer have these issues with my Ubuntu 21.10. Unfortunately something with the Crucial P5 is causing problems.

Ah.

Aaaah…

In my extensive post on SSD power consumption, I noticed that WD drives have two “low power” state – one when the computer is in S4 and the other for when it is in S3 (and perhaps other sleep states) – and only WD drive have this info on the datasheet.

My thinking is that the Crucial, like Samsung and many others, do not have the modern sleep state support (or the old sleep state support) WD drives possesses, and thus when Linux tried to perhaps sleep the device it would … well, cause troubles.

My next drive is going to be a WD. Noted!



Does your current installment (with WD) have any other issues? I don’t think so as NVMe is pretty generic a protocol. Compared to the “modern sleep”/“low power idle” madness.

1 Like

No, after swapping to WD it worked smoothly. Suspending and resuming worked fine, with no problems at all caused by the WD.

2 Likes

I do want to bump the thread for a quick update, that it seems that the latest linux kernel 5.16.* seems to introduce this suspend and can’t wake issue. This also affects my Western Digital SN850. I had to use the 5.15.* kernel and it is fine again, I can suspend and resume with no problems.

I mention this, for anyone who likes to play around with the latest kernel, especially since Linux 5.16.7 has been marked “Stable” : https://www.kernel.org/

Further links:

interesting. Maybe your hynix works now?
I wonder if there is a sleep state config in BIOS/Linux Kernel…

I see lots of people with excessive and quick linux power drain during sleep, I really don’t think its a hardware issue. Maybe Framework can chime in?

Power drain isn’t realted to battery (cell) degredation.

The suspend power drain Linux users are seeing is definitely not hardware related.

It might cause increased degradation over years due to excess cycling, but that’s about it.

2 Likes

Ah, if it’s during sleep, you can try a few things:

  1. Enable deep sleep (search here on the forums, you have to add a kernel parameter). This is in contrast to s2idle, which uses a lot more power.
  2. Enable and use hibernation. This is my preferred solution for any extended ‘sleeping’, since it uses next-to-no battery (especially when the battery is still new like it is in all Frameworks).

I’ve setup my power button to hibernate and lid closure to trigger deep sleep. If I’m going to be away from my laptop for any extended period of time, I trigger hibernation.

It’s not perfect, but it certainly greatly increases the time I can go between charges when I’m not using it.

2 Likes

Interesting.
I have set my power button to sleep and lid to do nothing.
Because I feel like that when you are telling the device to hibernate chances are that you have lots of time (to go into the power menu and click on “hibernate”), whereas if you have lots of tasks and don’t even have the time to hit the power button, you probably don’t need to sleep it anyway.
I wish there are the hibernation buttons of the old days. Some USB keyboard still have them, which is odd enough.

It’s using deep sleep.

It’s not about time (for me, anyway). It’s about convenience. I use a Wayland compositor (not a DE), so I don’t even have a ‘power menu’ of any kind. This means I have to trigger hibernation using the terminal (which is fine, I actually prefer it because I know exactly what’s going on and I have full control). While this is nice for control, it does mean that it’s slightly more inconvenient than, say, tapping a button. And since I use hibernation quite often for powersavings (for example, I pretty much always hibernate overnight, and even most of the time during the day when I’m not using it), it’s useful to be able to trigger it easily.

As for setting the lid action to ‘sleep’, that’s for those times where I don’t need to keep it closed for that long, but where not doing something just feels wasteful. For example, if I’ll be gone for 10–20 minutes or if I’m moving the laptop, I’ll put it in sleep (‘deep sleep’, not s2idle).

1 Like