nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.71k stars 1.76k forks source link

Can't start plasma with recent home-manager #334

Closed pasqui23 closed 4 years ago

pasqui23 commented 6 years ago

I'm forced to use a generation from 2018-7-29,otherwise when I start plasma it stops immediately with an .xsession-error that complains about not finding xcb. Note that the error remains even after upgrading to the lastest home-manager,wich I still haven't pushed

pasqui23 commented 6 years ago

Here is the .xsession-errors:

Fallimento: Inizializzazione del modulo non riuscita
/nix/store/wk6fk7j6f6phlnin1jrribzvsqybf778-xsession: Window manager 'plasma5' not found.
Fallimento: Inizializzazione del modulo non riuscita
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/nix/store/zsfnkicvqkb3593nidxgz4hshgczbswx-plasma-workspace-5.13.0-bin/bin/startkde: line 206:  3414 Aborted                 kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

startkde: Starting up...
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

kdeinit5: Communication error with launcher. Exiting!
kdeinit5_wrapper: Warning: connect(/run/user/1001/kdeinit5__0) failed: : Connection refused
Cannot find 'org.kde.KSplash.setStage' in object /KSplash at org.kde.KSplash
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/nix/store/zsfnkicvqkb3593nidxgz4hshgczbswx-plasma-workspace-5.13.0-bin/bin/startkde: line 364:  3431 Aborted                 /nix/store/ipb140jri8yjyw8r7x4r8bwjkdmkwhai-kinit-5.47.0-bin/bin/kwrapper5 /nix/store/zsfnkicvqkb3593nidxgz4hshgczbswx-plasma-workspace-5.13.0-bin/bin/ksmserver $KDEWM $KSMSERVEROPTIONS
startkde: Shutting down...
kdeinit5_wrapper: Warning: connect(/run/user/1001/kdeinit5__0) failed: : Connection refused
Error: Can not contact kdeinit5!
startkde: Done.

After putting my credentials in ssdm,there is a black screen and the screen returns to the login screen

rycee commented 6 years ago

Hmm, I haven't seen this particular error before but I know Qt is very strict about the plugins being binary compatible. I believe they pretty much should be from the same Nixpkgs build. Perhaps your user and system setups use different versions of Nixpkgs?

I notice that xcb is included twice in

Available platform plugins are: minimal, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa, minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

I'm guessing one is in /run/current-system/sw/ and the other in ~/.nix-profile. I have

$ md5sum /run/current-system/sw/lib/qt-5.10/plugins/platforms/libqxcb.so ~/.nix-profile/lib/qt-5.10/plugins/platforms/libqxcb.so
1e26198f0a82fbf9445614128ffca8e7  /run/current-system/sw/lib/qt-5.10/plugins/platforms/libqxcb.so
1e26198f0a82fbf9445614128ffca8e7  /home/rycee/.nix-profile/lib/qt-5.10/plugins/platforms/libqxcb.so

What is the output for you? If you have both then I believe they must be the same otherwise problems like this arise 😕

pasqui23 commented 6 years ago

I am on KDE 5.13(Qt 5.11),but

md5sum /run/current-system/sw/lib/qt-5.10/plugins/platforms/libqxcb.so ~/.nix-profile/lib/qt-5.10/plugins/platforms/libqxcb.so 

md5sum: /run/current-system/sw/lib/qt-5.10/plugins/platforms/libqxcb.so: No such file or directory
e7d6ea28be394f418c864014888a0a9d  /home/pasquale/.nix-profile/lib/qt-5.10/plugins/platforms/libqxcb.so

So is probably an incompatibility in versions How do I remove xcb from home manager's profile?

pasqui23 commented 6 years ago

On second thought,

md5sum /nix/store/aci2l1f8c3wpyr43s53jfba50010ykpc-home-manager-generation/lib/*/plugins/platforms/libqxcb.so
zsh: no matches found: /nix/store/aci2l1f8c3wpyr43s53jfba50010ykpc-home-manager-generation/lib/*/plugins/platforms/libqxcb.so

As this is the broken configuration,and the above checked a working configuration,I don't know

rycee commented 4 years ago

Sorry about the long delay. Do you still have this issue?

pasqui23 commented 4 years ago

Don't know,I'm using home-manager as a nixos module now and everything seems fine

rycee commented 4 years ago

:+1: