Ask Your Question

Preventing automatic system suspend (PC)

asked 2014-02-27 20:07:24 -0500

romanofski gravatar image

updated 2014-02-27 20:09:33 -0500

The Problem

My system is going into suspend after about 10 - 15min idle time. I'm running out of options on preventing systemd from going into suspend. It's not a notebook, but my workstation PC running Fedora 20.

The Setup

  • I'm running XMonad only, but logging in via Fedoras default display manager: GDM
  • When logging in, I'm starting xmonad with connecting to the session bus: xsession file on github

What I've tried so far:

  • I'm using the xfce4-power-manager to inhibit suspend: systemd-inhibit shows one inhibitor for going into suspend:

    $ systemd-inhibit
    Who: xfce4-power-manager (UID 1000/rjoost, PID 8916/xfce4-power-man)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
    Why: xfce4-power-manager handles these events
    Mode: block

    yet to no avail.

  • it seems logind correctly tracks my session as well, since I see my user listed when using loginctl
  • I can see quite a few additional sessions started when checking /var/log/messages and wonder if this is part of the problem:

     Feb 28 11:55:01 donbot systemd: Starting Session 109 of user root.
     Feb 28 11:55:01 donbot systemd: Started Session 109 of user root.
  • I've also commented out /etc/systemd/logind.conf to:


    but I think this is already the default, so it won't matter wether it's a comment or not.

  • I'm using xautolock with xlock. I wonder if the DPMS setting has somewhat something to do with the system going to sleep. Asking a colleague with more understanding of the guts of, this doesn't seem to be the case, but I thought I mention it. (Kudos to Peter Hutterer for helping me here) xsession file on github

My Question:

Any help to:

  • prevent the system going to sleep
  • diagnose why the inhibitors do not inhibit suspend
edit retag flag offensive close merge delete


A shot in the dark, looking at , I see:

Xautolock.killtime: 10
Xautolock.killer: systemctl suspend

From the xautolock man page, it looks like this adds a secondary automatic logout that gets triggered every 10min. after/while the locker is running.

Ahmad Samir gravatar imageAhmad Samir ( 2014-02-28 01:32:56 -0500 )edit

Oh boy... I almost had the feeling that it is a PEBKAC ...

romanofski gravatar imageromanofski ( 2014-03-02 17:01:41 -0500 )edit

I'd like to upvote your post if I could, since that was it. Cheers for helping me!!

romanofski gravatar imageromanofski ( 2014-03-02 18:34:41 -0500 )edit

PEBKAC is an old friend, I've lost count of the times something "stopped working" due to my too-many-tweaks...

(Personally I don't care much about the up/down vote logic, what matters is that the issue is fixed and the fix is findable).

Ahmad Samir gravatar imageAhmad Samir ( 2014-03-03 01:40:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-02 19:56:02 -0500

romanofski gravatar image

Answering this question based on the help from @Ahmad Samir. My Xresources configuration file configured the xautolock program, which after 10min the automatic suspend was triggered:

Xautolock.killtime: 10
Xautolock.killer: systemctl suspend

Removing that and the machine keeps running.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-27 20:07:24 -0500

Seen: 1,990 times

Last updated: Mar 02 '14