How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#1 How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

Post by Alez »

How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

This info has probabily changed since November. See next post instead

Original AMD page

Installing the AMDGPU-PRO Driver
There are four simple steps involved in the installation of the AMDGPU-Pro Driver: Download, Extract, Install and Configure. The instructions to perform the installation are intended for an Ubuntu installation of 16.04, and should take less than 10 minutes to complete. Before installing the driver, a quick note on how to check if your system already has AMDGPU-PRO installed. In addition, the recommended best practice is to bring the system up-to-date before starting the driver installation, with:

sudo apt update
sudo apt dist-upgrade
sudo reboot

System Check
The easiest way to find out if you have AMDGPU-Pro already installed on your Ubuntu System is to query the Debian package manager.

Using the following command at a terminal will provide you with the version of the AMDGPU-Pro stack on your system, or inform you that there are no packages found:

dpkg -l amdgpu-pro

Download
A direct link to download the Linux AMDGPU-PRO driver is given below and it is also available on the Driver Download Page. This file has a "tar.xz" extension which reflects a more-effective compression algorithm that (in most cases) creates a smaller archive than the more common gzip format.

AMDGPU-PRO Driver Version 17.40 for Ubuntu 16.04.3

NOTE: This file can also be located via the Driver Download Page by locating your card and selecting the Linux Driver link.

Extract
After the archive is downloaded, extract the contents to a temporary location from which you can install it. The example below assumes you have downloaded the archive to /tmp and will extract to the same location. If your file was downloaded into the ~/Downloads/ folder by default, you can also extract and install from there, and afterwards you can remove the install files.

(Notes: Please replace the "NNNNNN" in the following command line with the actual build number of the downloaded file)

cd /tmp
tar -Jxvf amdgpu-pro-17.30-NNNNNN.tar.xz

Install
Once the archive is expanded on the local machine, run the included script (amdgpu-pro-install) to install the graphics stack. During the installation you will be required to provide sudo access, and also to provide two confirmations to:

Install the packages, and
Allow installation of "unverified" packages from the AMDGPU-PRO archive.


The script will use the package manager to install the components of the graphics stack, with a short delay during the DKMS (Dynamic Kernel Module Support) installation. From the directory where you extracted the archive, issue the following command:

(Notes: Please replace the "NNNNNN" in the following command line with the actual build number of the downloaded file.)

cd amdgpu-pro-17.30-NNNNNN
./amdgpu-pro-install -y

you may have to use
./amdgpu-pro-install --compute
instead
sudo reboot

Configure
Ensure that your user account is a member of the "video" group prior to using the vulkan driver. You can find which groups you are a member of with the following command:

groups

To add yourself to the video group you will need the sudo password and can use the following command:

sudo usermod -a -G video $LOGNAME

If you installed boinc from the repo you will need to use the following command in addition

sudo usermod -a -G video boinc

You will need to log out and in again to activate this change.

Uninstalling the AMD GPU-PRO Driver
If for any reason you wish to remove the AMDGPU-PRO graphics stack you can do this using the uninstallation script which was part of the installation and is present in your path. From the command prompt enter the following command:

amdgpu-pro-uninstall

Installing the Optional ROCm Component
This AMDGPU-Pro driver package incorporates the ROCm component that can be optionally installed for running Compute/OpenCL applications. You can install the component by issuing the following command:

sudo apt install -y rocm-amdgpu-pro

Configuring the Optional ROCm Component
The LLVM_BIN environment variable needs to be set prior to running ROCm applications.

To set it temporarily when running an individual ROCm command, such as clinfo, use:

env LLVM_BIN=/opt/amdgpu-pro/bin /opt/amdgpu-pro/bin/clinfo

To set it permanently for all bash and other sh-like shell users, you can use the following command:

echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh

See the Ubuntu Environment Variables Community Help for more information.

To set it permanently for all csh users, you can use the following command:

echo 'setenv LLVM_BIN /opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.csh
Image
The best form of help from above is a sniper on the rooftop....
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#2 Re: How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

Post by Alez »

Installation Instructions for amdgpu Pro / amdgpu All Open Graphics Stacks

Original article page

For BOINC installs you will want to install amdgpu Pro Graphics Stack see further down page.

Article Number: AMDGPU-INSTALLATION
Installation Instructions for amdgpu All Open Graphics Stack

The amdgpu-pro Graphics stack is recommended for use with Radeon Pro graphics products. Use of amdgpu is recommended for all other products.

Note:
The instructions below are intended for use with systems running Ubuntu or RedHat/CentOS. They have been tested on Ubuntu 16.04.3 and mix of RedHat 7.4, RedHat 7.3 and CentOS 6.9.

Preparation

Download the amdgpu-pro tar archive containing the installation script (eg. to ~/Downloads).
Extract the archive to a known location (Please replace the "NNNNNN" in the following commands with the actual build number of the downloaded file.)

cd ~/Downloads
tar -Jxvf amdgpu-pro-17.50-NNNNNN.tar.xz
Enter the directory where the downloaded archive was extracted (this is expected to be the same name as the archive file).

cd ~/Downloads/amdgpu-pro-17.50-NNNNNN

Install

RedHat Only Pre-Install
Note that an internet connection will be required if EPEL is not found and Red Hat or CentOS installation media from a DVD, USB key or a mounted ISO will be required if the system does not have an active Red Hat or CentOS Subscription.
The AMDGPU-Pro driver requires access to specific RPMs from Red Hat or CentOS installation media as well as Extra Packages for Enterprise Linux (EPEL) for purposes of dependency resolution. A script named amdgpu-pro-preinstall.sh will confirm that all required prerequisite files and repositories are available in order to successfully install the AMDGPU-Pro driver in the Red Hat or CentOS environment. It can be run as follows:

sh amdgpu-pro-preinstall.sh --check
This will check if the required repositories are available to ensure a smooth installation. If there are any warnings, the script can be executed again without any options to build the necessary repositories

sh amdgpu-pro-preinstall.sh

Install the All Open Graphics stack

./amdgpu-install -y
Reboot

Uninstall

Removal of all components is accomplished by simply running the uninstall script from anywhere in the system.

amdgpu-uninstall
Reboot


NORMAL BOINC INSTALL

Installation Instructions for amdgpu Pro Graphics Stack

The amdgpu-pro Graphics stack is recommended for use with Radeon Pro graphics products. Use of amdgpu is recommended for all other products.
Note:
The instructions below are intended for use with systems running Ubuntu or RedHat/CentOS. They have been tested on Ubuntu 16.04.3 and mix of RedHat 7.4, RedHat 7.3 and CentOS 6.9.

Preparation

Download the amdgpu-pro tar archive containing the installation script (eg. to ~/Downloads).
Extract the archive to a known location (Please replace the "NNNNNN" in the following commands with the actual build number of the downloaded file.)

cd ~/Downloads
tar -Jxvf amdgpu-pro-17.50-NNNNNN.tar.xz

Enter the directory where the downloaded archive was extracted (this is expected to be the same name as the archive file.

cd ~/Downloads/amdgpu-pro-17.50-NNNNNN

Install

RedHat Only Pre-Install
Note that an internet connection will be required if EPEL is not found and Red Hat or CentOS installation media from a DVD, USB key or a mounted ISO will be required if the system does not have an active Red Hat or CentOS Subscription.
The AMDGPU-Pro driver requires access to specific RPMs from Red Hat or CentOS installation media as well as Extra Packages for Enterprise Linux (EPEL) for purposes of dependency resolution. A script named amdgpu-pro-preinstall.sh will confirm that all required prerequisite files and repositories are available in order to successfully install the AMDGPU-Pro driver in the Red Hat or CentOS environment. It can be run as follows:

sh amdgpu-pro-preinstall.sh --check
This will check if the required repositories are available to ensure a smooth installation. If there are any warnings, the script can be executed again without any options to build the necessary repositories

sh amdgpu-pro-preinstall.sh

Within the Complete Graphics and Compute Stack, newer hardware will require a different OpenCL component to be installed. Please choose the correct install based on your installed Graphics product.

Vega10 and newer

Install the Complete Graphics and Compute stack

./amdgpu-pro-install -y --opencl=rocm
Reboot

pre Vega10

Install the Complete Graphics and Compute stack

./amdgpu-pro-install -y --opencl=legacy
Reboot

Uninstall

Removal of all components is accomplished by simply running the uninstall script from anywhere in the system.

amdgpu-pro-uninstall

Reboot

Help

The install script includes brief builtin help. To view the help, run:

./amdgpu-install --help

The Pro variant would use

./amdgpu-pro-install --help'


POST DRIVER INSTALL


You need to add your user to the video group.

You can find which groups you are a member of with the following

command: groups . If you are not already a member of the “video” group

do this:

sudo usermod -a -G video $LOGNAME

If you installed boinc from the repo you will need to use the following command in addition

sudo usermod -a -G video boinc

log out and then back in and try the “groups” command. You should see that you are now a member of the “video” group.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
Dirk Broer
Corsair
Corsair
Posts: 1962
Joined: Thu Feb 20, 2014 11:24 pm
Location: Leiden, South Holland, Netherlands
Contact:

#3 Re: How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

Post by Dirk Broer »

I've tested the AMDGPU-PRO driver only to see it fail because it was built with a too-old version of DRM (2.5 where 3.0 or later was needed)
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#4 Re: How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

Post by Alez »

Yip Dirk, still far, far easier to install nVidia on Linux. I have all nVidia's under Linux and all AMD's under windows. AMD are still on 16.04 whereas all my systems are 17.10 They really are slow to support anything other than LTS.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
Dirk Broer
Corsair
Corsair
Posts: 1962
Joined: Thu Feb 20, 2014 11:24 pm
Location: Leiden, South Holland, Netherlands
Contact:

#5 Re: How-To Install/Uninstall AMD Radeon™ Software AMDGPU-PRO Driver for Linux® on an Ubuntu System

Post by Dirk Broer »

I have three 17.10 systems running at the moment: one with a nVidia GT650 that alas runs no higher than OpenCL 1.1, one with a Radeon HD7790 suffering that same fate -using the Open Source AMDGPU driver- and one with a Athlon 5350 and its R3 IGP that suffers from a lack of software support (an identical Win10 machine is lustely crunching on that IGP).

The Radeon HD7790 can only crunch Collatz it seems, but at quite a pace. The R3 will try to crunch Collatz too, but hasn't got enough power under U/Xu/Lu -take your pick- buntu 17.10....
Image
Post Reply Previous topicNext topic

Return to “Linux”