Questions regarding new AMDGPU driver. A newbie needs help

So today in the news, the new open-source AMDGPU driver was released for Ubuntu 18.04 and is available on Github

Source: Article on Phoronix

I want to install this to take advantage of the performance gain because I play some demanding games through Wine and Steam. I also want to learn to comfortably try these out and still be able to revert to the drivers my install came with, in case everything goes wrong.

In the past (on another install of regular Ubuntu 18.04) I installed the amdgpu-pro drivers through AMD website. I had carefully followed all their directions. When I had it installed correctly (and rebooted) I was not able to launch any native steam games at all, but I could launch Wine games. I also had a bit of screen tearing in browsers, in OBS-studio, Blender, and video playback, whereas I hadn’t experienced any of that with the kernel driver.

I solved it by re-installing my whole OS and kind of forgot to backup some video tutorials I had, oops. :disappointed_relieved:


On this page it describes the install process with the .deb file I would download ( which I block-quoted below).
Then it shows runtime settings , PAL GpuProfiler Layer , and some other information as you keep scrolling down that page and I don’t understand any the instructions after the ‘Install with pre-built driver’ section.

I’m am confused about all this because I’m really new to using Linux.
Here are my three questions:

After I install this, will I be able to utilize hardware encoding in OBS-studio? Right now I have to use the software encoding and I’d rather use the GPU.
Do I need anything after the install process I posted below to get the driver working?
And If I go ahead and install this .deb file, how do I revert to the AMDdriver that came with my distro?

Install with pre-built driver

You could download and install pre-built deb package (compatible with Ubuntu 16.04 and 18.04) from https://github.com/GPUOpen-Drivers/AMDVLK/releases for each stable code promotion in master branch:

sudo dpkg -r amdvlk   /* If old version is installed on the machine, remove it first */
sudo dpkg -i amdvlk_x.x.x_amd64.deb
sudo apt-get -f install

You could also install the latest driver build from http://repo.radeon.com:

sudo wget -qO - http://repo.radeon.com/amdvlk/apt/debian/amdvlk.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/amdvlk/apt/debian/ bionic main > /etc/apt/sources.list.d/amdvlk.list'
sudo apt-get remove amdvlk /* If old version is installed on the machine, remove it first */
sudo apt update
sudo apt-get install amdvlk

Here is my output of lspci -k | grep VGA -A2

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Polaris11] (rev cf)
Subsystem: Micro-Star International Co., Ltd. [MSI] Baffin [Radeon RX 560]
Kernel driver in use: amdgpu

Thank you for your time and efforts.

I can’t answer everything, but I have worked with AMD graphics for a number of years.

(1) “… new open-source AMDGPU driver was released for Ubuntu 18.04 and is available on Github …”
A: That source code is for the latest Vulkan Graphics API for AMD GPUs. https://www.khronos.org/vulkan/
I doubt that the code and debs there will be of any use to you as they are for debugging and testing Vulkan. It is not the AMDGPU driver.

(2) " …will I be able to utilize hardware encoding in OBS-studio?"
A: Probably not. Encoding on Linux is iffy at best. Some of the driver code is there but not very well tested. Other than some diagnostic apps, I don’t know of any user application with encoding tested and working. (Gstreamer? maybe) Your graphics chip is AMD VCE 3.4. https://en.wikipedia.org/wiki/Video_Coding_Engine

(3) For the latest, bleeding edge AMD GPU drivers https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

(4) To revert to standard Ubuntu drivers type the following in a prompt shell:
$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:oibaf/graphics-drivers

(5) I have seen more problems than improvements with the AMDGPU-PRO drivers. If you have an application that is a heavy OpenGL user, then the AMDGPU-PRO drivers will offer a dramatic speed improvement. Otherwise, not much.

I am using the “oibaf” drivers here. Still evaluating if the newer drivers help anything.

djb

1 Like

Hi,

You can try this…

Radeon™ Software for Linux® 18.20 Release Notes:
https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-20

File:
https://www2.ati.com/drivers/linux/amdgpu-pro-18.20-673703-ubuntu-18.04.tar.xz

Install
sudo tar -xJvf amdgpu-pro-18.20-673703-ubuntu-18.04.tar.xz
sudo cd amdgpu-pro-18.20-673703-ubuntu-18.04
sudo ./amdgpu-pro-install -y (it takes some time)

Reboot
After start you can check the config is running: # lshw -c video

Note
Works fine in Ubuntu MATE 18.04.1 LTS (Bionic Beaver) 64-bit, if your chipset is in the list “AMD Radeon™ Product Family Compatibility”.
If you got some error in boot you can uninstall in recovery mode # amdgpu-pro-uninstall && reboot.

Checkout your Chipset
sudo inxi -Fxz

The latest AMDGPU-PRO is 18.30 -
https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-30

1 Like

I installed the AMDGPU-Pro driver (I think) but I don’t think it is being used correctly.

I downloaded the 18.30 package and followed the directions you gave
sudo tar -xJvf
cd into the file I extracted then ran:
sudo ./amdgpu-pro-install -y

after I rebooted I ran sudo lshw -c video
output:

*-display
description: VGA compatible controller
product: Baffin [Polaris11]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: cf
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
configuration: driver=amdgpu latency=0
resources: irq:128 memory:c0000000-cfffffff memory:d0000000-d01fffff ioport:e000(size=256) memory:dfe00000-dfe3ffff memory:c0000-dffff

I ran glxinfo | grep “OpenGL version” and got this:

OpenGL version string: 4.5.13536 Compatibility Profile Context 18.30.2.15

I ran dpkg -l amdgpu-pro and got this output:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++Âą==============-============-============-=================================
ii amdgpu-pro 18.30-641594 amd64 Meta package to install amdgpu Pr

So is the driver installed correctly? I don’t know because lshw -c video shows the drivers are still amdgpu and the dpkg -l command shows the pro-18.30 and it looks like there was an error or reinstall required? I don’t know how to read the output.

edit:

  • I uninstalled the amdgpu-pro drivers

  • Then I blacklisted amdgpu by editing /etc/modeprobe.d/blacklist.conf with ‘blacklist amdgpu’ at the end of document.

  • Then I ran this to update initramfs:

  • sudo update-initramfs -u
    Then I rebooted

  • After fresh boot I installed the amdgpu-pro drivers (18.30)

  • After reboot I had only my desktop background and no icons, panel, and some strange black rectangles.

There was no sign of any driver in use but amdgpu-pro still showed as installed with lshw -c video


I did the same with the new 18.50 version and it was the same. So the Pro drivers just don’t work for me, but at least I learned how to revert to the ones I don’t want to use. This is sadly all because some water textures aren’t displaying correctly in a game my daughter wants to play with me and she says she would rather play in Windows because it looks better. I will prove her wrong somehow!

hahaha the things dads do.
(And to think my dad and I used to play Warcraft I and II over network cables back in the day!)

I added this ppa and did an apt update, now how do I install the driver package?

To pull in the new “oibaf” opensource drivers, the steps are:
(1) sudo add-apt-repository ppa:oibaf/graphics-drivers
(2) sudo spt update
(3) sudo apt upgrade

You need to do step three.

If you need to return to the Ubuntu provided drivers, do:
(1) sudo apt-get install ppa-purge
(2) sudo ppa-purge ppa:oibaf/graphics-drivers


The amdgpu-pro drivers add features to the open-source amdgpu driver. AMD took over development of the open-source drivers so that they could just add proprietary pieces rather than develop a whole new driver. The new amdgpu-pro pieces add OpenGL version 4.5 (should be with GPU assist). The “oibaf” version of the open-source parts add OpenGL 4.5 via Mesa, ie via software.

glxinfo | grep "OpenGL version"

OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.0-devel (git-a2ec788 2018-12-14 bionic-oibaf-ppa)

There are two primary kernel drivers: radeon and amdgpu. To those, the amdgpu-pro driver adds propietary accelleration kernel drivers.

Note that AMD is really working hard to get the basics working in the open-source drivers. That includes GPU accellerated decoding:

Part of the output from “vdpauinfo”

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3  9216  2048  1152
MPEG2_MAIN                      3  9216  2048  1152
H264_BASELINE                  41  9216  2048  1152
H264_MAIN                      41  9216  2048  1152
H264_HIGH                      41  9216  2048  1152
VC1_SIMPLE                      1  9216  2048  1152
VC1_MAIN                        2  9216  2048  1152
VC1_ADVANCED                    4  9216  2048  1152
MPEG4_PART2_SP                  3  9216  2048  1152
MPEG4_PART2_ASP                 5  9216  2048  1152
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE       0  9216  2048  1152
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

GPU accellerated encoding is coming and may already be there with amdgpu-pro, I just have no good way to test encoding here.

Good luck

djb

1 Like

Thank you for all your help.
I did end up figuring out all I had to do what upgrade and dist-upgrade.
I am now successfully running oibaf drivers on my machine and my youngest daughters (she dual-boots). So far everything looks much better in games. I proved my kid that we don’t need Windows! She might actually want to uninstall Windows now that all her games run in Linux just as good as Microsloth.

pastlife@genesis-01:~$ glxinfo | grep “OpenGL version”
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.0-devel (git-9dc135e 2018-12-17 bionic-oibaf-ppa)

Thanks again everyone, for all the hard work! Time for coffee…

Yep. It got to where my daughter hated having to use Windows. She has been on a version of Ubuntu for the last 10 years. She has to use Windows at work.

djb

1 Like