FS#62140 - [lightdm] gkr-pam: unable to locate daemon control file
Attached to Project:
Arch Linux
Opened by Kristian (Nexrem) - Monday, 25 March 2019, 22:47 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:15 GMT
Opened by Kristian (Nexrem) - Monday, 25 March 2019, 22:47 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:15 GMT
|
Details
Description:
Systemd journal reports lightdm[455]: gkr-pam: unable to locate daemon control file lightdm seems to work fine, allowing me to log in and continue operation. This issue did not exist in 1:1.28.0-1 Additional info: * package version(s): 1:1.28.0-3 Steps to reproduce: 1. Let lightdm launch 2. Check systemd journal |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:15 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lightdm/issues/2
Saturday, 25 November 2023, 20:15 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lightdm/issues/2
https://github.com/GNOME/gnome-keyring/blob/master/pam/gkr-pam-module.c
Issue on gitlab:
https://gitlab.gnome.org/GNOME/gnome-keyring/issues/28
`Sep 12 07:41:37 k3 lightdm[849]: gkr-pam: unable to locate daemon control file`
Unable to bring up a virtual terminal: Ctrl + Alt + F1, (F1-F6). Mouse frozen, etc.
Happens at random times.
Same behavior for XFCE and GNOME.
Will downgrade lightdm and try for a while to see if the system locks stop.
Kernel: 5.2.13-arch1-1-ARCH x86_64 bits: 64 compiler: gcc v: 9.1.0 Desktop: Xfce 4.14.1 Distro: Arch Linux
lightdm version: 1.30.0
Any recommendations on how best to troubleshoot this issue?
Thanks!
https://gitlab.gnome.org/GNOME/gnome-keyring/-/merge_requests/28
Time 19:27:25
Message gkr-pam: unable to locate daemon control file
Priority 3
I see the last person who commented was on the 2020-09-15 so don't know if this is still an issue but I presume that it is. My system is also locking up randomly with lightdm gkr-pam: unable to locate daemon control file` message
I'm using gnome-shell 1:3.38.1-1, gnome-keyring 1:3.36.0-1, lightdm 1:1.30.0-4, linux 5.8.14.arch1-1
Bugged when I boot with enabled service
Works if I start service after boot
'The monolithic daemon provided by GNOME Keyring will be split into dedicated sub-daemons, so that they can be consistently managed by systemd.'
Should help in general to fix this annoying error, if it can be implemented in time or there is enough developer effort.
https://fedoraproject.org/wiki/Releases/35/ChangeSet#Modular_GNOME_Keyring_services
---
I tried to temporarily fix this on my system but it's too problematic
The only way I have found to force the variable is to define it as a unit file override Environment=XDG_RUNTIME_DIR=/run/user/1000 but this is very dirty and not usable in multi user environment
I see pam_systemd is set on session in the lightdm's pam and system pam as well but $XDG_RUNTIME_DIR is not set at some point,
I think one possible explanation to this is:
$XDG_RUNTIME_DIR is not set if the current user is not the original user of the session.
https://www.freedesktop.org/software/systemd/man/pam_systemd.html
I'm assuming lightdm runs as root and the fact it opens a session of another user is enough to stops pam_systemd from publishing the variable.
It is just assumptions, because I did not went that far in debugging the internal work of pam_systemd, I have just used a shit tons of debug points in lightdm and I couldn't find any other root cause other than $XDG_RUNTIME_DIR that was indeed not set. lightdm seem to create that $XDG_RUNTIME_DIR at some point to workaround the problem I think, but unfortunately, we don't reach the code that lightdm has in place to create this $XDG_RUNTIME_DIR variable.
lightdm[556]: gkr-pam: unable to locate daemon control file
It is unlikely upstream will fix this in a timely manner and arch tends to not go out of it's way to 'fix' something that doesn't really need fixing.
One possible solution is to go about starting it the way Ubuntu does it. They ship systemd unit files started at graphical-session-pre.target.
Since arch for whatever reason doesn't have this target, a modification is in order where WantedBy points to graphical-session.target.
What's confusing is the fact arch doesn't package the gnome-keyring-daemon.{service,socket} files, however the gnome-keyring.install file contains references to it:
# Enable socket by default
systemctl --global enable gnome-keyring-daemon.socket
In case somebody wants to try this approach, the unit files needed:
cat /usr/lib/systemd/user/gnome-keyring-daemon.service
[Unit]
Description=GNOME Keyring daemon
Requires=gnome-keyring-daemon.socket
[Service]
Type=simple
StandardError=journal
ExecStart=/usr/bin/gnome-keyring-daemon --foreground --components="pkcs11,secrets" --control-directory=%t/keyring
Restart=on-failure
[Install]
Also=gnome-keyring-daemon.socket
WantedBy=graphical-session.target
cat /usr/lib/systemd/user/gnome-keyring-daemon.socket
[Unit]
Description=GNOME Keyring daemon
[Socket]
Priority=6
Backlog=5
ListenStream=%t/keyring/control
DirectoryMode=0700
[Install]
WantedBy=sockets.target
I have my system configured to autologin so I had to modify /etc/pam.d/gdm-autologin (I got a different error 'gdm-autologin: gkr-pam: couldn't unlock the login keyring.')
-session optional pam_gnome_keyring.so auto_start
+session optional pam_gnome_keyring.so
❯ pacman -Ql gnome-keyring | grep keyring-daemon
gnome-keyring /usr/bin/gnome-keyring-daemon
gnome-keyring /usr/lib/systemd/user/gnome-keyring-daemon.service
gnome-keyring /usr/lib/systemd/user/gnome-keyring-daemon.socket
gnome-keyring /usr/share/man/man1/gnome-keyring-daemon.1.gz
~ ▶ pacman -Fl gnome-keyring | grep service
gnome-keyring usr/share/dbus-1/services/
gnome-keyring usr/share/dbus-1/services/org.freedesktop.impl.portal.Secret.service
gnome-keyring usr/share/dbus-1/services/org.freedesktop.secrets.service
gnome-keyring usr/share/dbus-1/services/org.gnome.keyring.service
~ ▶ pacman -Fl gnome-keyring | grep keyring-daemon
gnome-keyring usr/bin/gnome-keyring-daemon
gnome-keyring usr/share/man/man1/gnome-keyring-daemon.1.gz
~ ▶ pacman -Qi gnome-keyring
Name : gnome-keyring
Version : 1:42.1-1
Description : Stores passwords and encryption keys
Architecture : x86_64
URL : https://wiki.gnome.org/Projects/GnomeKeyring
Licenses : GPL LGPL
Groups : gnome
Provides : org.freedesktop.secrets
Depends On : gcr libcap-ng pam openssh
Optional Deps : None
Required By : geary seahorse xdg-desktop-portal-gnome
Optional For : git libsecret
Conflicts With : None
Replaces : None
Installed Size : 3.59 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Thu 26 May 2022 07:53:16
Install Date : Wed 03 Aug 2022 22:08:50
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
~ ▶ pacman -Fl gnome-keyring | grep service
gnome-keyring usr/lib/systemd/user/gnome-keyring-daemon.service
gnome-keyring usr/share/dbus-1/services/
gnome-keyring usr/share/dbus-1/services/org.freedesktop.impl.portal.Secret.service
gnome-keyring usr/share/dbus-1/services/org.freedesktop.secrets.service
gnome-keyring usr/share/dbus-1/services/org.gnome.keyring.service
Checking the package history reveals it was added in version 42.0-1
https://github.com/archlinux/svntogit-packages/commit/654f922e97d5fcc1eb00c3ba1b390e2df77f3e9f