Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to install AMDGPU drivers on Debian 9 Stretch Linux  (Read 1360 times)

0 Members and 1 Guest are viewing this topic.

sumesht

  • Guest
How to install AMDGPU drivers on Debian 9 Stretch Linux
« on: March 03, 2018, 03:32:41 pm »
Installing the open source AMD drivers on Debian Stretch may just be the easiest and simplest install process in the history of Linux graphics drivers.

Anyone who tried to install the open source AMDGPU drivers when they first launched alongside AMD's Polaris cards will tell you that the process is long and painful, and they were right.

Required Packages

There are still some packages that need to be installed and some things that need to be done to get the drivers working. The first thing you need to do is enable the contrib and non-free repositories in Debian.

In your /etc/apt/sources.list add contrib non-free after main on every line. When that's done, close your text editor and run:

Code: [Select]
# apt update && apt upgrade
You should be using apt instead of apt-get by now. apt is the newer and better command. In creating this guide, kernel 4.9 was being kept back by apt-get but installed perfectly fine with apt.

Linux Firmware

Alright, so now you're ready to install the single package that makes this possible. Because Debian doesn't ship firmware blobs by default, the required firmware is available but not installed. Install it with the command below.

Code: [Select]
# apt install firmware-linux
That's really it. Now, don't restart just yet. There is another important part.

LLVM

LLVM is required to build Mesa, and it is used by some of the graphical packages. You may be able to get by without it, but it's a good idea to make sure that your system has the right version installed, just in case.

In order for Mesa to be built with AMDGPU support, LLVM 3.9 or greater is needed. At the time of this article, 3.9 is still the latest version, but 4.0 is available as a release client.

Meanwhile, Stretch is still shipping 3.7 and 3.8 as well as 3.9. Install 3.9 or 4.X now to make sure that the older versions are not pulled in.

Code: [Select]
# apt install llvm-3.9 clang-3.9
Restart and Test


Now you can restart your system for the changes to take effect and the firmware to be loaded. On the reboot, you should see the screen change while loading and possibly hear the fan spin up on your graphics card.

That's an indication that the firmware has been loaded.

To test out your graphics card, download the Phoronix Test Suite Debian package
Code: [Select]
http://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_6.8.0_all.deb
It's dependent on PHP, so install that first, and install it with dpkg.

Code: [Select]
# apt install php7.0 php7.0-cli php7.0-xml
$ cd ~/Downloads
# dpkg -i phoronix-test-suite_6.8.0_all.deb

After the packages install, you can run the Unigine tests or any of the tests available to see what your card can do.

Code: [Select]
$ phoronix-test-suite run unigine-heaven
« Last Edit: March 03, 2018, 03:34:42 pm by sumesht »