0

I am using i3wm on Ubuntu 20.04 without any DE so that shouldn't interfere with the functions. The default logind.conf makes the system suspend after I close the lid. I want it so that closing the lid does nothing for 2 minutes, after which it suspends the system. How do I do this?

Added output of systemd-inhibit --list as requested in comments

WHO                          UID USER PID  COMM            WHAT     WHY                                                       MODE 
ModemManager                 0   root 836  ModemManager    sleep    ModemManager needs to reset devices                       delay
NetworkManager               0   root 736  NetworkManager  sleep    NetworkManager needs to turn off networks                 delay
UPower                       0   root 1043 upowerd         sleep    Pause device polling                                      delay
Unattended Upgrades Shutdown 0   root 872  unattended-upgr shutdown Stop ongoing upgrades or perform upgrades before shutdown delay

4
  • what's your session manager (i.e. what starts i3wm)? Often, people use something like a gnome-session or cinnamon-session beneath to still get all the features of a modern desktop (automount, user management...) but with the window manager of their choice, and that session manager is typically what controls such functionality as inhibiting suspend Jul 28, 2021 at 7:43
  • @MarcusMüller I think it's gnome since the login screen at startup is gnome-like.
    – dnaik
    Jul 28, 2021 at 9:35
  • ah no, the login screen is not directly related; you can start a KDE session from GDM, and you can start Gnome from KDM, and all other sessions, too. Jul 28, 2021 at 9:36
  • Can you add the output of systemd-inhibit --list to your question? Jul 28, 2021 at 9:38

1 Answer 1

0

well you don't have a session manager taking care of these events. You could write your own program that does and register it using the logind inhibitors API.

I haven't done so myself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .