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

请教一下关于 DG1 在 PVE 上能驱动成功但无法解码的问题 #23

Closed
tylinux opened this issue Jul 3, 2024 · 1 comment
Closed

Comments

@tylinux
Copy link

tylinux commented Jul 3, 2024

遇到的问题:

安装 DKMS 驱动后可识别硬件解码能力,但 ffmpeg 调用失败。请各位路过的大佬指点一下~

使用环境

GPU: Intel DG1
驱动版本:1.24.1.19.240119.1.nodrm
Host:PVE 8.2,Kernel version 6.8.8-2-pve

使用场景

PVE驱动后,map到 LXC中供 jellyfin 使用

Host dmesg

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.8.8-2-pve root=/dev/mapper/pve-root ro quiet spectre_v2=off spectre_v1=off pcie_aspm=off i915.enable_guc=3
[    0.134088] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.8.8-2-pve root=/dev/mapper/pve-root ro quiet spectre_v2=off spectre_v1=off pcie_aspm=off i915.enable_guc=3
[   11.002445] i915_compat: module verification failed: signature and/or required key missing - tainting kernel
[   11.785283] i915 0000:0c:00.0: Force probing unsupported Device ID 4908, tainting kernel
[   11.787551] i915 0000:0c:00.0: [drm] VT-d active for gfx access
[   11.787621] i915 0000:0c:00.0: vgaarb: deactivate vga console
[   11.787696] i915 0000:0c:00.0: [drm] Local memory IO size: 0x00000000fb800000
[   11.787701] i915 0000:0c:00.0: [drm] Local memory available: 0x00000000fb800000
[   11.815104] i915 0000:0c:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none
[   11.817868] i915 0000:0c:00.0: [drm] Finished loading DMC firmware i915/dg1_dmc_ver2_02.bin (v2.2)
[   11.825676] i915 0000:0c:00.0: [drm] GT0: GuC firmware i915/dg1_guc_70.bin version 70.20.0
[   11.825682] i915 0000:0c:00.0: [drm] GT0: HuC firmware i915/dg1_huc.bin version 7.9.3
[   11.831147] i915 0000:0c:00.0: [drm] GT0: HuC: authenticated for all workloads
[   11.831598] i915 0000:0c:00.0: [drm] GT0: GUC: submission enabled
[   11.831601] i915 0000:0c:00.0: [drm] GT0: GUC: SLPC enabled
[   11.831832] i915 0000:0c:00.0: [drm] GT0: GUC: RC enabled
[   11.876033] [drm] Initialized i915 1.6.0 20201103 for 0000:0c:00.0 on minor 0
[   11.876516] i915 display info: display version: 12
[   11.876519] i915 display info: cursor_needs_physical: no
[   11.876522] i915 display info: has_cdclk_crawl: no
[   11.876524] i915 display info: has_cdclk_squash: no
[   11.876526] i915 display info: has_ddi: yes
[   11.876528] i915 display info: has_dp_mst: yes
[   11.876530] i915 display info: has_dsb: yes
[   11.876532] i915 display info: has_fpga_dbg: yes
[   11.876534] i915 display info: has_gmch: no
[   11.876536] i915 display info: has_hotplug: yes
[   11.876538] i915 display info: has_hti: no
[   11.876540] i915 display info: has_ipc: yes
[   11.876542] i915 display info: has_overlay: no
[   11.876544] i915 display info: has_psr: yes
[   11.876546] i915 display info: has_psr_hw_tracking: yes
[   11.876548] i915 display info: overlay_needs_physical: no
[   11.876550] i915 display info: supports_tv: no
[   11.876552] i915 display info: has_hdcp: yes
[   11.876554] i915 display info: has_dmc: yes
[   11.876556] i915 display info: has_dsc: yes
[   11.876581] i915 0000:0c:00.0: [drm] Cannot find any crtc or sizes
[   11.876697] i915 0000:0c:00.0: [drm] Cannot find any crtc or sizes
[   11.876733] i915 0000:0c:00.0: [drm] Cannot find any crtc or sizes

vainfo 工作正常

error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSliceLP
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSliceLP
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile1            :	VAEntrypointVLD
      VAProfileVP9Profile1            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile3            :	VAEntrypointVLD
      VAProfileVP9Profile3            :	VAEntrypointEncSliceLP
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileHEVCMain422_10         :	VAEntrypointVLD
      VAProfileHEVCMain422_12         :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          :	VAEntrypointVLD
      VAProfileHEVCSccMain10          :	VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         :	VAEntrypointVLD
      VAProfileHEVCSccMain444         :	VAEntrypointEncSliceLP
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :	VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :	VAEntrypointEncSliceLP

Intel_gpu_top 正常识别

intel-gpu-top: Intel Dg1 (Gen12) @ /dev/dri/card0 -    0/   0 MHz; 100% RC6;        0 irqs/s

         ENGINES     BUSY                                                                                                                                                               MI_SEMA MI_WAIT
       Render/3D    0.00% |                                                                                                                                                           |      0%      0%
         Blitter    0.00% |                                                                                                                                                           |      0%      0%
           Video    0.00% |                                                                                                                                                           |      0%      0%
    VideoEnhance    0.00% |                                                                                                                                                           |      0%      0%

   PID              NAME                  Render/3D                                   Blitter                                     Video                                  VideoEnhance

GuC & HuC 工作正常

GuC firmware: i915/dg1_guc_70.bin
	status: RUNNING
	version: found 70.20.0
	uCode: 321088 bytes
	RSA: 256 bytes
GuC status 0x8003f0ec:
	Bootrom status = 0x76
	uKernel status = 0xf0
	MIA Core status = 0x3
Scratch registers:
	 0: 	0x0
	 1: 	0x1633d7
	 2: 	0x44000
	 3: 	0x4
	 4: 	0x40
	 5: 	0x4ec
	 6: 	0x49080001
	 7: 	0x0
	 8: 	0x0
	 9: 	0x0
	10: 	0x0
	11: 	0x0
	12: 	0x0
	13: 	0x0
	14: 	0x0
	15: 	0x0

GuC logging stats:
	Relay full count: 0
	DEBUG:	flush count          0, overflow count          0
	CRASH:	flush count          0, overflow count          0
	CAPTURE:	flush count          0, overflow count          0
CT enabled
H2G Space: 3348
Head: 184
Tail: 184
G2H Space: 12284
Head: 77
Tail: 77
GuC Submission API Version: 1.9.0
GuC Number Outstanding Submission G2H: 0
GuC tasklet count: 0
Requests in GuC submit tasklet:

Global scheduling policies:
  DPC promote time   = 500000
  Max num work items = 15
  Flags              = 0

HuC:

HuC firmware: i915/dg1_huc.bin
	status: RUNNING
	version: found 7.9.3
	uCode: 589504 bytes
	RSA: 256 bytes
HuC status: 0x00090001

ffmpeg 转码测试

命令:/usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel verbose -hwaccel qsv -c:v h264_qsv -i /media_1/TVShows/The.Punisher/S01/Marvels.The.Punisher.S01E02.Two.Dead.Men.1080p.NF.WEB-DL.DD5.1.x264-NTb.mkv output.flv
错误信息:

...
[out#0/mp4 @ 0x64bc30ed3e40] No explicit maps, mapping streams automatically...
[vost#0:0/h264_qsv @ 0x64bc30f21580] Created video stream from input stream 0:1
[AVHWDeviceContext @ 0x64bc30f1f100] Trying to use DRM render node for device 0, with matching kernel driver (i915).
[AVHWDeviceContext @ 0x64bc30f1f100] libva: VA-API version 1.17.0
[AVHWDeviceContext @ 0x64bc30f1f100] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x64bc30f1f100] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x64bc30f1f100] libva: Found init function __vaDriverInit_1_17
[AVHWDeviceContext @ 0x64bc30f1f100] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x64bc30f1f100] Initialised VAAPI connection: version 1.17
[AVHWDeviceContext @ 0x64bc30f1f100] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ().
[AVHWDeviceContext @ 0x64bc30f1f100] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x64bc30f1fec0] Use Intel(R) oneVPL to create MFX session, API version is 2.11, the required implementation version is 1.3
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
[AVHWDeviceContext @ 0x64bc30f1fec0] Initialize MFX session: implementation version is 2.8
[aost#0:1/aac @ 0x64bc31127f40] Created audio stream from input stream 0:0
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
  Stream #0:0 -> #0:1 (aac (native) -> aac (native))
[vost#0:0/h264_qsv @ 0x64bc30f21580] Starting thread...
[aost#0:1/aac @ 0x64bc31127f40] Starting thread...
[vf#0:0 @ 0x64bc30f23f00] Starting thread...
[af#0:1 @ 0x64bc31122400] Starting thread...
[vist#0:1/h264 @ 0x64bc30f147c0] [dec:h264_qsv @ 0x64bc30f26440] Starting thread...
[aist#0:0/aac @ 0x64bc30f8b800] [dec:aac @ 0x64bc3111e880] Starting thread...
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x64bc30ec0840] Starting thread...
Press [q] to stop, [?] for help
[graph_-1_in_0:0 @ 0x787dc0003080] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:stereo
[AVHWDeviceContext @ 0x787dbc003100] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ().
[AVHWDeviceContext @ 0x787dbc003100] Driver not found in known nonstandard list, using standard behaviour.
[h264_qsv @ 0x64bc30f1ed40] Decoder: output is video memory surface
[h264_qsv @ 0x64bc30f1ed40] Use Intel(R) oneVPL to create MFX session with the specified MFX loader
[AVHWDeviceContext @ 0x787dbc00c840] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ().
[AVHWDeviceContext @ 0x787dbc00c840] Driver not found in known nonstandard list, using standard behaviour.
[h264_qsv @ 0x64bc30f1ed40] Decoder: output is video memory surface
[h264_qsv @ 0x64bc30f1ed40] Use Intel(R) oneVPL to create MFX session with the specified MFX loader
[h264_qsv @ 0x64bc30f1ed40] Error during QSV decoding.: device failed (-17)
...
@moetayuko
Copy link
Owner

pve 自带驱动能解码吗,不需要 sriov 的话没必要装我这个

@tylinux tylinux closed this as completed Jul 9, 2024
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

2 participants