`element-desktop` no longer working with NixOS 25.05 on a minimal desktop (`i3` or `xterm`) due to unsupported keyring

When running element-desktop on a graphical NixOS 25.05 system with desktopManager.xterm.enable = true or services.displayManager.defaultSession = "none+i3", I get the following error message:

Your system has an unsupported keyring meaning the database cannot be opened.
Electron's keyring detection did not find a supported backend. You can attempt to manually configure the backend by starting Element with a command-line argument, a one-time operation. 
See https://www.electronjs.org/docs/latest/api/safe-storage#safestoragegetselectedstoragebackend-linux

The same config worked with NixOS 24.11 (e.g. rev 50ab793786d9de88ee30ec4e4c24fb4236fc2674).

How can i fix this?

Affected versions:

  • NixOS 25.05
  • Element Desktop: 1.11.110 (NixOS 25.05), 1.11.112 (NixOS unstable)

Note that Element Desktop 1.11.110 works on NixOS 24.11

Reproduce

vm.nix:

((builtins.getFlake "github:NixOS/nixpkgs/8cd5ce828d5d1d16feff37340171a98fc3bf6526").lib.nixosSystem {
  system = "x86_64-linux";
  modules = [
    ({ config, pkgs, ... }: {
      environment.systemPackages = [ pkgs.element-desktop ];
      users.users.a = {
        isNormalUser = true;
        password = "a";
      };
      services = {
        xserver = {
          enable = true;
          desktopManager.xterm.enable = true;
        };
        displayManager.autoLogin = {
          enable = true;
          user = "a";
        };
      };
      system.stateVersion = config.system.nixos.release;
    })
  ];
}).config.system.build.vm
vm=$(nix build --no-link --print-out-paths -f vm.nix)
export NIX_DISK_IMAGE=/tmp/vmimg; rm -f $NIX_DISK_IMAGE; $vm/bin/run-*-vm

After booting, run element-desktop in xterm.

1 Like

Use gnome-keyring or KWallet, or try adding --password-store="basic" to command line arguments as the link from the error message says

1 Like

This seems to be an exclusive issue for element-desktop because other Electron apps don’t suffer from this. I ran into this myself a few days ago, ended up needing to run the app once with --password-store=<value> (value is based on your keyring). After that, I did not need to specify this again.

This could just be a bug with Element, or with the version of Electron they are using, or with Nixpkgs itself. I have no clue :sweat_smile:

1 Like

On my system I have gnome-keyring configured, and despite that it still had this issue. I had to run it once with the password-store argument to make it work properly for all subsequent runs.

1 Like

Adding services.gnome.gnome-keyring.enable = true and then running element-desktop --password-store="gnome-libsecret" fixes the issue.

The issue was caused by the newer electron version used in the element-desktop derivation on NixOS 25.05.

For clarity, this is incorrect. This is actually just a known issue with Electron, as it uses XDG_CURRENT_DESKTOP to make assumptions about what org.freedesktop.secrets provider exists, rather than querying D-BUS directly.

I’m not sure why microsoft-edge didn’t seem to have this issue for me, since Electron and Chromium should be using similar APIs to do their detection…

More information on this can be found at these two issues: