You are not logged in.

#1 2016-09-29 09:55:23

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

[SOLVED] XDG_RUNTIME_DIR not being set

Posting in Newbie Corner because I'm not sure whether one of the other forums is more appropriate.

I ran into this trying to figure out why systemctl --user was complaining about dbus:

Failed to connect to bus: No such file or directory

Then I found out that DBUS_SESSION_BUS_ADDRESS wasn't set, despite the file existing in ~/.dbus/session-bus. It appears that this variable should be set by systemd, but it depends on XDG_RUNTIME_DIR, which is not being set. It seems this should be handled by pam, but apparently it isn't.

My system is up to date. Pacman reports no altered files in dbus, pam or systemd.

Until a couple days ago, a reboot would often fix this. I've been putting off fixing this for good for a long time, because systemd and dbus are incredibly annoying to deal with when something is wrong. Now, it seems quite persistent and no amount of rebooting seems to do anything. Once in a blue moon, the planets will align and it will work, but I have no idea why.

One thing I've noticed is that logging in, even on a TTY, takes ~10 seconds. This is rather recent. Aside from a kernel upgrade yesterday, I can't see anything suspicious in pacman.log over the last ~10 days.

I'd really appreciate any help, because this is driving me insane.

Last edited by mkaito (2016-09-29 10:30:52)


Fear me! I have root! Sometimes...

Offline

#2 2016-09-29 10:29:42

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,969

Re: [SOLVED] XDG_RUNTIME_DIR not being set

XDG_RUNTIME_DIR is set by pam_systemd using logind .

Are there unprocessed *.pacnew / *.pacsave files in /etc/.systemd ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-09-29 10:31:25

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: [SOLVED] XDG_RUNTIME_DIR not being set

I've found the culprit: a user service for emacs was timing out.

Funny how after a couple days of headaches, I find the problem right after posting here.


Fear me! I have root! Sometimes...

Offline

#4 2016-10-05 22:37:56

tacotron
Member
Registered: 2016-10-05
Posts: 1

Re: [SOLVED] XDG_RUNTIME_DIR not being set

I had the exact same problem -- logging in from console takes ~30s, no XDG_RUNTIME_DIR, no DBUS_SESSION_BUS_ADDRESS -- so I was able to narrow it down to a problem with pam_systemd. Thanks to you I tried disabling some user services and found my culprit!

It was profile-sync-daemon, which I had just installed a few days ago.

Offline

#5 2016-10-09 16:11:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] XDG_RUNTIME_DIR not being set

@tacotron - Not sure how psd would cause a delay due to no XDG_RUNTIME_DIR or DBUS_SESSION_BUS_ADDRESS.  Is this something recent?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB