Article Number
AMDGPU-INSTALLATION

This guide provides installation and uninstallation procedures for the AMDGPU graphics and compute stack.

Overview

This guide provides installation and uninstallation procedures for the AMDGPU graphics and compute stack.
 

Stack Variants

There are two major stack variants available for installation:

  • Pro: recommended for use with Radeon Pro graphics products.
  • All-Open: recommended for use with consumer products.

Installing Option

Components

Installing Option

Components

All-Open Stack
  • Base kernel drivers
  • Base accelerated graphics drivers
  • Mesa OpenGL
  • Mesa multimedia
Pro Stack
  • Base kernel drivers
  • Base accelerated graphics drivers
  • Mesa multimedia
  • Pro OpenGL
  • Pro OpenCL
    • PAL OpenCL stack (supports Vega 10 and later products)
    • Legacy OpenCL stack (supports legacy products older than Vega 10)
  • Pro Vulkan

You can install a combination of stack components using the amdgpu-install script, as listed in the following:

  • Base kernel and accelerated graphics drivers + Pro OpenGL + Pro Vulkan
  • Base kernel and accelerated graphics drivers + Pro OpenGL + Pro Vulkan + Pro OpenCL
  • Base kernel and accelerated graphics drivers + Pro OpenCL
  • Base kernel drivers (no accelerated graphics drivers) + Pro OpenCL (headless mode)

 

Back to top

Prerequisites

Downloading the Package Archive

The AMDGPU graphics stack is delivered as an archive of native packages. Prior to installation, you must first obtain the archive from your AMD Customer Engagement Representative or from the AMD web site.

Download the AMDGPU-Pro tar archive (for example, to ~/Downloads), which contains the installation script.

Extracting the Package Archive

Extract the tar archive to a known location. Replace XXXXXX in the following commands with the actual build number of the downloaded file:

$ cd ~/Downloads

$ tar -Jxvf amdgpu-pro-18.30-XXXXXX.tar.xz

$ cd ~/Downloads/amdgpu-pro-18.30-XXXXXX


Configuring Access to the Distribution Repository (RHEL and SLE only)

AMDGPU stack depends on packages provided by the Linux distribution vendors.

The AMDGPU-Pro driver requires access to specific RPMs from Red Hat Enterprise Linux (RHEL) or SUSE Linux Enterprise (SLE) installation media for the purpose of dependency resolution. You must ensure one of the following:

  • Have a valid subscription and be connected to Internet during installation.
  • Mount an installation media (for example, DVD, USB key or ISO file). Media mounting instructions for Red Hat systems are provided at https://access.redhat.com/solutions/1355683. For SLE, use YaST to add the installation media as a new repository, see the SUSE documentation for details.
Back to top

Using the amdgpu-install Script

Script Types

The AMDGPU graphics stack offers the following scripts to help you install a coherent set of stack components:

  • amdgpu-install
  • amdgpu-pro-install

Each of these scripts support the same set of arguments that are explained in the following sections of this page.

Purpose

The amdgpu-install script does the following:

  • Simplifies the installation of the AMDGPU graphics and compute stack by encapsulating the distribution specific package installation logic and by using command line options that allow to specify the:
    • Variant of the AMDGPU stack to be installed (All-Open or Pro)
    • Combination of components (in case of the Pro stack)
  • 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 packaged into the AMDGPU-Pro tar archive.

Invoking the amdgpu-install Script

Once you have downloaded and extracted the AMDGPU-Pro tar archive, access the directory where you extracted it. Invoke the script as ./amdgpu-install.
 

Scenarios

Specifying an OpenCL Implementation

There are two OpenCL implementations available:

  • PAL: Provides support for Vega 10 and newer hardware.
  • Legacy: Provides support for hardware older than Vega 10.

You can either install one or both implementations.

OpenCL is installed using the --opencloption, as follows:

Applicable examples on this page demonstrate installation of both OpenCL implementations.


Viewing Help or Usage Output

Executing the script with -h or --help argument provides the help or usage output.

./amdgpu-install -h

Installing Non-Interactively

Using the argument -y informs the package management system to assume the answer yes for any interactive question. This option allows the install script to embed itself inside other automated scripts.

Example:

$ ./amdgpu-install -y

Adding Advanced Package Management Functionality

More advanced functionality can be obtained by providing the installation script with arguments to pass through to the package management software of the distribution you are using.

Back to top

Installing or Uninstalling AMDGPU

Installing the All-Open Variant

Run the following command to install the All-Open variant:

$ ./amdgpu-install -y

! Note

The -y option installs non-interactively. See Using the amdgpu-install script for more information.

Reboot the target system after running amdgpu-install.

Installing the Pro Variant

Refer to the following table to understand how to install a combination of Pro components:

Command

Installed Components

$ ./amdgpu-pro-install -y
  • Base kernel
  • Accelerated graphics
  • Mesa multimedia
  • Pro OpenGL
  • Pro Vulkan
$ ./amdgpu-pro-install -y --opencl=pal,legacy
  • Base kernel
  • Accelerated graphics
  • Mesa multimedia
  • Pro OpenGL
  • Pro Vulkan
  • Pro OpenCL
$ ./amdgpu-pro-install -y --opencl=pal,legacy --headless
  • Only base kernel
  • Pro OpenCL (headless mode)

 

Reboot the target system after running amdgpu-pro-install.

For more information, refer to the following sections to understand how to install individual components.

OpenGL (Default Component)

OpenGL is a default component of the Pro variant.


OpenCL (Optional Component)

OpenCL is an optional component of the Pro variant and is installed only if it is specifically requested.

Two different implementations of OpenCL (legacy and PAL) are provided. Either of these implementations or both of them can be installed on the target system.

In some scenarios, it may be desirable to install only the OpenCL portion of the Pro variant (omitting the OpenGL portion), which can be accomplished by adding the --headless option. The typical use case is headless compute.

Vulkan (Default Component)

Vulkan is a default component of the Pro variant.

PX Platform Support (Ubuntu only)

For PX (PowerExpress) platform support, use the --px option as shown in the following command:

$ ./amdgpu--pro-install --px

 

 

Uninstalling the AMDGPU Graphics Stack

To remove all components of the stack, run the uninstall script from anywhere in the system.

  1. Based on whether you installed the All-Open or Pro components, run one of the following commands:

    # Use this for All-Open components
    $ amdgpu-uninstall

    # Use this for Pro components
    $ amdgpu-pro-uninstall
     
  2. After uninstalling the components, reboot the target system.

Back to top

Reporting Bugs

Bugs should be reported through your AMD Customer Engagement Representative.

If you downloaded a release archive directly from the AMD web site and do not have an AMD Customer Engagement Representative, you may report bugs using the freedesktop.org Bugzilla.

File bugs according to the following table:

Generating a Bug Report

In order to facilitate efficient investigation, it’s important to include as much detail as possible with the bug report. Perform the following steps before you file a bug report:

  1. Create a destination folder for the report.

    $ LOGDIR=~/LOGS/20170913-1
    $ mkdir -p $LOGDIR
    $ cd $LOGDIR

     
  2. Gather basic configuration details.

    $ sudo lshw -c cpu | grep product >> basic.conf
    $ lspci -nn | grep "VGA\|Display" >> basic.conf
    $ sudo dmidecode -t BIOS | grep Version >> basic.conf
    $ lsb_release -sd >> basic.conf
    $ uname -a >> basic.conf
    $ dkms status | grep "amdgpu\|radeon" >> basic.conf

     
  3. Create detailed log files by running the following commands:

    $ dkms status > dkms.status.log
    $ lsmod | grep amdgpu > lsmod.amdgpu.log
    $ dmesg > dmesg.log
    $ cp /var/log/Xorg.0.log .
    $ type -p dpkg && dpkg -l > package.log
    $ type -p rpm && rpm -qa > package.log

     
  4. (Optional) To facilitate in-depth analysis, you can run the following commands:

    $ lspci -vnn > lspci.vnn.log
    $ lspci -nn > lspci.nn.log
    $ sudo dmidecode > dmidecode.log
    $ uname -a > uname.a.log
    $ lsinitramfs /boot/initrd.img-`uname -r` > lsinitramfs.log
    $ sudo lshw > lshw.log
    $ modinfo amdgpu > modinfo.amdgpu.log
    $ glxinfo > glxinfo.log

Capturing the Output of Your Commands to a File

  1. Start a script session to capture your commands to a log file.

    $ script /tmp/install-log.txt
     
  2. Run all commands you want to capture in the script (for example, install All-Open base driver).

    $ ./amdgpu-install -y
     
  3. End the capture session.

    $ exit
Back to top