Bug 498542 - Kwin wayland and Mesa 24.3
Summary: Kwin wayland and Mesa 24.3
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-11 23:05 UTC by Alexandre Pereira
Modified: 2025-03-14 07:42 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Pereira 2025-01-11 23:05:41 UTC
SUMMARY

Since the release of Mesa 24.3, Kwin wayland has issues with chromium/electron wayland gpu acceleration, with an amdgpu card.
It works fine in Kwin if I downgrade Mesa to 24.2.x. In Hyprland, it works fine with both Mesa 24.2 and 24.3.

In Mesa 24.2, chromium/electron apps have their GPU acceleration enabled, and I test it on a 8K video that plays smoothly and without using much CPU.
With Mesa 24.3, all the GPU acceleration is disabled (on chrome://gpu) and 8K video barely plays, using 100% CPU

On Hyprland, everything is fine with either 24.2 or 24.3.


STEPS TO REPRODUCE
1. Launch an chromium/electron app with the params listed bellow
2. Go to chrome://gpu or try to play a video
3. Check CPU/GPU usage

OBSERVED RESULT
GPU acceleration is disabled/not working

EXPECTED RESULT
GPU acceleration should work on Mesa 24.3, as it does on Mesa 24.2 and with Mesa 24.3 in Hyprland


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

This issue happens with either plasma 6.2 or the new beta for 6.3.

The params I use to launch the chromium/electron apps:

```
export CHROMEPARAMS=" \
--ignore-gpu-blocklist \
--enable-gpu-rasterization \
--enable-oop-rasterization \
--enable-accelerated-2d-canvas \
--enable-quic \
--enable-smooth-scrolling \
--disable-features=Vulkan,DefaultANGLEVulkan,VulkanFromANGLE \
--enable-features=AcceleratedVideoEncoder,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiIgnoreDriverChe
cks,WaylandWindowDecorations,UseMultiPlaneFormatForHardwareVideo,FluentOverlayScrollbar \
--gtk-version=4 \
--disable-gtk-ime \
--wayland-text-input-version=3 \
--enable-wayland-ime \
--ozone-platform-hint=wayland \
--ozone-platform=wayland \
--password-store=basic \
--touch-events=disabled \
--use-angle=gl \
--use-gl=angle \
"

export GDK_BACKEND=wayland
export QT_QPA_PLATFORM=wayland

export GTK_THEME=Breeze
export LIBVA_DRIVER_NAME=radeonsi
```

Thanks!
Comment 1 Alexandre Pereira 2025-01-12 17:48:00 UTC
More info: log messages, for example, on brave:

```
Log Messages
============
[23791:23791:0112/174606.168996:WARNING:sandbox_linux.cc(430)] : InitializeSandbox() called with multiple threads in process gpu-process.
[23791:23791:0112/174606.169403:WARNING:viz_main_impl.cc(85)] : VizNullHypothesis is disabled (not a warning)
[23791:23791:0112/174606.303394:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[23791:23791:0112/174606.303460:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[23791:23791:0112/174606.303478:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[23791:23791:0112/174606.303500:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[23791:23791:0112/174606.303516:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[23791:23791:0112/174606.303531:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[23791:23791:0112/174606.303549:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[23791:23791:0112/174606.303566:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[23791:23791:0112/174606.303581:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[23791:23791:0112/174606.303605:ERROR:shared_image_manager.cc(250)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[23791:23791:0112/174606.303661:ERROR:gpu_service_impl.cc(1154)] : Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
GpuProcessHost: The GPU process exited with code 8704.
[24046:24046:0112/174606.392154:WARNING:sandbox_linux.cc(430)] : InitializeSandbox() called with multiple threads in process gpu-process.
[24046:24046:0112/174606.392642:WARNING:viz_main_impl.cc(85)] : VizNullHypothesis is disabled (not a warning)
[24046:24046:0112/174606.447349:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24046:24046:0112/174606.447405:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24046:24046:0112/174606.447425:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24046:24046:0112/174606.447452:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24046:24046:0112/174606.447470:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24046:24046:0112/174606.447487:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24046:24046:0112/174606.447506:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24046:24046:0112/174606.447526:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24046:24046:0112/174606.447543:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24046:24046:0112/174606.458302:ERROR:shared_image_manager.cc(250)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
GpuProcessHost: The GPU process exited with code 8704.
[24140:24140:0112/174606.531572:WARNING:sandbox_linux.cc(430)] : InitializeSandbox() called with multiple threads in process gpu-process.
[24140:24140:0112/174606.532043:WARNING:viz_main_impl.cc(85)] : VizNullHypothesis is disabled (not a warning)
[24140:24140:0112/174606.560952:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24140:24140:0112/174606.561036:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24140:24140:0112/174606.561063:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24140:24140:0112/174606.561092:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24140:24140:0112/174606.561113:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24140:24140:0112/174606.561140:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24140:24140:0112/174606.561166:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24140:24140:0112/174606.561190:ERROR:gbm_pixmap_wayland.cc(82)] : Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24140:24140:0112/174606.561213:ERROR:shared_image_factory.cc(880)] : CreateSharedImage: could not create backing.
[24140:24140:0112/174606.561259:ERROR:shared_image_manager.cc(250)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
GpuProcessHost: The GPU process exited with code 8704.
[24190:24190:0112/174606.625186:WARNING:sandbox_linux.cc(430)] : InitializeSandbox() called with multiple threads in process gpu-process.
[24190:24190:0112/174606.625601:WARNING:viz_main_impl.cc(85)] : VizNullHypothesis is disabled (not a warning)
[24190:24190:0112/174608.413098:ERROR:gl_display.cc(497)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
```
Comment 2 Zamundaaa 2025-01-29 13:54:36 UTC
If an older Mesa version worked, then this will be a regression in Mesa - things still working in Hyprland doesn't mean that it's a KWin bug, as they do a bunch of things differently and support a different feature set.
Please report it here: https://gitlab.freedesktop.org/mesa/mesa/-/issues
Comment 3 Alexandre Pereira 2025-02-09 04:28:16 UTC
Sorry for taking so much time, but reported the bug here: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12595

Thanks!