LXC emby don't detect hardware acceleration

LeidenSpain

Member
Sep 9, 2022
18
0
6
Spain
HI,

I am another one who has installed an LXC virtual machine in proxmox but has problems with hardware acceleration: https://github.com/tteck/Proxmox
I use an I5-10500T with UHD Graphics 630.


I have searched a lot of information for both proxmox and emby, but I can't solve it.
I am also investigating for emby to see where the problem is.

This is my LXC configuration:
Code:
# Emby LXC
#### https://tteck.github.io/Proxmox/
#<a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/%E2%98%95-Buy me a coffee-red' /></a>
arch: amd64
cores: 2
features: nesting=1
hostname: emby-original
memory: 2048
net0: name=eth0,bridge=vmbr0,gw=192.168.3.1,hwaddr=6E:88:37:D7:17:69,ip=192.168.3.98/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-198-disk-0,size=8G
swap: 512
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file

HOST MACHINE
Code:
root@host:~# ls -l /dev/dri
total 0
drw-rw---- 2 root root         80 Oct 20 16:41 by-path
crw-rw---- 1 root video  226,   0 Oct 20 16:41 card0
crw-rw---- 1 root render 226, 128 Oct 20 16:41 renderD128

LXC MACHINE
Code:
root@emby:~# ls -l /dev/dri
total 0
drw-rw---- 2 root root         80 Oct 20 14:41 by-path
crw-rw---- 1 root video  226,   0 Oct 20 14:41 card0
crw-rw---- 1 root syslog 226, 128 Oct 20 14:41 renderD128

My error on emby is: Failed to open the drm device /dev/dri/renderD128

But on the LXC machine i think all it's ok:
Code:
root@emby:~# lspci -nn | grep -e VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-S GT2 [UHD Graphics 630] [8086:9bc8] (rev 03)
root@emby:~# lshw -c video
  *-display                
       description: VGA compatible controller
       product: CometLake-S GT2 [UHD Graphics 630]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 03
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1680,1050
       resources: irq:154 memory:9e000000-9effffff memory:a0000000-afffffff ioport:3000(size=64) memory:c0000-dffff
root@emby:~#



I see two things there that I don't know if they are important, they are things that I have seen differently compared to other users:
1) Is correct this line?
lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file

2) Somewhere I saw that they used:
lxc.cgroup2.devices.allow: c 226:* rwm
lxc.cgroup2.devices.allow: c 29:* rwm


I have also seen a thread that commented that it was a group thing, but the truth is that I do not master it and I do not know what to put in subuid and subgid
https://forum.proxmox.com/threads/using-intel-quick-sync-inside-container.114502/


At this point I don't know where the problem is coming from, if it's a thing of the machine, of emby, of the LXC, of proxmox, of me,.....

Greetings and thanks
 
Last edited:
Hi,

I don't know if this information can be important for my problem.

I have dealt with this problem in the emby support forums, and we have tried to install it on the host, and thus it detects the graphic without problems.

One thing I didn't mention before (and I don't know if it matters), is that I had done the procedure to have iGPU Split Passthrough, since I still need it for a windows.
https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-split-passthrough/

Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

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_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1 iommu=pt pcie_acs_override=downstream,multifunction video=efifb:off video=vesa:off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Code:
root@host:~# dmesg | grep -e DMAR -e IOMMU
[    0.000000] Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA
[    0.013449] ACPI: DMAR 0x000000008F124000 0000C8 (v01 LENOVO TC-M2W   00001570      01000013)
[    0.013495] ACPI: Reserving DMAR table memory at [mem 0x8f124000-0x8f1240c7]
[    0.074499] DMAR: IOMMU enabled
[    0.180269] DMAR: Host address width 39
[    0.180271] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.180277] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[    0.180281] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.180285] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.180288] DMAR: RMRR base: 0x0000008f8c8000 end: 0x0000008fb11fff
[    0.180290] DMAR: RMRR base: 0x0000009b000000 end: 0x0000009d7fffff
[    0.180292] DMAR: RMRR base: 0x0000008efaa000 end: 0x0000008f029fff
[    0.180294] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.180296] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.180297] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.182500] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    0.460488] DMAR: No ATSR found
[    0.460489] DMAR: No SATC found
[    0.460491] DMAR: IOMMU feature fl1gp_support inconsistent
[    0.460493] DMAR: IOMMU feature pgsel_inv inconsistent
[    0.460494] DMAR: IOMMU feature nwfs inconsistent
[    0.460495] DMAR: IOMMU feature pasid inconsistent
[    0.460496] DMAR: IOMMU feature eafs inconsistent
[    0.460497] DMAR: IOMMU feature prs inconsistent
[    0.460499] DMAR: IOMMU feature nest inconsistent
[    0.460500] DMAR: IOMMU feature mts inconsistent
[    0.460501] DMAR: IOMMU feature sc_support inconsistent
[    0.460502] DMAR: IOMMU feature dev_iotlb_support inconsistent
[    0.460503] DMAR: dmar0: Using Queued invalidation
[    0.460507] DMAR: dmar1: Using Queued invalidation
[    0.461154] DMAR: Intel(R) Virtualization Technology for Directed I/O

I hope this helps to clarify my problem a bit.

Regards