Bug 505962

Summary: startplasma-wayland throws misleading error messages when KWin doesn't launch
Product: [Plasma] kwin Reporter: Ilya Bizyaev <bizyaev>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: denis7774, kde, kdedev, nate
Priority: NOR    
Version First Reported In: 6.4.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ilya Bizyaev 2025-06-22 10:15:35 UTC
SUMMARY

```
$ /usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland
...
Error: could not determine $DISPLAY.
Error: Can not contact kdeinit5!
org.kde.startup: "kdeinit5_shutdown" QList exited with code 255
startplasma-wayland: Shutting down...
startplasmacompositor: Shutting down...
startplasmacompositor: Done.
```

This is unexpected behavior: DISPLAY is indeed not set in a TTY, but it shouldn't be a hard requirement to starting a Wayland session.

STEPS TO REPRODUCE
1. Log in to a TTY.
2. Execute the command above.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250618
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.2-1-default (64-bit)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 4070

ADDITIONAL INFORMATION
References to `kdeinit5` also look suspicious to me, but are plausible.
Comment 1 Vlad Zahorodnii 2025-06-23 09:29:23 UTC
Do I understand correctly that you can't log in into plasma session from SDDM? or does the bug happen only when you run startplasma-wayland manually?
Comment 2 Ilya Bizyaev 2025-06-23 09:32:12 UTC
This happened when I ran the command manually from a TTY for troubleshooting.

SDDM was not available after a problematic system update (NVIDIA packaging).
Comment 3 David Edmundson 2025-06-23 09:45:27 UTC
The error is not relevant and throwing things off. kwin is clearly failing to start, and then the kdialog prompt at the end to say everything exploded tries to connect to X and is displaying an error.

Please check `journalctl --user` for something more helpful.
Comment 4 Ilya Bizyaev 2025-06-23 09:47:59 UTC
I have since figured out the root cause (https://bugzilla.opensuse.org/show_bug.cgi?id=1237696#c22).

So the error message is misleading? Is it possible to fix to avoid user confusion?
Comment 5 TraceyC 2025-06-26 00:18:35 UTC
It does seem like the actionable thing for KDE would be that when the kdialog prompt fails to connect to X, the error could be more human friendly / verbose.
Comment 6 Denis Reva 2025-06-28 07:51:32 UTC
Is it somehow related to https://bugs.kde.org/show_bug.cgi?id=506288?
Comment 7 TraceyC 2025-06-30 18:55:25 UTC
(In reply to Denis Reva from comment #6)
> Is it somehow related to https://bugs.kde.org/show_bug.cgi?id=506288?

No, that bug is about "I can't launch KDE (kwin) on wayland with normal user."

This one is about a misleading error when trying to start kwin
Comment 8 TraceyC 2025-06-30 18:55:44 UTC
.