| Summary: | KWin Magic Lamp effect causing black screen (X11 + Wayland) | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Brennan Kinney <polarathene-signup> |
| Component: | effects-various | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | nate, polarathene-signup, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 5.25.2 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Brennan Kinney
2022-07-09 06:15:55 UTC
I forgot to add that I did test with the official Breeze theme. --- This bug may only affect VMware guests. There is a related bug report from 2017 that describes this bug more briefly, and later discovers a workaround via an ENV that drops OpenGL in the guest down to 2.1: https://bugs.kde.org/show_bug.cgi?id=376115#c4 > `export SVGA_VGPU10=0` anywhere so it would be applied to all 3D apps. [Referencing Mesa SVGA3D driver docs](https://docs.mesa3d.org/drivers/svga3d.html) (which seems a bit outdated in content) > OpenGL 3.3 support can be disabled by setting the environment variable SVGA_VGPU10=0. You will then have OpenGL 2.1 support. This may be useful to work around application bugs (such as incorrect use of the OpenGL 3.x core profile). --- Setting the ENV into the bash profile and restarting, the graphical failure is no longer reproducible: $ echo "export SVGA_VGPU10=0" >> ~/.bashrc Fedora 36 logs (journalctl -b0) after toggling the compositor on: Jul 09 18:48:17 fedora kwin_x11[1304]: OpenGL vendor string: VMware, Inc. Jul 09 18:48:17 fedora kwin_x11[1304]: OpenGL renderer string: SVGA3D; build: RELEASE; LLVM; Jul 09 18:48:17 fedora kwin_x11[1304]: OpenGL version string: 2.1 Mesa 22.1.3 Jul 09 18:48:17 fedora kwin_x11[1304]: OpenGL shading language version string: 1.20 Jul 09 18:48:17 fedora kwin_x11[1304]: Driver: VMware (SVGA3D) Jul 09 18:48:17 fedora kwin_x11[1304]: GPU class: Unknown Jul 09 18:48:17 fedora kwin_x11[1304]: OpenGL version: 2.1 Jul 09 18:48:17 fedora kwin_x11[1304]: GLSL version: 1.20 Jul 09 18:48:17 fedora kwin_x11[1304]: Mesa version: 22.1.3 Jul 09 18:48:17 fedora kwin_x11[1304]: X server version: 1.20.14 Jul 09 18:48:17 fedora kwin_x11[1304]: Linux kernel version: 5.18.9 Jul 09 18:48:17 fedora kwin_x11[1304]: Requires strict binding: yes Jul 09 18:48:17 fedora kwin_x11[1304]: GLSL shaders: yes Jul 09 18:48:17 fedora kwin_x11[1304]: Texture NPOT support: yes Jul 09 18:48:17 fedora kwin_x11[1304]: Virtual Machine: yes Jul 09 18:48:18 fedora kwin_x11[1304]: QObject::connect(KWin::InputMethod, KWin::EffectsHandlerImpl): invalid nullptr parameter --- It may still be considered a possible bug in the effect. But I am also aware of Chrome based web browsers all having rendering issues unless switching to their Vulkan experimental rendering backend (in chrome://flags), that workaround is not required when OpenGL drivers are reset to 2.1. The fix worked for both openSUSE Tumbleweed and Fedora 36, but NOT for EndeavourOS. It is unclear why, but it may be a timing issue? `inxi -G` and `glxinfo | grep -i opengl` both report OpenGL 2.1, but kwin (X11 and Wayland) is started with OpenGL 4.1, requiring manual `kwin_x11 --replace &` to be run to restart kwin when it will then also use OpenGL 2.1. I have run without systemd startup for EndeavourOS: kwriteconfig5 --file startkderc --group General --key systemdBoot false qdbus org.kde.KWin /KWin supportInformation | grep -i opengl This did not help and still required manually restarting kwin to switch OpenGL used from 4.1 to 2.1. The ENV set in bashrc is perhaps applied too late for this distro with kwin initializing earlier? I have created a 3D accel VM guest with a different hypervisor (QEMU-KVM), and cannot reproduce the Magic Lamp effect bug described here. It appears to be specific to the VMware GPU driver SVGA3D/vmwgfx. Mesa has a related issue about the Magic Lamp effect bug with SVGA3D originally reported in 2017 here: https://gitlab.freedesktop.org/mesa/mesa/-/issues/889 I'll leave this bug report open, if a developer wants to assess if there is a bug in the Magic Lamp effect, or close it as a driver bug. --- If at all useful, the output of `glxinfo | grep -i opengl` reports: For virgl: - OpenGL core profile version string: 4.3 (same as reported by `inxi -G`) - OpenGL version string: 3.1 (which kwin uses) - OpenGL ES: 3.2 For SVGA3D: - OpenGL core profile version string: 4.1 - OpenGL version string: 4.1 (notes that it's a Compatibility profile) - OpenGL ES: 3.0 For SVGA3D (with ENV `SVGA_VGPU10=0` which avoids the bug): - Not Present => OpenGL core profile version string - OpenGL version string: 2.1 - OpenGL ES: 2.0 |