How to install AMD / ATI drivers in Ubuntu 18.04?

AMD Radeon

En the previous article I shared some methods to perform the installation of the Nvidia video drivers on our systemWell, now it's the turn for those with AMD drivers.

To be able to install the video drivers of our chipset We must know the model of our video graphics, this includes AMD processors which have long come bundled with integrated graphics.

It is worth mentioning that this article is oriented for newbies, since this topic is usually something that is asked very often.

Installation of Privative AMD drivers in Ubuntu

We must open a terminal and run the following command:

lspci | grep VGA

So it will show you something like this:

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] [Radeon R5 (PCIE)]

In my case I have an AMD processor with an integrated Radeon R5 GPU.

With this information, we proceed to download the appropriate driver for our system.

We will have to go to the official AMD page to download the driver corresponding to our video card. The link is this.

Done the download we must unzip the file just obtained, in the terminal we position ourselves on the folder where we save the file and execute:

tar -xJvf amdgpu-pro _ *. tar.xz

A directory will be created containing all the necessary driver packages. We enter the directory:

cd amdgpu-pro-XX.XX-XXXXXX

Before installing we must add support for 32-bit architecture:

sudo dpkg --add-architecture i386

sudo apt update

And now let's run the installation script. In the terminal we type:

./amdgpu-pro-install -y

They can use the following arguments depending on the case.

--px  PX platform support

--online    Force installation from an online repository

--version=VERSION      Install the specified driver VERSION

--pro        Install "pro" support (legacy OpenGL and Vulkan)

--opencl=legacy    Install legacy OpenCL support

--opencl=rocm      Install ROCm OpenCL support

--opencl=legacy,rocm       Install both legacy and ROCm OpenCL support

--headless    Headless installation (only OpenCL support)

--compute     (DEPRECATED) Equal to --opencl=legacy –headless

The recommended argument for a smooth installation is -px.

At the end of the installation you only have to restart your computer so that the new drivers are loaded at startup and you can start your system using them.

Just like interesting alternatives you can install:

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

How to uninstall Radeon drivers in Ubuntu 18.04?

Now one of the most frequent problems that usually occur is that when you restart your computer the screen goes black and does not show you the desktop environment.

So that to revert the changes you only have to open a TTY with Ctrl + Alt + F1 and in it you type:

amdgpu-pro-uninstall

You can try with some installation argument in case the previous one didn't work for you.

Another solution is editing the grub, we must edit the following line, for this we execute:

sudo nano /etc/default/grub

They add amdgpu.vm_fragment_size = 9 in the following line, it looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.vm_fragment_size=9"

Installing the open source ATI / AMD drivers in Ubuntu 18.04

Default Ubuntu 18.04, already has the open source AMD drivers installed. They are built into Mesa and the Linux Kernel.

Although, yes they want to have the latest updates faster, Since the packages in the official Ubuntu repositories are not always up to date, we can rely on a repository.

This PPA provides updated free graphics drivers X (2D) and table (3D). The update packages provide:

  • Vulcan 1.1+
  •  OpenGL 4.5+ support and new OpenGL extensions
  • OpenCL support with libclc support
  • Gallium -nine updated
  • VDPAU and VAAPI Gallium3D Accelerated Video Drivers

To add this PPA to our system, it is necessary that we open a terminal with Ctrl + Alt + T and we execute the following commands:

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

sudo apt-get update

And we install with:

sudo apt install xserver-xorg-video-amdgpu

Y if you want to install support for Vulkan:

sudo apt install mesa-vulkan-drivers

Another method for the system to install the drivers is:

sudo apt update && sudo apt -y upgrade

At the end we must restart our computer and the changes will be loaded at system startup.