Install Radeon software for Linux with ROCm#

The ROCm™ Software Stack and other Radeon™ software for Linux components are installed using the amdgpu-install script to assist you in the installation of a coherent set of stack components.

  • Simplifies the installation of the AMDGPU stack by encapsulating the distribution specific package installation logic and by using command line options that allows you to specify the:

    • Usecase of the AMDGPU stack to be installed (Graphics or Workstation)

    • Combination of components (Pro stack, or user selection)

  • Performs post-install checks to verify whether the installation was performed successfully.

  • Installs the uninstallation script to allow you to remove the whole AMDGPU stack from the system by using a single command.

The script is provided by the installer package. See Compatibility matrices for support information.

Install AMD unified driver package repositories and installer script#

Download and install the amdgpu-install script on the system.

Enter the following commands to install the installer script for the latest compatible Ubuntu® version:

sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.2.3/ubuntu/jammy/amdgpu-install_6.2.60203-1_all.deb
sudo apt install ./amdgpu-install_6.2.60203-1_all.deb

Install AMD unified kernel-mode GPU driver, ROCm, and graphics#

After the Unified Driver Deb Package repositories are installed, run the installer script with appropriate --usecase parameters to install the driver components.

AMD recommends installing the Graphics usecase by default. Only consider the alternative install option if you have an applicable Workstation usecase scenario.

Enter the following command to display a list of available usecases:

sudo amdgpu-install --list-usecase

AMD recommends installing the Graphics usecase by default.

  1. Run the following command to install open source graphics and ROCm.

    amdgpu-install -y --usecase=graphics,rocm
    

    Watch for output warning or errors indicating an unsuccessful driver installation.

    Note:
    The -y option installs non-interactively. This step may take several minutes, depending on internet connection and system speed.

  2. Reboot the system.

    sudo reboot
    

See Using the amdgpu-install script for more information.

Next, set Groups permissions.

Only consider the alternative install option if you have an applicable Workstation usecase scenario.

  1. Run the following command to install workstation graphics and ROCm.

    amdgpu-install -y --usecase=workstation,rocm
    

    Note:
    The -y option installs non-interactively. This step may take several minutes, depending on internet connection and system speed.

  2. Reboot the system.

    sudo reboot
    

See Using the amdgpu-install script for more information.

Next, set Groups permissions.

Set Groups permissions#

Once the driver is installed, add any current user to the render and video groups to access GPU resources.

Reboot in order for group changes to take effect.

Add user to render and video groups#

  1. Enter the following command to check groups in the system:

    groups
    
  2. Add user to the render and video group using the command:

    sudo usermod -a -G render,video $LOGNAME
    
  3. Reboot the system.

    sudo reboot
    

See Setting Permissions for Groups for more information.

Post-install verification checks#

Run these post-installation checks to verify that the installation is complete:

  1. Verify that the current user is added to the render and video groups.

    groups
    

    Expected result:

    <username> adm cdrom sudo dip video plugdev render lpadmin lxd sambashare
    

    <username> indicates the current user, and this result will vary in your environment.

  2. Check if amdgpu kernel driver is installed.

    dkms status
    

    Expected result:

    amdgpu/x.x.x-xxxxxxx.xx.xx, x.x.x-xx-generic, x86_64: installed
    
  3. Check if the GPU is listed as an agent.

    rocminfo
    

    Expected result:

    [...]
    *******
    Agent 2
    *******
      Name:                    gfx1100
      Uuid:                    GPU-5ecee39292e80c37
      Marketing Name:          Radeon RX 7900 XTX
      Vendor Name:             AMD
      [...]
    [...]
    
  4. Check if the GPU is listed.

    clinfo
    

    Expected result:

    [...]
      Platform Name:                 AMD Accelerated Parallel Processing
    Number of devices:               1
      Device Type:                   CL_DEVICE_TYPE_GPU
      Vendor ID:                     1002h
      Board name:                    Radeon RX 7900 XTX
    [...]
    

See Installing the all open usecase for additional troubleshooting tips.

Advanced install methods#

For advanced install methods, such as Multi-Version and Package Manager, refer to AMD GPU Install Script.

Uninstall ROCm#

Run the following command to uninstall the ROCm software stack and other Radeon software for Linux components:

sudo amdgpu-uninstall

Upgrade to newer versions of Radeon software for Linux#

The recommended method to upgrade is to uninstall, followed by an install.

Radeon Software for Linux does not support in-place upgrades.