NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.77k stars 13.88k forks source link

plasma6: black screen with a cursor after login #315246

Closed CHN-beta closed 4 months ago

CHN-beta commented 4 months ago

Describe the bug

After logging in using a fresh user, plasma6 showed only a black screen with a cursor. (see screenshot 1)

plasmashell refused to start, as it could not connect to kactivitymanagerd.

kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.

Full log see plasmashell.txt.

However, kactivitymanagerd seem started normally.

May 28 12:42:16 pc systemd[2838]: Started KActivityManager Activity manager Service

Full log see kactivitymanagerd.txt.

In d-spy, org.kde.ActivityManager could be found in session dbus (see screenshot 2).

dbus services complained a lot of "duplicate name". See dbus.txt.

All logs (journalctl -b 0) see log.txt.

Steps To Reproduce

Use this flake. (nixosConfigurations.pc)

I have tried these modifications but nothing works (on branch next-debug):

  1. switch to default kernel (linuxPackages) without any custom patch.
  2. disable cuda and hostPlatform.gcc.arch = "znver4".
  3. disable all home-manager stuff and impermanence mount about directories under the user home, to keep the home directory as clean as possible.
  4. use X11 instead of Wayland.
  5. switch between Nvidia graphic card only and amd+nvidia hybrid offload.
  6. add nvidia-drm.fbdev=1 to the kernel parameter.

The same problem also exist on @Cryolitia 's GPD (This flake, nixosConfigurations.cryolitia-gpd-nixos).

Expected behavior

Plasma started with the default wallpaper and status bar.

Screenshots

Notify maintainers

I am not sure which people should I notify, as I could not which part of nixpkgs led to this problem.

Metadata


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

Cryolitia commented 4 months ago

Same on me

CoelacanthusHex commented 4 months ago

A strange thing is why plasmashell 6 tries to load qt5 plugins.

May 28 12:42:16 pc plasmashell[3466]: kf.coreaddons: The plugin "/nix/store/r57jxbq8xzwplvp221kpp691jk5ldgg7-system-path/lib/qt-5.15.12/plugins/plasma/containmentactions/plasma_containmentactions_applauncher.so" explicitly states an Id in the embedded metadata, which is different from the one derived from the filename The Id field from the KPlugin object in the metadata should be removed
CoelacanthusHex commented 4 months ago

There is some guess, from

May 28 12:42:16 pc plasmashell[3466]: kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
May 28 12:42:16 pc plasmashell[3466]: kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
May 28 12:42:16 pc kactivitymanagerd[3506]: kf.windowsystem: virtual void KX11Extras::connectNotify(const QMetaMethod&) may only be used on X11
May 28 12:42:16 pc kactivitymanagerd[3506]: kf.windowsystem: virtual void KX11Extras::connectNotify(const QMetaMethod&) may only be used on X11
May 28 12:42:16 pc plasmashell[3466]: kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
May 28 12:42:16 pc plasmashell[3466]: kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
May 28 12:42:16 pc systemd[2838]: Started KActivityManager Activity manager Service.

it may be a race condition. Try systemctl --user restart plasmashell.service to check this guess.

If not caused by this, write export QT_LOGGING_RULES="org.kde.kactivities.*.debug=true" in ~/.config/plasma-workspace/env/debug.sh to enable debug log for KActivityManagerd (sadly, there is no debug log in KActivities library), and then open a tty/ssh and execute dbus-monitor --session "interface='org.kde.ActivityManager'" &> dbus.log to monitor any request to KAMD. Then switch back to SDDM and log in to Plasma. Finally, post the dbus.log and journalctl output here.

CHN-beta commented 4 months ago

it may be a race condition. Try systemctl --user restart plasmashell.service to check this guess.

It does not work.

If not caused by this, write export QT_LOGGING_RULES="org.kde.kactivities.*.debug=true" in ~/.config/plasma-workspace/env/debug.sh to enable debug log for KActivityManagerd (sadly, there is no debug log in KActivities library), and then open a tty/ssh and execute dbus-monitor --session "interface='org.kde.ActivityManager'" &> dbus.log to monitor any request to KAMD. Then switch back to SDDM and log in to Plasma. Finally, post the dbus.log and journalctl output here.

There are only two item in dbus.log:

signal time=1716878876.363339 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.3"
signal time=1716878876.363359 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.3"

Here is journalctl -b -1 after reboot: journalctl.log

CHN-beta commented 4 months ago

I have found the problem. Some theme packages (such as utterly-nord-plasma) contain a file named nix-support/propagated-user-env-packages whose content is some qt5 library pathes. If I add these theme packages into environment.systemPackages, the qt5 libraries listed in the file will also be added to the environment, causing a conflict with qt6 and plasma6. Solution is to remove these packages from environment.systemPackages.

CoelacanthusHex commented 4 months ago

The problem is here:

https://github.com/NixOS/nixpkgs/blob/93b5069466184dcf89db912e5e5a0e159cd18156/pkgs/top-level/all-packages.nix#L29355

It should use kdePackages instead of libsForQt5.

Cryolitia commented 4 months ago

It's still a problem that should be fixed, do not close.

I remember that I uses pkgs.nordic, that's probably why I met the problem, too.

CC @romildo if you have any idea.