Proxmox Virtual Environment 7.2-3
CPU: 1165G7 passthrough GPU to LXC in linux not working
i7-1165G7 https://ark.intel.com/content/www/e...165g7-processor-12m-cache-up-to-4-70-ghz.html
First question: Should the GPU passthrough work to LXC at all?
I actually tried and here is where I am:
HOST:
root@proxmox.lan's password:
Linux proxmox 5.15.30-2-pve #1 SMP PVE 5.15.30-3 (Fri, 22 Apr 2022 18:08:27 +0200) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Nov 6 20:35:32 2022 from 192.168.88.252
root@proxmox:~# cat /etc/group | grep video
video:x:44:
root@proxmox:~# cat /etc/group | grep render
render:x:103:
root@proxmox:~# cat /etc/subgid
root:100000:65536
root:44:1
root:103:1
root@proxmox:~# ls -la /dev/dri/renderD128
crw-rw-rw- 1 root render 226, 128 Nov 6 11:43 /dev/dri/renderD128
root@proxmox:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.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
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointVLD
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
root@proxmox:~# cd /etc/pve/lxc/
root@proxmox:/etc/pve/lxc# cat 105.conf
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: ubuntu2004
memory: 16384
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.88.1,hwaddr=46:FE:48:EB:FC:2B,ip=192.168.88.17/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-105-disk-0,size=100G
startup: order=4,up=5
swap: 512
unprivileged: 1
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 62
lxc.idmap: g 107 103 1
lxc.idmap: g 108 100108 65428
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file,mode=0666
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=dir
root@proxmox:/etc/pve/lxc#
LXC : Ubuntu 20.04
root@192.168.88.17's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.30-2-pve x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Sun Nov 6 19:38:13 2022 from 192.168.88.252
root@ubuntu2004:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
root@ubuntu2004:~# ls -la /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
-rw-r--r-- 1 root root 8098968 Feb 6 2020 /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
root@ubuntu2004:~# glxinfo | grep Mesa
Error: unable to open display
root@ubuntu2004:~# ls -la /dev/dri/renderD128
total 0
drwxr-xr-x 2 root root 40 Nov 6 19:37 .
drwxr-xr-x 3 root root 80 Nov 6 19:37 ..
root@ubuntu2004:~# lshw -c video
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: iomemory:600-5ff iomemory:400-3ff irq:139 memory:6000000000-6000ffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
root@ubuntu2004:~# cat /etc/group | grep video
video:x:44:root
root@ubuntu2004:~# cat /etc/group | grep render
render:x:107:root,ubuntu
root@ubuntu2004:~# cat /etc/subgid
ubuntu:100000:65536
root@ubuntu2004:~#
Can you please help if i miss something? Do I need to install some drivers to the host or LXC? Will ffmpeg work with the passthrough GPU in LXC? Should I try Ubuntu 22.04 instead of 20.04?
Many thanks
CPU: 1165G7 passthrough GPU to LXC in linux not working
i7-1165G7 https://ark.intel.com/content/www/e...165g7-processor-12m-cache-up-to-4-70-ghz.html
First question: Should the GPU passthrough work to LXC at all?
I actually tried and here is where I am:
HOST:
root@proxmox.lan's password:
Linux proxmox 5.15.30-2-pve #1 SMP PVE 5.15.30-3 (Fri, 22 Apr 2022 18:08:27 +0200) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Nov 6 20:35:32 2022 from 192.168.88.252
root@proxmox:~# cat /etc/group | grep video
video:x:44:
root@proxmox:~# cat /etc/group | grep render
render:x:103:
root@proxmox:~# cat /etc/subgid
root:100000:65536
root:44:1
root:103:1
root@proxmox:~# ls -la /dev/dri/renderD128
crw-rw-rw- 1 root render 226, 128 Nov 6 11:43 /dev/dri/renderD128
root@proxmox:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.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
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointVLD
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
root@proxmox:~# cd /etc/pve/lxc/
root@proxmox:/etc/pve/lxc# cat 105.conf
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: ubuntu2004
memory: 16384
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.88.1,hwaddr=46:FE:48:EB:FC:2B,ip=192.168.88.17/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-105-disk-0,size=100G
startup: order=4,up=5
swap: 512
unprivileged: 1
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 62
lxc.idmap: g 107 103 1
lxc.idmap: g 108 100108 65428
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file,mode=0666
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=dir
root@proxmox:/etc/pve/lxc#
LXC : Ubuntu 20.04
root@192.168.88.17's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.30-2-pve x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Sun Nov 6 19:38:13 2022 from 192.168.88.252
root@ubuntu2004:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
root@ubuntu2004:~# ls -la /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
-rw-r--r-- 1 root root 8098968 Feb 6 2020 /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
root@ubuntu2004:~# glxinfo | grep Mesa
Error: unable to open display
root@ubuntu2004:~# ls -la /dev/dri/renderD128
total 0
drwxr-xr-x 2 root root 40 Nov 6 19:37 .
drwxr-xr-x 3 root root 80 Nov 6 19:37 ..
root@ubuntu2004:~# lshw -c video
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: iomemory:600-5ff iomemory:400-3ff irq:139 memory:6000000000-6000ffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
root@ubuntu2004:~# cat /etc/group | grep video
video:x:44:root
root@ubuntu2004:~# cat /etc/group | grep render
render:x:107:root,ubuntu
root@ubuntu2004:~# cat /etc/subgid
ubuntu:100000:65536
root@ubuntu2004:~#
Can you please help if i miss something? Do I need to install some drivers to the host or LXC? Will ffmpeg work with the passthrough GPU in LXC? Should I try Ubuntu 22.04 instead of 20.04?
Many thanks
Last edited: