Bug 474924 - Kwin wayland crashes when dynamically changing from software decode to hw code in steam -pipewire-dmabuf
Summary: Kwin wayland crashes when dynamically changing from software decode to hw cod...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 5.27.8
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-09-27 02:46 UTC by idoitprone
Modified: 2024-06-12 06:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:
monkeyboyted: Wayland+


Attachments
coredumpctl dump 2> (10.02 KB, text/plain)
2023-09-27 02:51 UTC, idoitprone
Details
non steam game launch settings. (42.92 KB, image/png)
2023-09-27 02:53 UTC, idoitprone
Details
remote steam hw acceleration disabled. (114.53 KB, image/png)
2023-09-27 02:55 UTC, idoitprone
Details
journalctl -xe -b -1 (244.16 KB, text/plain)
2023-09-27 03:07 UTC, idoitprone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description idoitprone 2023-09-27 02:46:41 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Start steam with `steam -pipewire-dmabuf`
2. Setup steam link with a pair client and host
2. Turn off hardware acceleration on the host
3. Setup a non steam game with 
target /usr/bin/gamescope 
Run in $HOME
application: /usr/share/code/code ## I only tested vscode at the moment.
4. Go to the client steam application and start the steam
5. Go to the host settings and turn on hardware acceleration
6. Kwin crashes

OBSERVED RESULT
Software remote works but hardware acceleration crashes

EXPECTED RESULT
No crash. At least fail gracefully.


    Unit: user@1000.service
     User Unit: plasma-kwin_wayland.service
         Slice: user-1000.slice
     Owner UID: 1000 (doof)
       Boot ID: fa2904d835574194aa15e8ed816493ad
    Machine ID: 5011abe9c25e4cad8dc58ec9dc82abe7
      Hostname: steamdeck.lan
       Storage: /var/lib/systemd/coredump/core.kwin_wayland.1000.fa2904d835574194aa15e8ed816493ad.22146.1695780986000000.zst (present)
  Size on Disk: 5.7M
       Message: Process 22146 (kwin_wayland) of user 1000 dumped core.
                
                Stack trace of thread 22146:
                #0  0x00007f3dffc91e0c __pthread_kill_implementation (libc.so.6 + 0x91e0c)
                #1  0x00007f3dffc3f0e6 __GI_raise (libc.so.6 + 0x3f0e6)
                #2  0x00007f3dffc268d7 __GI_abort (libc.so.6 + 0x268d7)
                #3  0x00007f3e0218b1ba egl_provider_resolver (libepoxy.so.0 + 0xc11ba)
                #4  0x00007f3e0218e78a epoxy_eglDestroyImageKHR_resolver (libepoxy.so.0 + 0xc478a)
                #5  0x00007f3e02c25587 _ZN4KWin15EglDmabufBuffer12removeImagesEv (libkwin.so.5 + 0x425587)
                #6  0x00007f3e02c27309 _ZN4KWin9EglDmabufD1Ev (libkwin.so.5 + 0x427309)
                #7  0x00007f3e02c2877c _ZN4KWin18AbstractEglBackendD2Ev (libkwin.so.5 + 0x42877c)
                #8  0x00007f3e02b6f8e9 _ZN4KWin13EglGbmBackendD0Ev (libkwin.so.5 + 0x36f8e9)
                #9  0x00007f3e029c5eb7 _ZN4KWin10Compositor4stopEv (libkwin.so.5 + 0x1c5eb7)
                #10 0x00007f3e029be903 _ZN4KWin10Compositor12reinitializeEv (libkwin.so.5 + 0x1be903)
                #11 0x00007f3e01125812 _ZN9QtPrivate15QSlotObjectBase4callEP7QObjectPPv (libQt5Core.so.5 + 0x325812)
                #12 0x00007f3e02b0c7ee _ZN4KWin9Workspace15slotReconfigureEv (libkwin.so.5 + 0x30c7ee)
                #13 0x00007f3e01125812 _ZN9QtPrivate15QSlotObjectBase4callEP7QObjectPPv (libQt5Core.so.5 + 0x325812)
                #14 0x00007f3e011295ea _ZN6QTimer7timeoutENS_14QPrivateSignalE (libQt5Core.so.5 + 0x3295ea)
                #15 0x00007f3e0111922b _ZN7QObject5eventEP6QEvent (libQt5Core.so.5 + 0x31922b)
                #16 0x00007f3e005a519e _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x1a519e)
                #17 0x00007f3e010ed568 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x2ed568)
                #18 0x00007f3e01145899 _ZN14QTimerInfoList14activateTimersEv (libQt5Core.so.5 + 0x345899)
                #19 0x00007f3e01143d40 _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x343d40)
                #20 0x000055b0b79f9a5d _ZN23QUnixEventDispatcherQPA13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (kwin_wayland + 0x136a5d)
                #21 0x00007f3e010ebffb _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2ebffb)
                #22 0x00007f3e010f4490 _ZN16QCoreApplication4execEv (libQt5Core.so.5 + 0x2f4490)
                #23 0x000055b0b791cf6a main (kwin_wayland + 0x59f6a)
                #24 0x00007f3dffc281b0 __libc_start_call_main (libc.so.6 + 0x281b0)
                #25 0x00007f3dffc28279 __libc_start_main_impl (libc.so.6 + 0x28279)
                #26 0x000055b0b791ea65 _start (kwin_wayland + 0x5ba65)


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:   steamdeck.lan 6.5.0-7.gb5edcad-default 
(available in About System)
KDE Plasma Version: 5.27.8 / wayland
KDE Frameworks Version: 5.110.0
Qt Version: 6.5.0-7.gb5edcad-default (64-bit)

lsb_release -a
LSB Version:    n/a
Distributor ID: openSUSE
Description:    openSUSE Tumbleweed
Release:        20230922
Codename:       n/a

Repository     : openSUSE:Tumbleweed
Name           : pipewire
Version        : 0.3.80-1.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 76,3 KiB
Installed      : Yes
Status         : up-to-date
Source package : pipewire-0.3.80-1.1.src



Trying display: wayland
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.19 (libva 2.19.0)
vainfo: Driver version: Mesa Gallium driver 23.1.7 for AMD Custom GPU 0405 (vangogh, LLVM 16.0.6, DRM 3.54, 6.5.0-7.gb5edcad-default)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Information for package gamescope:
----------------------------------
Repository     : openSUSE:Tumbleweed
Name           : gamescope
Version        : 3.12.5+git0.a8471d8-2.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 1,5 MiB
Installed      : Yes
Status         : up-to-date
Source package : gamescope-3.12.5+git0.a8471d8-2.1.src
Upstream URL   : https://github.com/Plagman/gamescope

doof@steamdeck:~> zypper info mesa
Loading repository data...
Reading installed packages...


Information for package Mesa:
-----------------------------
Repository     : packman
Name           : Mesa
Version        : 23.1.7-1699.358.pm.3
Arch           : x86_64
Vendor         : http://packman.links2linux.de
Installed Size : 9,4 KiB
Installed      : Yes
Status         : up-to-date
Source package : Mesa-23.1.7-1699.358.pm.3.src
Upstream URL   : https://www.mesa3d.org


ADDITIONAL INFORMATION
Steam Deck Host/Intel OSX client

I only tested vscode. I think you can reproduce this crash with many other applications
Comment 1 idoitprone 2023-09-27 02:51:52 UTC
Created attachment 161897 [details]
coredumpctl dump 2>

The original coredump is a 127 MB file. I do not know how to upload it to this site. I uploaded the bt which displayed in stderr.
Comment 2 idoitprone 2023-09-27 02:53:51 UTC
Created attachment 161898 [details]
non steam game launch settings.

tested settings
Comment 3 idoitprone 2023-09-27 02:55:50 UTC
Created attachment 161899 [details]
remote steam hw acceleration disabled.

You will need to enabled hw during remote play to crash dmabuf
Comment 4 idoitprone 2023-09-27 02:58:51 UTC
Sep 26 19:22:12 steamdeck.lan kded5[5970]: 3
Sep 26 19:22:12 steamdeck.lan kded5[5970]: 2
Sep 26 19:22:12 steamdeck.lan dbus-daemon[2081]: [session uid=1000 pid=2081] Activating via systemd: service name='org.bluez.obex' unit='dbus-org.blue>
Sep 26 19:22:12 steamdeck.lan dbus-daemon[2081]: [session uid=1000 pid=2081] Activation via systemd failed for unit 'dbus-org.bluez.obex.service': Uni>
Sep 26 19:22:12 steamdeck.lan kded5[5970]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supporte>
Sep 26 19:22:12 steamdeck.lan plasmashell[5805]: Getting auto rotate failed: "org.freedesktop.DBus.Error.UnknownMethod" "No such method 'getAutoRotate>
Sep 26 19:22:12 steamdeck.lan kded5[5970]: kf.bluezqt: PendingCall Error: "Unit dbus-org.bluez.obex.service not found."
Sep 26 19:22:12 steamdeck.lan kded5[5970]: Registering ":1.1282/StatusNotifierItem" to system tray
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Reloading configuration
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Loaded 12 settings from /home/doof/.config/xsettingsd/xsettingsd.conf
Sep 26 19:22:12 steamdeck.lan kcminit[6028]: QSocketNotifier: Can only be used with threads started with QThread
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Reloading configuration
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Loaded 12 settings from /home/doof/.config/xsettingsd/xsettingsd.conf
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Reloading configuration
Sep 26 19:22:12 steamdeck.lan org.kde.kded5[5992]: xsettingsd: Loaded 12 settings from /home/doof/.config/xsettingsd/xsettingsd.conf
Sep 26 19:22:12 steamdeck.lan plasmashell[5805]: Error: DataSource type expected
Sep 26 19:22:12 steamdeck.lan plasmashell[5805]: file:///usr/lib64/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding lo>
Sep 26 19:22:12 steamdeck.lan kwin_wayland[5739]: kwin_core: Could not find window with uuid "{bb69502e-b2c2-4809-bdab-218a98b95f7c}"
Sep 26 19:22:12 steamdeck.lan kwin_wayland[5739]: kwin_core: Could not find window with uuid "{bb69502e-b2c2-4809-bdab-218a98b95f7c}"
Sep 26 19:22:12 steamdeck.lan kcminit[6028]: Initializing  "/usr/lib64/qt5/plugins/plasma/kcms/systemsettings/kcm_fonts.so"
Sep 26 19:22:12 steamdeck.lan kwin_wayland_wrapper[5739]: No provider of eglDestroyImageKHR found.  Requires one of:
Sep 26 19:22:12 steamdeck.lan kwin_wayland_wrapper[5739]:     EGL_KHR_image
Sep 26 19:22:12 steamdeck.lan kwin_wayland_wrapper[5739]:     EGL_KHR_image_base
Sep 26 19:22:12 steamdeck.lan kwin_wayland_wrapper[5739]:     EGL 15
Sep 26 19:22:12 steamdeck.lan systemd[1]: Started Process Core Dump (PID 6047/UID 0).
Sep 26 19:22:13 steamdeck.lan systemd-coredump[6048]: [🡕] Process 5739 (kwin_wayland) of user 1000 dumped core.
                                                      
                                                      Stack trace of thread 5739:
                                                      #0  0x00007fe22a291e0c __pthread_kill_implementation (libc.so.6 + 0x91e0c)
                                                      #1  0x00007fe22a23f0e6 __GI_raise (libc.so.6 + 0x3f0e6)
                                                      #2  0x00007fe22a2268d7 __GI_abort (libc.so.6 + 0x268d7)
                                                      #3  0x00007fe22c18b1ba egl_provider_resolver (libepoxy.so
Comment 5 idoitprone 2023-09-27 03:07:39 UTC
Created attachment 161900 [details]
journalctl -xe -b -1

This journalctl should contain the crash within the log
Comment 6 idoitprone 2023-09-27 03:11:45 UTC
I use plasma5 mobile. I do not think it matters


Information for package plasma5-mobile:
---------------------------------------
Repository     : openSUSE:Tumbleweed
Name           : plasma5-mobile
Version        : 5.27.8-1.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 2,3 MiB
Installed      : Yes
Status         : up-to-date
Source package : plasma5-mobile-5.27.8-1.1.src
Upstream URL   : http://www.kde.org/
Summary        : Plasma Mobile
Description    : 
    Plasma shell and components targeted for phones.


#  | Alias                                | Name                                                | Enabled | GPG Check | Refresh | URI
---+--------------------------------------+-----------------------------------------------------+---------+-----------+---------+-----------------------------------------------------------------------------------------------------
 1 | code                                 | Visual Studio Code                                  | Yes     | (r ) Yes  | No      | https://packages.microsoft.com/yumrepos/vscode
 2 | home_andresbs_plasma-mobile          | Plasma Mobile Apps (openSUSE_Tumbleweed)            | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile/openSUSE_Tumbleweed/
 3 | home_andresbs_plasma-mobile_extra    | Additional Plasma Mobile apps (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile:/extra/openSUSE_Tumbleweed/
 4 | home_andresbs_plasma-mobile_gear     | KDE Plasma Mobile Gear (openSUSE_Tumbleweed)        | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile:/gear/openSUSE_Tumbleweed/
 5 | home_andresbs_pure-maps              | Pure Maps (openSUSE_Tumbleweed)                     | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/andresbs:/pure-maps/openSUSE_Tumbleweed/
 6 | home_dmitry-s                        | home:dmitry-s (openSUSE_Tumbleweed)                 | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/dmitry-s/openSUSE_Tumbleweed/
 8 | https-download.opensuse.org-5ef024b2 | mozilla                                             | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/mozilla/openSUSE_Tumbleweed/
 7 | https-download.opensuse.org-179d9981 | openSUSE:Tumbleweed                                 | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/tumbleweed/repo/oss/
 9 | https-download.opensuse.org-efbadd6c | openSUSE:Tumbleweed                                 | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/
10 | kernel-head                          | kernel-head                                         | No      | ----      | ----    | https://download.opensuse.org/repositories/Kernel:/HEAD/standard
11 | packman                              | packman                                             | Yes     | (r ) Yes  | Yes     | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/
12 | repo-debug                           | openSUSE-Tumbleweed-Debug                           | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/debug/tumbleweed/repo/oss/
13 | repo-non-oss                         | openSUSE-Tumbleweed-Non-Oss                         | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/non-oss/
14 | repo-oss                             | openSUSE-Tumbleweed-Oss                             | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/oss/
15 | repo-source                          | openSUSE-Tumbleweed-Source                          | No      | ----      | ----    | http://download.opensuse.org/source/tumbleweed/repo/oss/
16 | repo-update                          | openSUSE-Tumbleweed-Update                          | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/tumbleweed/
17 | snappy                               | snappy                                              | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed
Comment 7 idoitprone 2023-09-27 03:30:56 UTC
4. Go to the client steam application and start the steam

Correction

4. Go to the client steam application and start the stream. Stream the game
Comment 8 idoitprone 2023-09-27 03:34:35 UTC
This bug is simple. Steam will crash kwin when switch from software decode to hw decode during a dmabuf-pipewire stream. Kwin will be killed, you can start krunner and start konsole to retrieve the longs. Sometimes, kwin will restart itself.

This bug is repeatable. I did not test other applications nor tested hw acceleration to software acceleration.
Comment 9 Vlad Zahorodnii 2024-06-12 06:53:28 UTC
This should be fixed in 6.0