Hardware decoding not working with mpv 0.39.1 on tumbleweed slowroll

I am running mpv with Hyprland on this hardware, I have intel-media-driver, libva2 and libva-utils installed but for some reason it won’t run with hardware decoding as it should.

Graphics:
  Device-1: Intel Iris Graphics 540 driver: i915 v: kernel
  Display: wayland server: Xwayland v: 24.1.4 compositor: Hyprland driver:
    gpu: i915 resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6 vendor: intel mesa v: 24.3.3 renderer: Mesa Intel Iris
    Graphics 540 (SKL GT3)
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: gputop, intel_gpu_top, lsgpu
    wl: kanshi,swaymsg x11: xrandr

I have got this in my .bash_profile

export XDG_SESSION_TYPE=wayland

I have got this in my .profile

export LIBVA_DRIVER_NAME=iHD

this is the output of vainfo

Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 ()
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

some of the mpv log is here

[   0.106][v][vd] Codec list:
[   0.106][v][vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[   0.106][v][vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[   0.106][v][vd]     h264_qsv (h264) - H264 video (Intel Quick Sync Video acceleration)
[   0.106][v][vd]     libopenh264 (h264) - OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[   0.106][v][vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[   0.106][v][vd] Opening decoder h264
[   0.106][v][vd] Looking at hwdec h264-vaapi...
[   0.106][v][vo/gpu] Loading hwdec drivers for format: 'vaapi'
[   0.106][v][vo/gpu] Loading hwdec driver 'vaapi'
[   0.107][v][vo/gpu/vaapi] VAAPI hwdec only works with OpenGL or Vulkan backends.
[   0.107][v][vo/gpu] Loading failed.
[   0.107][v][vd] Could not create device.
[   0.107][v][vd] Using software decoding.
[   0.107][v][vd] Detected 4 logical cores.

(notice the software decoding part)

Can someone please help me figure out what the cause behind hardware decoding not working could be?
The system is Tumbleweed Slowroll.
In my understanding, this should work with hardware decoding.

@sft Hi is libvulkan_intel installed, also did you enable huc/guc for the GPU?

Can you post the output from inxi -SGaxxz

How would I check if libvulkan_intel is installed (I doubt it is, I didn’t specifically install it so unless it came with another package then I don’t think it is).

I don’t think huc/guc is enabled, again I didn’t specifically enable it
But looking at the answer you provided to another user here, I don’t think it is enabled. It doesn’t show up.

output from inxi

System:
  Kernel: 6.13.0-1-default arch: x86_64 bits: 64 compiler: gcc v: 14.2.1 clocksource: tsc
    avail: hpet,acpi_pm parameters: BOOT_IMAGE=/boot/vmlinuz-6.13.0-1-default
    root=UUID=84f70bcb-a4bc-435d-8dd9-48cab3a11e71 splash=silent mitigations=auto quiet
    security=apparmor
  Console: tty 1 Distro: openSUSE Tumbleweed-Slowroll 20250101
Graphics:
  Device-1: Intel Iris Graphics 540 driver: i915 v: kernel arch: Gen-9 process: Intel 14n
    built: 2015-16 ports: active: HDMI-A-2 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:1926
    class-ID: 0300
  Display: wayland server: Xwayland v: 24.1.4 driver: gpu: i915 tty: 120x33
  Monitor-1: HDMI-A-2 model: LG (GoldStar) TV serial: <filter> built: 2019 res: 1920x1080
    dpi: 30 gamma: 1.2 size: 1600x900mm (62.99x35.43") diag: 1836mm (72.3") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL Message: GL data unavailable in console. Try -G --display
  API: EGL Message: EGL data unavailable in console, eglinfo missing.
  Info: Tools: api: glxinfo gpu: gputop, intel_gpu_top, lsgpu wl: kanshi,swaymsg x11: xrandr

@sft To see what’s installed use zypper se -i intel it may be there but install the other tools mentioned by inxi eg zypper se --provides eglinfo and if not installed, install the package.

So you have a Gen-9 device so GUC2, so could either add to grub with i915.enable_guc=2 it will taint the kernel, but worth a try after checking above first.

You can check for eample with;

journalctl -b --no-hostname | grep -E "guc|huc"
Jan 30 08:28:04 kernel: i915 0000:05:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin version 70.36.0
Jan 30 08:28:04 kernel: i915 0000:05:00.0: [drm] GT0: HuC firmware i915/dg2_huc_gsc.bin version 7.10.16
 
journalctl -b --no-hostname | grep -E "guc|huc"
Jan 30 15:34:58 kernel: i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.bin version 70.36.0
Jan 30 15:34:58 kernel: i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3

when I run the journalctl command, nothing comes up.

is there a specific place I need to add i915.enable_guc=2 to grub?

(I added it to GRUB_CMDLINE_LINUX_DEFAULT, I think that was logical)

@sft YaST Bootloader and add to the kernel options

I’m running without a DE.

@sft then as root run yast bootloader it should be installed?

I have Hyprland on MicroOS, but it’s a gen 8 device so can’t help, all my other intel devices are automatically selected ARC and Alder Lake-N

I did run the dracut regenerate command after adding “i915.enable_guc=2 grub” to GRUB_CMDLINE_LINUX_DEFAULT in the grub config, but the hardware decoding still isn’t working.
I did also install the libvulkan_intel package btw.

@sft I really wanted to see what’s not installed first before going the guc route…

Well I hadn’t used the yast bootloader thing before but it is added as a kernel option and I’m assuming the reason you said to go through yast bootloader is because it does the update-initramfs thing?

It’s still not working however. Are there any other things worth trying? I might try reinstalling, as it could just be the system is just too littered with legacy crap at this point and it’s causing all sorts of conflicts.

@sft what about journalctl output? Could be missing firmware…

Oh okay it’s showing now (maybe I didn’t run journalctl with sudo before, it’s been a long day)

Jan 30 23:15:22 kernel: Setting dangerous option enable_guc - tainting kernel
Jan 30 23:15:22 kernel: i915 0000:00:02.0: [drm] GT0: GuC firmware i915/skl_guc_70.1.1.bin version 70.1.1
Jan 30 23:15:22 kernel: i915 0000:00:02.0: [drm] GT0: HuC firmware i915/skl_huc_2.0.0.bin version 2.0.0

Shouldn’t hardware decoding just work at this point? I don’t get what’s causing this.

Is my mpv.conf definitely okay?

fs=yes
hwdec=vaapi
vo=gpu
gpu-api=opengl
gpu-context=wayland 
volume=100

@sft and the output from zypper se -i intel

Loading repository data...
Reading installed packages...

S  | Name                  | Summary                                                                 | Type
---+-----------------------+-------------------------------------------------------------------------+--------
i+ | intel-gpu-tools       | Collection of tools for development and testing of the Intel DRM driver | package
i+ | intel-media-driver    | Intel Media Driver for VAAPI                                            | package
i+ | intel-vaapi-driver    | Intel Driver for Video Acceleration (VA) API for Linux                  | package
i  | kernel-firmware-intel | Kernel firmware files for Intel-platform device drivers                 | package
i  | libdrm_intel1         | Userspace interface for Kernel DRM services for Intel chips             | package
i+ | libvulkan_intel       | Mesa vulkan driver for Intel GPU                                        | package
'kernel-firmware-intel' is already installed.
There is an update candidate for 'kernel-firmware-intel', but it comes from a repository with a lower priority. Use 'zypper install kernel-firmware-intel-20250122-1.1.noarch' to install this candidate.

not sure if that matters but I doubt it

I think I’ll just redo it, it’s probably going to take less time than trying to fix it. Thanks for your help. Opensuse can just be terrible sometimes.

@sft For Multimedia stuff, I install/use flatpaks as my user, no requirement for Packman…

I’m wondering if something got “missed” in the hardware setup because I’m running a bare-bones no-DE install, I guess it’s possible something happens in the setup of the DE that enables graphics but maybe isn’t being kicked off in a terminal-only or tiling WM install.

did you also install hyprland through a flatpak? I’ve just reinstalled opensuse tw and hyprland still has problems on a fresh install.