So from what I can tell, there's hundreds upon hundreds of "can't suspend" questions on here already, but I've been digging through them and none of the proposed solutions work, so here I am.
I've got an HP Envy x360 that's been running Ubuntu 18.04 fine for a year now. Last week, it started having an issue where the device won't suspend correctly anymore. Specifically, when I suspend the device and then try to wake it up again, all it shows is a black screen (no cursor or anything), and nothing I do affects the display at all, short of killing the power and restarting the device. Suspending via any of the following methods has the same result
- Using the "Suspend" option in the main menu
- Closing the laptop lid
- Simply waiting half an hour for the device to suspend of its own accord
The device is actually not suspending correctly; it's not simply a video issue, as CTRL+ALT+F1, et al have no effect, and I cannot ssh into the device after the botched wake-up either. The power LED for the device remains on even when the device allegedly is suspended.
/sys/power/mem_sleep
contents:
[s2idle]
Relevant entries from /var/log/kern.log
:
Mar 27 15:51:33 silvenvius kernel: [ 1580.034024] wlo1: deauthenticating from 08:02:8e:d1:5f:90 by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 27 15:51:33 silvenvius kernel: [ 1580.178236] PM: suspend entry (s2idle)
(Yes, that's it. The next entries are from the reboot after I force kill it)
I should also note that in the course of fixing this problem, I formatted my disk and reinstalled Ubuntu from a USB, to no avail. So I'm currently running a fresh Ubuntu which exhibits this problem, on a device that didn't used to have the problem.
What I've tried that doesn't work:
- Switching from
gdm3
tolightdm
. - Installing
xscreensaver
orgnome-screensaver
. nouveau.modeset=0
in/etc/default/grub
(Although I am on Intel graphics, so I didn't figure this one would do anything).- Blacklisting
amdgpu
. - Upgrading to Ubuntu 19.10.
- Demanding the device use "deep" suspend with
echo deep >/sys/power/mem_sleep
(with appropriate sudo permissions, of course). - Uninstalling
light-locker
(It wasn't installed to begin with). - Updating the kernel (Mine was already up to date).
- Reformatting the disc and reinstalling Ubuntu 18.04.
However, if I boot from an Ubuntu 18.04.4 LiveUSB, suspend works. ??
I'm slightly running out of options here, and my nuclear option of "reinstall from scratch" has already failed, so any further advice on how to debug and ideally fix this would be greatly appreciated.
I am suffering the same problems, while I have not yet solved them yet, I have narrowed down the problem. I hope this explanation, and the technical keywords provided therein, will help more people identify what is going on.
TL;DR: On some 'modern' hardware, the BIOS no longer reports the classic "S3/suspend-to-ram" power state, in favour of a new Microsoft-only feature "modern suspend" (also known as "S0ix" or "s2idle").
Additionally: there are resume-problems within the AMDGPU graphics driver
For the first problem (missing S3-support), the only proper fix for this is that the laptop manufacturer releases an updated BIOS, that allows one to switch suspend modes between "modern Windows 10" and "classic S3". (The way Microsoft specified the modern suspend is mutually exclusive with classic deep sleep, BIOS can't advertise both at the same time)
The physical symptoms of this problem are that, upon entering suspend, your power-LED never starts blinking, it just stays on.
There are workarounds possible, by providing updated BIOS-tables during boot. However, this is a non-trivial process, that could permanently damage hardware if done wrong. (I am currently debating returning the laptop vs. trying this)
The second problem is that in some/many cases AMDGPU hangs on resume. If your Laptop enters suspend succesfully (blinking power-LED), but the screen doesn't come back on after waking the machine, you are having this problem. In this situation, you should still be able to SSH into the machine. If you can SSH into the machine, the
dmesg
log will be flooded with dozens of errors similar toYou can identify if missing S3-support is the problem with the following commands, which query the kernel which suspend-modes it identified during boot:
As you can see, on my Envy x360, "S3"/suspend-to-ram is missing. (So is S4/suspend-to-disk)
What we are hoping for is that the "
deep
" entry is also present. The[]
indicate which state is default.More information here, including workarounds that involve force-overriding your ACPI-tables at boot.