If I disable auto-login for myself and manually type password to get to the desktop then kwallet auto-opens fine, but if I enable auto-login then kwallet fails to open.
In journtalctl there are lots of entries related to PAM or kwallet, maybe these ones are relevant:
Nov 21 13:31:18 newtw sddm[1253]: Authentication for user “stan” successful
Nov 21 13:31:18 newtw systemd[1]: Created slice User Slice of UID 1000.
Nov 21 13:31:18 newtw systemd[1]: Starting User Runtime Directory /run/user/1000…
Nov 21 13:31:18 newtw systemd-logind[1066]: New session 1 of user stan.
Nov 21 13:31:18 newtw systemd[1]: Finished User Runtime Directory /run/user/1000.
Nov 21 13:31:18 newtw systemd[1]: Starting User Manager for UID 1000…
Nov 21 13:31:18 newtw (systemd)[1283]: pam_unix(systemd-user:session): session opened for user stan(uid=1000) by stan(uid=0)
Nov 21 13:31:18 newtw (systemd)[1283]: pam_kwallet5(systemd-user:session): pam_kwallet5: pam_sm_open_session
Nov 21 13:31:18 newtw (systemd)[1283]: pam_kwallet5(systemd-user:session): pam_kwallet5: not a graphical session, skipping. Use force_run parameter to ignore this.
Then, just a few lines below:
Nov 21 13:31:18 newtw sddm-helper[1280]: pam_unix(sddm-autologin:session): session opened for user stan(uid=1000) by stan(uid=0)
Nov 21 13:31:18 newtw systemd[1283]: Started Daily Cleanup of User’s Temporary Directories.
Nov 21 13:31:18 newtw sddm-helper[1280]: pam_kwallet5(sddm-autologin:session): pam_kwallet5: pam_sm_open_session
Nov 21 13:31:18 newtw systemd[1283]: Reached target Paths.
Nov 21 13:31:18 newtw sddm-helper[1280]: pam_kwallet5(sddm-autologin:session): pam_kwallet5: open_session called without kwallet5_key
There are more lines later, but the last one is this, again:
Nov 21 13:31:45 newtw sudo[2032]: pam_kwallet5(sudo:session): pam_kwallet5: not a graphical session, skipping. Use force_run parameter to ignore this.
I use the same password for kwallet as for login and it’s called kdewallet, and it looks like the same setup as for the older TW I run on the same machine where kwallet opens without any problems. All the PAM configuration files are the same as in the older TW, too.
I tried adding “force_run” parameter to PAM config files as seen on the internet but it didn’t work. On the internet these problems went away after patches and updates, but that was years ago so it should be working fine by now.
I’ve also traced the origin of “pam_kwallet5: not a graphical session, skipping. Use force_run parameter to ignore this.” message to this script:
https://github.com/KDE/kwallet-pam/blob/master/pam_kwallet.c
But it might not be what causes the actual problem.
I’m using KDE with SDDM.
Any ideas?