System does not resume after suspend after upgrading to bullseye

Need help with peripherals or devices?
Post Reply
Message
Author
gi1242
Posts: 17
Joined: 2009-10-30 01:33

System does not resume after suspend after upgrading to bullseye

#1 Post by gi1242 »

Hi All,

I just upgraded from buster to bullseye, and find that the suspend is broken. (I have a X1 Yoga, and am running the 5.10.46-4 kernel from linux-image-5.10.0-8-amd64.)

Here's what happens:

1. Run systemctl suspend. System suspends fine (power button flashing), but then never resumes. Does not respond to power key, USB keyboards, etc.

2. Run systemctl hibernate. System suspends with power button flashing fast. Does not respond to power key, usb wakeups, etc. Press and hold the power button and the system goes fully off. Then startup the system and it resumes from disk. After this, systemctl suspend suspends and resumes normally with no issues.

I've had the system for about 4 years now, and suspend/resume was working fine the entire time. This upgrade to bullseye seems to have this weird bug... Does anyone know what the problem might be and how I go about fixing it?

Thanks in advance.

GI

User avatar
Hallvor
Posts: 1571
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 40 times
Been thanked: 81 times

Re: System does not resume after suspend after upgrading to bullseye

#2 Post by Hallvor »

gi1242 wrote: 2021-08-20 20:15 Does anyone know what the problem might be and how I go about fixing it?
There is no way to know accurately without logs. Check your logs from last boot:

Code: Select all

# journalctl -b-1
How to install firmware: viewtopic.php?f=16&t=151785
Installing and configuring Debian Bullseye: viewtopic.php?f=16&t=150334

gi1242
Posts: 17
Joined: 2009-10-30 01:33

Re: System does not resume after suspend after upgrading to bullseye

#3 Post by gi1242 »

Thanks for your quick response. I'm attaching two boot logs. From the previous boot where suspend failed, and from the current boot where the suspend worked.
Attachments
boot-logs.tgz
Two boot logs. One working suspend, one without working suspend.
(85.07 KiB) Downloaded 118 times

gi1242
Posts: 17
Joined: 2009-10-30 01:33

Re: System does not resume after suspend after upgrading to bullseye

#4 Post by gi1242 »

Paste bin of the boot logs:

https://pastebin.com/wv3Qu3UY (Resume working)
https://pastebin.com/3bVA7LzP (Resume not working)

User avatar
Hallvor
Posts: 1571
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 40 times
Been thanked: 81 times

Re: System does not resume after suspend after upgrading to bullseye

#5 Post by Hallvor »

I didn't notice any big, red flags, but I might have missed something.

Do you use non-free graphics drivers?

And how large is your swap partition?

Code: Select all

$ df -h
How to install firmware: viewtopic.php?f=16&t=151785
Installing and configuring Debian Bullseye: viewtopic.php?f=16&t=150334

gi1242
Posts: 17
Joined: 2009-10-30 01:33

Re: System does not resume after suspend after upgrading to bullseye

#6 Post by gi1242 »

Thanks again for responding. I have enough free space (80GB); my swap is twice the ram (8gb RAM, 16GB swap). Resume was 100% stable before the bullseye upgrade, so I doubt it's free space related.

I don't use non-free graphics drivers. I use the onboard graphics (i915, Skylake GT2 [HD Graphics 520]). I don't think it's the graphics that's crashing either; normally when that happens the keyboard LDEs respond (caps lock goes on/off). I'm not seeing that. System's completely dead to everything except a press and hold power to reboot...

Any other thoughts? Thanks in advance.

herreradimas
Posts: 10
Joined: 2021-08-15 20:48
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#7 Post by herreradimas »

Hello,
I solved using before kernel, when you reboot laptop in grub select to advanced and select to another kernel.

I hope next release kernel 5 fix it!.

cratuki
Posts: 1
Joined: 2021-08-28 18:21

Re: System does not resume after suspend after upgrading to bullseye

#8 Post by cratuki »

I am experiencing a similar issue.

System: Debian 11, fresh install, Thinkpad T14 gen 2 (intel) 20W0CTO1WW.

root@t14:~# uname -a
Linux t14 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux
root@t14:~#

Expected behaviour: When I close the lid, the system should suspend, and the LED breath. When I open the lid, it should resume.

Observed behaviour: When I close the lid, the system seems to suspend and the LED breathes. When I open the lid, it shuts down.

As above, I cannot find hints for why it would be shutting down in the journal from the previous boot.

In the T14 BIOS, I have tried both power management settings. There is a default Linux/Windows option, and a Linux S3 option. Same behaviour. It is currently set to Linux S3.

In forums, I saw a recommendation to add mem_sleep_default=deep into grub options. I have tried this, and it does not resolve the issue.

cat /sys/power/mem_sleep currently shows "s2idle [deep]"

Hibernation: I am not able to hibernate using the command gi1242 gives. Instead, I get this message: Failed to hibernate system via logind: Sleep verb "hibernate" not supported

Any recommendation about things to investigate?

lo0
Posts: 1
Joined: 2021-09-04 05:01

Re: System does not resume after suspend after upgrading to bullseye

#9 Post by lo0 »

I have the same laptop as OP and also have this problem. Been waiting for a new kernel to come out to hopefully address this problem. Anyone know where the official bug is (if it exists) so I can watch it?

Aki
Posts: 298
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 2 times
Been thanked: 33 times

Re: System does not resume after suspend after upgrading to bullseye

#10 Post by Aki »

lo0 wrote: 2021-09-04 05:05 I have the same laptop as OP and also have this problem. Been waiting for a new kernel to come out to hopefully address this problem. Anyone know where the official bug is (if it exists) so I can watch it?
Hello,

A bug report about a similar issue for a different hardware (nvidia GPU) has been recently updated with a possibile solution: see here [1][2].

[1] https://bugs.debian.org/cgi-bin/bugrepo ... =989705#30
[2] viewtopic.php?p=740991#p740991
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

james_saltwood
Posts: 1
Joined: 2021-09-10 22:38
Been thanked: 2 times

Re: System does not resume after suspend after upgrading to bullseye

#11 Post by james_saltwood »

i had the same problem and adding intel_iommu=off to kernel parameters solved it
then again... i deactivated virtualization in BIOS (i do not really need it) and removed intel_iommu=off from kernel parameters and it solved the problem too

chamalainen
Posts: 2
Joined: 2021-09-22 03:49
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#12 Post by chamalainen »

Same here, the upgrade from buster to bullseye broke suspend on my 4th gen Lenovo X1 Carbon.

I upgraded to 5.14.6 and now suspend works fine. I built from source using the config for 5.10.0-8 and defaults on all new settings.

Aki
Posts: 298
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 2 times
Been thanked: 33 times

Re: System does not resume after suspend after upgrading to bullseye

#13 Post by Aki »

Hello,
chamalainen wrote: 2021-09-22 06:53 Same here, the upgrade from buster to bullseye broke suspend on my 4th gen Lenovo X1 Carbon.

I upgraded to 5.14.6 and now suspend works fine. I built from source using the config for 5.10.0-8 and defaults on all new settings.
Hello,

Have you tested the solution in [1][2] ?

[1] https://bugs.debian.org/cgi-bin/bugrepo ... =989705#30
[2] viewtopic.php?p=740991#p740991
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

chamalainen
Posts: 2
Joined: 2021-09-22 03:49
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#14 Post by chamalainen »

Aki wrote: 2021-09-22 09:06 Hello,

Have you tested the solution in [1][2] ?

[1] https://bugs.debian.org/cgi-bin/bugrepo ... =989705#30
[2] viewtopic.php?p=740991#p740991
The fix is to set init_on_alloc=0, right? I tried this and suspend didn't work on 5.10.0-8-amd64

Code: Select all

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="init_on_alloc=0"

$ cat /boot/grub/grub.cfg  | grep init
	linux	/vmlinuz-5.14.6 root=/dev/mapper/x4--vg-root ro init_on_alloc=0 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-5.14.6
		linux	/vmlinuz-5.14.6 root=/dev/mapper/x4--vg-root ro init_on_alloc=0 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.14.6
		linux	/vmlinuz-5.14.6 root=/dev/mapper/x4--vg-root ro single init_on_alloc=0
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.14.6
		linux	/vmlinuz-5.10.0-8-amd64 root=/dev/mapper/x4--vg-root ro init_on_alloc=0 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.10.0-8-amd64
		linux	/vmlinuz-5.10.0-8-amd64 root=/dev/mapper/x4--vg-root ro single init_on_alloc=0
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-5.10.0-8-amd64

herreradimas
Posts: 10
Joined: 2021-08-15 20:48
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#15 Post by herreradimas »

Hello I fixed it!!

1. open terminal: sudo nano /etc/default/grub
2. go to: GRUB_CMDLINE_LINUX=" " and add to: GRUB_CMDLINE_LINUX="init_on_alloc=0"
3. save and exit
4. sudo update-grub
5. reboot pc

I tested with Linux debian 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 4729
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 44 times
Been thanked: 138 times

Re: System does not resume after suspend after upgrading to bullseye

#16 Post by sunrat »

8) Please edit your first post to add [SOLVED] to enable any others with the same issue to find the solution.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

pvincent
Posts: 6
Joined: 2017-03-28 05:10
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#17 Post by pvincent »

The firsrt time I booted on Bullseye, I noticed warnings about DMAR, but didn't take care of.
However, this is probably the cause which prevent my system (Lenovo x260) to resume successfully.

As @james_saltwood has already mentioned, adding intel_iommu=off to the kernel parameters fix the issue.
Thx all

Code: Select all

sudo vim /etc/default/grub
  GRUB_CMDLINE_LINUX="intel_iommu=off"
sudo update-grub
sudo reboot
I suggest others to experience the DMAR warnings at boot time before applying this fix. It seems to be relative to old BIOS which can't handle GPU Intel virtualization, stuff like that

scrat-squirrel
Posts: 1
Joined: 2021-12-29 02:47
Has thanked: 1 time

Re: System does not resume after suspend after upgrading to bullseye

#18 Post by scrat-squirrel »

Thanks @james_saltwood
@james_saltwood wrote:...adding intel_iommu=off to kernel parameters solved it...
I too experienced failure to resume from suspend after upgrading to bullseye. (was working just fine in buster)

system: Lenovo Thinkcentre M58
video card: RV620 PRO [Radeon HD 3470] driver=radeon
kernel: 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08)

i got to have wake from suspend (RAM) work again after i added intel_iommu=off to my GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub, which now looks like:

Code: Select all

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet hpet=disable init_on_alloc=0 intel_iommu=off"
GRUB_CMDLINE_LINUX=""
of course after modifying grub, must run, as others posted already:

Code: Select all

# update-grub
# reboot
Last edited by scrat-squirrel on 2021-12-29 03:11, edited 2 times in total.

Post Reply