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

Framebuffer capture with VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME does not work #798

Open
neon12345 opened this issue Feb 10, 2024 · 2 comments

Comments

@neon12345
Copy link

Problem:
Framebuffer capture with VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME does not work. I have tried this with a simple implementation, but ffmpeg is a better way to reproduce the issue.
The captured frames have some parts of the real picture with pixel soup on top and parts of readable text from previous bash sessions and other stuff.
It seems a wrong part of memory is used as the framebuffer, which also leaks information from memory.
I don't know if this is a bug or unsupported usage of libva, but it was working in an older version of Ubuntu.

Command used:
ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4 (with replaced crtc_id)

Hardware:
Intel Iris Xe Graphics (TigerLake-LP GT2) laptop

OS versions with different versions of the software stack (including kernel):

Debian 12 bookworm fresh install                not working
Ubuntu 23.10 upcoming LTS fresh install         not working
An older Ubuntu LTS live dvd    (with XOrg instead of Xwayland and the oldest software versions)  working

all with intel-media-va-driver-non-free

@neon12345
Copy link
Author

It seems the problem is due to the unsupported drm format modifier I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC. I changed my implementation to VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and added MUTTER_DEBUG_USE_KMS_MODIFIERS=0 to /etc/environment. This forced gnome to use the working I915_FORMAT_MOD_X_TILED modifier.

@XinfengZhang
Copy link
Contributor

X tile should also has some potential problem, should be Y or 4 tile.

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

No branches or pull requests

2 participants