30
submitted 1 month ago* (last edited 1 month ago) by Fuck_u_spez_@sh.itjust.works to c/linux4noobs@programming.dev

The Cinnamon power management settings on Mint have options to suspend OR lock my ThinkPad when the lid is closed but I can't seem to find a way to make it do both.

Update: fixed

you are viewing a single comment's thread
view the rest of the comments
[-] gtrcoi@programming.dev 1 points 1 month ago* (last edited 1 month ago)

I assume cinnamon uses the kind of methods talked about here: https://www.freedesktop.org/wiki/Software/systemd/inhibit/

I don't know anything about freedesktop and I refuse to learn, but give it a read and see if you can use it for anything.

The systemd-suspend.service also runs any scripts it finds in /usr/lib/systemd/system-sleep/, which might also be respected by whatever cinnamon is doing, or not. You can read more about it here https://man7.org/linux/man-pages/man8/systemd-suspend.service.8.html

For that you'd basically put a shell script in that directory that checks if the $1 variable that is passed to it is either "pre" or "post" for suspending or waking up respectively and running whatever command you want. Again, this is hacky and might not work in all environments.

this post was submitted on 09 Dec 2025
30 points (100.0% liked)

linux4noobs

3208 readers
2 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 2 years ago
MODERATORS