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

  • gtrcoi@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    22 days 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.