LXC GPU Passthrough xorg

mle

Member
Aug 5, 2021
78
16
13
31
Austria
Hy Leute

Hab jetzt mehrer Tage damit verbracht meine GPU in LXC zu nutzen.

Hab mich etwas an dieser Anleitung orientiert:
https://jocke.no/2022/02/23/plex-gpu-transcoding-in-docker-on-lxc-on-proxmox/

NVIDIA Treiber im LXC funktioniert soweit.
Transcoding auch.

Mein Problem ist aber das ich es nicht für transcoding verwenden möchte sondern eine grafisches oberfläche (desktop) über xrdp, x11vnc und/oder sunshine zum einsatz kommen würde.
Z.b. Für flüssige und nicht so CPU lastige remote lösung, auch mit webbrowser im LXC und/oder wenn möglich remote gaming. (aufgeteilt auf mehrere lxc)

Aktuelles Test setup:
Proxmox 8
nvidia titan x 12gb (keine dummy dongle für display angeschlossen)
debian oder ubuntu lxc (privilegiert)
Sicherheitsbedenken aktuell keine wegen test setup (keine wichtigen daten vorhanden sollte der host abstürzen auch egal)

LXC Config:

Code:
lxc.cgroup2.devices.allow: c 0:* rwm
lxc.cgroup2.devices.allow: c 4:* rwm
lxc.cgroup2.devices.allow: c 7:* rwm
lxc.cgroup2.devices.allow: c 29:* rwm
lxc.cgroup2.devices.allow: c 128:* rwm
lxc.cgroup2.devices.allow: c 195:* rwm
lxc.cgroup2.devices.allow: c 226:* rwm
lxc.cgroup2.devices.allow: c 237:* rwm
lxc.cgroup2.devices.allow: c 240:* rwm
lxc.cgroup2.devices.allow: c 255:* rwm
lxc.cgroup2.devices.allow: c 254:* rwm
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-caps/nvidia-cap1 dev/nvidia-caps/nvidia-cap1 none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-caps/nvidia-cap2 dev/nvidia-caps/nvidia-cap2 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/tty7 dev/tty7 none bind,optional,create=file

xorg config:

Könnet ich jetzt viele posten die ich schon getestet habe aber um es kurtz zu sagen alle haben den gleichen fehler.

z.b.
Erstellt mit:
nvidia-xconfig --enable-all-gpus --use-display-device=none --busid=PCI:1:0:0

Testweiste ausgefüllt mit:
X -config /etc/X11/xorg.conf

Fehler: (LOG)

Code:
Fatal server error:
(EE) no screens found(EE)

Testweise mal direkt unter Proxmox getestet (alle benötigten pakete für xorg natürlich installiert)
Funktioniert soweit (wird dann auch unter nvidia-smi angezeigt)

Über das tool xserver-xorg-video-dummy Funktioniert das dummy display auch im lxc aber hald ohne HW-acceleration.

Gefühlt liegt der fehler in der LXC Config. Mittlerweile hab ich aber so viel getestet dass mir nix mehr einfallen würde was ich noch testen könnte.

Hab ihr noch ideen was man testen könnte oder welche config man noch anpassen müsste oder hat schon jemand einen lxc laufen bei dem das funktuniert.

mfg. Mike
 

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!