Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. What are your lockscreen/suspend setup for window manager (i3wm for me) that has the least problems?.

What are your lockscreen/suspend setup for window manager (i3wm for me) that has the least problems?.

Scheduled Pinned Locked Moved Linux
6 Posts 3 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M This user is from outside of this forum
    M This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    I have an older laptop so no need to worry about the stupid Modern Standby introduced in late 2019. What I want is a reliable way to lock screen when suspend, doesnt matter how bloat or minimal.

    First, to make sure the laptop suspends when I close the lid:

    • on some Distro, this works OOTB.
    • If it doesnt, I check /etc/systemd/sleep.conf and set allow Suspend from there.

    After this, laptop does suspend. Now here comes the trickiest part, how to make sure your screen stays locked? There are so many rabbit holes so I want some help.

    Depending on your software selections, you can fall into 3 categories:

    1. create some systemd script like this: https://wiki.archlinux.org/title/Slock

    Problem: sometimes the screen doesnt get locked, i.e. your slock doesnt get triggered. Even worse, in some cases, the desktop is briefly shown on resume, before the locker shows up.

    1. use program like xss-lock, xautolock. Then links it with your locker and then autostart in your wm. Eg: i3wm with i3lock and xss-lock:

    exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock

    This works. But the laptop sometimes takes a while to suspend.

    1. manually invoke "Lock" with a keystroke. Then close the lid. Apparently this works but I have to remember to manually "lock" every single time.

    Thanks for any suggestions.

    M juipeltje@lemmy.worldJ poinck@lemm.eeP 3 Replies Last reply
    0
    • System shared this topic on
    • M [email protected]

      I have an older laptop so no need to worry about the stupid Modern Standby introduced in late 2019. What I want is a reliable way to lock screen when suspend, doesnt matter how bloat or minimal.

      First, to make sure the laptop suspends when I close the lid:

      • on some Distro, this works OOTB.
      • If it doesnt, I check /etc/systemd/sleep.conf and set allow Suspend from there.

      After this, laptop does suspend. Now here comes the trickiest part, how to make sure your screen stays locked? There are so many rabbit holes so I want some help.

      Depending on your software selections, you can fall into 3 categories:

      1. create some systemd script like this: https://wiki.archlinux.org/title/Slock

      Problem: sometimes the screen doesnt get locked, i.e. your slock doesnt get triggered. Even worse, in some cases, the desktop is briefly shown on resume, before the locker shows up.

      1. use program like xss-lock, xautolock. Then links it with your locker and then autostart in your wm. Eg: i3wm with i3lock and xss-lock:

      exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock

      This works. But the laptop sometimes takes a while to suspend.

      1. manually invoke "Lock" with a keystroke. Then close the lid. Apparently this works but I have to remember to manually "lock" every single time.

      Thanks for any suggestions.

      M This user is from outside of this forum
      M This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      The only robust and no BS lock combo so far, imo, is Regolith i3wm.

      For some reasons, this Frankenstein combo of i3 and GNOME work every single time. The downside is their configs are soooo messy. It is very hard to use whatever you have in vanilla i3 for Regolith.

      1 Reply Last reply
      0
      • M [email protected]

        I have an older laptop so no need to worry about the stupid Modern Standby introduced in late 2019. What I want is a reliable way to lock screen when suspend, doesnt matter how bloat or minimal.

        First, to make sure the laptop suspends when I close the lid:

        • on some Distro, this works OOTB.
        • If it doesnt, I check /etc/systemd/sleep.conf and set allow Suspend from there.

        After this, laptop does suspend. Now here comes the trickiest part, how to make sure your screen stays locked? There are so many rabbit holes so I want some help.

        Depending on your software selections, you can fall into 3 categories:

        1. create some systemd script like this: https://wiki.archlinux.org/title/Slock

        Problem: sometimes the screen doesnt get locked, i.e. your slock doesnt get triggered. Even worse, in some cases, the desktop is briefly shown on resume, before the locker shows up.

        1. use program like xss-lock, xautolock. Then links it with your locker and then autostart in your wm. Eg: i3wm with i3lock and xss-lock:

        exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock

        This works. But the laptop sometimes takes a while to suspend.

        1. manually invoke "Lock" with a keystroke. Then close the lid. Apparently this works but I have to remember to manually "lock" every single time.

        Thanks for any suggestions.

        juipeltje@lemmy.worldJ This user is from outside of this forum
        juipeltje@lemmy.worldJ This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        I recently finally configured my lockscreen again after switching to wayland. I'm using gtklock and so far it has been working really well. I'm using void linux with elogind installed, laptop suspends when closing the lid ootb. In order to trigger the lockscreen on suspend, i'm using a script placed in /etc/elogind/system-sleep, as described on the artix wiki

        M 1 Reply Last reply
        0
        • juipeltje@lemmy.worldJ [email protected]

          I recently finally configured my lockscreen again after switching to wayland. I'm using gtklock and so far it has been working really well. I'm using void linux with elogind installed, laptop suspends when closing the lid ootb. In order to trigger the lockscreen on suspend, i'm using a script placed in /etc/elogind/system-sleep, as described on the artix wiki

          M This user is from outside of this forum
          M This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          hmm thanks i'm gonna try that script you linked in artix wiki. Havent seen that one before so its worth a shot. What I usually see is some systemd Unit scripts. Gtlock looks neat as well, does swaylock give you problems too?

          juipeltje@lemmy.worldJ 1 Reply Last reply
          0
          • M [email protected]

            I have an older laptop so no need to worry about the stupid Modern Standby introduced in late 2019. What I want is a reliable way to lock screen when suspend, doesnt matter how bloat or minimal.

            First, to make sure the laptop suspends when I close the lid:

            • on some Distro, this works OOTB.
            • If it doesnt, I check /etc/systemd/sleep.conf and set allow Suspend from there.

            After this, laptop does suspend. Now here comes the trickiest part, how to make sure your screen stays locked? There are so many rabbit holes so I want some help.

            Depending on your software selections, you can fall into 3 categories:

            1. create some systemd script like this: https://wiki.archlinux.org/title/Slock

            Problem: sometimes the screen doesnt get locked, i.e. your slock doesnt get triggered. Even worse, in some cases, the desktop is briefly shown on resume, before the locker shows up.

            1. use program like xss-lock, xautolock. Then links it with your locker and then autostart in your wm. Eg: i3wm with i3lock and xss-lock:

            exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock

            This works. But the laptop sometimes takes a while to suspend.

            1. manually invoke "Lock" with a keystroke. Then close the lid. Apparently this works but I have to remember to manually "lock" every single time.

            Thanks for any suggestions.

            poinck@lemm.eeP This user is from outside of this forum
            poinck@lemm.eeP This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            I have used xss-lock with i3lock in the past with success. It makes sure that systemd-logind notifies over dbus when entering hibernation so that xss-lock starts the configured lockscreen.

            Before that I had a script which locks manually and then calls systemctl hibernate.

            Currently I am on Gnome, but I want to transition back to a more minimalistic DE like niri. Then I have to look on the options again to reliably lock my screen.

            1 Reply Last reply
            0
            • M [email protected]

              hmm thanks i'm gonna try that script you linked in artix wiki. Havent seen that one before so its worth a shot. What I usually see is some systemd Unit scripts. Gtlock looks neat as well, does swaylock give you problems too?

              juipeltje@lemmy.worldJ This user is from outside of this forum
              juipeltje@lemmy.worldJ This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              I haven't tried swaylock unfortunately, gtklock is the first wayland screenlocker i tried. Before that i think i was using i3lock-color on xorg, which also worked fine as far as i can remember, but the problem with xorg screenlocking is that it isn't actually very safe. Also, i'm not sure what distro you are using, but if it is a systemd distro there is probably a better way to trigger the screenlocker. I'm not sure if that script works in that case because it might be elogind specific. elogind is used on distros like artix and void because they don't use systemd. Elogind is basically just the logind part ripped out of systemd.

              1 Reply Last reply
              0
              • System shared this topic on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups