Score:0

Ubuntu suspend broken

vc flag

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).

Rasmus Hjorth Lüdeking avatar
vc flag
Thank you so much! Concretely, both 5.19.0.32 and 5.19.0.43 were available, and suspend worked 10 times in a row, which I deem statistically sufficient :D, booting into 0.43. Can I set this as a permanent change or would I have to manually do this on every boot?
Score:3
ar flag

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

Rasmus Hjorth Lüdeking avatar
vc flag
What an answer - very clear and as far in-depth as required. This solved the problem and most likely ensured another year or two in lifespan. I tip my hat in appreciation!
Rasmus Hjorth Lüdeking avatar
vc flag
Hmm, it seems this just opens up another problem. My fan isn't working on this kernel -.-
Rasmus Hjorth Lüdeking avatar
vc flag
Never mind, I was too fast on the trigger. After some testing it seems, my previous perception of what a healthy fan mechanism is, had been corrupted by it spinning on max permanently when on the prev. kernel - for whatever reason that is.
nilsmagnus avatar
ph flag
@RasmusHjorthLüdeking what kernel did you end up with here? I have the same problem and have been considering to sell the thinkpad all together because of this problem.
Rasmus Hjorth Lüdeking avatar
vc flag
Welp none of the available kernels work now, nor the default.
ar flag
@RasmusHjorthLüdeking I assume you can boot the laptop but suspend does not work when you say "none of the available kennels work now". Try Ubuntu 23.04 with kernel 6.2. This kernel will come to Ubuntu 22.04 HWE in a month or two.
Rasmus Hjorth Lüdeking avatar
vc flag
Appriciate the answer, I will try that in a months time and let you know!
Rasmus Hjorth Lüdeking avatar
vc flag
In a preliminary reboot i tried 6.4, and it seems to have worked. Once again, I thank you for your input @user68186 and wish you a great summer!
Score:0
ph flag

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.

David avatar
cn flag
There is already an accepted answer and it is correct. Your answer is dangerous and will affect future updating.
nilsmagnus avatar
ph flag
Could you describe in what way this solution is dangerous?
David avatar
cn flag
I is an oem untested and not intended kernel for Ubuntu it will cause issues when trying to update the OS.
nilsmagnus avatar
ph flag
Ok. I would assume a package in the main repository to be safe, but you are right about the upgrade-issue. Editing my answer to include this.
nilsmagnus avatar
ph flag
Also, the link to the issue is on the ubuntu-issuetracker, so I would assume it is provided by ubuntu. apt info gives Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
nilsmagnus avatar
ph flag
After having used this kernel for a while, I have noticed that this kernel is patched with security updates as the normal kernels do. So I assume that the danger of using this kernel is minimal.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.