Ubuntu に OpenCL ドライバーをインストールする

To install the OpenCL driver on Ubuntu, select your GPU vendor below and run the listed commands for your Ubuntu version.

Intel
  1. キーボードの 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

    注釈

    Ubuntu 18.04 のサポートは SDK 2.10 以降削除されました。以前の SDK バージョンの Ubuntu 18.04 の手順を確認するには、左上隅にあるナレッジベースのバージョンを変更します。

  2. Zivid Studio を開き、OpenCL エラーが発生しないことを確認します。

注釈

If you get OpenCL errors, add your user to group Video.

NVIDIA
  1. NVIDIA GPU ドライバー PPA をシステムに追加します。

    キーボードの Ctrl + Alt + T キーを押してターミナル ウィンドウを開きます。

    グラフィックス ドライバー PPA を追加します。

    sudo add-apt-repository ppa:graphics-drivers/ppa
    

    Adding the PPA prints the current long-lived branch release driver package name, e.g. nvidia-xxx.

    ../../../../_images/long-lived-branch-release-nvidia.png
  2. システムに現在の最新ドライバーをインストールします。

    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

    注釈

    Ubuntu 18.04 のサポートは SDK 2.10 以降削除されました。以前の SDK バージョンの Ubuntu 18.04 の手順を確認するには、左上隅にあるナレッジベースのバージョンを変更します。

    ドライバーをインストールした後、システムを再起動します。

    sudo reboot
    
  3. 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 をサポートしなくなりました。Zivid ソフトウェアと互換性があるために、GPU ドライバーが SPIR をサポートしていることを確認してください。

  1. 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 /latest path, 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 カーネルのバージョンを確認します。

    uname -r
    
    Kernel 5.4

    Linux カーネル バージョン 5.4 (Ubuntu LTS) の場合は、Ubuntu 20.04 用の Radeon ソフトウェア 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 カーネル バージョン 5.8 (Ubuntu LTS HWE スタック) の場合は、Linux 20.04 用の Radeon ソフトウェア 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

    注釈

    Ubuntu 18.04 のサポートは SDK 2.10 以降削除されました。以前の SDK バージョンの Ubuntu 18.04 の手順を確認するには、左上隅にあるナレッジベースのバージョンを変更します。

  2. グラフィックス スタックをインストールします。

    Ubuntu 22.04

    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
    

    You may have to reboot for the changes to take effect.

    sudo reboot
    

    You can now try to open ZividStudio. If it fails then follow the next steps.

    ZividStudio
    
    Ubuntu 20.04

    AMD 独自の手順

    ./amdgpu-pro-install --opencl=pal
    
  3. 手順に従ってセキュア ブートを構成します (プロンプトが表示された場合)。

    ../../../../_images/secure_boot_1.png
    ../../../../_images/secure_boot_2.png
    ../../../../_images/secure_boot_3.png

    起動できない場合は System Boot Error After AMD OpenCL Drivers Installation を確認してください。

  4. Zivid Studio を開き、OpenCL エラーが発生しないことを確認します。

注釈

OpenCL エラーが発生した場合は、 ユーザーをグループ Video に追加する必要がある場合があります。