ObjectiveInstall the latest AMD graphics drivers on Ubuntu
RequirementsA working install of Ubuntu 18.04 with root privileges
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
IntroductionIf you're planning on using an AMD graphics card with Ubuntu 18.04, you have a couple of options. Because Bionic is an LTS release, you do have the option of using the proprietary AMDGPU-PRO drivers. The open source drivers that come with Ubuntu are probably better for gamers, though. They're already installed, and you can configure your system to receive constant performance-boosting upgrades from the latest Mesa releases. Either way, you're going to have great experience working with AMD on Ubuntu 18.04.
ProprietaryWarning: as of this article, the proprietary drivers haven't been released for Ubuntu 18.04 yet.
Since Ubuntu 18.04 is a LTS release it will be officially supported by AMD with the AMDGPU-PRO drivers. These drivers are only available directly from AMD and are geared more towards professional applications. You don't need these drivers for gaming. Actually, the "gaming" part is almost identical to the open source driver.
Download and Unpack The DriversIn order to get the drivers, you need to go to the AMD Download Page, and grab the latest version of the drivers that matches your card. The release should come in the form of a tarball. Either extract the tarball automatically with your GUI archive manager through your browser or let it download and extract it using
tarfrom the command line.
$ tar -xJvf amdgpu-pro_*.tar.xzA directory containing all of the necessary packages will be created based on the version of the drivers.
cdinto that directory.
Run The ScriptDon't worry about installing all of those packages individually. There's an installer script that will handle everything for you. Run the script as a regular user. It will ask you for your password to use
sudo. If you want to be lazy, add the
-yflag to answer "Yes" to every question.
$ ./amdgpu-pro-install -yLet the script run and install all of your packages. It'll take a bit of time, but once it's done, your system will be ready. Just restart, and you can start using your new drivers.
Open SourceIf you're running Ubuntu 18.04, you already have the open source AMD drivers installed. They're integrated into Mesa and the Linux kernel. Since, Ubuntu 18.04 is new, it'll have some of the latest features. However, if you want the absolute latest as long as you're running your system, there's an excellent PPA that packages Git versions of Mesa.
Add The PPAThis PPA also includes the Gallium Nine patches which enable DirectX9 support for Mesa. You can use it along with Wine to play older Windows games with near native performance.
$ sudo add-apt-repository ppa:oibaf/graphics-drivers $ sudo apt-get update
Update and UpgradeAfter you've added the PPA, update Apt, and run a full upgrade.
$ sudo apt update && sudo apt -y upgradeApt will automatically pull in the updated packages from the PPA.
Enable DRI3DRI3 will increase graphical performance with the AMDGPU drivers. In order to enable it, you need to add a few lines to your
/etc/X11/xorg.conffile. Open it with
sudousing your favorite text editor. Add in the block below.
Once you've added that. Save, and restart your computer. When it reboots, you'll be using the latest version of Mesa with DRI3 enabled.
Section "Device" Identifier "AMDGPU" Driver "amdgpu" Option "AccelMethod" "glamor" Option "DRI" "3" EndSection
Closing ThoughtsWhichever route you chose, your AMD graphics card will perform very well with Ubuntu 18.04. Both drivers will also be supported through the release's entire lifespan, so don't worry about them falling out of date. Again, gamers should probably stick to the open source. It'll see the most incremental upgrades, and you can take advantage of Gallium Nine for Wine gaming.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-the-latest-amd-radeon-drivers-on-ubuntu-18-04-bionic-beaver-linux%EF