在PVE8下ubuntu22.04虚拟机的显卡驱动成功安装,其他未测试

一.添加资源库

sudo apt update
sudo apt install -y gpg-agent wget

为LTS版本添加在线网络包存储库:

. /etc/os-release
if [[ ! " jammy " =~ " ${VERSION_CODENAME} " ]]; then
  echo "Ubuntu version ${VERSION_CODENAME} not supported"
else
  wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
    sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg
  echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu ${VERSION_CODENAME}/lts/2350 unified" | \
    sudo tee /etc/apt/sources.list.d/intel-gpu-${VERSION_CODENAME}.list
  sudo apt update
fi

注意:如果在系统更新期间遇到存储库签名问题(与初始安装相反),请使用以下GPG公钥对包存储库签名:

wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
  sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg

可选:除了上面的在线网络包存储库步骤,您可以下载并使用离线存储库:

. /etc/os-release
if [[ ! " jammy " =~ " ${VERSION_CODENAME} " ]]; then
  echo "Ubuntu version ${VERSION_CODENAME} not supported"
else
  wget https://repositories.intel.com/gpu/ubuntu/dists/jammy/lts/2350/intel-gpu-ubuntu-${VERSION_CODENAME}-2350.run
  chmod +x intel-gpu-ubuntu-${VERSION_CODENAME}-2350.run
  sudo ./intel-gpu-ubuntu-${VERSION_CODENAME}-2350.run
fi

二.软件包安装

内核和xpu-smi包安装

sudo apt install -y \
  linux-headers-$(uname -r) \
  linux-modules-extra-$(uname -r) \
  flex bison \
  intel-fw-gpu intel-i915-dkms xpu-smi
sudo reboot

计算和媒体

sudo apt install -y \
  intel-opencl-icd intel-level-zero-gpu level-zero \
  intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \
  libigdgmm12 vainfo hwinfo clinfo

开发包

sudo apt install -y \
  libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev

三.配置组成员

查看所有权组

stat -c "%G" /dev/dri/render*
groups ${USER}

将用户添加至组

sudo gpasswd -a ${USER} render

启用新组

newgrp render