<div dir="ltr">Thanks for your reply Martin.<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I see the following possibilities to address this error:<br></span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> * forward declare Display (struct Display should be sufficent)<br></span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> * disable building of the EglOnXBackend</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Given that epoxy seems to not have X11 support I would say the second option is the proper one. But it would mean no compositing support on X11 in this build. This makes only sense if you want to use Wayland. If you want to use KWin on X11 you need to get epoxy to support X11.</span></blockquote><div><br></div><div>I followed your second suggestion and disabled EglOnXBackend backend since I don't want to use X11.<br></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Following patch works and I could compile kwin.<br><br><a href="https://paste.kde.org/p2rvhzgmc">https://paste.kde.org/p2rvhzgmc</a><br></span></div><div><br></div><div>Nevertheless, in this state I was not able to start kwin at all. Kwin told me that no backend is available.</div><div>Below the full story how I got kwin working, maybe it's useful for someone else out there.<br></div><div><br></div><div><br></div><div>For fast comparison I enabled weston in my yocto configuration.<br></div><div>Weston only found fbdev as backend. No egl accelerated backend was available.</div><div><br></div><div>It seems that there are currently two ways to get hardware accelerated rendering with a wayland compositor on raspberry pi:<br></div><div><br></div><div>1. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">raspberrypi</span> specific userand driver (proprietary)</div><div> - qtbase with raspberrypi specific eglfs backend</div><div> - qtwayland with <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">raspberrypi</span> specific eglfs backend </div><div>2. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">raspberrypi</span> specific drm driver (open source vc4)</div><div> - qtbase with drm, kms and eglfsdevice</div><div> - weston using drm with egl</div><div> - kwin using drm with egl</div><div><br></div><div>At this point I was on the first track. But there is no backend available for kwin and also not for weston.</div><div>Raspberry pi specific backend was dropped from weston because of maintenance:</div><div><a href="https://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/commit/?h=rocko&id=a1cfeb3324c458a73507e34ffcf28c25591b8052">https://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/commit/?h=rocko&id=a1cfeb3324c458a73507e34ffcf28c25591b8052</a></div><div><br></div><div>I changed my yocto configuration to the second approach:<br><br>remove:<br>#IMAGE_INSTALL_append = " userland"</div><div>add:</div><div>MACHINE_FEATURES_append = " vc4graphics"<br></div><div><br></div><div>qtbase configuration also needs adjustment (enable kms and gbm)</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><a href="https://paste.kde.org/povjpohkv">https://paste.kde.org/povjpohkv</a></span></div><div><br></div><div>Weston runs nicely at this point with following commands:<br><br><div>export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir</div><div>mkdir "${XDG_RUNTIME_DIR}"</div><div>chmod 0700 "${XDG_RUNTIME_DIR}"</div><div>weston --backend=drm-backend.so --tty=4<br></div><br></div><div>Nevertheless weston is complaining about logind issue:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">[15:38:26.505] logind: failed to get session seat
</span><br>[15:38:26.505] logind: cannot setup systemd-logind helper (-61), using legacy fallback<br>
<br></span>Trying kwin:<br><br><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">export $(dbus-launch)</span><br></span><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">kwin_wayland --drm</span><br></span></div><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Kwin runs without any output message. It seems to hang. After a bit of debugging with GDB it turns out that kwin waits for a logind session.</span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">This could also be made visible by:</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">export QT_LOGGING_RULES="kwin_core.debug=true;kwin_wayland_drm.debug=true"<br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>To shorten this up here, it was not enough to enable logind and pam support in systemd.</div><div>It is needed to enable pam support in yocto distro features. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Otherwise login does not create a logind session with pam.</span></div><div><br></div><div><div>DISTRO_FEATURES_append = " systemd wayland x11 wifi pam"</div></div><div><br></div><div>Now running kwin_wayland --drm results in following output executed from ssh:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">kwin_core: Platform does not support input, enforcing libinput support
</span><br>kwin_core: KGlobalAcceld inited
<br>kwin_core: Session path: "/org/freedesktop/login1/session/c1"
<br>kwin_core: "logind" seat: "" / "/"
<br>kwin_core: "logind" seat: "" / "/"
<br>kwin_core: Gained session control
<br>kwin_core: Could not take device /dev/input/event0 , cause: "Operation not permitted"
<br>kwin_core: Could not take device /dev/dri/card0 , cause: "Operation not permitted"<br>
<br></span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Running the same on the terminal from raspberry pi (hdmi terminal) results in a working kwin :-D</span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Any ideas how to start kwin properly from ssh?</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>Regards,</div><div>Jörn</div><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">2018-03-01 21:29 GMT+01:00 Martin Flöser <span dir="ltr"><<a href="mailto:mgraesslin@kde.org" target="_blank">mgraesslin@kde.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Am 2018-03-01 20:56, schrieb Jörn M:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I simply did the same as above for kdeclarative and applied the few<br>
lines from kwin's kwinglutils_funcs.h<br>
on all places where the error occurs:<br>
<br>
<a href="https://paste.kde.org/pgtkzf5yu" rel="noreferrer" target="_blank">https://paste.kde.org/pgtkzf5y<wbr>u</a><br>
</blockquote>
<br></span>
see also <a href="https://phabricator.kde.org/D10762" rel="noreferrer" target="_blank">https://phabricator.kde.org/D1<wbr>0762</a><span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
This leads me to the final error I'm not able to solve:<br>
<br>
eglonxbackend.h:36:27: error: expected ')' before '*' token<br>
| EglOnXBackend(Display *display);<br>
| ^<br>
|<br>
/home/joern/yocto/tmp/work/cor<wbr>texa7hf-neon-vfpv4-poky-linux-<wbr>gnueabi/kwin/5.12.1-r0/git/<wbr>plugins/platforms/x11/common/<wbr>eglonxbackend.h:37:58:<br>
error: 'Display' has not been declared<br>
<br>
<a href="https://paste.kde.org/pimqgxedi" rel="noreferrer" target="_blank">https://paste.kde.org/pimqgxed<wbr>i</a><br>
<br>
Which component normally declares "Display"?<br>
</blockquote>
<br></span>
Display is the XLib Display. It comes in with anything pulling in XLib. So most likely the reason for the compile error is that this gets pulled in through epoxy normally, but on yocto epoxy is probably built without X11 support (which might be questionably, but so what).<br>
<br>
I see the following possibilities to address this error:<br>
* forward declare Display (struct Display should be sufficent)<br>
* disable building of the EglOnXBackend<br>
<br>
Given that epoxy seems to not have X11 support I would say the second option is the proper one. But it would mean no compositing support on X11 in this build. This makes only sense if you want to use Wayland. If you want to use KWin on X11 you need to get epoxy to support X11.<br>
<br>
Cheers<span class="gmail-HOEnZb"><font color="#888888"><br>
Martin<br>
</font></span></blockquote></div><br></div></div></div>