Ubuntu suspends itself a few seconds after waking up
Matthew Martinez
Running 21.04 on a Razer Blade Base early-2020
When I wake up my laptop from sleep, it will automatically suspend itself about 20-30 seconds later with no warning. This is while it's plugged in.
How can I prevent this or figure out why?
22 Answers
I resolved this on 20.04 with the following kernel parameter: button.lid_init_state=open
But this does not work for 21.04 as far as I've tried.
1To expand on @vityobugs answer, this issue has been addressed here:
The OS does not detect that the lid has been opened if the laptop is suspended. This can be fixed through the following modification:
- Edit the default grub config:
sudo nano /etc/default/grubAdd
button.lid_init_state=opento the end of theGRUB_CMDLINE_LINUX_DEFAULToption, like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash button.lid_init_state=open"
Run the following command to update grub when you are done:
sudo update-grub sudo reboot