Suspend/resume with Linux on Lenovo Yoga 6 Gen8
Running Linux on a Lenovo Yoga 6 Gen 8 (2023 version, specifically 13ABR8, but probably applies to others as well) works reasonably well with most hardware being supported out-of-the-box with all Linux distributions from around 2022 or later that I have tried. The touchpad works with multiple fingers and tap-to-click (although KDE can be a bit finicky with that one under Kubuntu), the touchscreen just works, audio, etc. do not need any additional actions.
Notable exceptions are the fingerprint sensor (which I have not managed to get working so far) and - as is often the case with new hardware - problems with suspend/resume. More specifically, the standard S3 sleep-to-RAM doesn’t work on standard configuration but either fails to put the hardware to proper sleep (i.e., the fan keeps running when the lid is being closed) or crashes on wakeup (typically the screen comes back but no process can start because there is a GPU-related kernel crash message in the log, causing the filesystem to fail, and no further files can be read or written at that point).
Solving S3 sleep-to-RAM
After many different tries with multiple kernel versions and different settings, both with Ubuntu/Kubuntu and Fedora Kinoite (because atomic updates are really nice) in different versions, the usual symptoms are:
- S3 sleep works with the live distribution versions booted from a USB stick. This is quite annying from a debugging point of view because trying with a different distribution and/or flash disk partitioning scheme requires a full re-install.
- S3 sleep fails with a distribution booted from the internal flash disk. It doesn’t seem to matter if the root partition is encrypted or not or if there is a swap partition/file or not.
- S3 sleep works on the pre-installed Windows 11 with the same BIOS settings.
It took too much time tinkering to find a set of parameters that makes it work, which is why I am sharing it through this post.
The one combination that now finally works correctly for S3 sleep is (others may work as well, but this is a starting point):
- Fedora Kinoite 38-20231008.0 with kernel 6.5.5-200.fc38.x86_64 (and hopefully any newer versions)
- Btrfs root filesystem (unencrypted as well with with LUKS encryption, both tested successfully), ext4 boot filesystem, and a separate
/boot/efipartition for Kinoite (different to the Windows EFI partition, because the installer seems to be a bit silly in these regards)
- BIOS settings (F2 to enter, F12 for boot device menu):
- Configuration -> AMD V(TM) Technology -> Disabled (I am not sure if this one is important)
- Configuration -> Flip To Start -> Enabled
- Configuration -> One Key Battery -> Disabled (I think this one does not matter)
- Security -> AMD Platform Security Processor -> Disabled
I believe the last one is the important setting that will actually make it work with other kernels and distributions as well, because it is one of the last changes I tried before it started working.