Bug 430501 - kwin_wayland can't load wayland-org.kde.kwin.qpa and won't start from CLI
Summary: kwin_wayland can't load wayland-org.kde.kwin.qpa and won't start from CLI
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR critical
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-17 10:45 UTC by Duncan
Modified: 2020-12-19 17:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2020-12-17 10:45:09 UTC
git-master kwin_wayland just (within the last 2-3 days, I'm at a2c765800 ATM, today's frameworks and the rest of plasma too) started failing to startup from the CLI (dbus-run-session startplasma-wayland).  I'm presently running plasma/X since plasma/wayland won't run.

By moving kwin_wayland to kwin_wayland.bin and replacing it with a wrapper script that saves STDERR, I was able to get this

>>>

qt.qpa.plugin: Could not load the Qt platform plugin "wayland-org.kde.kwin.qpa" 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb, wayland-org.kde.kwin.qpa.

<<<

I had trouble associating that plugin string with an actual file, but eventually, comparing the current kwin package to a backup, I see the current version is missing /usr/lib64/qt5/plugins/platforms/KWinQpaPlugin.so.  The (seemingly successful) build log has a bunch of KWinQpaPlugin hits, but none for the .so.   Unless it was folded into kwin_wayland itself (step 888/918 does seem to be linking a bunch of *.o files from KWinQpaPlugin.dir into bin/kwin_wayland, maybe it was), that would be the problem.  But in the still-separate case why wouldn't the *.so be built, and if it was folded-in, why won't kwin_wayland load?
Comment 1 David Edmundson 2020-12-17 11:16:23 UTC
Make sure you have a clean build & install dir.

That plugin is now bundled into the binary, we got conflicts if the file also exists on the file system.

Please reopen if that doesn't fix it.
Comment 2 Duncan 2020-12-17 13:32:57 UTC
(In reply to David Edmundson from comment #1)
> Make sure you have a clean build & install dir.
> 
> That plugin is now bundled into the binary, we got conflicts if the file
> also exists on the file system.

Gentoo's live-git builds from the gentoo/kde overlay. (Gentoo's in the platform info but I didn't mention it in the text this time until now and you probably missed it.)  Portage auto-cleans before build and tracks and removes all the files of the old version from the main system when merging the new one.  If it was leaving trash behind there'd be a lot more packages in trouble.  (Besides, building on tmpfs and I've rebooted so for sure started with a clean one a couple times now.)

Thanks for confirming it's built into the binary now. tho.  I can quit probing /that/ rabbit-trail. =:^)

Meanwhile, ecac025a2 builds and is bad but the previous commit 3b1c14388 won't build due to changes in (I think) kwayland-server since then.  I actually suspect the problem is kwin's still not quite adjusted to those or other changes and builds against current but is failing to run, but my initial semi-random rollback tests there didn't prove much so now, given your comment indicates you're not already seeing/working-on it from the CI testing, I have to get more systematic.
Comment 3 Duncan 2020-12-19 12:23:59 UTC
Doing an upgrade ATM (with a new icu forcing a revdep-build of qtwebengine so it could be awhile, tho I'm over 80% thru it now) and see kdeclarative 81c14c916 "Workaround crash with GL detection and kwin_wayland" in the git logs.  That reads like it /might/ be the culprit and kwin is indeed pulling in kdeclarative, tho I'm not sure it's a core-enough dep to crash kwin_wayland itself before I see a switch from the CLI and prevent startup.  I guess I'll find out if that (or something else) fixed it in a few hours...

If that's it it's a good thing someone else found and fixed it as I wasn't even looking at kdeclarative as a possible bisect candidate...  If it's fixed kdeclarative will certainly be on my list for the (hopefully never, but I /am/ on live-git) next time!
Comment 4 Duncan 2020-12-19 17:19:07 UTC
(In reply to Duncan from comment #3)
> [I see] kdeclarative 81c14c916 "Workaround crash with GL detection and kwin_wayland"
> in the git logs.  That reads like it /might/ be the culprit[.]

Hallelujah!  That, or possibly something else, fixed it, and I'm back on kwin_wayland now!

Resolved/fixed. =:^)

... And I know to check kdeclarative's gitlog and consider it a bisect candidate when kwin_wayland's having problems, now.

(FWIW, rebuilding kdeclarative was complicated by the temporary kio header hiccup that's now fixed as well.)