In the previous post I’ve had a look the differences between Suspend to Idle and Suspend to RAM when the lid is closed. While Ubuntu 20.04 runs great on the 650 euro consumer grade notebook I bought a few weeks ago with the latest 11th generation Intel i5 processor, the Linux kernel would not support the much more power efficient Suspend to RAM and opted to go for Suspend to Idle instead. That suits me just fine for the purpose, but just for the fun of it, I was wondering if there is a way to get Suspend to RAM to work after all.
A 9-month Old Kernel is Too Old
Currently, Ubuntu 20.04 uses the 5.11 branch of the Linux kernel that stopped evolving back in February 2021. The notebook is newer, however, so it would not be a surprise if the kernel were not to support Suspend to RAM, which requires interaction with the BIOS, whicht might not have been on the market at that time. One can activate the feature in the kernel (see previous episode), but wake-up from Suspend to RAM would freeze the notebook.
Let’s Get the Kernel From… Yesterday
Ubuntu 20.04 will see another two Hardware Enablement Releases (HWE) with updated kernel lines in the next six months, so perhaps these will support the new hardware better than the current 5.11 line. While not officially supported by Ubuntu, it is possible to use much newer kernels by installing them manually. Canonical even provides a repository for it. So after taking an image of my root partition with Clonezilla, I took the plunge and installed the latest kernel on the system that was just one day. At the time of writing this was kernel version 5.15.3.
After booting with this kernel, the mem_sleep variable was still set to s2idle, i.e. to Suspend to Idle. So I again manually switched the variable to ‘deep‘ to see if things have improved since kernel 5.11. And indeed, deep sleep, i.e. suspend to RAM, now works, with a power consumption of well below one watt compared to the 4 watts during suspend to idle.
While things looked good at first, I noticed after a while, that even after the first return from Suspend to RAM, the average power requirement was suddenly at around 15 watts instead of the typical 9-10 watts. Also, the fan was running, albeit quietly, all the time. This is caused by one CPU core constantly running at the full 4 GHz clock rate. There is no speed step down of that CPU core at all and constant activity is shown by gkrellm. Htop on the other hand showed no thread that could have been responsible for this. A bit of a mystery.
Long story short: The 5.15 kernel brings quite some enhancements to Suspend to RAM for this notebook, but it’s still a long way from being perfect. So I’ll go back to Ubuntu’s standard 5.11 kernel and will try again in a couple of months.