AMD驱动程序(Ubuntu)

警告

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 may give unexpected results and errors, and is not tested by Zivid.

警告

Radeon在某些GPU上不再支持SPIR。请验证您的GPU驱动程序是支持SPIR的,以确保与Zivid软件兼容。

  1. 下载并解压适用于Linux的正确的Radeon软件:

    按下键盘上的 Ctrl + Alt + T 键打开终端窗口。

    创建一个临时文件夹并导航到它:

    mkdir amd
    cd amd
    

    当您访问https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-20时,您会找到一个指向损坏的AMD GPU驱动程序安装程序版本的链接。在以下说明中,我们将使用我们已经测试过并且可以正常工作的版本。撰写本文时的版本为22.20.3。 AMD有一个 /latest 路径,但它仍然指向了22.20这一损坏的文件。

    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
    

    检查您的Linux Kernel版本:

    uname -r
    

    对于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
    

    对于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
    

    备注

    自 SDK 2.10 起,移除了对 Ubuntu 18.04 的支持。如需查看早期 SDK 版本的 Ubuntu 18.04 说明,请更改左上角的知识库版本。

  2. 安装图形堆栈。

    AMD的说明

    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
    

    您可能必须重新启动才能使更改生效。

    sudo reboot
    

    您现在可以尝试打开 ZividStudio 。如果失败,请按照以下步骤操作。

    ZividStudio
    

    AMD的说明

    ./amdgpu-pro-install --opencl=pal
    
  3. 按照以下步骤配置安全启动(如果出现提示):

  4. 打开 Zivid Studio 并验证不会出现 OpenCL 错误。

备注

如果您碰到 OpenCL 错误,您可能必须 将您的用户添加到视频组