Gnome keyring daemon not starting up properly

Since a few days ago my Gnome-keyring daemon hasn't been starting up properly.

After logging in:

ps aux | grep keyring
user       3496  0.0  0.0 214408 15800 ?        SLl  13:30   0:00 /usr/bin/gnome-keyring-daemon --daemonize --login

Apps complain about not being able to access the keyring (and fail to do so), some shortcuts are very slow CTRL+ALT+T for terminal or Print screen can both take up to a minute between key press and action)

Seahorse does not show the login keyring

$ /usr/bin/gnome-keyring-daemon
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
$ ps aux | grep keyr
user       3496  0.0  0.0 214408 15800 ?        SLl  13:30   0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
user       8524  0.1  0.0 211004 12468 pts/5    SLl  13:38   0:00 /usr/bin/gnome-keyring-daemon

Then, as soon as an app wants to access I get the keyring password prompt. Once unlocked, the keyring works properly.

I had a look to startup apps for my session and I only have one command that is relevant:

/usr/bin/gnome-keyring-daemon --start --components=ssh

I added /usr/bin/gnome-keyring-daemon to startup apps, but it will prompt for the keyring password after each login, which wasn't happening before.

Any idea on what happened and how to fix this please?


Solution 1:

I'm facing the same issue,

as an temporary solution try to run the following after login

gnome-keyring-daemon --replace --foreground --components=secrets,ssh,pcks11

When I'm doing this it prompts me to enter my secret to unlock my keyrings.

Solution 2:

I could work around this problem by uninstalling dbus-user-session (and its dependendants xdg-desktop-portal and xdg-desktop-portal-gtk). Those packages came in through installing flatpak.

Thanks to Olaf who brought me on the right track (https://forum.ubuntuusers.de/topic/gnome-keyring-daemon-doppelt/)

Solution 3:

I've been able to fix the slow shortcut and hanging chromium, by commenting out one line in /etc/pam.d/lightdm

# session optional        pam_gnome_keyring.so auto_start

The issue seems to affect more users btw: https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1689825

Solution 4:

This can also happen if you are using apparmor and somehow (updates, something else) apparmor stops getting run on boot. You will get messages about gnome-keyring-agent not being able to allocate secure memory. Starting apparmor, logging out and logging in again fixes it temporarily, re-enabling apparmor on boot with systemctl enable apparmor and rebooting fixes this permanently (if that was your problem!).