KDE Crashes on startup

Hi

I left my system alone for the summer, then we had a power cut. Now KDE is crashing - getting
various errors and a segfault in xdg-desktop-po.

I’m a technical developer, but not at all an expert on Nix. I’ve tried checking the cache with the nix repair - it spent a long time, and didn’t change anything. I removed KDE from my configuration.nix, rebuilt, then put it back - no effect. I upgraded to 23.05 - still the same problem.

My assumption is that there’s some persistent configuration file or local cache that is corrupt - but I have no idea how to find it or fix it. I’ve seen a report that some apps crash due to a qml cache, and followed those instructions - no effect again!

I’d really appreciate someone helping - my home automation is dead until I fix this!

Partial log below - thanks!!

Sep 18 21:09:31 haserver2 .xdg-desktop-po[963]: No skeleton to export
Sep 18 21:09:31 haserver2 .xdg-desktop-po[963]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached
Sep 18 21:09:19 haserver2 dhcpcd[638]: eno1: no IPv6 Routers available
Sep 18 21:09:10 haserver2 systemd[1]: Reached target Graphical Interface.
Sep 18 21:09:10 haserver2 systemd[1]: Reached target Multi-User System.
Sep 18 21:09:10 haserver2 systemd[1]: Reached target Network is Online.
Sep 18 21:09:10 haserver2 systemd[1]: Started DHCP Client.
Sep 18 21:09:10 haserver2 dhcpcd[627]: Failed to reload-or-try-restart chronyd.service: Unit chronyd.service not found.
Sep 18 21:09:10 haserver2 dhcpcd[627]: Failed to reload-or-try-restart openntpd.service: Unit openntpd.service not found.
Sep 18 21:09:10 haserver2 dhcpcd[627]: Failed to reload-or-try-restart ntpd.service: Unit ntpd.service not found.
Sep 18 21:09:10 haserver2 systemd[1]: Reached target User and Group Name Lookups.
Sep 18 21:09:10 haserver2 systemd[1]: Reached target Host and Network Name Lookups.
Sep 18 21:09:10 haserver2 systemd[1]: Started Name Service Cache Daemon (nsncd).
Sep 18 21:09:10 haserver2 nsncd[1079]: Sep 18 21:09:10.939 INFO started, handoff_timeout: 3s, worker_count: 8, path: “/var/run/nscd/socket”
Sep 18 21:09:10 haserver2 systemd[1]: Starting Name Service Cache Daemon (nsncd)…
Sep 18 21:09:10 haserver2 avahi-daemon[623]: No service file found in /etc/avahi/services.
Sep 18 21:09:10 haserver2 avahi-daemon[623]: Got SIGHUP, reloading.
Sep 18 21:09:10 haserver2 systemd[1]: Stopped Name Service Cache Daemon (nsncd).
Sep 18 21:09:10 haserver2 systemd[1]: nscd.service: Deactivated successfully.
Sep 18 21:09:10 haserver2 systemd[1]: Stopping Name Service Cache Daemon (nsncd)…
Sep 18 21:09:10 haserver2 systemd[1]: Stopping User and Group Name Lookups…
Sep 18 21:09:10 haserver2 systemd[1]: Stopped target User and Group Name Lookups.
Sep 18 21:09:10 haserver2 systemd[1]: Stopping Host and Network Name Lookups…
Sep 18 21:09:10 haserver2 systemd[1]: Stopped target Host and Network Name Lookups.
Sep 18 21:09:10 haserver2 dhcpcd[638]: eno1: adding default route via 10.1.0.1
Sep 18 21:09:10 haserver2 dhcpcd[638]: eno1: adding route to 10.1.0.0/24
Sep 18 21:09:10 haserver2 avahi-daemon[623]: Registering new address record for 10.1.0.156 on eno1.IPv4.
Sep 18 21:09:10 haserver2 avahi-daemon[623]: New relevant interface eno1.IPv4 for mDNS.
Sep 18 21:09:10 haserver2 avahi-daemon[623]: Joining mDNS multicast group on interface eno1.IPv4 with address 10.1.0.156.
Sep 18 21:09:10 haserver2 dhcpcd[638]: eno1: leased 10.1.0.156 for 7200 seconds
Sep 18 21:09:09 haserver2 systemd[1]: systemd-rfkill.service: Deactivated successfully.
Sep 18 21:09:07 haserver2 sddm-greeter[959]: Message received from daemon: HostName
Sep 18 21:09:07 haserver2 sddm-greeter[959]: Message received from daemon: Capabilities
Sep 18 21:09:07 haserver2 sddm-greeter[959]: QDBusConnection: name ‘org.freedesktop.UPower’ had owner ‘’ but we thought it was ‘:1.18’
Sep 18 21:09:07 haserver2 sddm-greeter[959]: QDBusConnection: name ‘org.freedesktop.UDisks2’ had owner ‘’ but we thought it was ‘:1.17’
Sep 18 21:09:07 haserver2 sddm-greeter[959]: Adding view for “DP-1” QRect(0,0 2560x1440)
Sep 18 21:09:07 haserver2 sddm-greeter[959]: Failed to find a Kirigami platform plugin
Sep 18 21:09:07 haserver2 systemd[1]: Started Daemon for power management.
Sep 18 21:09:07 haserver2 dbus-daemon[709]: [system] Successfully activated service ‘org.freedesktop.UPower’
Sep 18 21:09:07 haserver2 systemd[1]: Starting Daemon for power management…
Sep 18 21:09:07 haserver2 udisksd[1003]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Sep 18 21:09:07 haserver2 dbus-daemon[709]: [system] Activating via systemd: service name=‘org.freedesktop.UPower’ unit=‘upower.service’ requested by ‘:1.16’ (uid=175 pid=959 comm=“/nix/store/rfqx80qvl5r96q3nj420v95lln3hdd7w-s>
Sep 18 21:09:07 haserver2 systemd[1]: Started Disk Manager.
Sep 18 21:09:07 haserver2 dbus-daemon[709]: [system] Successfully activated service ‘org.freedesktop.UDisks2’
Sep 18 21:09:07 haserver2 udisksd[1003]: udisks daemon version 2.9.4 starting
Sep 18 21:09:07 haserver2 systemd[1]: Starting Disk Manager…
Sep 18 21:09:07 haserver2 dbus-daemon[709]: [system] Activating via systemd: service name=‘org.freedesktop.UDisks2’ unit=‘udisks2.service’ requested by ‘:1.16’ (uid=175 pid=959 comm=”/nix/store/rfqx80qvl5r96q3nj420v95lln3hdd7w>
Sep 18 21:09:06 haserver2 systemd[1]: systemd-coredump@0-994-0.service: Deactivated successfully.
Sep 18 21:09:06 haserver2 systemd[945]: Failed to start Xdg Desktop Portal For KDE.
Sep 18 21:09:06 haserver2 systemd[945]: plasma-xdg-desktop-portal-kde.service: Failed with result ‘core-dump’.
Sep 18 21:09:06 haserver2 systemd[945]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=dumped, status=6/ABRT
Sep 18 21:09:06 haserver2 systemd-coredump[995]: [🡕] Process 992 (.xdg-desktop-po) of user 175 dumped core.

                                             Module libxcb-util.so.1 without build-id.
                                             Module libxkbcommon-x11.so.0 without build-id.
                                             Module libICE.so.6 without build-id.
                                             Module libSM.so.6 without build-id.
                                             Module libxcb-xinput.so.0 without build-id.
                                             Module libxcb-xkb.so.1 without build-id.
                                             Module libxcb-xinerama.so.0 without build-id.
                                             Module libxcb-xfixes.so.0 without build-id.
                                             Module libxcb-sync.so.1 without build-id.
                                             Module libxcb-shape.so.0 without build-id.
                                             Module libxcb-render.so.0 without build-id.
                                             Module libxcb-render-util.so.0 without build-id.
                                             Module libxcb-randr.so.0 without build-id.
                                             Module libxcb-shm.so.0 without build-id.
                                             Module libxcb-image.so.0 without build-id.
                                             Module libxcb-icccm.so.4 without build-id.
                                             Module libX11-xcb.so.1 without build-id.
                                             Module libQt5XcbQpa.so.5 without build-id.
                                             Module libqxcb.so without build-id.
                                             Module libmp3lame.so.0 without build-id.
                                             Module libmpg123.so.0 without build-id.
                                             Module libogg.so.0 without build-id.
                                             Module libopus.so.0 without build-id.
                                             Module libvorbisenc.so.2 without build-id.
                                             Module libvorbis.so.0 without build-id.
                                             Module libFLAC.so.12 without build-id.
                                             Module libsndfile.so.1 without build-id.
                                             Module libbrotlicommon.so.1 without build-id.
                                             Module libpulsecommon-16.1.so without build-id.
                                             Module libgraphite2.so.3 without build-id.
                                             Module libsystemd.so.0 without build-id.
                                             Module libkeyutils.so.1 without build-id.
                                             Module libkrb5support.so.0 without build-id.
                                             Module libcom_err.so.3 without build-id.
                                             Module libk5crypto.so.3 without build-id.
                                             Module libkrb5.so.3 without build-id.
                                             Module libcap.so.2 without build-id.
                                             Module libpcre2-8.so.0 without build-id.
                                             Module libexpat.so.1 without build-id.
                                             Module libbrotlidec.so.1 without build-id.
                                             Module libXdmcp.so.6 without build-id.
                                             Module libXau.so.6 without build-id.
                                             Module liblzma.so.5 without build-id.
                                             Module libbz2.so.1 without build-id.
                                             Module libpulse-mainloop-glib.so.0 without build-id.
                                             Module libpulse.so.0 without build-id.
                                             Module libGLdispatch.so.0 without build-id.
                                             Module libXext.so.6 without build-id.
                                             Module libGLX.so.0 without build-id.
                                             Module libzstd.so.1 without build-id.
                                             Module libpcre2-16.so.0 without build-id.
                                             Module libicudata.so.73 without build-id.
                                             Module libicuuc.so.73 without build-id.
                                             Module libicui18n.so.73 without build-id.
                                             Module libharfbuzz.so.0 without build-id.
                                             Module libpng16.so.16 without build-id.
                                             Module libdbus-1.so.3 without build-id.
                                             Module libgssapi_krb5.so.2 without build-id.
                                             Module libKF5DBusAddons.so.5 without build-id.
                                             Module libKF5Crash.so.5 without build-id.
                                             Module libudev.so.1 without build-id.
                                             Module libz.so.1 without build-id.
                                             Module libfreetype.so.6 without build-id.
                                             Module libfontconfig.so.1 without build-id.
                                             Module libQt5Svg.so.5 without build-id.
                                             Module libxcb-keysyms.so.1 without build-id.
                                             Module libXfixes.so.3 without build-id.
                                             Module libxcb.so.1 without build-id.
                                             Module libattr.so.1 without build-id.
                                             Module libacl.so.1 without build-id.
                                             Module libKF5Archive.so.5 without build-id.
                                             Module libffi.so.8 without build-id.
                                             Module libdbusmenu-qt5.so.2 without build-id.
                                             Module libQt5X11Extras.so.5 without build-id.
                                             Module libphonon4qt5.so.4 without build-id.
                                             Module libgcc_s.so.1 without build-id.
                                             Module libstdc++.so.6 without build-id.
                                             Module libGL.so.1 without build-id.
                                             Module libxkbcommon.so.0 without build-id.
                                             Module libQt5Core.so.5 without build-id.
                                             Module libQt5Gui.so.5 without build-id.
                                             Module libQt5DBus.so.5 without build-id.
                                             Module libKF5CoreAddons.so.5 without build-id.
                                             Module libKF5AuthCore.so.5 without build-id.
                                             Module libQt5Xml.so.5 without build-id.
                                             Module libQt5Network.so.5 without build-id.
                                             Module libQt5Concurrent.so.5 without build-id.
                                             Module libKF5I18n.so.5 without build-id.
                                             Module libKF5ConfigCore.so.5 without build-id.
                                             Module libKF5Service.so.5 without build-id.
                                             Module libKF5KIOCore.so.5 without build-id.
                                             Module libQt5Qml.so.5 without build-id.
                                             Module libQt5QmlModels.so.5 without build-id.
                                             Module libQt5Quick.so.5 without build-id.
                                             Module libKF5Solid.so.5 without build-id.
                                             Module libQt5Widgets.so.5 without build-id.
                                             Module libKF5Auth.so.5 without build-id.
                                             Module libKF5Codecs.so.5 without build-id.
                                             Module libKF5ConfigGui.so.5 without build-id.
                                             Module libKF5WidgetsAddons.so.5 without build-id.
                                             Module libQt5WaylandClient.so.5 without build-id.
                                             Module libKF5GuiAddons.so.5 without build-id.
                                             Module libKF5ConfigWidgets.so.5 without build-id.
                                             Module libKF5ItemViews.so.5 without build-id.
                                             Module libQt5PrintSupport.so.5 without build-id.
                                             Module libKF5IconThemes.so.5 without build-id.
                                             Module libKF5GlobalAccel.so.5 without build-id.
                                             Module libKF5XmlGui.so.5 without build-id.
                                             Module libKF5Bookmarks.so.5 without build-id.
                                             Module libKF5Completion.so.5 without build-id.
                                             Module libKF5JobWidgets.so.5 without build-id.
                                             Module libX11.so.6 without build-id.
                                             Module libKF5WindowSystem.so.5 without build-id.
                                             Module libKF5KIOGui.so.5 without build-id.
                                             Module libKF5KIOWidgets.so.5 without build-id.
                                             Module libKF5KIOFileWidgets.so.5 without build-id.
                                             Module libKF5Package.so.5 without build-id.
                                             Module libQt5QuickWidgets.so.5 without build-id.
                                             Module libKF5WaylandClient.so.5 without build-id.
                                             Module libKF5Notifications.so.5 without build-id.
                                             Module libKF5Declarative.so.5 without build-id.
                                             Module .xdg-desktop-portal-kde-wrapped without build-id.
                                             Stack trace of thread 992:
                                             #0  0x00007f79fbaa1adc __pthread_kill_implementation (libc.so.6 + 0x87adc)
                                             #1  0x00007f79fba52cb6 raise (libc.so.6 + 0x38cb6)
                                             #2  0x00007f79fba3c8ba abort (libc.so.6 + 0x228ba)
                                             #3  0x00007f79fc099cd7 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x99cd7)
                                             #4  0x00007f79fc7274bb _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x1274bb)
                                             #5  0x00007f79fc7279d0 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x1279d0)
                                             #6  0x00007f79fc2d2f05 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2d2f05)
                                             #7  0x00007f79fc72a8bc _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x12a8bc)
                                             #8  0x00007f79fdf76539 _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x176539)
                                             #9  0x0000000000425701 main (.xdg-desktop-portal-kde-wrapped + 0x25701)
                                             #10 0x00007f79fba3dace __libc_start_call_main (libc.so.6 + 0x23ace)
                                             #11 0x00007f79fba3db89 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x23b89)
                                             #12 0x0000000000425a35 _start (.xdg-desktop-portal-kde-wrapped + 0x25a35)
                                             
                                             Stack trace of thread 993:
                                             #0  0x00007f79fbb1477f __poll (libc.so.6 + 0xfa77f)
                                             #1  0x00007f79fb72dfde g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0x5dfde)
                                             #2  0x00007f79fb72e0fc g_main_context_iteration (libglib-2.0.so.0 + 0x5e0fc)
                                             #3  0x00007f79fc324786 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x324786)
                                             #4  0x00007f79fc2cadc3 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2cadc3)
                                             #5  0x00007f79fc0d4757 _ZN7QThread4execEv (libQt5Core.so.5 + 0xd4757)
                                             #6  0x00007f79fcd07767 _ZN22QDBusConnectionManager3runEv (libQt5DBus.so.5 + 0x19767)
                                             #7  0x00007f79fc0d5b2c _ZN14QThreadPrivate5startEPv (libQt5Core.so.5 + 0xd5b2c)
                                             #8  0x00007f79fba9fe24 start_thread (libc.so.6 + 0x85e24)
                                             #9  0x00007f79fbb219b0 __clone3 (libc.so.6 + 0x1079b0)
                                             ELF object binary architecture: AMD x86-64

Sep 18 21:09:06 haserver2 systemd[1]: Started Process Core Dump (PID 994/UID 0).
Sep 18 21:09:06 haserver2 systemd[1]: Created slice Slice /system/systemd-coredump.
Sep 18 21:09:06 haserver2 xdg-desktop-portal-kde[992]: Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Sep 18 21:09:06 haserver2 xdg-desktop-portal-kde[992]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Sep 18 21:09:06 haserver2 xdg-desktop-portal-kde[992]: qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
Sep 18 21:09:06 haserver2 xdg-desktop-portal-kde[992]: qt.qpa.xcb: could not connect to display
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Could not find any platform plugin
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject::installEventFilter(): Cannot filter events for objects in a different thread.
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x7ffcc1f362b0), parent’s thread is QThread(0xa5cc50), current thread is QThread(0xb67910)
Sep 18 21:09:06 haserver2 systemd[945]: Starting Xdg Desktop Portal For KDE…
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Loading file:///run/current-system/sw/share/sddm/themes/breeze/Main.qml…
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Activating via systemd: service name=‘org.freedesktop.impl.portal.desktop.kde’ unit=‘plasma-xdg-desktop-portal-kde.service’ requested by ‘:1.2’ (uid=175 pid>
Sep 18 21:09:06 haserver2 .xdg-desktop-po[963]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Sep 18 21:09:06 haserver2 .xdg-desktop-po[963]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Sep 18 21:09:06 haserver2 .xdg-desktop-po[963]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Sep 18 21:09:06 haserver2 systemd[945]: Started flatpak document portal service.
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Successfully activated service ‘org.freedesktop.portal.Documents’
Sep 18 21:09:06 haserver2 systemd[945]: Started sandboxed app permission store.
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Successfully activated service ‘org.freedesktop.impl.portal.PermissionStore’
Sep 18 21:09:06 haserver2 systemd[945]: Starting sandboxed app permission store…
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Activating via systemd: service name=‘org.freedesktop.impl.portal.PermissionStore’ unit=‘xdg-permission-store.service’ requested by ‘:1.3’ (uid=175 pid=968 >
Sep 18 21:09:06 haserver2 systemd[945]: Starting flatpak document portal service…
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Activating via systemd: service name=‘org.freedesktop.portal.Documents’ unit=‘xdg-document-portal.service’ requested by ‘:1.2’ (uid=175 pid=963 comm="/nix/s>
Sep 18 21:09:06 haserver2 sddm[920]: Message received from greeter: Connect
Sep 18 21:09:06 haserver2 sddm-greeter[959]: QFont::fromString: Invalid description ‘(empty)’
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Connected to the daemon.
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Loading theme configuration from “/run/current-system/sw/share/sddm/themes/breeze/theme.conf”
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Reading from “/nix/store/8gsw4mfraifx34wainp54vhs9qi6i5jy-desktops/share/xsessions/plasma.desktop”
Sep 18 21:09:06 haserver2 sddm-greeter[959]: Reading from “/nix/store/8gsw4mfraifx34wainp54vhs9qi6i5jy-desktops/share/wayland-sessions/plasmawayland.desktop”
Sep 18 21:09:06 haserver2 systemd[945]: Starting Portal service…
Sep 18 21:09:06 haserver2 dbus-daemon[961]: [session uid=175 pid=961] Successfully activated service ‘org.freedesktop.systemd1’

try this command to repair the corrupt package

sudo nixos-rebuild boot --repair

then reboot the computer

Thanks very much - but I still get the same error, after running this and rebooting. I had previously tried another version of the repair command without success. I’d also tried removing and re-adding
KDE - with garbage collect in between, so I don’t think this is a package issue.

I still think this is a corrupt persistent settings or cache file - but I’ve no idea how to clear these?

Any other ideas

try with new user. create new user from tty1 then try login to the new user. if success, it means there is something wrong with your ~/.config

Hi

I have two accounts in my configuration.nix. Logging in with a backup account, and rebooting results in the same error in the journal log - KDS is failing.

Any other ideas? Bit stuck here!

Thanks

Martin Green