You can check if your card is detected and usuable if you see any device with the prefix renderD with the following command output
ls /dev/dri | grep renderD
apt update && apt install firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all
Restart your system to load the new drivers
Add the following to your /etc/apt/sources.list
# buster-backports deb http://deb.debian.org/debian buster-backports main contrib non-free
Now refresh your package databse and install the Nvidia drivers
apt update && apt install -t buster-backports nvidia-driver firmware-misc-nonfree
Now reboot your system to load the new drivers.
Optionally Apply this Patch to remove some of the driver limitaions.
https://github.com/keylase/nvidia-patch
nano /etc/pve/lxc/105.conf
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.autodev: 1 lxc.hook.autodev:/var/lib/lxc/105/mount_hook.sh
nano /var/lib/lxc/105/mount_hook.sh
mkdir -p ${LXC_ROOTFS_MOUNT}/dev/dri
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/dri/card0 c 226 0
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/dri/renderD128 c 226 128
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/fb0 c 29 0
chmod +x /var/lib/lxc/105/mount_hook.sh
Passthrough Your GPU
First identify the device you want to passthrough, List all devices using
ls -l /dev/dri
apt install gnupg gnupg1 gnupg2 cifs-utils smbclient curl apt-transport-https ca-certificates -y apt update && apt install qemu-guest-agent -y
echo deb https://downloads.plex.tv/repo/deb public main | tee /etc/apt/sources.list.d/plexmediaserver.list curl https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add - apt update && apt dist-upgrade && apt install plexmediaserver
systemctl enable plexmediaserver.service systemctl start plexmediaserver.service
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list sudo apt-get update && sudo apt-get install plexmediaserver && sudo systemctl status plexmediaserver
sudo mkdir /media/Plex
sudo mkdir /media/Plex/films
sudo apt-get install cifs-utils
sudo cp /etc/fstab /etc/fstab.bak
sudo nano /etc/fstab
//x.x.x.x/Video /media/Plex/films cifs username=x,password=x,iocharset=utf8 0 0
sudo mount -a
Supprimer le cache des paquets périmés :
apt autoclean
Supprimer tout le cache :
apt clean
Supprimer les paquets installés automatiquement comme dépendances et devenus inutiles :
apt autoremove
journalctl –vacuum-size=200M
lxc → stop lxc → Options → Features → Tick Nesting → Start lxc