'create new keyring' prompt every boot and wiped Secret Service sessions
Summary
Autologin installs (the Omarchy default) rely on a passwordless default keyring created by default-keyring.sh. When that single keyring file becomes unreadable, observed here right after Proton VPN (OmaProton) stored its session, gnome-keyring rejects it on every session start (keyring was in an invalid or unrecognized format). Every Secret Service client (OmaProton, Chromium, gh) silently loses its stored session and appears signed out, and each boot shows a "Choose password for new keyring" prompt. Autologin PAM has no password to give pam_gnome_keyring, so nothing can recover the collection automatically; only interactively creating a new passwordless keyring fixes it. Same symptom cluster as #5105 (post-update/reboot keyring invalidation, cleared browser sessions and gh auth, keyring file churn in ~/.local/share/keyrings).
Environment
- omarchy / omarchy-settings
4.0.4-1; gnome-keyring1:50.0-1 - proton-vpn-cli
1.0.3-1, python-proton-vpn-api-core5.6.10-1, python-proton-keyring-linux0.2.3-1(OmaProton, Secret Service backend) - SDDM autologin (
omarchy-provision-ownerwrites/etc/sddm.conf.d/autologin.conf)
What happens
install/user/all.shrunsinstall/user/default-keyring.sh, which writes~/.local/share/keyrings/Default_keyring.keyring(INI[keyring]header, chmod 700/600/644) plus adefaultpointer file.install/login/sddm.shstrips the-auth/-passwordpam_gnome_keyring.solines from/etc/pam.d/sddmso a password-protected login keyring never overrides the passwordless one.- The pristine stub is loadable:
gnome-keyring-daemon --unlockagainst an isolated copy returns cleanly. Sodefault-keyring.shoutput alone is not the bug. - The failure is that the single legacy-format file is not resilient once clients write through Secret Service. After Proton stored its session, the file (4084 bytes) held the
Proton,gh:github.com("Password for '' on 'gh:github.com'") and Proton-accounts sessions as plaintextsecret=values with embedded newlines (Proton's JSON contains a PEM certificate) and orphaned[N:attributex]blocks. gnome-keyring then refused the whole file at load time, every session:
Sep 19 09:09:19 gnome-keyring-daemon[1247]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
Sep 19 16:15:12 gnome-keyring-daemon[1252]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
Sep 19 16:16:44 gnome-keyring-daemon[1228]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
Sep 19 18:32:41 gnome-keyring-daemon[1199]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
Sep 19 18:35:45 gnome-keyring-daemon[1212]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
Sep 19 22:02:46 gnome-keyring-daemon[1242]: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
- With the default collection dropped, the next client request (OmaProton autostarts at login) triggers the create-new-keyring prompt. Re-entering credentials each loop drops the remembered sessions and spawns replacement files (
Default_Keyring_1.keyring, ...), exactly the file census in #5105.
Why autologin cannot recover
(/etc/pam.d/).sddm-autologin has -session optional pam_gnome_keyring.so auto_start, but autologin authenticates through pam_permit with no password, so gkr-pam never has anything to unlock/repair with (gkr-pam: no password is available for user). There is no automated self-heal; the invalid file is simply rejected again on every boot.
Workaround (confirmed)
Complete the "Choose password for new keyring" prompt once with an empty password. gnome-keyring writes a fresh valid passwordless Default.keyring + pointer; prompts stop and Secret Service clients stay signed in across boots (OmaProton included). Tradeoff: secrets are then stored effectively unencrypted at rest (0600 files).
Evidence
install/user/all.shrunsdefault-keyring.sh;install/user/default-keyring.sh(stub + pointer, 700/600/644);install/login/sddm.sh(gkr auth/password removed);omarchy-provision-ownerautologin- 4084-byte keyring file containing plaintext Proton/gh sessions and newline-containing secrets (hexdumps available on request)
- journal excerpts above
Filed by big-pickle via opencode.
I'm getting this even after filling in an empty password
I reproduced this on a clean Omarchy 4.0.4 worker with gnome-keyring 1:50.0-1. I stored a secret containing newlines with secret-tool, the way Proton stores its JSON with a PEM certificate. gnome-keyring wrote it into Default_keyring.keyring with the newlines raw. On the next daemon start the journal logged keyring was in an invalid or unrecognized format, and a single-line gh:github.com secret stored beside it could no longer be looked up. A keyring holding only that single-line secret came through the same restart intact. The file stays on disk, so the old secrets can still be recovered. The daemon just refuses to load the collection.
The cause is upstream in gnome-keyring, not in what Omarchy writes. Omarchy's default keyring has no password, and gnome-keyring saves any keyring with no password, or an empty one, in its plain-text format (gkm-secret-collection.c, in the save path). In that format, gkm-secret-textual.c writes secrets with g_key_file_set_value, which escapes nothing, and reads them back with g_key_file_get_string, which expects escaped text. Once a continuation line can't be parsed, the whole file is rejected. This also explains @r8tten's report: a new keyring created with an empty password is saved in the same plain-text format, so it breaks again the next time a multi-line secret is stored in it.
Two open fixes exist. omacom/omarchy-pkgs#248 backports the upstream escaping fix (GNOME/gnome-keyring!111) and fixes the cause for new writes, but it doesn't repair a file that is already broken. #11697 here repairs a broken default keyring at login and says it closes this issue. It treats the symptom: it doesn't restore the old secrets, the writer stays unfixed, and its branch currently conflicts with quattro. Which to take, or both, is the maintainer's call, so I haven't opened a third.
This is the same bug that several comments on #5105 diagnose, and #11159 was already folded into #5105. I tried to close this one as a duplicate of #5105. The duplicate check is shown only the two issue bodies, and it disagreed, since #5105's body predates the diagnosis. So this issue stays open, and whether to merge the two is also left to the maintainer.
Codex Medium reviewed the diagnosis against the gnome-keyring 50.0 source and agreed with the mechanism and the empty-password explanation. It added that the result depends on what the continuation lines look like, and that the collection is unloaded, not erased. Its independence isn't guaranteed. This now waits on the maintainer.
This matches the wiped-keyring cluster in #5105. Related repair work already open: #11697 (repair broken passwordless default keyring) and #14913 (enroll encrypted keyrings without replacing existing secrets).
If you still have them, a listing of ~/.local/share/keyrings/ plus journalctl --user -t gnome-keyring -b -1 from the boot where it first went invalid would help confirm whether we are hitting corrupt login.keyring vs an overwrite. Autologin + passwordless keyring is a known sharp edge here.
A third approach is now open: #14913, which @jandrusk pointed to above. I read its diff against this bug. It would stop the bug for keyrings it manages to enroll. It replaces the passwordless default keyring with an encrypted one created through GNOME's password prompt, and gnome-keyring saves a keyring with a non-empty password in its binary format, which doesn't go through the unescaped text writer that breaks here. It doesn't repair a keyring that has already broken, though. Its migration sees the [keyring] header and treats the file as a plain-text keyring to encrypt, but the daemon never loaded that collection, so the first D-Bus call on it fails and the migration stays pending. Anyone who cancels the prompt, leaves the password empty, or has no graphical session keeps a plain-text keyring. It also changes the experience for autologin users, who would now choose a keyring password and may be asked to unlock it, so it is a product decision rather than a fix for this issue alone.
That leaves three pieces that each cover a different part: omacom/omarchy-pkgs#248 fixes the writer, #11697 repairs a file that is already broken, and #14913 moves away from plain-text keyrings altogether. None has landed on quattro, and choosing between them is still the maintainer's call.
The mechanism was already reproduced on a clean 4.0.4 worker in my earlier comment, so the keyring listing and journal aren't needed to confirm it. They would still show whether a particular machine hit this bug or something else.
Codex Medium reviewed #14913 against the gnome-keyring 50.0 source and reached the same conclusions. It traced the failing migration path to the Items lookup on the unloaded collection. Its independence isn't guaranteed. This still waits on the maintainer.
Additional reproduction and recovery results on Omarchy 4.0.6-1 with gnome-keyring 1:51.1-1, tested October 27, 2026. This confirms the multiline-secret writer bug is still reproducible beyond the 50.0 version discussed above.
Observed on an existing installation
After boot, a client triggered “Choose password for new keyring”. The journal showed:
gnome-keyring-daemon: keyring was in an invalid or unrecognized format: ~/.local/share/keyrings/Default_keyring.keyring
The installation uses SDDM autologin and Omarchy's passwordless default keyring. Chrome/Chromium flags include --password-store=gnome-libsecret. The existing text-format keyring contained a Proton VPN session value with raw multiline PEM data, causing the entire collection to be rejected. The same rejection appeared in an earlier boot's journal; this was not just a one-off prompt.
Recovery without replacing the collection
We backed up the file, escaped 17 raw continuation-line boundaries inside the affected secret= value as GLib keyfile \n sequences, and validated the repaired file with GLib.KeyFile. After restarting GNOME Keyring, the existing collection loaded and all six item paths were visible over Secret Service. No replacement collection or empty-password recreation was needed. The keyring remains passwordless. We verified collection availability and item count, not every application's subsequent sign-in behavior.
Isolated reproduction on stock 51.1
A disposable HOME, XDG data/config/cache/runtime directories, and a private dbus-run-session were used, with a fresh Omarchy-style plaintext default keyring. No real credentials were used.
- Start
gnome-keyring-daemon --foreground --components=secretswith a private control directory. - Store the dummy bytes
line one\nline two\\with-backslash(an actual newline and one literal backslash) withsecret-tool store. - Stop and restart that daemon against the same disposable keyring.
- Look up the dummy secret and compare its bytes.
Stock 1:51.1-1: lookup failed; the daemon logged invalid/unrecognized format; the file contained the raw newline.
Writer fix tested and installed locally
Against GNOME's 51.1 release source, the only C source change was in pkcs11/secret-store/gkm-secret-textual.c, in generate_item():
- g_key_file_set_value (file, identifier, "secret", (gchar*)secret);
+ g_key_file_set_string (file, identifier, "secret", (gchar*)secret);
This matches the escaping approach linked from omacom/omarchy-pkgs#248 / GNOME MR !111.
Results:
- Patched daemon: disposable newline/backslash secret survived restart with exact byte equality; no invalid-format log; raw newline was escaped on disk.
- Upstream Meson suite: 62 passed, 0 failed.
- Built a local package version
1:51.1-1.1, retaining stock package integration and all other payload files. Payload comparison confirmed that onlyusr/bin/gnome-keyring-daemonandusr/lib/gnome-keyring/devel/gkm-secret-store-standalone.sochanged. - The final installed package passed the same isolated regression test.
- After restarting the installed service, the existing real collection loaded with six item paths and was unlocked through Secret Service without a password prompt.
A normal omarchy update -y completed successfully during troubleshooting but left the repository GNOME Keyring at 1:51.1-1; the local patch was installed afterward. This separates repairing an already malformed file from fixing future writes. Both were needed here.
Please consider shipping the escaping fix for the current 51.1 package as well as preserving existing secrets when repairing broken keyrings. Creating a fresh empty-password collection alone does not address the faulty writer. The local package can be superseded by a future repository update, so it is not a substitute for a distributed fix.
Prepared with Codex assistance from command output and local tests. No keyring contents, tokens, account identifiers, certificates, or raw personal logs are attached.
Follow-up to my comment above, after a reboot with the locally patched gnome-keyring 1:51.1-1.1.
Result
- The repaired passwordless
Default_keyringloaded at boot, still the default alias, unlocked, all six items present. No "Choose password for new keyring" prompt. - Browser sign-ins persisted across the reboot (Chromium with
--password-store=gnome-libsecret; e.g. Gmail stayed signed in). This closes the gap I noted earlier, where I had only verified item count.
One pitfall worth knowing for anyone repairing this by hand
During troubleshooting, an extra empty, password-protected login.keyring (plus user.keystore) appeared in ~/.local/share/keyrings/, most likely created by running gnome-keyring-daemon --unlock manually. On the next boot it caused a different prompt: "The login keyring did not get unlocked when you logged into your computer."
With SDDM autologin, PAM has no password to pass on, so the journal shows:
gkr-pam: no password is available for user
gkr-pam: couldn't unlock the login keyring.
Those two lines are normal under autologin and appear even when everything works. They only matter if a login.keyring with a password actually exists.
The fix was to move the empty login.keyring and user.keystore out of ~/.local/share/keyrings/. I moved them aside rather than deleting them. After the next reboot: no prompt, no new login.keyring created, and the passwordless default keyring worked as before.
So a repair script or guide should probably avoid creating a password-protected login collection on autologin systems, or should check for a stray one.
Prepared with Claude Code assistance from command output on my machine. No keyring contents or credentials are included.
Updating this after @M4864020543's reports from gnome-keyring 1:51.1-1, which is the version Arch now ships.
The 51.1 update doesn't fix this. I read pkcs11/secret-store/gkm-secret-textual.c at the 51.1 tag, and it still writes textual secrets with g_key_file_set_value, so a passwordless keyring still breaks on the first multi-line secret. That matches the reproduction above.
That affects omacom/omarchy-pkgs#248, the writer fix. As it stands it builds 1:50.0-1.1, which is older than [extra]'s 1:51.1-1. On 4.x [omarchy] comes before [extra] in the shipped pacman configs, so pacman takes gnome-keyring from [omarchy]. A machine that already has 51.1 would keep the unpatched daemon with a "local is newer" warning, and a fresh install would stay on 50.0. It needs rebuilding on 51.1, with a release above 1:51.1-1, before it reaches current installs. The same patch applies to 51.1 unchanged, according to the report above.
The report also shows that a broken file can be repaired without losing what's in it, by escaping the raw continuation lines in place. #11697 doesn't do that. It moves the file aside and starts an empty keyring, so stored sessions are still gone from the Secret Service, and without the writer fix the next multi-line secret starts the cycle again. It also conflicts with quattro right now. #16626 has since opened, repairing the file in place and replacing #11697. It will be reviewed and run on a worker as its own item. I haven't verified it yet, so I'm not linking it to this issue.
So there are now three parts, and each covers something different. The rebuilt package fixes new writes, an in-place repair (#16626, or #11697 if losing the secrets is acceptable) recovers keyrings that are already broken, and #14913 moves to encrypted keyrings. Codex pointed out that #11697 and #14913 can't ship together unchanged: under autologin #11697 would move aside the encrypted default that #14913 creates. None of these has landed, and which to take is the maintainer's call.
I didn't do a new worker run this time. The mechanism was reproduced on a clean worker earlier, and the 51.1 finding comes from the source and the report above. Codex Medium reviewed these conclusions and agreed. It added #16626 and the conflict between #11697 and #14913, and it qualified the package point: older installs could still upgrade to the 50.0 build. Its independence isn't guaranteed. This waits on the maintainer.
On Omarchy 4.5.0-3, [omarchy] is listed before [extra] and does not ship gnome-keyring. pacman -Sp gnome-keyring resolves to extra/gnome-keyring 1:51.1-1. A clean 4.5 install gets that unpatched daemon. omarchy-pkgs#248 still builds 1:50.0-1.1, which would not replace it.
Correction to my previous reply: @tempest-chaoscreator is right about package availability. I checked the published x86_64 databases today: [omarchy] contains no gnome-keyring in stable, rc or edge. Both Omarchy's stable/rc [extra] snapshots and Arch's current [extra] list 1:51.1-1. The proposed 1:50.0-1.1 package in omacom/omarchy-pkgs#248 is not a shipped override in those databases. My earlier fresh-install scenario was conditional on publishing that package unchanged; it did not describe what users currently receive. That proposed version would also be too old to upgrade an existing 1:51.1-1 installation through a normal update.
The writer fix in omacom/omarchy-pkgs#248 and the in-place repair in #16626 remain open. #16626 already carries a closing reference that would automatically close this issue on merge; that alone would not establish that future writes are fixed. #14913 closed without merging; #17502 now proposes replacing GNOME Keyring and declares dependencies on #16626 and omacom/omarchy-pkgs#2696. I have not verified those proposals in this pass. The issue still waits on the maintainer to decide what ships for future writes and for keyrings already damaged.
GPT-6 in Codex (effort not exposed) checked the databases, current repository configuration and GNOME's 51.1 source. Opus 5.5 High and muse-wonder via pi, thinking high reviewed this correction and agreed; their independence is not guaranteed. Opus also highlighted the closing-reference caveat above. No new worker reproduction ran; the earlier worker reproduction remains the evidence for the multiline-secret failure.
I'm getting this even after filling in an empty password
just cancel, fix the file and restart proton