Bug 441253 - kwin_wayland crashes on start in KWin::DrmPlane::formats()
Summary: kwin_wayland crashes on start in KWin::DrmPlane::formats()
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 441578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-20 17:13 UTC by Bharadwaj Raju
Modified: 2021-08-27 11:57 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
backtrace (5.41 KB, text/vnd.kde.kcrash-report)
2021-08-20 17:13 UTC, Bharadwaj Raju
Details
startplasma-wayland log (2.73 KB, text/x-log)
2021-08-25 09:47 UTC, Bharadwaj Raju
Details
eglinfo output (3.79 KB, text/plain)
2021-08-26 16:14 UTC, Bharadwaj Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bharadwaj Raju 2021-08-20 17:13:20 UTC
Created attachment 140881 [details]
backtrace

SUMMARY
kwin_wayland crashes on start on Neon Unstable. Backtrace attached


SOFTWARE/OS VERSIONS
Kernel: Linux neon 5.11.0-27-generic #29~20.04.1-Ubuntu SMP 
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.3

kwin-wayland version: 5.22.4+p20.04+tunstable+git20210820.1352-0
kwin-wayland-backend-drm version: 5.22.4+p20.04+tunstable+git20210820.1352-0


HARDWARE
GPU: Mesa DRI Intel G41
Comment 1 Bharadwaj Raju 2021-08-20 18:52:43 UTC
Same thing happens with Kernel 5.8
Comment 2 Bharadwaj Raju 2021-08-25 09:47:34 UTC
Created attachment 141030 [details]
startplasma-wayland log

Output of startplasma-wayland. Same output is repeated a number of times before finally exiting.
Comment 3 Zamundaaa 2021-08-26 15:49:28 UTC
> Choosing EGL config did not return a suitable config. There were 5 configs.
This sounds like a driver bug if it worked with older versions of KWin. It probably returns the wrong bit count and doesn't support GBM_BO_FORMAT_XRGB8888

Can you try again with https://invent.kde.org/plasma/kwin/-/merge_requests/1314, or simply attach the output of eglinfo? The output of drm_info might be useful, too.
Comment 4 Vlad Zahorodnii 2021-08-26 16:02:04 UTC
*** Bug 441578 has been marked as a duplicate of this bug. ***
Comment 5 Zamundaaa 2021-08-26 16:10:10 UTC
Git commit ef48c247e673b9bd2a4e9cdcb50602c33a995e21 by Xaver Hugl.
Committed on 26/08/2021 at 15:38.
Pushed by zamundaaa into branch 'master'.

platforms/drm: re-add some logging for egl configs

But only print it when KWin can't find a fitting config

M  +12   -2    src/plugins/platforms/drm/egl_gbm_backend.cpp

https://invent.kde.org/plasma/kwin/commit/ef48c247e673b9bd2a4e9cdcb50602c33a995e21
Comment 6 Bharadwaj Raju 2021-08-26 16:14:58 UTC
Created attachment 141070 [details]
eglinfo output

(In reply to Zamundaaa from comment #3)
> > Choosing EGL config did not return a suitable config. There were 5 configs.
> This sounds like a driver bug if it worked with older versions of KWin. It
> probably returns the wrong bit count and doesn't support
> GBM_BO_FORMAT_XRGB8888
> 
> Can you try again with
> https://invent.kde.org/plasma/kwin/-/merge_requests/1314, or simply attach
> the output of eglinfo? The output of drm_info might be useful, too.

Attached output of eglinfo.
Comment 7 Zamundaaa 2021-08-27 11:50:19 UTC
Git commit 092660613a56443c49c7e0bba06348e5318574c5 by Xaver Hugl.
Committed on 27/08/2021 at 11:50.
Pushed by zamundaaa into branch 'master'.

platforms/drm: fix legacy mode

M  +12   -2    src/plugins/platforms/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/commit/092660613a56443c49c7e0bba06348e5318574c5
Comment 8 Zamundaaa 2021-08-27 11:57:06 UTC
Git commit d6de38c1d66bfd96426b82003e01978f1e585823 by Xaver Hugl.
Committed on 27/08/2021 at 11:56.
Pushed by zamundaaa into branch 'master'.

platforms/drm: use drm formats instead of gbm formats

There's no need to guard the code, gbm and drm format definitions
are the same. Using GBM_BO_FORMAT_* even caused bugs, as that is
an enum and not a proper format identifier.

M  +4    -3    src/plugins/platforms/drm/drm_gpu.cpp
M  +1    -1    src/plugins/platforms/drm/drm_gpu.h
M  +3    -8    src/plugins/platforms/drm/drm_object_plane.cpp
M  +1    -1    src/plugins/platforms/drm/egl_gbm_backend.cpp
M  +1    -1    src/plugins/platforms/drm/gbm_dmabuf.cpp

https://invent.kde.org/plasma/kwin/commit/d6de38c1d66bfd96426b82003e01978f1e585823