Thanks to visit codestin.com
Credit goes to 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

    • ulterno
      Codestin Search App
      Codestin Search App
      English
      Codestin Search App
      1
      Codestin Search App
      1
      ·
      26 days ago

      Do you have a screenlocker program installed and setup?
      A quick search tells me that cinnamon-screensaver is its name for Cinnamon.

      Perhaps you can also run journalctl -f in a terminal and then click the lock button in the menu, to see if there is any error related to that at that moment.

      • Fuck u/spez@sh.itjust.worksOP
        Codestin Search App
        Codestin Search App
        English
        Codestin Search App
        3
        ·
        25 days ago

        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.

        • ulterno
          Codestin Search App
          Codestin Search App
          English
          Codestin Search App
          0
          Codestin Search App
          1
          ·
          25 days ago

          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).

  • gtrcoi
    Codestin Search App
    Codestin Search App
    Codestin Search App
    1
    ·
    Codestin Search App
    23 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.