0

So.. ubuntu suspend isn't working on my lenovo z13. Originally I was dualbooting windows and ubuntu and having suspend working perfectly fine in windows but not in ubuntu. I then tried purging the whole disk down to the efi system and bootloaders, and installed a fresh ubuntu on an absolute clean slate. The problem persists on the fresh 22.04.1.

Funny sidenote; systemctl suspend works fine when booting onto the ubuntu usb if "trying ubuntu".

The exact problem revolves around the suspend function it seems. When systemctl suspend is run the very first time after boot it works fine. But any time after that it proceeds to turn of the screen, whilst the pc is still running (still able to use Fn buttons(backlighting etc.)), drawing power and fans blazing. I am furthermore not able to have it "wake" from this state by whatever means. Only thing that resolves this state is forcing manual reboot.

TL;DR is suspend function works fine on ubuntu usb and any windows installations, but not on local ubuntu (atleast any consecutive suspends post first one).

2 Answers2

3

Ubuntu 22.04 recently had a new point release and went from 22.04.1 to 22.04.2. The new point release updates the kernel from 5.15 to 5.19. It looks like the Ubuntu kernel 5.19.0.32 has some bugs affecting some specific hardware.

Try the older kernel

  1. Get the grub menu by hitting the ESC key when you turn on the laptop.
  2. Go to the Advanced Option for Ubuntu menu and boot using the older kernel.

See if suspend works. Go to the next step.

Change the grub default

To change which kernel Ubuntu boots by default, you need to get the index number of all the menu entries. Open a terminal using Ctrl+Alt+T and enter:

$ sudo grub-mkconfig | grep -iE "menuentry 'Ubuntu, with Linux" | awk '{print i++ " : "$1, $2, $3, $4, $5, $6, $7}'

You will get a bunch out output that ends with something like:

0 : menuentry 'Ubuntu, with Linux 5.19.0-32-generic' --class ubuntu
1 : menuentry 'Ubuntu, with Linux 5.19.0-32-generic (recovery mode)'
2 : menuentry 'Ubuntu, with Linux 5.15.0-43-generic' --class ubuntu
3 : menuentry 'Ubuntu, with Linux 5.15.0-43-generic (recovery mode)'

Note: Yours may look different. The above output is just an example. Using this example, you may want to boot using the menu entry number 2.

Next you will need to edit the file /etc/default/grub. I use the text file editor nano but you may use something else. Enter the following command in the terminal to open the file in nano:

sudo nano /etc/default/grub

Look for the line:

GRUB_DEFAULT=0

Edit the line to look like:

GRUB_DEFAULT="1>2"

This setting means, if entry 1 is a submenu, open it and select entry 2 from there. In this example, menu entry 1 (note, entries start from 0) is the Advanced Option for Ubuntu. and entry 2 from the resulting submenu is:

menuentry 'Ubuntu, with Linux 5.15.0-43-generic' --class ubuntu 

Exit nano by pressing Ctrl+X and save the file when prompted.

Now to make this change take effect you have to use the command:

sudo update-grub

Reboot the laptop normally (without getting into grub menu). The computer should boot with the older kernel from now on.

More on How can I boot with an older kernel version?

Important: Eventually a newer kernel will be released and your computer will get the update. At that point you may be prompted to delete the older kernel. Check if the newer kernel works for you before "autoremoving" the kernel 5.15.

After the next kernel update, you will need to edit the grub default again. If the new kernel works, you will want to reverse the changes, so the computer boots with the latest kernel.

If the then newest kernel does not work, you will still need to go through this process again as the relative poison of the menu entries would change.

Note: you may want to file a bug report. See How do I report a bug? so that the kernel gets fixed.

Hope this helps

user68186
  • 37,461
0

Use custom OEM kernel

This issue describes the problem and proposes a solution that worked for me on a Thinkpad Z13 with an amd ryzen7 cpu:

sudo apt install linux-oem-22.04c

There seems to be a bug in the kernel that has been fixed in newer releases.

Edit: Note that this will lock you to this specific version of the kernel until a new kernel is specifically installed or this kernel is uninstalled by you.