moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.93k stars 636 forks source link

AppImage version unable to use hardware decode #1398

Open SeeleVolleri opened 3 months ago

SeeleVolleri commented 3 months ago

Describe the bug Moonlight unable to call va_openDriver when Host machine has a different version libva and intel-media-va-driver or i965-va-driver-shaders. tldr: failed to use hardware decode

Steps to reproduce 1, download latest release moonlight-qt AppImage 2, update host libva and intel-media-va-driver and/or i965-va-driver-shaders 3, start streaming and observed a warning shows unable to use hardware decode

Other Moonlight clients

Moonlight settings (please complete the following information)

Client PC details (please complete the following information)

Server PC details (please complete the following information)

Moonlight Logs (please attach)

Additional context Anything else you think may be relevant to the issue

$  vainfo              
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.3.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
$  ./Desktop/Moonlight-6.0.1-x86_64.AppImage 
00:00:00 - SDL Info (0): Compiled with SDL 2.31.0
00:00:00 - SDL Info (0): Running with SDL 2.31.0
00:00:00 - Qt Info: Successfully loaded translation for "zh_CN"
00:00:00 - Qt Warning: qrc:/gui/main.qml:13:1: QML ApplicationWindow: ToolTip must be attached to an Item
00:00:00 - Qt Info: Found "gamecontrollerdb.txt" at "/home/ayaka/.cache/Moonlight Game Streaming Project/Moonlight/gamecontrollerdb.txt"
00:00:00 - SDL Info (0): Loaded 337 new gamepad mappings
00:00:00 - SDL Info (0): V-sync disabled
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Info (0): Trying fallback VAAPI driver paths
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri-nonfree/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Error (0): Failed to initialize VAAPI: -1
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Info (0): Trying fallback VAAPI driver paths
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri-nonfree/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Error (0): Failed to initialize VAAPI: -1
00:00:00 - SDL Warn (0): Vulkan device 'Intel(R) UHD Graphics (CML GT2)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Warn (0): Vulkan device 'llvmpipe (LLVM 17.0.6, 256 bits)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Error (0): No suitable HDR-capable Vulkan devices found!
00:00:00 - SDL Warn (0): Vulkan device 'Intel(R) UHD Graphics (CML GT2)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Warn (0): Vulkan device 'llvmpipe (LLVM 17.0.6, 256 bits)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Error (0): No suitable Vulkan devices found!
00:00:00 - SDL Warn (0): Vulkan device 'Intel(R) UHD Graphics (CML GT2)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Warn (0): Vulkan device 'llvmpipe (LLVM 17.0.6, 256 bits)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Error (0): No suitable HDR-capable Vulkan devices found!
00:00:00 - SDL Warn (0): Vulkan device 'Intel(R) UHD Graphics (CML GT2)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Warn (0): Vulkan device 'llvmpipe (LLVM 17.0.6, 256 bits)' does not support VK_KHR_video_decode_h265
00:00:00 - SDL Error (0): No suitable Vulkan devices found!
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Info (0): Trying fallback VAAPI driver paths
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/iHD_drv_video.so
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri-nonfree/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/i965_drv_video.so
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/va/drivers/i965_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Error (0): Failed to initialize VAAPI: -1
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
00:00:00 - SDL Info (0): Skipping VAAPI fallback driver names on libva 2.20+
00:00:00 - SDL Info (0): Trying fallback VAAPI driver paths
libva info: VA-API version 1.21.0
cgutman commented 2 months ago

This is unfortunately a side effect of how libva driver versioning works. The version of libva.so must be >= the version of the VA drivers. We use the latest libva version at the time of each Moonlight release, but it will break when your distro's VA drivers are updated to build against a newer libva than Moonlight was.

I recommend avoiding the AppImages if you're on bleeding edge distros, and instead use the Flatpak (which includes compatible libva and VA drivers in the runtime) or another package format that is specific to your distro (like AUR for Arch).