Server Version#: 1.41.3.9314
Player Version#: Plex HTPC version: 1.70.1.303-5bbf114f
I’m running a GMKtec Nuc with the N97 Intel Processor and Intel UHD graphics.
Running a video via the mpv snap by default will use hardware decoding just fine as per the log file from mpv, with the CPU running between 15-30% on one core:
mpv_standalone.log (68.0 KB)
[ 0.026][v][vo/gpu] Probing for best GPU context.
[ 0.026][v][vo/gpu/opengl] Initializing GPU context 'wayland'
[ 0.026][v][vo/gpu/opengl] Initializing GPU context 'x11egl'
[ 0.026][v][vo/gpu/x11] X11 opening display: :0
~~~
[ 0.051][v][vo/gpu/opengl] EGL_VERSION=1.5
[ 0.051][v][vo/gpu/opengl] EGL_VENDOR=Mesa Project
[ 0.051][v][vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES
[ 0.051][v][vo/gpu/opengl] Trying to create Desktop OpenGL context.
~~~
[ 0.055][v][vo/gpu/opengl] Choosing visual EGL config 0x15, visual ID 0x21
[ 0.056][v][vo/gpu/x11] The XPresent extension was found.
[ 0.056][v][vo/gpu/x11] XPresent enabled.
[ 0.059][v][vo/gpu/opengl] GL_VERSION='4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.04.1'
[ 0.059][v][vo/gpu/opengl] Detected desktop OpenGL 4.6.
[ 0.059][v][vo/gpu/opengl] GL_VENDOR='Intel'
[ 0.059][v][vo/gpu/opengl] GL_RENDERER='Mesa Intel(R) Graphics (ADL-N)'
[ 0.059][v][vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.60'
~~~
[ 0.062][v][vd] Container reported FPS: 23.976024
[ 0.062][v][vd] Codec list:
[ 0.062][v][vd] hevc - HEVC (High Efficiency Video Coding)
[ 0.062][v][vd] hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[ 0.062][v][vd] Opening decoder hevc
[ 0.062][v][vd] Looking at hwdec hevc-vaapi...
[ 0.062][v][vo/gpu] Loading hwdec drivers for format: 'vaapi'
[ 0.062][v][vo/gpu] Loading hwdec driver 'vaapi'
[ 0.062][v][vo/gpu/vaapi] Using EGL dmabuf interop via GL_EXT_EGL_image_storage
[ 0.062][v][vo/gpu/vaapi] Trying to open a x11 VA display...
[ 0.062][v][vo/gpu/vaapi/vaapi] libva: VA-API version 1.20.0
[ 0.062][v][vo/gpu/vaapi/vaapi] libva: Trying to open /snap/mpv/203/gpu-2404/usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so
[ 0.064][v][vo/gpu/vaapi/vaapi] libva: Found init function __vaDriverInit_1_20
[ 0.067][v][vo/gpu/vaapi/vaapi] libva: va_openDriver() returns 0
[ 0.067][v][vo/gpu/vaapi/vaapi] Initialized VAAPI: version 1.20
[ 0.067][d][ffmpeg] AVHWDeviceContext: VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ().
~~~
[ 0.068][v][vd] Trying hardware decoding via hevc-vaapi.
[ 0.069][v][vd] Selected codec: HEVC (High Efficiency Video Coding)
~~~
[ 0.070][v][vd] Pixel formats supported by decoder: vaapi vdpau yuv420p10le
[ 0.070][v][vd] Codec profile: Main 10 (0x2)
[ 0.070][v][vd] Requesting pixfmt 'vaapi' from decoder.
[ 0.082][i][vd] Using hardware decoding (vaapi).
[ 0.082][v][vd] Decoder format: 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 crop=1920x1080+0+0
[ 0.082][v][vd] Using container aspect ratio.
~~~
[ 0.082][v][vo/gpu] Loading hwdec drivers for format: 'vaapi'
However when attempting to run via the Plex-HTPC snap the software always fails to start hardware decoding, and ends up using vaapi-copy which then ramps up CPU usage to over 300% according to the application top. The frame rate drops to about 4 fps due to the CPU load if I get an image at all. Other times the screen is blank for the video, but the overlay works. So it appears to be the interaction of the packaged software in the snap that is not working. Here are some of the main logs from the Plex-HTPC snap.
plex-htpc.log (233.8 KB)
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading hwdec driver 'vaapi'
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render/vaapi: VAAPI hwdec only works with OpenGL or Vulkan backends.
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading failed.
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading hwdec driver 'drmprime'
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render/drmprime: drmprime hwdec requires at least one dmabuf interop backend.
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading failed.
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading hwdec driver 'drmprime-overlay'
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render/drmprime-overlay: Failed to retrieve DRM fd from native display.
Feb 22, 2025 19:36:00.584 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Loading failed.
Feb 22, 2025 19:36:00.579 [129043273860864] DEBUG - Created OpenGL context QSurfaceFormat(version 3.1, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBu
fferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1,
colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
Feb 22, 2025 19:36:00.580 [129043273860864] DEBUG - OpenGL VENDOR: Mesa/X.org RENDERER: llvmpipe (LLVM 12.0.0, 256 bits) VERSION: 3.1 Mesa 21.2.6
Feb 22, 2025 19:36:00.582 [129043273860864] DEBUG - MSAA sample count for the swapchain is 1. Alpha channel requested = no.
Feb 22, 2025 19:36:00.582 [129043273860864] DEBUG - rhi texture atlas dimensions: 1024x512
Feb 22, 2025 19:36:00.582 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: GL_VERSION='3.1 Mesa 21.2.6'
Feb 22, 2025 19:36:00.583 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: Detected desktop OpenGL 3.1.
Feb 22, 2025 19:36:00.583 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: GL_VENDOR='Mesa/X.org'
Feb 22, 2025 19:36:00.583 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: GL_RENDERER='llvmpipe (LLVM 12.0.0, 256 bits)'
Feb 22, 2025 19:36:00.583 [129044465035008] DEBUG - [MPVEngine/mpv] libmpv_render: GL_SHADING_LANGUAGE_VERSION='1.40'
~~~
Feb 22, 2025 19:36:16.403 [129044465035008] DEBUG - [MPVEngine/mpv] cplayer: Set property: hwdec="auto" -> 1
Feb 22, 2025 19:36:16.403 [129044465035008] DEBUG - [MPVEngine/mpv] cplayer: Set property: vo="libmpv" -> 1
~~~
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Container reported FPS: 23.976024
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Codec list:
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: hevc - HEVC (High Efficiency Video Coding)
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Opening decoder hevc
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Looking at hwdec hevc-vaapi...
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Could not create device.
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Looking at hwdec hevc-vaapi-copy...
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vaapi: libva: VA-API version 1.21.0
Feb 22, 2025 19:36:16.620 [129044465035008] DEBUG - [MPVEngine/mpv] vaapi: libva: Trying to open /snap/plex-htpc/71/lib/dri/iHD_drv_video.so
Feb 22, 2025 19:36:16.624 [129044465035008] DEBUG - [MPVEngine/mpv] vaapi: libva: Found init function __vaDriverInit_1_21
Feb 22, 2025 19:36:16.630 [129044465035008] DEBUG - [MPVEngine/mpv] vaapi: libva: va_openDriver() returns 0
Feb 22, 2025 19:36:16.630 [129044465035008] DEBUG - [MPVEngine/mpv] vaapi: Initialized VAAPI: version 1.21
Feb 22, 2025 19:36:16.630 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Trying hardware decoding via hevc-vaapi-copy.
Feb 22, 2025 19:36:16.631 [129044465035008] DEBUG - [MPVEngine/mpv] vd: Selected codec: HEVC (High Efficiency Video Coding)
I’ve tried some of the suggestions such as environment variables
QT_XCB_GL_INTEGRATION=xcb_egl
and config in the mpv.conf file
hwdec=vaapi or hwdec=vaapi-egl
But nothing seems to trigger the system to use pure hw decoding.
The error seems to be the video decoder is not creating a device:
vd: Looking at hwdec hevc-vaapi...
vd: Could not create device
Additional logs in the console if plex-htpc is launched from the command line:
:~/snap/plex-htpc/common$ plex-htpc
MESA: warning: Driver does not support the 0x46d1 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
MESA: warning: Driver does not support the 0x46d1 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
[104719:104766:0222/223126.869106:ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blocklisted
[104719:104766:0222/223126.880826:ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blocklisted
If I launch the same thing with the env variable: QT_XCB_GL_INTEGRATION=xcb_egl plex-htpc
then the line “failed to load driver: iris” is not seen.
If there is a way to point the Plex-HTPC snap to the external mpv snap that would work. I am not sure what is missing in the Plex-HTPC snap to make this happen, but a stand alone install of mpv snap plays a video file in hw decoding without further config changes. It is just the included software in the Plex-HTPC snap that appears to be not working or is missing components.
Does anyone know what might be the problem here?