i5-12400安装PVE9后,将核显虚拟到飞牛OS上
使用PVE-Tools虚拟化核显
- 先使用
https://github.com/PVE-Tools/PVE-Tools-9在PVE上进行核显虚拟化,使用命令 bash <(curl -sSL https://ghfast.top/raw.githubusercontent.com/PVE-Tools/PVE-Tools-9/main/PVE-Tools.sh)运行脚本。
- 依次选择后完成虚拟化:
4 . 硬件直通与显卡 ( 核显 / NVIDIA / AMD / IOMMU / 磁盘直通 )
1 . Intel 核显虚拟化管理 (SR-IOV/GVT-g)
1 . Intel 11-15代 SR-IOV 核显虚拟化
- 核显被分成3个虚拟显卡,在飞牛OS的虚拟机上,添加分配出来的虚拟核显,从第二个开始选择,比如
0000:00:02.1,不能选择 0000:00:02.0。
安装驱动
-
飞牛中应用中心安装驱动:i915-sriov-dkms
-
此时飞牛影视等还是会调用失败,选择启动GPU会显示:获取/设置 GPU 失败
-
终端中的查看状态,GuC失败
~# dmesg | grep -i i915
[ 1.765555] i915: You are using the i915-sriov-dkms module, a ported version of the i915/xe module with SR-IOV support.
[ 1.765556] i915: Please file any bug report at https://github.com/strongtz/i915-sriov-dkms/issues/new.
[ 1.765556] i915: Module Homepage: https://github.com/strongtz/i915-sriov-dkms
[ 1.765729] i915 0000:01:00.0: [drm] Found alderlake_s (device ID 4682) integrated display version 12.00 stepping C0
[ 1.765756] i915 0000:01:00.0: Running in SR-IOV VF mode
[ 1.765902] i915 0000:01:00.0: [drm] *ERROR* GuC submission disabled
[ 1.908779] i915 0000:01:00.0: [drm] *ERROR* Device initialization failed (-19)
-
查看启动参数,默认未配置 i915 GuC 及相关 IOMMU 参数
~# cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
-
修改grub,将原先的GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"修改
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt i915.enable_guc=3 module_blacklist=xe"
- 更新配置并重启
sudo update-grub
sudo update-initramfs -u
sudo reboot
- 验证驱动
~# dmesg | grep -i i915
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.18.18-trim root=UUID=f7abaacf-749c-41b8-a20d-74ff1c6adb3f ro modprobe.blacklist=pcspkr pcie_aspm=off quiet splash intel_iommu=on iommu=pt i915.enable_guc=3 module_blacklist=xe
[ 0.016006] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.18.18-trim root=UUID=f7abaacf-749c-41b8-a20d-74ff1c6adb3f ro modprobe.blacklist=pcspkr pcie_aspm=off quiet splash intel_iommu=on iommu=pt i915.enable_guc=3 module_blacklist=xe
[ 1.414832] i915: You are using the i915-sriov-dkms module, a ported version of the i915/xe module with SR-IOV support.
[ 1.414833] i915: Please file any bug report at https://github.com/strongtz/i915-sriov-dkms/issues/new.
[ 1.414833] i915: Module Homepage: https://github.com/strongtz/i915-sriov-dkms
[ 1.414972] i915 0000:01:00.0: [drm] Found alderlake_s (device ID 4682) integrated display version 12.00 stepping C0
[ 1.414990] i915 0000:01:00.0: Running in SR-IOV VF mode
[ 1.415831] i915 0000:01:00.0: [drm] GT0: GUC: interface version 0.1.24.4
[ 1.416048] i915 0000:01:00.0: [drm] VT-d active for gfx access
[ 1.416064] i915 0000:01:00.0: [drm] Using Transparent Hugepages
[ 1.416974] i915 0000:01:00.0: [drm] GT0: GUC: interface version 0.1.24.4
[ 1.417235] i915 0000:01:00.0: [drm] GT0: GUC: interface version 0.1.24.4
[ 1.417421] i915 0000:01:00.0: GuC firmware PRELOADED version 0.0 submission:SR-IOV VF
[ 1.417423] i915 0000:01:00.0: HuC firmware PRELOADED
[ 1.419425] i915 0000:01:00.0: [drm] Protected Xe Path (PXP) protected content support initialized
[ 1.419427] i915 0000:01:00.0: [drm] PMU not supported for this GPU.
[ 1.419485] [drm] Initialized i915 1.6.0 for 0000:01:00.0 on minor 1
8.在影视中选择首选GPU不再报错,验证转码播放正常调用GPU