The box is a debian stable (stretch as of now). The problem I encountered is that systemctl can't query user service manager. For command,

systemctl --user

The error message is:

Failed to list units: Process org.freedesktop.systemd1 exited with status 1

For command

systemctl --user status

The error message is:

Failed to read server status: Input/output error

On the other hand, everything looks fine that there is no failed service, and user@1000.service is working as expected. Basically, all user units are running normally, yet I can't interact with them through the systemctl interface.

Many people had similar symptoms yet all with different issues. Tried to reboot the machine but it didn't help.

My question is: how should I debug the user systemctl session? The information above is too generic to pinpoint the actual problem.

Thanks in advance.


Please check the environment variable XDG_RUNTIME_DIR is defined and is equal to /run/user/$(id -u). If it is not, then define it as such and try again.

export XDG_RUNTIME_DIR=/run/user/$(id -u)
| improve this answer | |
  • 1
    Thanks, that it solved the problem. Also wonder where such variable is defined since I don't recall to touch the system configuration for systemd. – Gang Liang Dec 11 '17 at 21:36
  • I've also seen this strange behavior on latest Fedora; it's not Debian specific. I'm not aware of the exact nature of the problem or a fix (yet) but I'll update when I find out. – Michael Hampton Dec 11 '17 at 23:08
  • Thanks! I also searched quite a bit but didn't find the solution to this issue. Just rebooted the machine again, the problem went away. My guess for now is that the logind.service is not stable enough that it might fail due to timeout of other user units. – Gang Liang Dec 11 '17 at 23:41
  • This is it! I added it to my .xsession to make sure even my windows manager knows about it. – Han Apr 5 '19 at 18:15
  • Does not work for me on Debian stretch, the problem persists. – Philipp Ludwig Apr 24 '19 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.