Bug 356318

Summary: I can run wayland plasma session from terminal, not from sddm
Product: [Plasma] kwin Reporter: Mustafa Muhammad <mustafa1024m>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: bhush94, dah5aeZe, hrvoje.senjan, plasma-bugs, simonandric5
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mustafa Muhammad 2015-12-05 18:13:27 UTC
Using openSUSE Tumbleweed with latest Plasma from openSUSE KDE repos (following git), I can start (and use) wayland session from terminal, but not from sddm.
If I try to log into Plasma on wayland, sddm looks freezed and I only have a mouse curser moving.

Reproducible: Always
Comment 1 Christian Stadelmann 2016-01-24 11:11:58 UTC
Same here with Gdm on Fedora 23. I can run plasma/wayland sessions from tty (`dbus-launch --exit-with-session startplasmacompositor`) but I cannot run them from gdm, although it has the same command line. Running plasma-workspace-5.5.3-4.fc23.x86_64 with qt5-qtbase-5.5.1-11.fc23.x86_64 and gdm-3.18.2-1.fc23.x86_64.
Comment 2 Martin Flöser 2016-01-27 07:33:57 UTC
> sddm looks freezed and I only have a mouse curser moving

does kwin start at all in that case? Are we still on sddm or did KWin take over the session?
Comment 3 Mustafa Muhammad 2016-01-27 10:12:38 UTC
(In reply to Martin Gräßlin from comment #2)
> > sddm looks freezed and I only have a mouse curser moving
> 
> does kwin start at all in that case? Are we still on sddm or did KWin take
> over the session?

I can't reproduce this anymore on openSUSE, but will try on Fedora, as far as I remember, kwin_wayland started, and took over, didn't show anything other than the curser moving.

Today I tested again with kwin 5.5.90git~20160125T153610~1752302-18.1 (openSUSE kde unstable repo), and I only get a blank space with a mouse curser, this is by running from terminal or from sddm.
Comment 4 Mustafa Muhammad 2016-01-27 10:23:02 UTC
From terminal, using "kwin_wayland --drm --libinput --xwayland plasmashell" I can login to the session.
kwin_wayland is running, no X server, but when I open an application (e.g. dolphin or systemsettings), in the "About" I see "The xcb windowing system".
So plasma runs in wayland and all applications run on xwayland!!
Comment 5 Martin Flöser 2016-01-27 10:25:05 UTC
> So plasma runs in wayland and all applications run on xwayland!!

you need to:
export QT_QPA_PLATFORM=wayland
Comment 6 Mustafa Muhammad 2016-01-27 10:51:10 UTC
(In reply to Martin Gräßlin from comment #5)
> > So plasma runs in wayland and all applications run on xwayland!!
> 
> you need to:
> export QT_QPA_PLATFORM=wayland

After exporting QT_QPA_PLATFORM, running "kwin_wayland --drm --libinput --xwayland plasmashell" I get only mouse on a black screen, just like "dbus-launch --exit-with-session /usr/bin/startplasmacompositor"
Comment 7 Martin Flöser 2016-01-27 11:22:40 UTC
might it be that QtWayland is not installed at all?
Comment 8 Mustafa Muhammad 2016-01-27 11:46:13 UTC
(In reply to Martin Gräßlin from comment #7)
> might it be that QtWayland is not installed at all?

You are right, after installing libqt5-qtwayland, it is now working.
So dependency issue?
Comment 9 Martin Flöser 2016-01-27 12:03:15 UTC
> So dependency issue?

yes. Please report to your distribution.
Comment 10 Mustafa Muhammad 2016-01-27 12:10:12 UTC
(In reply to Martin Gräßlin from comment #9)
> > So dependency issue?
> 
> yes. Please report to your distribution.

Thanks
Comment 11 Hrvoje Senjan 2016-01-27 17:11:12 UTC
Will add the required qtwayland dep.
1) I only wonder which package is most logically correct.
2) Can upstream have find_package call for Qt5Wayland (mark as runtime)
Comment 12 Martin Flöser 2016-01-28 07:50:23 UTC
concerning 1) please see https://community.kde.org/KWin/Packaging

concerning 2) there is no real place where it can go. It certainly doesn't make sense in KWin (doesn't need it), it also doesn't really make sense in Plasma as it doesn't solve the problem. If you use Qt apps on GNOME/Wayland you also want to get the dependency. This is clearly something distributions need to solve and we as an upstream cannot solve.
Comment 13 Hrvoje Senjan 2016-01-28 17:29:00 UTC
Well from here it looks kwayland-integration is perfect candidate for both 1) and 2).

Regarding 1. it would also be more correct to have qtwayland as part of the default install (i.e. deeper than kwayland-integration dep).
Comment 14 Martin Flöser 2016-01-29 08:31:49 UTC
I think we in upstream should not find for QtWayland. We also don't check whether the Qt's xcb plugin is present. Given that kwayland-integration is the wrong place. It doesn't solve the problem for GNOME or any other Wayland compositor so a check in our code is just useless.