NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.46k stars 12.96k forks source link

disabling KDE Wallet (via KDE Settings) causes Chromium/Electron Apps to freeze/crash #319353

Open GsakuL opened 3 weeks ago

GsakuL commented 3 weeks ago

Describe the bug

after a recent system update, I've noticed vscode and discord freezing for several seconds on startup (and even crashing when clicking on the frozen window)

my config for reference: https://github.com/GsakuL/mynix

Steps To Reproduce

Steps to reproduce the behavior:

  1. enable KDE5 (wayland(?))
  2. install vscode/vscodium, discord, chromium,...
  3. go to KDE Settings (systemsettings5) -> "KDE Wallet" -> "Wallet Preferences" Tab -> untick/disable "Enable the KDE wallet subsystem"
  4. reboot/restart session
  5. try to open vscode, discord....

Expected behavior

apps not freezing

Screenshots

grafik

Additional context

discord.log code.log code.log is very verbose!

what told me that it was kde wallet are these lines:

[154886:0612/191803.045185:ERROR:object_proxy.cc(577)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[154886:0612/191803.045201:ERROR:kwallet_dbus.cc(112)] Error contacting kwalletd5 (isEnabled)
[154886:0612/191803.047964:ERROR:object_proxy.cc(577)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.klauncher was not provided by any .service files
[154886:0612/191803.047976:ERROR:kwallet_dbus.cc(81)] Error contacting klauncher to start kwalletd5
[154886:0612/191828.073207:ERROR:object_proxy.cc(577)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[154886:0612/191828.073228:ERROR:kwallet_dbus.cc(503)] Error contacting kwalletd5 (close)

"As a user", since I'm not using kwallet, I wouldn't even install it, but since it's in the list of requiredPackages, it will be installed. And since it would open popups on every app start, I disabled it.

I have found a workaround using --password-store=basic as a chromium argument in an overlay wrapper, but this seems more of a hack than a clean solution. Also I don't want to enable an empty wallet, just to ""fix"" this. (yes I know, setting the same password on the wallet auto-opens it), since after all "don't need => disable"

I'm unsure if this is a upstream issue. However the logs "indicate" that kwallet is "registered but not running" (to express it in my layman's terms), which could be a "service configuration issue".

not sure if relevant, but ~/.config/kwalletrc

[Wallet]
Close When Idle=true
Close on Screensaver=true
Enabled=false
First Use=false
Idle Timeout=1
Launch Manager=false
Leave Manager Open=false
Leave Open=false
Prompt on Open=false
Use One Wallet=true

[org.freedesktop.secrets]
apiEnabled=false

Notify maintainers

(no maintainers listed) @K900 because creating/touching https://github.com/NixOS/nixpkgs/blob/master/pkgs/kde/frameworks/kwallet/default.nix @SuperSandro2000 because touching https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/plasma5.nix

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.11 (Vicuña), 24.11.20240607.051f920`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/3dr5pyja36lvvrszhzffww1jwyrx6i09-source`

Add a :+1: reaction to issues you find important.

SuperSandro2000 commented 2 weeks ago

Is this still an issue with Plasma 6?

GsakuL commented 2 weeks ago

i removed my wrappers, and swapped from services.xserver.desktopManager.plasma5.enable = true; to services.desktopManager.plasma6.enable = true;. rebuild boot, and rebooted into the new Config "just to be sure".

Apparently vscode, discord and (ungoogled-)chromium do not freeze under Plasma 6. log still shows the errors, but it did not freeze like before (and if it did, it was "non-noticeable") discord.log code3.log

At the end, I don't care if that gets logged but is this considered "ok"/"intended behavior" (still showing error)?

SuperSandro2000 commented 2 weeks ago

I could think that Electron just assumes that kwallet is enabled and waits for it. Not sure if electron has some arguments to disable it. I think Chromium has some, to enable support.

The easiest fix would be to just keep it enabled.

Plasma 5 is kinda on our EOL list and doesn't get so much love anymore.