Intel Quick Sync passthrough to Ubuntu VM

ssolomon

New Member
Mar 25, 2022
7
0
1
Hi... looked at other posts but they seem to deal with LXCs rather than VMs. I am looking at running Plex in Docker running on an Ubuntu 20.04 VM. I was trying to ensure HW transcoding support by verifying Quick Sync but am not sure if it is working.

My CPU is Intel(R) Core(TM) i7-10710U CPU, which is listed as supported on the Intel site. Within the Ubuntu VM config I have the Display set to "default" and KVM hardware virtualization is set to "Yes".

I read on an Intel site that I should run the following command to check if the proper driver is in use: lspci -v -s $(lspci | grep VGA | cut -d" " -f 1) and that if running I should see the following: Kernel driver in use: i915

Within the shell of the ProxMox host I get the following output and it does have the correct driver indicated.

root@pve01:~# lspci -v -s $(lspci | grep VGA | cut -d" " -f 1)
00:02.0 VGA compatible controller: Intel Corporation Device 9bca (rev 04) (prog-if 00 [VGA controller])
DeviceName: GPU
Subsystem: Intel Corporation Device 2081
Flags: bus master, fast devsel, latency 0, IRQ 177, IOMMU group 1
Memory at 6022000000 (64-bit, non-prefetchable) [size=16M]
Memory at 4000000000 (64-bit, prefetchable) [size=256M]
I/O ports at 3000 (size=64)
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [100] Process Address Space ID (PASID)
Capabilities: [200] Address Translation Service (ATS)
Capabilities: [300] Page Request Interface (PRI)
Kernel driver in use: i915
Kernel modules: i915

When I run the same command within the Ubuntu 20.04 server shell I get this output...

00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) (prog-if 00 [VGA controller])
Subsystem: Red Hat, Inc. Device 1100
Flags: bus master, fast devsel, latency 0
Memory at fd000000 (32-bit, prefetchable) [size=16M]
Memory at fea50000 (32-bit, non-prefetchable) [size=4K]
Expansion ROM at 000c0000 [disabled] [size=128K]
Kernel driver in use: bochs-drm
Kernel modules: bochs_drm

I tried running: sudo apt install intel-media-va-driver libmfx1 libva2 libva-drm2 to install the driver inside Ubuntu but unless I proceed with the Plex install I am not sure if it is set up correctly given that the Ubuntu does not list the right Kernel driver in use. Any help is appreciated. Thanks.
 
Hey buddy,

I'm in a similar boat to you.
I too, want to run Ubuntu as a VM, docker under that, then plex with Intel quicksync working.
I edit the grub file, updated and rebooted and I'm getting this.

root@proxmox:~# dmesg | grep -e DMAR -e IOMMU
[ 0.011218] ACPI: DMAR 0x00000000BFFC2000 0000A8 (v01 INTEL KBL 00000001 INTL 00000001)
[ 0.011256] ACPI: Reserving DMAR table memory at [mem 0xbffc2000-0xbffc20a7]
[ 0.079814] DMAR: Host address width 39
[ 0.079815] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.079820] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[ 0.079822] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.079826] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[ 0.079828] DMAR: RMRR base: 0x000000bfc7a000 end: 0x000000bfc99fff
[ 0.079829] DMAR: RMRR base: 0x000000ca000000 end: 0x000000cc7fffff
[ 0.079831] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.079833] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.079834] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.081517] DMAR-IR: Enabled IRQ remapping in x2apic mode



However the machine is still saying no IOMMU support (both the VT's are enabled in the bios and the processor is compatible - 7500T)
Not sure what I'm doing wrong.
I get this error, regardless:


"No IOMMU detected, please activate it.See Documentation for further information."




These are the only commands in my grub file, not commented out.

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

intel_iommu=on


Baffled.
 
Hey buddy,

I'm in a similar boat to you.
I too, want to run Ubuntu as a VM, docker under that, then plex with Intel quicksync working.
I edit the grub file, updated and rebooted and I'm getting this.

root@proxmox:~# dmesg | grep -e DMAR -e IOMMU
[ 0.011218] ACPI: DMAR 0x00000000BFFC2000 0000A8 (v01 INTEL KBL 00000001 INTL 00000001)
[ 0.011256] ACPI: Reserving DMAR table memory at [mem 0xbffc2000-0xbffc20a7]
[ 0.079814] DMAR: Host address width 39
[ 0.079815] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.079820] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[ 0.079822] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.079826] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[ 0.079828] DMAR: RMRR base: 0x000000bfc7a000 end: 0x000000bfc99fff
[ 0.079829] DMAR: RMRR base: 0x000000ca000000 end: 0x000000cc7fffff
[ 0.079831] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.079833] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.079834] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.081517] DMAR-IR: Enabled IRQ remapping in x2apic mode



However the machine is still saying no IOMMU support (both the VT's are enabled in the bios and the processor is compatible - 7500T)
Not sure what I'm doing wrong.
I get this error, regardless:


"No IOMMU detected, please activate it.See Documentation for further information."




These are the only commands in my grub file, not commented out.

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

intel_iommu=on


Baffled.

intel_iommu=on should be within the quotes next to GRUB_CMDLINE_LINUX_DEFAULT

So...
  1. reconfigure it to look like GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
  2. Save the file
  3. run command update-grub
  4. reboot
 
Last edited:
  • Like
Reactions: jaxjexjox
intel_iommu=on should be within the quotes next to GRUB_CMDLINE_LINUX_DEFAULT

So...
  1. reconfigure it to look like GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
  2. Save the file
  3. run command update-grub
  4. reboot

Exactly this, I found this out a few hours before you replied, but thank you so much.

I now need to sort some storage issues. (No idea how to add 180+GB of 'spare' NVMe storage from my boot device) but I'm close to getting up and running.


I do hope google indexes this post too, because this legit had me stuck for 4 hours.
Sadly someone on the google results does not actually make it clear you need that full line, so I followed the wrong advice on line.

Thanks again.
 
Last edited:
intel_iommu=on should be within the quotes next to GRUB_CMDLINE_LINUX_DEFAULT

So...
  1. reconfigure it to look like GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
  2. Save the file
  3. run command update-grub
  4. reboot
For a Linux VM running Docker, does the GRUB config need to be changed on the PVE Host only or on both the PVE Host and the Linux VM? On the Linux VM the config in /etc/default/grub currently shows...
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity".
 
Last edited:

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!