[BUG] vaapi_copy_drm_planes_to_video_surface failed, falling back to opengl copy
Opened this issue · 12 comments
Describe the bug
After updating gpu-screen-recorder all rcordings only record the mouse pointer movement, but no image. Sound is working fine. (Probably due to changes on 2024-09-16, since it worked fine before)
To Reproduce
Using the GUI, mostly default setting:
- Frame rate: 60fps
- Color range: limited
- Quality: Very high
- Video codec: Auto(H264)
- Audio codec: Opus
- Frame rate mode: auto
- record cursor: true (if 'false' is chosen: the video is completely blank)
cli command gpu-screen-recorder -w screen -f 60 -a default_output -o ~/Videos/test_video.mp4
gives the same result (see attached video below)
Desktop (please complete the following information):
- Wayland
- Desktop environment/Window Manager: Gnome
- Distro: Manjaro
- GPU:
Radeon 7800XTRadeon RX 7900 XT - Version (aur): v4.1.9 (gpu-screen-recorder-git r800.95e1971-1)
Additional context
Add any other context about the problem here, such as terminal output of running GPU Screen Recorder:
console is being spammed with
gsr error: vaapi_copy_drm_planes_to_video_surface: vaCreateSurfaces failed, error: invalid parameter
if the issue isn't related to audio then please run sudo drm_info > log.txt
and attach that log.txt file in this bug report.
->
log.txt
Attach a video that shows the issue (if applicable), in raw form as output by GPU Screen Recorder
->
test video
Which game did you run while recording (if any) and does the issue also happen if you only record your desktop?
- In any game (Drill Core, Hunt:Showdown)
- normal Desktop enviorment
Additional
- [yes] I played the video with the command
mpv --no-config video.mp4
(if applicable) - [no] I use a laptop with an integrated GPU and a dedicated GPU
Hmm, I was afraid this could happen. Let me see if I can reproduce it, I have the same gpu.
Hmm nope I cant reproduce it, even with the same hardware, same desktop environment on wayland and same version. The log.txt file shows the same data too. The only difference is that im on arch, not manjaro
Since manjaro has disabled support for hardware accelerated h264 for mesa (amd), which mesa package are you using to enable h264 on manjaro? or did they revert the decision to disable h264?
I pushed a change to aur that should allow you to record now, please test it. But that is a workaround, not a fix. So I would still like you to provide more information so I can reproduce the issue.
Whoops, i mixed something up: my GPU is a Radeon RX 7900 XT
and I'm using amgpu packages (amf-amdgpu-pro, xf86-video-amdgpu, vulkan-amdgpu-pro, mhwd-amdgpu).
I pushed a change to aur that should allow you to record now, please test it.
It works
So I would still like you to provide more information so I can reproduce the issue.
Of course! What exactly do you need?
Oh, amdgpu pro packages.. That could explain it. I'll see if I can reproduce it with that.
I have the same warning too, but the recording itself isn't impacted.
gpu-screen-recorder-git
from AUR, version = r890.4d3e95d-1
RX 5700 XT + mesa, hvec_10bit
(HW accelerated on this GPU)
So, the issue may be indeed related to amdgpu pro drivers.
@murlakatamenka which amdgpu pro packages do you use on arch, if you are using pure arch and not manjaro. I haven't managed to reproduce it myself yet.
Maybe I wasn't clear enough, sorry.
I meant that I have the same warning in the output
gsr error: gsr_capture_portal_capture: vaapi_copy_drm_planes_to_video_surface failed, falling back to opengl copy
but that doesn't impact the recording itself, the produced video is just as expected.
I'm using the open stack for GPU: amdgpu driver, mesa, vulkan-radeon, xf86-video-amdgpu on Arch (you can hover over @murlakatamenka to see that mentioned, btw).
I just wanted to provide more information to track the issue, given that @Ignifazius used proprietary stack with issues and I use open one without them (despite still seeing the warning in the output).
Ok I see. In your case it could be hardware limitation that may be possible to fix. Do you also see the same warning when using hevc
instead of hevc_10bit
?
After some experiments done:
the warning only appears when capturing portal
with any HW-accelerated VAAPI codec (h264, hevc, hevc_10bit), if I use screen
or (no matter the codec), it's gone.
Here is a little more context:
gsr info: pipewire: stream 0x5c585ab10170 state: "streaming" (error: none)
gsr error: gsr_pipewire_video_create_egl_image_with_fallback: failed to create egl image with modifiers, trying without modifiers
gsr info: gsr_capture_portal_start: pipewire negotiation finished
gsr warning: gsr_video_encoder_vaapi_start: black bars have been added to the video because of a bug in AMD drivers/hardware. Record with h264 codec instead (-k h264) to get around this issue
[hevc_vaapi @ 0x5c585a895f00] ignoring invalid SAR: 0/0
[hevc_vaapi @ 0x5c585a895f00] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
gsr error: vaapi_copy_drm_planes_to_video_surface: vaCreateSurfaces failed, error: invalid parameter
gsr error: gsr_capture_portal_capture: vaapi_copy_drm_planes_to_video_surface failed, falling back to opengl copy.
A few warnings here relate to my 2560x1080 (21:9, not 16:9) monitor.
Hmm ok. Can you post the full terminal output when capturing with portal? Also which wayland compositor are you using when capturing portal?