Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland: use linux-dmabuf instead of wl_drm #351

Open
emersion opened this issue Jan 20, 2024 · 18 comments
Open

wayland: use linux-dmabuf instead of wl_drm #351

emersion opened this issue Jan 20, 2024 · 18 comments
Labels
assigned The issue is assigned to engineer

Comments

@emersion
Copy link

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.

@Flakebi
Copy link
Member

Flakebi commented Jan 25, 2024

Thanks for the heads-up. This is tracked in GPUOpen-Drivers/pal#96.

@CNR0706
Copy link

CNR0706 commented Jan 26, 2024

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.

@jinjianrong jinjianrong added the assigned The issue is assigned to engineer label Mar 25, 2024
@jinjianrong
Copy link
Member

Done in 2024.Q4.1 release

@mikezackles
Copy link

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!

@jinjianrong
Copy link
Member

Sorry, this is a typo. The work is done in 2024.Q2.1 release

@HurricanePootis
Copy link

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

@jinjianrong
Copy link
Member

Thanks for reporting the issue. We will check it further.

@jinjianrong jinjianrong reopened this Jul 1, 2024
@lukelmy
Copy link

lukelmy commented Jul 2, 2024

Hi @HurricanePootis, thanks for your report.
Could you please provide your wayland application or where I can download it?

@HurricanePootis
Copy link

HurricanePootis commented Jul 3, 2024

@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 GPUOpen-Drivers/pal@695337a.

Edit:
Here is vulkaninfo for my system with the AMDVLK driver

@HurricanePootis
Copy link

Any update on this? Kind of inconvenient for amdvlk not to work with modern wayland apps.

@jinjianrong
Copy link
Member

@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

@HurricanePootis
Copy link

HurricanePootis commented Aug 7, 2024

@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.

@HurricanePootis
Copy link

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.

@olm52
Copy link

olm52 commented Sep 12, 2024

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)

@HurricanePootis
Copy link

Sounds like an Arch Issue? I will make a gitlab issue on their tracker.

@olm52
Copy link

olm52 commented Sep 12, 2024

Ok, fine

@lf-
Copy link

lf- commented Oct 4, 2024

@HurricanePootis
Copy link

awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned The issue is assigned to engineer
Projects
None yet
Development

No branches or pull requests

9 participants