24

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?

7
  • 3
    I actually wonder if an update might have caused this. I am experiencing the exact same issue, and I have just about exhausted every single resource I have just shy of doing a complete reinstall. I hope that someone might have figured this one out. I am able to get the daemon to start up OK, but I cannot get the keyring to unlock at log in time.
    – Terrance
    Mar 31, 2017 at 2:53
  • 3
    Strangely this is affecting me since today on 16.04.
    – Byte Commander
    Jun 3, 2017 at 22:14
  • I have the same problem on a gnome-shell (from Ubuntu Gnome 16.04) install. Started recently. So it seems not unity-related...
    – Rmano
    Jul 26, 2017 at 11:22
  • 1
    @ByteCommander 's method solved the problem for me. Thanks...
    – Rmano
    Jul 26, 2017 at 13:48

6 Answers 6

17

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.

5
  • It still asks for the password to unlock the keyring
    – Laurent
    May 12, 2017 at 23:57
  • 5
    This worked great! But I just needed to remove the --start option because it's not compatible with --replace
    – Anwar
    May 22, 2017 at 13:58
  • chrome was taking to long to load, in terminal i type gnome-keyring-daemon, then close and open chrome , now i am able to type my password, thankyou Sep 16, 2017 at 16:38
  • 1
    *pkcs11, not pcks11
    – Matt F.
    Sep 17, 2021 at 19:18
  • This fixed it permanently for me.
    – SebastianR
    Aug 14, 2022 at 12:45
12

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/)

3
  • 1
    this seem to work for several people, including me. See this bug report starting at #67 for more info. bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1689825 Jul 17, 2017 at 22:09
  • 1
    This should be the top answer as it permanently fixes the issue without any other side effects - except maybe that the application that wanted dbus-user-session installed might be slightly upset, but better just that one than the whole system.
    – Byte Commander
    Aug 4, 2017 at 12:36
  • It didn't solved it for me
    – Laurent
    Aug 14, 2017 at 3:38
5

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

3
  • 1
    It still asks for the password to unlock the keyring
    – Laurent
    May 12, 2017 at 23:57
  • Hmm... I have the same problem, with gnome-shell and gdm, so this is probably not directly related. Thanks anyway, will explore pam... somewhere the gnome-keyring-daemon will have to be started
    – Rmano
    Jul 26, 2017 at 11:21
  • I run gnome-sheel too, so looking at the config I found a similar line in /etc/pam.d/gdm-password. I commented it out but it didn't solve the issue.
    – Laurent
    Aug 14, 2017 at 3:40
3

I had exactly the same problem. Basically, whenever I started up, I could see the gnome-keyring-daemon as a process (ps -ef | grep keyring). If I manually issued the gnome-keyring-daemon using --start option, it would not start up the one fault instance already running. By a process of manual deduction, I found that if I killed that process and started a new keyring, then everything worked perfect. so here is what I did to make the solution "sticky"....

go to menu - system configuration - startup apps

delete the gnome-keyring-daemon entry that is already there (if you have one)

create a new gnome-keyring daemon with the following properties:

Name = Gnome Keyring Daemon
Command = /usr/bin/gnome-keyring-daemon --replace --daemonize --components=pkcs11,secrets,ssh
Comment = Gnome Keyring Manager Daemon

Save the startup item, but make sure it has a small delay - I added 10 seconds, and set the option "On"

Now Reboot, and it worked flawlessly for me. It seemed to be the --replace and --daemonize settings that made the difference on my VirtualBox Mint 18.3 cinnamon and a Lenovo G710 Laptop, having tried various combinations of other suggestions on here.

1
  • Great answer. Solved the problem for me that Chrome couldnt start without keyring daemon
    – Nathan G
    Feb 27, 2022 at 8:56
2

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!).

0

I ended up here because of the following errors in my logs.

Mar 11 11:14:32 debian systemd[1899]: Failed to start app-gnome-gnome\x2dkeyring\x2dssh-2092.scope - Application launched by gnome-session-binary.
Mar 11 11:14:32 debian systemd[1899]: Failed to start app-gnome-gnome\x2dkeyring\x2dsecrets-2098.scope - Application launched by gnome-session-binary.
Mar 11 11:14:32 debian systemd[1899]: Failed to start app-gnome-gnome\x2dkeyring\x2dpkcs11-2094.scope - Application launched by gnome-session-binary.

I could fix them by a slight modification of decocijo's answer.

In /etc/xdg/autostart/ I could find the following three files

-rw-r--r-- 1 root root 8608 Mar 11 11:49 gnome-keyring-pkcs11.desktop
-rw-r--r-- 1 root root 8136 Mar 11 11:49 gnome-keyring-secrets.desktop
-rw-r--r-- 1 root root 6671 Mar 11 11:50 gnome-keyring-ssh.desktop

on each of them comment and add one line, as for example in gnome-keyring-pkcs11.desktop

#Exec=/usr/bin/gnome-keyring-daemon --start --components=pkcs11
Exec=/usr/bin/gnome-keyring-daemon --replace --daemonize --components=pkcs11

do the same with the other two files.

I am mainly writing this answer so that other people with these errors can find the answer but ultimately, this should not happen. I have a clean installation of Gnome 43 on Debian Bookworm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .