Created attachment 285513 [details] Config file for my 5.2.17 kernel. My Dell Latitude has issues with suspending. I noticed this on a normal Debian kernel (4.19.0-5-amd64) but tried out a newer kernel (one I have built for all my machines) and the issue still persists. When I boot up, it only supsends to idle: $ cat /sys/power/mem_sleep [s2idle] deep If I switch it to deep and try suspending to mem, it just shuts down and doesn't come back. # echo deep > /sys/power/mem_sleep # echo mem > /sys/power/state Attached is the config I used for my 5.2.17 kernel.
what is the model name of your laptop? Probably S3 is not well supported for this mode.
It's a Dell Latitude 7390. I'll attach the dmidecode as well.
Created attachment 286595 [details] dmidecode output of my laptop
Hi, Mario, do you know if S3 is supported on this model?
If echo core > /sys/power/pm_test echo mem > /sys/power/state resumed back within 5 second, it is probably S3 is not supported on this platform.
Grumble, it gives me a "Resource temporarily unavailable" message, and dmesg gives me: "Unsupported test mode for suspend to idle, please choose none/freezer/devices/platform".
you should run "# echo deep > /sys/power/mem_sleep" first, before your test.
(In reply to Zhang Rui from comment #7) > you should run "# echo deep > /sys/power/mem_sleep" first, before your test. Thanks! I just did and the laptop did go to sleep for about 5 seconds and came back without issue.
But from Comment 5, I'm guessing that means it's not supported?
Well, I'd like very likely, but I still like to check with Mario about this.
@Zhang Rui: S3 should not be supported on this model.
Hi, Mario, thanks for confirming. Hi, Steven, so the problem is clear that S3 is not supported on this platform. And that is why s2idle is made as default by the Linux kernel. Bug closed as this is a BIOS bug, if S3 is not supported, BIOS should not expose _S3 control method at all.
So that being said - if you're having high power consumption under s2idle, we should debug it. Ideally please use a more recent kernel version. There are some pretty significant fixes that when into 5.4 that have drastic impacts on s2idle power consumption on Dell HW. If you're continuing to have power consumption problems on s2idle with 5.4, open another issue and lets work through them.
Well, I tried under 5.4, and the same issue applies. Actually, the one thing that makes it hard to determine power usage problems, is that the laptop wakes up if the power or volume buttons are touched (which all exist on the exterior of the laptop case! That makes placing it in a laptop bag in suspend most likely to wake it up. Note, this all works fine if I boot Windows on this laptop. Not sure what magic sauce Windows is doing. When in suspend, the outside buttons do not wake it up. Note I can't really test Windows anymore, because I accidentally forgot to enable secure boot before booting it up, and as this is a work laptop, the windows configuration cleared out my account on this box when it detected secure boot was off! :-) Thus, I can no longer log into windows. But that may be more of a feature than a bug ;-)
On a 5.4 kernel as you go down capture /sys/devices/system/cpu/cpuidle/{low_power_idle_system_residency_us, low_power_idle_cpu_residency_us} Compare those after you wake up and you should see both going up. If they're not going up there is still a separate power problem on your system that we should debug. If they're going up we need to figure out how to know to prevent those buttons from waking the system. I wouldn't expect volume to do it, but I would expect power to do so. "Normally" the power button wakes traditional clamshell laptops from s2idle. the same code is there in 2-in-1's, but nothing prevents it from waking. I'd guess what we need is to examine the tablet mode switch in intel-vbtn (https://github.com/torvalds/linux/blob/master/drivers/platform/x86/intel-vbtn.c#L116) and if it's set into laptop mode don't listen to power button presses, and if it's in tablet mode follow power button presses. You should probably raise this on the mailing lists (platform-x86 and linux-acpi).