My laptop just shuts down instead of going to sleep when I close the lid

When I close the lid of my laptop, it shuts down instead of going to sleep. What can I do to prevent this? I checked and all my power settings are set to suspend when you close the lid, with no effect.

What version of Ubuntu MATE are you using?

What model laptop are you using?

I use a ASUS X541SC laptop with UM 18.04.3.

You can try this and see if this helps:

In your case change HandleLidSwitch=suspend

I would also make sure your BIOS is up to date. And that there is not a BIOS setting preventing this.

If those do not work you should consider opening a bug

I already tried both of these on a thread from reddit and the only bios setting related to the lid is "Wake on lid open" and its on.

Have you tried the simple, go to control center, look under power settings, and make sure to change how to computer acts when you close the lid. Mine is set to suspend and it does it. you can set it to do nothing, or shut down.

Yes, but it still won't suspend.