Install OpenCL Drivers On Ubuntu

  1. Download Intel packages:

    Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard.

    Create a temporary folder:

    mkdir neo
    

    Download all *.deb packages:

    Note

    This tutorial is using the OpenCL driver version that we tested. We recommend installing the latest OpenCL packages supported for your OS.

    cd neo
    wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12149.1/intel-igc-core_1.0.12149.1_amd64.deb
    wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12149.1/intel-igc-opencl_1.0.12149.1_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-level-zero-gpu-dbgsym_1.3.24347_amd64.ddeb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-level-zero-gpu_1.3.24347_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-opencl-icd-dbgsym_22.39.24347_amd64.ddeb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-opencl-icd_22.39.24347_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/libigdgmm12_22.2.0_amd64.deb
    
    cd neo
    wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12149.1/intel-igc-core_1.0.12149.1_amd64.deb
    wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12149.1/intel-igc-opencl_1.0.12149.1_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-level-zero-gpu-dbgsym_1.3.24347_amd64.ddeb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-level-zero-gpu_1.3.24347_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-opencl-icd-dbgsym_22.39.24347_amd64.ddeb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/intel-opencl-icd_22.39.24347_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/22.39.24347/libigdgmm12_22.2.0_amd64.deb
    
    cd neo
    wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-gmmlib_18.4.1_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-igc-core_18.50.1270_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-igc-opencl_18.50.1270_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-opencl_19.07.12410_amd64.deb
    wget https://github.com/intel/compute-runtime/releases/download/19.07.12410/intel-ocloc_19.07.12410_amd64.deb
    
  2. Install all packages:

    sudo apt install ./*.deb
    
  3. Check OpenCL driver

    Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:

    Note

    You first have to install clinfo.

    /usr/bin/clinfo -l
    

    If clinfo doesn’t print anything, you might have to add your user to group Video.

  1. Add the NVIDIA GPU driver PPA to your system:

    Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard.

    Add the graphics-driver PPA:

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

    This will provide info on the current long-lived branch release: `nvidia-xxx`

    ../../../_images/long-lived-branch-release-nvidia.png
  2. Install the current latest drivers for your system:

    sudo apt update
    sudo apt install nvidia-driver-xxx
    
    sudo apt update
    sudo apt install nvidia-driver-xxx
    

    Note

    Support for Ubuntu 16.04 is removed since SDK 2.7. To see Ubuntu 16.04 instructions for an earlier SDK version, change the Knowledge Base version in the top left corner.

    After installing the driver, restart your system:

    sudo reboot
    
  3. Check OpenCL driver

    Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:

    Note

    You first have to install clinfo.

    /usr/bin/clinfo -l
    

    If clinfo doesn’t print anything, you might have to add your user to group Video.

Warning

Ubuntu 18.04 is no longer supported for AMD GPUs from models Radeon RX 6600 and newer.

Warning

Radeon no longer supports SPIR on some GPUs, please verify that your GPU drivers support SPIR to be compatible with Zivid Software.

  1. Download and extract the correct Radeon Software for Linux:

    Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard.

    Create a temporary folder and navigate to it:

    mkdir amd
    cd amd
    

    If you go to https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-20 you will find a link to a version AMD GPU driver installer which is broken. 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
    

    Install this package with apt:

    sudo apt install ./amdgpu-install_22.20.50203-1_all.deb
    sudo apt update
    

    Check your Linux Kernel version:

    uname -r
    

    For Linux Kernel version 5.4 (Ubuntu LTS), download Radeon Software 20.45 for Ubuntu 20.04:

    wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
    

    Extract the contents:

    tar -Jxvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
    cd amdgpu-pro-20.45-1188099-ubuntu-20.04
    

    For Linux Kernel version 5.8 (Ubuntu LTS HWE stacks), download Radeon Software 20.50 for Linux 20.04:

    wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz
    

    Extract the contents:

    tar -Jxvf amdgpu-pro-20.50-1234664-ubuntu-20.04.tar.xz
    cd amdgpu-pro-20.50-1234664-ubuntu-20.04
    

    Download Radeon Software 18.50 for Ubuntu 18.04:

    wget --referer http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz
    

    Extract the contents:

    tar -Jxvf amdgpu-pro-18.50-725072-ubuntu-18.04.tar.xz
    cd amdgpu-pro-18.50-725072-ubuntu-18.04
    

    Note

    Support for Ubuntu 16.04 is removed since SDK 2.7. To see Ubuntu 16.04 instructions for an earlier SDK version, change the Knowledge Base version in the top left corner.

  2. Install the graphics stack.

    AMDs own instructions

    amdgpu-install --usecase=graphics,opencl --no-32 --no-dkms
    

    Note

    If you require Secure Boot you may have to include DKMS (remove --no-dkms in the above command). For more information see secure-boot-support.

    Now add your user as member of both the render group and the video group.

    sudo gpasswd -a $USER render
    sudo gpasswd -a $USER video
    

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

    sudo reboot
    

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

    ZividStudio
    

    AMDs own instructions.

    ./amdgpu-pro-install --opencl=pal
    

    AMDs own instructions.

    ./amdgpu-pro-install --opencl=pal
    
  3. Follow the steps to Configure Secure Boot (if prompted):

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

    If you are not able to boot, check System Boot Error After AMD OpenCL Drivers Installation.

  4. Check OpenCL driver

    Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard. Execute the following command to get a synthetic summary about all OpenCL platforms on the system and the devices they expose:

    Note

    You first have to install clinfo.

    clinfo -l
    

    If clinfo doesn’t print anything, you might have to add your user to group Video.

    If your system does not boot up after installing the OpenCL driver, click System Boot Error After AMD OpenCL Drivers Installation.