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
Something is actually preventing the system from being locked at all. If I click the lock icon in the menu above the log out button, nothing happens.
Update: I installed xfce, which is also broken in its own way, but it allowed me to reinstall Cinnamon which now allows me to lock the laptop, manually or automatically.
Do you have a screenlocker program installed and setup?
A quick search tells me thatcinnamon-screensaveris its name for Cinnamon.Perhaps you can also run
journalctl -fin a terminal and then click the lock button in the menu, to see if there is any error related to that at that moment.cinnamon-screensaver/zara,now 6.4.1+zara amd64 [installed]

I don’t see any errors at all.
Dec 08 23:17:01 Mint-Yoga CRON[10491]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Dec 08 23:17:01 Mint-Yoga CRON[10490]: pam_unix(cron:session): session closed for user root
Dec 08 23:17:18 Mint-Yoga dbus-daemon[780]: [system] Activating via systemd: service name=‘org.freedesktop.hostname1’ unit=‘dbus-org.freedesktop.hostname1.service’ requested by ‘:1.190’ (uid=1000 pid=10482 comm=“/usr/bin/gnome-screenshot --gapplication-service” label=“unconfined”)
Dec 08 23:17:18 Mint-Yoga systemd[1]: Starting systemd-hostnamed.service - Hostname Service…
Dec 08 23:17:18 Mint-Yoga dbus-daemon[780]: [system] Successfully activated service ‘org.freedesktop.hostname1’
Dec 08 23:17:18 Mint-Yoga systemd[1]: Started systemd-hostnamed.service - Hostname Service.
Dec 08 23:17:51 Mint-Yoga systemd-resolved[723]: Clock change detected. Flushing caches.
Dec 08 23:17:51 Mint-Yoga systemd-timesyncd[733]: Contacted time server 185.125.190.57:123 (ntp.ubuntu.com).
Dec 08 23:17:51 Mint-Yoga systemd[1]: apt-daily.service - Daily apt download activities was skipped because of an unmet condition check (ConditionACPower=true).
Dec 08 23:18:09 Mint-Yoga systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Yeah, nothing seems related to locking the screen.
Perhaps try some cinnamon related place and they might know how to get the related info (I haven’t used cinnamon).
Because when it suspending it will already be locked after waking
You would think so, wouldn’t you? But no, it lets me pick right back up where I left off without a password prompt. I thought maybe I had forgotten to set a password altogether, but I hadn’t.
Are you immediately opening the screen, or does it still do it after sitting in sleep for like 5 minutes?
5 minutes, 5 hours, doesn’t matter. And it does actually go to sleep when closed.
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.


