[SOLVED] Proxmox gvt-g passthrough in VM [Partial Solved] (Left: i915 SAGV, flip_done timed out)

chinyongcy

New Member
Apr 10, 2023
10
0
1
I have the following:

Host Machine: i5-8500T
Proxmox 8.1.3

VM: Debian 12.4

In Host Machine, I have the following:
/etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt i915.enable_gvt=1"

then run "update-grub"/proxmox-boot-tool refresh
Code:
Generating grub configuration file ...
W: This system is booted via proxmox-boot-tool:
W: Executing 'update-grub' directly does not update the correct configs!
W: Running: 'proxmox-boot-tool refresh'

Copying and configuring kernels on /dev/disk/by-uuid/9AAC-8642
    Copying kernel 6.5.11-4-pve
    Copying kernel 6.5.11-7-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.5.11-7-pve
Found initrd image: /boot/initrd.img-6.5.11-7-pve
Found linux image: /boot/vmlinuz-6.5.11-4-pve
Found initrd image: /boot/initrd.img-6.5.11-4-pve
Adding boot menu entry for UEFI Firmware Settings ...
done
Found linux image: /boot/vmlinuz-6.5.11-7-pve
Found initrd image: /boot/initrd.img-6.5.11-7-pve
/usr/sbin/grub-probe: error: unknown filesystem.
Found linux image: /boot/vmlinuz-6.5.11-4-pve
Found initrd image: /boot/initrd.img-6.5.11-4-pve
/usr/sbin/grub-probe: error: unknown filesystem.
Adding boot menu entry for UEFI Firmware Settings ...
done


Reboot then in nano /etc/modules
Code:
# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

# Modules required for Intel GVT
kvmgt
exngt
vfio_mdev

Then I ran "update-initramfs -u -k all" then I reboot

In my VM If i do this and tick "All Function" - everythings works perfectly. Jellyfin in the VM is able to use it's iGPU for transcoding.
1703349428067.png

However if I do this, my VM will get error
1703349494455.png

dmesg | grep ERROR
Code:
[    3.732715] i915 0000:00:10.0: [drm] *ERROR* Failed to disable SAGV (-110)
[   18.145137] i915 0000:00:10.0: [drm] *ERROR* Failed to disable SAGV (-110)
[   28.163025] i915 0000:00:10.0: [drm] *ERROR* [CRTC:51:pipe A] flip_done timed out
[   39.170936] i915 0000:00:10.0: [drm] *ERROR* flip_done timed out
[   39.170962] i915 0000:00:10.0: [drm] *ERROR* [CRTC:51:pipe A] commit wait timed out

Then i realised Jellyfin is not using h/w transcoding.
 
Fixed - GPU is actually working the DRM error doesn't matter actually.


Upon checking the VM with
ls /dev/dri - there is
card0 and card1

when I check the logs Jellyfin is using card0
when i think the actual iGPU is in card1
Then i tried changing the display in Hardware
from Default
1703351815917.png
to None then Violia

1703351772803.png

Everything works out fine.

I find out that it is also possible to keep it enabled
then in docker

Code:
From:
devices:
    - /dev/dri:/dev/dri 

To:
devices:
    - /dev/dri/card0:/dev/dri/card0
    - /dev/dri/renderD128:/dev/dri/renderD128


However this two methods will causes my jellyfin container to fail to start when bootup. Still looking into this...
 
I guess the issue is the message in dmesg somehow delayed the start up of the gpu....
thus when docker started, that container will fail since the device is not fully started yet
Code:
[    3.732715] i915 0000:00:10.0: [drm] *ERROR* Failed to disable SAGV (-110)
[   18.145137] i915 0000:00:10.0: [drm] *ERROR* Failed to disable SAGV (-110)
[   28.163025] i915 0000:00:10.0: [drm] *ERROR* [CRTC:51:pipe A] flip_done timed out
[   39.170936] i915 0000:00:10.0: [drm] *ERROR* flip_done timed out
[   39.170962] i915 0000:00:10.0: [drm] *ERROR* [CRTC:51:pipe A] commit wait timed out

Using this quick and dirty solution for now:
sudo systemctl edit docker.service
Code:
# Add this under [Service]
ExecStartPre=/bin/sleep 30
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!