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

HW VP9 encode GPU HANG on i915/RKL - Resetting vcs0 for preemption time out - GPU HANG: ecode 12:4:28ffff7d, in ffmpeg #539

Open
ajgnet opened this issue Sep 17, 2021 · 4 comments

Comments

@ajgnet
Copy link

ajgnet commented Sep 17, 2021

Unable to HW encode VP9 on Rocket Lake i7-11700K. Tried various kernels, applications, intel-vaapi-driver versions.

ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -I "input.mp4" -c:v vp9_vaapi output.mp4
[vp9_vaapi @ 0x5568da8db800] Failed to map output buffers: 24 (internal encoding error).=1.32x
[vp9_vaapi @ 0x5568da8db800] Output failed: -5.
Video encoding failed
[aac @ 0x5568da925340] Qavg: 155.537
[aac @ 0x5568da925340] 2 frames left in the queue on closing
Conversion failed!

Encoding fails ~50% of the time with a GPU hang.

[ 3806.462671] i915 0000:00:02.0: [drm] Resetting vcs0 for preemption time out
[ 3806.462689] i915 0000:00:02.0: [drm] ffmpeg[1377] context reset due to GPU hang
[ 3806.463476] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:4:28ffff7d, in ffmpeg [1377]

HEVC encoding works as expected

ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -I "input.mp4" -c:v hevc_vaapi output.mp4

System info:

root@ajgsys012:~# uname -a
Linux ajgsys012 5.14.5-xanmod1-edge #0~git20210916.cfd723d SMP PREEMPT Thu Sep 16 21:16:08 UTC 2021 x86_64 GNU/Linux

root@ajgsys012:~# dpkg -l | grep ffmpeg
ii  ffmpeg                               7:4.4-5                                         amd64        Tools for transcoding, streaming and playing of multimedia files

root@ajgsys012:~# dpkg -l | grep libva
ii  libva-drm2:amd64                     2.12.0-2                                        amd64        Video Acceleration (VA) API for Linux -- DRM runtime
ii  libva-wayland2:amd64                 2.12.0-2                                        amd64        Video Acceleration (VA) API for Linux -- Wayland runtime
ii  libva-x11-2:amd64                    2.12.0-2                                        amd64        Video Acceleration (VA) API for Linux -- X11 runtime
ii  libva2:amd64                         2.12.0-2                                        amd64        Video Acceleration (VA) API for Linux -- runtime

root@ajgsys012:~# dpkg -l | grep intel-media
ii  intel-media-va-driver-non-free:amd64 21.3.3+ds1-1                                    amd64        VAAPI driver for the Intel GEN8+ Graphics family
@ajgnet
Copy link
Author

ajgnet commented Oct 2, 2021

Just a quick update to the above bug, this appears to only occur with videos longer than 10 seconds in length when converting to VP9 only. Perhaps it is a memory bug of some kind. Happy to provide any more details as requested that may be helpful.

@dalcombright
Copy link

Just a quick update to the above bug, this appears to only occur with videos longer than 10 seconds in length when converting to VP9 only. Perhaps it is a memory bug of some kind. Happy to provide any more details as requested that may be helpful.

any luck? I am seeing the same thing using unmanic on unraid. Nothing will convert.

@ajgnet
Copy link
Author

ajgnet commented Jan 16, 2022

any luck? I am seeing the same thing using unmanic on unraid. Nothing will convert.

Sadly no. We dropped the processor and went with Alder Lake where everything works as expected.

@edwarddavidbaker
Copy link
Contributor

I'm not sure which Linux distribution you are using, but you will want to discuss Rocket Lake at https://github.com/intel/media-driver . Also for VP9 encode it might be important to double check loading microcontroller firmware GuC and HuC.

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

3 participants