logind fails to work, falling back to ConsoleKit when /run/users has wrong permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Touch session manager |
Incomplete
|
Undecided
|
Unassigned | ||
ubuntu-touch-session (Ubuntu) |
Fix Released
|
High
|
Oliver Grawert |
Bug Description
When testing Mir I've found a case where logind fails and this causes the user to lose access the hardware accelerated rendering. The cause is (for some unknown reason) /run/user exists and logind aborts when trying to open a session.
From /var/log/auth.log:
Jul 31 13:25:07 alchemy lightdm: pam_unix(
Jul 31 13:25:07 alchemy systemd-
Jul 31 13:25:07 alchemy lightdm: pam_systemd(
When this first occurred it would persist between reboots and went away eventually (don't know if I did anything to cause that).
The second time it occurred I did:
$ sudo stop lightdm
$ sudo umount /run/user
$ sudo rmdir /run/user
$ sudo start lightdm
and this fixes the problem.
The relevant code in systemd is src/login/ logind- user.c:
static int user_mkdir_ runtime_ path(User *u) {
char *p;
int r;
assert(u);
r = mkdir_safe_ label(" /run/user" , 0755, 0, 0);
log_error( "Failed to create /run/user: %s", strerror(-r));
return r;
if (r < 0) {
}
It would seem that the directory already exists should not be considered an error?