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?
- Mention your Linux distro and relevant system details.
- Describe what you've tried so far.
- Share your solution even if you found it yourself.
- Do not delete your post. This allows other people to see possible solutions if they have a similar problem.
- Properly format any scripts, code, logs, or error messages.
- Be mindful to omit any sensitive information such as usernames, passwords, IP addresses, etc.
Community Rules
- Keep discussions respectful and amiable. This community is a space where individuals may freely inquire, exchange thoughts, express viewpoints, and extend help without encountering belittlement. We were all a noob at one point. Differing opinions and ideas is a normal part of discourse, but it must remain civil. Offenders will be warned and/or removed.
- Posts must be Linux oriented
- Spam or affiliate links will not be tolerated.
founded 2 years ago
MODERATORS
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.htmlFor 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.