Ubuntu suspends itself a few seconds after waking up

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?


Solution 1:

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.