Bug 487777 - kwin_wayland 6.0.90.1 crashed repeatedly when starting in VMs using the virgl driver resulting in a black screen
Summary: kwin_wayland 6.0.90.1 crashed repeatedly when starting in VMs using the virgl...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git-stable-Plasma/6.1
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-05-30 01:03 UTC by Matt Fagnani
Modified: 2024-05-31 12:42 UTC (History)
1 user (show)

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


Attachments
screenshot of kwin_wayland trace when starting in VM using the virgl driver (87.59 KB, image/png)
2024-05-30 01:03 UTC, Matt Fagnani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Fagnani 2024-05-30 01:03:56 UTC
Created attachment 169964 [details]
screenshot of kwin_wayland trace when starting in VM using the virgl driver

SUMMARY

I booted the Fedora Rawhide/41 KDE Plasma live image Fedora-KDE-Live-x86_64-Rawhide-20240529.n.0.iso in a QEMU/KVM VM using GNOME Boxes with 3D acceleration enabled using the virgl driver from mesa 24.1.0. The screen remained black with just a blinking text cursor at the top left. I switched to VT2. The journal showed kwin_wayland 6.0.90.1 crashed repeatedly when starting due to errors including.

kwin_wayland_wrapper[1788]: No provider of glBufferStorage found. Requires one of:
kwin_wayland_wrapper[1788]:    Desktop OpenGL 4.4
kwin_wayland_wrapper[1788]:    GL_ARB_buffer_storage
kwin_wayland_wrapper[1788]:    GL_EXT_buffer_storage

The journal above that showed virgl had OpenGL 4.3 support. I guess virgl doesn't support OpenGL 4,4,  GL_ARB_buffer_storage, or GL_EXT_buffer_storage.

I'm attaching a trace of the first of ten such kwin_wayland crashes as a screenshot since I'm unsure how to copy or send text from bash in a VT in a VM to the host. The crashes were aborts in gl_provider_resolver in libepoxy, but they involved various kwin functions below that. Various other Plasma processes crashed after that. The crashes happened on 2/2 boots. The problem is likely that virgl doesn't meet the requirements of kwin 6.0.90, but I'm reporting to kwin since it prevented Plasma from starting.

STEPS TO REPRODUCE
1. Boot a Fedora 40 KDE Plasma installation updated to 2024-5-29 with updates-testing enabled
2. Log in to Plasma 6.0.5 on Wayland
3. Start Konsole
4. Install GNOME Boxes if it isn't already with sudo dnf install gnome-boxes
5. Download Fedora-KDE-Live-x86_64-Rawhide-20240529.n.0.iso from https://koji.fedoraproject.org/koji/buildinfo?buildID=2458143
6. Start GNOME Boxes
7. Boot Fedora-KDE-Live-x86_64-Rawhide-20240529.n.0.iso in a GNOME Boxes QEMU/KVM VM with 3 GiB RAM, UEFI enabled, and 3D acceleration enabled using the virgl driver

OBSERVED RESULT
kwin_wayland 6.0.90.1 crashed repeatedly when starting in VMs using the virgl driver resulting in a black screen

EXPECTED RESULT
No crashes would happen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Rawhide
(available in About System)
KDE Plasma Version: 6.0.90
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION

This problem didn't happen when booting Fedora-KDE-Live-x86_64-Rawhide-20240529.n.0.iso in a GNOME Boxes QEMU/KVM VM with 3 GiB RAM, UEFI enabled, and 3D acceleration disabled using the llvmpipe driver.
Comment 1 Bug Janitor Service 2024-05-31 00:38:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5803
Comment 2 Zamundaaa 2024-05-31 12:19:47 UTC
Git commit f4f0660dbb50bcb66b37b28f3080c2989257e669 by Xaver Hugl.
Committed on 31/05/2024 at 12:11.
Pushed by zamundaaa into branch 'master'.

opengl/openglcontext: correct the check for buffer storage support

M  +1    -1    src/opengl/openglcontext.cpp

https://invent.kde.org/plasma/kwin/-/commit/f4f0660dbb50bcb66b37b28f3080c2989257e669
Comment 3 Zamundaaa 2024-05-31 12:42:32 UTC
Git commit 049d9db87924d104956cfd1c28b311f4d6c9ef8e by Xaver Hugl.
Committed on 31/05/2024 at 12:28.
Pushed by zamundaaa into branch 'Plasma/6.1'.

opengl/openglcontext: correct the check for buffer storage support
(cherry picked from commit f4f0660dbb50bcb66b37b28f3080c2989257e669)

M  +1    -1    src/opengl/openglcontext.cpp

https://invent.kde.org/plasma/kwin/-/commit/049d9db87924d104956cfd1c28b311f4d6c9ef8e