You are not logged in.

#1 2024-11-11 12:43:45

julianmb
Member
Registered: 2018-07-31
Posts: 5

Hardware encoding H264 by VAAPI crashes the computer (Intel HD 2000)

Hi, I encountered an error while trying to hardware encode to h264 with spectacle, obs and even ffmpeg. Every time I start encoding the system instantly crashes, becoming unresponsive and generating artifacts on the screen, until the session terminates itself and returns me to SDDM or I’m forced to force shutdown my computer. However Vaapi decoding on mpv and even on Firefox/Chrome works perfectly. I use KDE on Wayland but it's the same result if I started on x11.

lspci –v

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
        Subsystem: Samsung Electronics Co Ltd Device c652
        Flags: bus master, fast devsel, latency 0, IRQ 25
        Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 3000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

lscpu | grep name

Model Name:                     Intel(R) Pentium(R) CPU B960 @ 2.20GHz

sudo vainfo

Trying display: wayland
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Trying display: x11
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Link to journal of the crash
journalctl -b-1


the command that causes the crash (it doesnt produce any errors on logfile after crashing)

ffmpeg  -vaapi_device /dev/dri/renderD128 -i asd.mkv -c:v h264_vaapi -c:a copy -vf 'format=nv12,hwupload' asd2.mkv  -loglevel "repeat+level+info"

I also tried different versions of mesa (mesa,mesa-git,mesa-tkg-git), mesa-amber(doesn't even start SDDM) and libva-intel-driver (libva-intel-driver-git) with the same result.
Encoding isn't that important to me but I'm kinda curious about why is this happening. Tell me if I need to provide any other log. Thanks

Last edited by julianmb (2024-11-11 19:16:02)

Offline

#2 2024-11-11 14:38:11

seth
Member
Registered: 2012-09-03
Posts: 59,173

Re: Hardware encoding H264 by VAAPI crashes the computer (Intel HD 2000)

…
nov 04 19:37:50 DadStolen kwin_wayland[4469]: kwin_screencast: Failed to connect PipeWire context
nov 04 19:38:32 DadStolen kwin_wayland[4469]: kwin_screencast: Failed to connect PipeWire context
nov 04 19:38:47 DadStolen kwin_wayland[4469]: kwin_scene_opengl: 0x7: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
nov 04 19:38:47 DadStolen kwin_wayland[4469]: kwin_scene_opengl: 0x7: GL_INVALID_OPERATION in glDrawBuffers(unsupported buffer GL_BACK_LEFT)
…

Do you have the same problem on an X11 session?

Offline

#3 2024-11-11 14:41:41

julianmb
Member
Registered: 2018-07-31
Posts: 5

Re: Hardware encoding H264 by VAAPI crashes the computer (Intel HD 2000)

Yes, I do have the same problem if I start KDE on a X11 session, with or without xf86-video-intel.

Offline

#4 2024-11-12 11:26:56

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,995

Re: Hardware encoding H264 by VAAPI crashes the computer (Intel HD 2000)

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])

vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 2.4.1

Are you using mesa-amber ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB