在 Ubuntu 上安装 OpenCL 驱动程序
To install the OpenCL driver on Ubuntu, select your GPU vendor below and run the listed commands for your Ubuntu version.
Intel
按键盘上的 Ctrl + Alt + T 键打开终端窗口,然后安装 OpenCL 驱动程序。
Ubuntu 26.04
sudo apt update sudo apt install intel-opencl-icd
Ubuntu 24.04
sudo apt update sudo apt install intel-opencl-icd
Ubuntu 22.04
sudo apt update sudo apt install intel-opencl-icd
Ubuntu 20.04
sudo apt update sudo apt install intel-opencl-icd
Ubuntu 18.04
备注
自 SDK 2.10 起,移除了对 Ubuntu 18.04 的支持。如需查看早期 SDK 版本的 Ubuntu 18.04 说明,请更改左上角的知识库版本。
打开 Zivid Studio 并验证不会出现 OpenCL 错误。
备注
If you get OpenCL errors, add your user to group Video.
NVIDIA
将NVIDIA GPU驱动程序PPA添加到您的系统:
为您的系统安装当前最新的驱动程序:
Ubuntu 26.04
sudo apt update sudo apt install nvidia-driver-xxx
Ubuntu 24.04
sudo apt update sudo apt install nvidia-driver-xxx
Ubuntu 22.04
sudo apt update sudo apt install nvidia-driver-xxx
Ubuntu 20.04
sudo apt update sudo apt install nvidia-driver-xxx
Ubuntu 18.04
备注
自 SDK 2.10 起,移除了对 Ubuntu 18.04 的支持。如需查看早期 SDK 版本的 Ubuntu 18.04 说明,请更改左上角的知识库版本。
安装驱动程序后,重新启动系统:
sudo reboot打开 Zivid Studio 并验证不会出现 OpenCL 错误。
备注
If you get OpenCL errors, add your user to group Video.
AMD
警告
Support for using AMD compute devices/GPUs is removed due to low usage and OpenCL stability issues in the drivers. It is possible to opt in to run the SDK with an unsupported compute device, by enabling an option in the Config.yml file. However, such a setup can give unexpected results and errors, and is not tested by Zivid.
警告
Radeon在某些GPU上不再支持SPIR。请验证您的GPU驱动程序是支持SPIR的,以确保与Zivid软件兼容。
下载并解压适用于Linux的正确Radeon软件:
按下键盘上的 Ctrl + Alt + T 键打开终端窗口。
创建一个临时文件夹并导航到其路径:
mkdir amd cd amd
Ubuntu 22.04
AMD's own release-notes page for this driver is no longer available. In the following instructions we will use a version that we have tested and that works. At the time of writing this is version 22.20.3. AMD has a
/latestpath, but this still points to 22.20, which is broken.wget --referer http://support.amd.com http://repo.radeon.com/amdgpu-install/22.20.3/ubuntu/jammy/amdgpu-install_22.20.50203-1_all.deb
使用
apt安装这个包:sudo apt install ./amdgpu-install_22.20.50203-1_all.deb sudo apt update
Ubuntu 20.04
检查您的Linux Kernel版本:
uname -rKernel 5.4
对于Linux Kernel version 5.4 (Ubuntu LTS),请下载适用于Ubuntu 20.04的Radeon Software 20.45:
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
提取内容:
tar -Jxvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz cd amdgpu-pro-20.45-1188099-ubuntu-20.04
Kernel 5.8
对于Linux Kernel version 5.8 (Ubuntu LTS HWE stacks),请下载适用于Linux 20.04的Radeon Software 20.50:
wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz
提取内容:
tar -Jxvf amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz cd amdgpu-pro-20.50-1234664-ubuntu-20.04
Ubuntu 18.04
备注
自 SDK 2.10 起,移除了对 Ubuntu 18.04 的支持。如需查看早期 SDK 版本的 Ubuntu 18.04 说明,请更改左上角的知识库版本。
安装图形堆栈。
Ubuntu 22.04
amdgpu-install --usecase=graphics,opencl --no-32 --no-dkms
备注
如果您需要安全启动,您可能必须包含 DKMS(在上述命令中删除
--no-dkms)。有关更多信息,请参阅 secure-boot-support 。现在将您的用户添加为
render组和video组的成员。sudo gpasswd -a $USER render sudo gpasswd -a $USER video
You may have to reboot for the changes to take effect.
sudo rebootYou can now try to open
ZividStudio. If it fails then follow the next steps.ZividStudio
Ubuntu 20.04
AMD的说明 .
./amdgpu-pro-install --opencl=pal
按照以下步骤配置安全启动(如果出现提示):
打开 Zivid Studio 并验证不会出现 OpenCL 错误。
备注
如果您碰到 OpenCL 错误,您可能必须 将您的用户添加到视频组 。