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

I’ve always had deep sleep enabled even though it makes it so much longer to wake and i’m using the 850 that came with it so not a cheap drive or anything I’m sure they tested this.

I left Linux on laptop 10 years ago exactly because I was fed up with sleep/awake issues. Just placed an order on Framework DIY two days ago, but reading this thread gives me PTSD :scream:

1 Like

Hmm. I have the same wakeup issues on (non-Linux) OpenBSD, which has a completely different driver codebase for all types of “hard drives” - and my FW also boots off a WD Black SN850 (bought locally). Several previous laptops over the last decade or so have done sleep/awake nicely on this OS. At least one other person with the same OS release does not have such issues, so it’s looking like either one batch of the 850’s have a defect, or, the @Framework BIOS has an issue with these drives. Team: any thoughts?

FWIW, mine identifies as model WDS100T1X0E-00AF. Others with SN850 including @jon @Anil_Kulkarni @nomb85 or anyone else with an 850 and non-Windows OS , please reply with your full exact model number and whether suspend/resume works perfectly (i.e. every time) or not? This may help narrow the problem down. Thanks!

1 Like

@BesselFunct The touchpad not initializing has been a commonly reported issue, and disabling PS/2 emulation in the BIOS seems to be the workaround.

My worse issues have been on Manjaro. I should note that I do not have any wake issues on Windows. This issue actually made me install Windows again on my main drive and move Linux over to the 1TB USB.

I seem to only have the issues on Linux. If it is drive related that it has to be an issue in the Linux kernel.

I have worse issues plugged into a dock. The worse is when it decides to just crash on wake.

Yep while this might be better for battery drainage during sleep, it does create a longer wake time.

I’ll have to wait until I reboot again out of Windows but on Windows it identifies as: WDS200T1X0E-00AF

Full one: WDS200T1X0E-00AFY0613200WD

WDS200T1X0E-00AFY0

Running Pop!_OS, so far so good, no wake from sleep issues that I have run into. Fingers crossed.

1 Like

I remember a discussion somewhere where Linux does not play nicely with NVMe drives and sleep on some older newer systems (huh)?
Like, yes. If you have a old SATA m.2 drive lying around, try that one out. Or try running everything in “legacy mode” (a.k.a. BIOS mode instead of UEFI mode).
My last brief experiences with linux tell me that they tend to go pretty well with old protocols.
But I don’t think it’s entirely Linux or Framework’s fault. The “modern sleep” (S0 low power or whatever) is complete madness.
Like look at this. Yes, it’s on windows, but it’s not less messy for linux.

The following sleep states are available on this system:
    Standby (S3)
    Hibernate
    Hybrid Sleep

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.
    Standby (S2)
        The system firmware does not support this standby state.
    Standby (S0 Low Power Idle)
        The system firmware does not support this standby state.
    Fast Startup
        This action is disabled in the current system policy.

It’s not as if (S0 to S2 is “not supported”). It is because the system uses “hybrid sleep” which, when enabled, disables S0 to S2. However, if I remember correctly that S0 low power (as well as a thing called “S0 connected standby”, which is apparently two different things) is supposedly the new “hybrid sleep” thing.

So until it does some more janky things (like waking up because i closed the lid before i let the system sit with the lid open for 5 minute), I am going to pretend this problem did not exist. Or that nothing can fix it.

And during the brief period I tried Linux on the different machines, only the old legacy core 2 duo system (with full legacy BIOS and SATA drive) played “nicely”, but will shutdown instead of sleep (?) on seemingly random occasions (?). “Linux Sleep” on the Thinkpad does not help either.

3 Likes

Throwing my own experience at this. I’m running Manjaro, but not with the WD-Black drive, but a Samsung 980 1TB NVME drive. This is a drive I have used previously with a Lenovo T14 drive.

My issues also generally stem from sleeping the machine while it is connected to a thunderbolt dock. I’ll try to avoid that for the next few days to see if that helps the issue or not. Judging from my previous experience with the T14, it should help significantly.

1 Like

Same here. On Linux I was seeing about a 5 second delay when resuming from s2idle deep sleep. Totally acceptable for me. No issues resuming on Windows, to include hibernation.

Thanks to everyone looking into this issue. It’s the “last mile” to making this wonderful machine my primary workhorse.

I’m running the latest Pop!_OS beta (21.10) with kernel 5.15 and I’m unable to restore after closing the lid. When I open the lid, the power button’s light is on and the screen remains black for more than a minute. I’ve tried several times and it is consistently unable to awake. (I have to hold down the power button for 10+ seconds to turn off).

$ uname -r
5.15.0-76051500-generic

$ cat /sys/block/nvme0n1/device/model 
WDS100T3X0C-00SJG0

$ cat /sys/block/nvme0n1/device/firmware_rev 
111130WD
1 Like

@Ian_Darwin I just got my framework laptop from late batch 4 and I’m also facing resume issues on OpenBSD. It consistently fails for me with both hibernate and suspend. The disk I’m using is Samsung 960 EVO 500GB Solid State Drive (MZ-V6E500BW) m.2 NVMe.

To add another datapoint, I got my Framework yesterday and installed Debian sid on there. Both suspend and hibernate (including hibernate overnight) resume fine. I also just tried deep sleep and resume and, other than realizing I had to disable PS/2 emulation mode, it seems to work just fine (although I haven’t yet tried a resume from deep sleep after, say, an hour).

I’m using a SAMSUNG 970 EVO PLUS M.2 2280 250GB PCIe Gen 3.0 x4, NVMe 1.3 V-NAND 3-bit MLC Internal Solid State Drive (SSD) MZ-V7S250B/AM.

1 Like

The new Linux 5.16-rc1 kernel offers some interesting things that could possibly help us. Intel’s ACPI engineer, Rafael Wysocki, has landed some ACPI additions:

A fix to avoid crashing the kernel by user-space when attempting to restore the system state from a swap partition in use.

[Thermal change:] Support for saving and restoring the TCC value within the Intel int340x driver for suspend/resume conditions.

Does anyone know if this would pertain to the framework laptop?

2 Likes

Some slightly good news! I have a workaround for this problem in Pop!_OS, if you’re willing to use hibernate instead of suspend:

  1. It looks like Pop!_OS doesn’t support hibernate out of the box. The main hurdle is that a swap partition is not pre-configured with large enough size to hold all of RAM. A swap file can be used instead. Follow this excellent guide to create a swap file that is [your RAM GB] + 2 GB in size.

  2. Edit /etc/systemd/logind.conf and uncomment and change the following settings to “hibernate” instead of “suspend”:

HandleLidSwitch=hibernate
HandleLidSwitchExternalPower=hibernate
  1. I also added mem_sleep_default=deep to the kernel boot params. I’m not 100% sure this step is necessary. On Pop!_OS there is a handy tool called kernelstub that can be used to edit boot params:
sudo kernelstub -a "mem_sleep_default=deep"
  1. Don’t forget to turn of the PS/2 driver in the bios. (I’m also not 100% sure this is necessary, but others have reported it, so I’ll add the reminder!)

Done!

Although this doesn’t give us the fast & convenient “suspend” feature, it’s still relatively fast with an NVMe drive (~5 seconds) and makes things significantly more usable. Hopefully we’ll get more information from framework engineers at some point so we can take advantage of better sleep/resume capabilities.

2 Likes

This is only needed if you intend on using suspend (it doesn’t affect the behavior of hibernate).

2 Likes

Again, I’ve seen this to be more of an issue with suspend than with hibernate, but there’s no harm in doing this.

1 Like

@Chiraag_Nataraj Thanks for the better recommendations there.

BTW I found this guide to be really helpful in diagnosing what was going on within my system:

It’s a few years old (2015) but the general methodology hasn’t changed.

In my case, I discovered that the initcall to software_resume was returning -2 (ENOENT) which I think indicated the swap partition couldn’t be found. This was only visible when I added initcall_debug to the kernel boot params (via kernelstub -a "initcall_debug" in my case).

1 Like

I consistently had wake from sleep issues on multiple Linux distributions with my Crucial P5 SSD. The laptop would hang on waking if I let it sleep for more than about 10 minutes, and I would need to hold the power button down to forcibly reset it. Sometimes I would see console logs that indicated filesystem problems, but sometimes the screen locker would just freeze.

I tried OpenSUSE, Arch, and Fedora. I tried both btrfs and ext4, to rule out filesystem issues. I also played around with the various types of sleep (deep, hibernate, etc.) – no luck.

Today I installed a Western Digital SN750 SSD, and the problem went away.

I think there must be some kind of Linux compatibility issue with the Crucial P5. Several other users in this thread seem to have run into the same problem I did. I would recommend avoiding the P5 if you plan to run Linux on the Framework laptop.

2 Likes

I’m interested to see long term if this is still resolved for you. I am on a SN850 SSD and have had nothing but issues with sleep.