Hey everyone,
I think I have worked out what is going on with a credential problem on my
system, but I would like a sanity check from someone who knows the packaging
before I change anything. Apologies if this is well known already.
System
- Manjaro Linux, kernel 7.2.0-1-MANJARO
- KDE Plasma 6.7.4, Wayland
- plasma-login-manager 6.7.4-1, installed 2 September, replacing sddm
- gnome-keyring 1:50.0-1, kwallet 6.29.0-1, kwallet-pam 6.7.4-1
The symptom
Since early September, command line tools that store credentials through the
Secret Service API keep losing them. In my case glab and gh. After a reboot
they report no stored token and I have to log in again.
What I think is happening
I switched from SDDM to plasma-login-manager on 2 September. Removing sddm took
/etc/pam.d/sddm with it, saved as sddm.pacsave. That old file started KWallet
and nothing else:
session optional pam_kwallet5.so auto_start
The replacement, /usr/lib/pam.d/plasmalogin, starts both keyring daemons, with
gnome-keyring first:
-session optional pam_gnome_keyring.so auto_start
-session optional pam_kwallet5.so auto_start
Since PAM runs session modules in order, gnome-keyring now claims
org.freedesktop.secrets before KWallet’s ksecretd can, and ksecretd ends up
registering only org.kde.secretservicecompat:
$ busctl --user list | grep -E "secrets|secretservice"
org.freedesktop.secrets 5793 gnome-keyring-d
org.kde.secretservicecompat 5804 ksecretd
Under SDDM, KWallet won every login because gnome-keyring was never started by
PAM at all. The result is that my credentials are now split across two stores.
Everything from before the switch is in kdewallet, and everything written
since is in gnome-keyring, including a duplicate copy of the same glab token in
both. That is why tools sometimes read a stale copy and sometimes find nothing.
What I am proposing to do
Since /etc/pam.d/ overrides /usr/lib/pam.d/, I was going to copy the vendor
file to /etc/pam.d/plasmalogin and move the two pam_kwallet5.so lines above
the pam_gnome_keyring.so lines, so KWallet gets the name back. I would rather
keep KWallet as the provider, since most of my existing secrets are already
there.
My questions
- Is that ordering in
/usr/lib/pam.d/plasmaloginintentional, or is it just
the upstream default that happens to differ from what the sddm package
shipped? I would like to know whether I am working around a deliberate choice. - Is an
/etc/pam.d/plasmaloginoverride the accepted way to do this on
Manjaro, and will it survive updates cleanly? gnome-keyring-daemon.socketis also enabled as a systemd user unit. Will
that start gnome-keyring and claim the name regardless of the PAM ordering, or
does fixing PAM alone settle it? This is the part I am least sure about.
Thanks very much for reading. Happy to post any further output that helps.
Post generated with AI; apologies if its tone is weird