Open emersion opened 10 months ago
Thanks for the heads-up. This is tracked in https://github.com/GPUOpen-Drivers/pal/issues/96.
Would implementing linux-dmabuf also allow Tearing on Wayland? Or is this unrelated?
Not super experienced with this. Sorry if that's a dumb question.
Done in 2024.Q4.1 release
In case anyone else comes across this and does a double-take, it's in the 2024.Q2.1 release notes, so I'm guessing Q4 was a typo. Anyway, thanks!
Sorry, this is a typo. The work is done in 2024.Q2.1 release
I am running AMDVLK 2024.Q2.3 and I am still getting the following error whenever I try to run a wayland application using AMDVLK:
wl_drm#44: error 0: wl_drm.create_prime_buffer is not implemented
Thanks for reporting the issue. We will check it further.
Hi @HurricanePootis, thanks for your report. Could you please provide your wayland application or where I can download it?
@lukelmy
I am running vkcube-wayland
, which is apart of the Vulkan-Tools repository.
Also, for more information, I am running the amdvlk
driver with the following build process:
cmake -H. -Bbuilds/Release64 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_WAYLAND_SUPPORT=On \
-G Ninja
And, according to the default.xml
file in the tar soure code, it is built with PAL commit https://github.com/GPUOpen-Drivers/pal/commit/695337aa8131913d883ff15787cd75f6fcb11229.
Edit: Here is vulkaninfo for my system with the AMDVLK driver
Any update on this? Kind of inconvenient for amdvlk not to work with modern wayland apps.
@HurricanePootis we can't reproduce the issue locally. But we do notice an issue that may be related with yours. A fix is under implementation
@jinjianrong Good to know. If you are curious, I installed amdvlk through archlinux and here is the PKBUILD build script they use to build amdvlk for arch.
I am looking at the files pulled by the archlinux amdvlk
package during its build process of 2024.Q2.3, and at pal/src/core/os/amdgpu/wayland/waylandWindowSystem.h
, zwp_linux_dmbauf
does show up and pal/src/core/os/wayland/mesa/
does exist.
So then, I don't know why even though these files are present at build time, the ensuing amdvlk driver is trying to use wl_drm.
Same problem here with up to date Archlinux using
ENABLE_HDR_WSI=1 mpv --vo=gpu-next --target-colorspace-hint --gpu-api=vulkan --gpu-context=waylandvk '/home/audiolinux/Downloads/Temp/Life Untouched 4K Demo.mp4'
[audiolinux@archlinux ~]$ ENABLE_HDR_WSI=1 mpv --vo=gpu-next --target-colorspace-hint --gpu-api=vulkan --gpu-context=waylandvk '/home/audiolinux/Downloads/Temp/Life Untouched 4K Demo.mp4' (+) Video --vid=1 (*) (hevc 3840x2160 59.940fps) (+) Audio --aid=1 (*) (aac 2ch 48000Hz) [HDR Layer] Created HDR surface AO: [pipewire] 48000Hz stereo 2ch floatp VO: [gpu-next] 3840x2160 yuv420p10 [HDR Layer] Creating swapchain for id: 5 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR wl_drm#56: error 0: wl_drm.create_prime_buffer is not implemented [vo/gpu-next/wayland] Error occurred on the display fd Exiting... (Quit)
Sounds like an Arch Issue? I will make a gitlab issue on their tracker.
Ok, fine
awesome
After a while, I still think this is an amdvlk issue. Looks like both NixOS and Arch Linux could not get amdvlk to work under wayland rn
@HurricanePootis we had a fix in pal dev branch: https://github.com/GPUOpen-Drivers/pal/commit/758683bc4c64d56287a1beb8384d19d94251200f https://github.com/GPUOpen-Drivers/pal/commit/7b182c9310b3ed8eb98f2239c36a008ffb3eea3c
Could you help check if this fixes the issue?
@jinjianrong I just tested out vkcube-wayland
and an SDL2 game, and was able to run them with Wayland with AMDVLK 2024.Q4.1 with these two patches applied, thank you so much!
amdvlk relies on the
wl_drm
Wayland protocol to find the DRM device used by the compositor. However,wl_drm
is a Mesa-private, legacy protocol, and compositors are starting to drop support. amdvlk should use the standard linux-dmabuf protocol from wayland-protocols instead.