Return to Level1Techs.com

RX590 Ubuntu 18.04 Setup Guide


#1

Booting the USB installer will result in an unhelpful black screen and/or possibly some video corruption (at least, as of the time of this writing).

Your best bet is to hit ‘e’ on the “Install Ubuntu / Try Ubuntu” screen and add a space and nomodeset to the end of the line that starts with linux.

(scr)

ctrl-e or F10 will continue the bootup process. From there you should get to a graphical installer that we all know and love.

Install as normal. NOTE: I recommend unplugging or removing any drives on which you don’t intend to install Linux. Dual booting? Remove that drive. Duel Booting for VFIO stuff? Remove the windows drive. It’s just easier, especially if you’re unsure of yourself. The Ubuntu installer can detect windows, too, which can make things overly complicated for newbies. So, please, remove any drives that have anything important and make backups before you get started.

Booting into Ubuntu won’t work either. On my install I got kernel 4.15 – you will have to hit ‘e’ again early in the bootup process and add nomodeset to get the system to boot.

What’s going on here is that the Linux Kernel is too out of date to work with the new RX590 silicon. There were some changes to power management, apparently to enable higher boost clocks, on the RX590 which will crash the card when the software driver uses.

We can use the Ubuntu Kernel Update Utility (ukuu) to make the update process easier. However, we will also need updated firmware for Polaris.

First, install UKUU

Then install Kernel 4.20, 4.20.1 or newer.

Finally, we will need some firmware from here:
https://people.freedesktop.org/~agd5f/radeon_ucode/

The polaris* files dated for december go in /lib/firmware/amdgpu on your local system. I like to do it from the terminal, but there is no reason you can’t use Firefox to just save those files then use the ‘Files’ program to move them over.

sudo wget https://people.freedesktop.org/~agd5f/radeon_ucode/polaris10_k_mc.bin

It isn’t necessary to do this for all the files. If you want to be sure, you can run dmesg in a terminal to find out what firmware files you need:

# dmesg |grep firmware
[    0.942424] amdgpu 0000:09:00.0: Direct firmware load for amdgpu/polaris10_k_mc.bin failed with error -2
[    0.942424] mc: Failed to load firmware "amdgpu/polaris10_k_mc.bin"
[    0.942469] [drm:gmc_v8_0_sw_init [amdgpu]] *ERROR* Failed to load mc firmware!
[    4.109598] r8822be: Using firmware rtlwifi/rtl8822befw.bin

You will also need to update the initial ram FS once all these are downloaded. I do this from the terminal:

You should see something like:

sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-4.20.0-042000-generic

Which tells us it is making the initial ram disk for kernel 4.20 which was setup with the Ukuu GUI earlier.

Note that you may also get a bunch of warnings:

update-initramfs: Generating /boot/initrd.img-4.20.0-042000-generic
W: Possible missing firmware /lib/firmware/amdgpu/raven2_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/si58_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/banks_k_2_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hainan_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/oland_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/verde_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_k_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/pitcairn_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/tahiti_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/polaris11_k_mc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_uvd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/mullins_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/hawaii_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kaveri_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/kabini_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/bonaire_vce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven2_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/picasso_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega12_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vegam_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/polaris11_k2_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_dmcu.bin for module amdgpu

That is OK. These firmware files aren’t there yet because Ubuntu hasn’t caught up. You can download them from the same website – but they only apply to specific video cards. You can see the codenames in there – polaris, vega, kaveri, hawaii, etc – in general you only need the firmware file(s) that apply to your specific gpu.

Once that’s done reboot, run the dmesg command again and verify it found & loaded the firmware.

Without this, advanced features of the graphics card (like 3d acceleration) doesn’t seem possible.

For some reason on my system mesa was not functioning properly.

I used this to correct the issue:
sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
sudo apt update
sudo apt upgrade
sudo apt install mesa-utils mesa-vulkan-drivers

From there I could install Steam:

sudo apt install steam

And the steam icon was in my shortcut list.

Begin Quality of Life Detour.

This, being a new system, needs some quality-of-life fixes. One of my favorite utilities is cpufreq which lets me see what speed the CPU is at and to set the performance profile of the system easily. Let’s set that up.

first
apt install chrome-gnome-shell

then visit
https://extensions.gnome.org/extension/1082/cpufreq/

with Firefox. Install the Gnome Firefox extension, and reload the page in Firefox.

Once you do that you will have a toggle in the upper right. Toggle “On” the CPUFreq extension. Once that is on, you will get the CPU speed in the top right.

On my system I found it necessary to uninstall irqbalance – an older utility for balancing interrupts across processors. It usually causes more trouble than it saves.

sudo apt remove irqbalance

I also hit the "Install…’ option on CPUFreq to give me some more fine-grained control of the CPU performance.

End Detour.

At this point, you really should reboot. You should not have to enter nomodeset to get to a graphical desktop in Ubuntu (since you should be running a newer kernel). Verify the firmware situation is fine with the dmesg command and we can move on to making sure that Steam, and mesa, are suitable for playing games.

$ dmesg |grep firmware
[    0.945582] [drm] Found UVD firmware Version: 1.130 Family ID: 16
[    0.946056] [drm] Found VCE firmware Version: 52.4 Binary ID: 3
[    4.047513] r8822be: Using firmware rtlwifi/rtl8822befw.bin

This is good to see. Firmware was loaded for the RX590 successfully. [The last line is the WiFi firmware. Your system might have other firmware files you need, so beware of that. Not having the WiFi firmware, for me, would not be fatal to having a working system.]


AMD Video Drivers (from hell)
Linux Gaming: 0 to Steam with the Sapphire RX 590 on Ubuntu! | Level One Techs
#2

#3

Reserved. Video out soon.


#4

Might as well get the “RTX card and Fedora 29” tutorial going…


#5

Freesync is working. Just like that…


#6

You can get even newer firmware from a Fedora 29 install, dated 22nd of January. Fedora doesn’t seem to load the firmware for my RX460 though…


#7

Wendell, any chance of doing a video about ROCm

I like to game but also mine when I have the chance. The Open Source drivers give me far superior performance than the AMDGPU-pro drivers. But with all miners being Open CL, I need to install the pro drivers to make the miners run.

I have read that if using the open source drivers and installing rocM, it will allow to play games on open source drivers but also mine?

Is this true and if so a video tutorial would be great.

New to Linux and would be very handy to assist in me learning.


#8

I also have another question as I have an RX580. On Ubuntu how would you overclock the GPU and undervolt it.

Easy on Windows with MSI Afterburner, but with Linux I have no clue


#9

thanks for this wendell now I can get linux working on my RX 590 :stuck_out_tongue: but now I want to buy a M.2 for just linux goddamit


#10

Any chance we could get a linux amdgpu overclocking video? I’ve tried my hand at it but I think I’m doing something wrong. and I constantly get varying information and it seems like the actual state of amdgpu OC is changing a lot right now.

Edit: or a potential more awesome idea. EXTREME OVERCLOCKING in linux. partner up with jay or GN steve and do something insane with a 590 or some form of vega. I’ve heard legend that you could theoretically pass an unsigned vbios at boot time in linux which would mean you could do some really awesome OC while bypassing power limits.


#11

Just last month I upgraded my pc and now I’m on a ryzen 5 2400g and an rx 570, I know it doesn’t apply as much but thanks for the little QoL improvements, that cpufreq and irqbalance thing went great, already tweaked the multiplier, turboing to 3.9 - 4.0 gHz with stock cooler.

The only issue I had with the video @wendell, you’re such a teaser.
I want to know what “the experiment” is


#12

only thing that worries me … is the fans on this bad boy…
i do admit that the last time i was running Linux on a desktop machine
was more then 12yr ago… my Sapphire card sum times went nuts with the fans spinning… That’s why i was looking for a passively cooled amd gpu that could drive my future 4k display don’t need it for gaming…only one i could find is the MSI Radeaon R5 230 …for €60… But if the Sapphire Radeon RX590 8G Nitro+ what ever all that means runs near silent in my pc and it’s not overkill for someone that spends all his time in a terminal (virtual machines) and sum browsing i’m willing to put this card on my list… if Wendell says it’s good i trust him :wink:


#13

btw would a card with 3 fans be better?? less noise or more ??
was looking at RX590 cards… and found this one…
“Asus ROG Strix Radeon RX 590 8GB GDDR5”
it’s even more expensive than the Sapphire one hahahha…


#14

How does Fedora work out of the box?

$ uname -a
Linux localhost.localdomain 4.20.6-200.fc29.x86_64 
#1 SMP Thu Jan 31 15:50:43 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

#15

I didn’t have to do a tutorial for it, so… what do you conclude? :wink:

Though, I have to say, Arch is really kicking ass for “it just works” w/steam amd proton. I’ve had a little test machine running under my desk for 3 months and… its track record is quite good for non-breakage.


#16

Very nice. Thank you.

I wish I could say things were going as swimmingly on the integrated graphics side of things. https://bugzilla.redhat.com/show_bug.cgi?id=1562530 still says NEW (I’ve since returned the Asus Vivobook though.)


#18

hey @wendell i found this while searching for a way to update the entire drivers, and it contains seems to work for both ubuntu and debian.


#19

I wish I could recommend Antergos to a beginner since it’s so easy to do the install and get steam running. But the longer I use it the more things I find require me to go in and manually setup configs where in ubuntu they would be ready to go ootb like samba or local domain name resolution


#20

you have

sudo apt remove irqfreq

did you mean

sudo apt remove irqbalance


#21

Hi Wendell thanks for the guide.

I don’t think i understand Shells?

I ditched Cinnamon as it tended to crash when gaming and went to XFCE (Mint) .

You suggest adding the Gnome shell to Ubuntu for CPUFREQ. A. can I do this and keep XFCE and B. if I add gnome shell to xfce am I defeating the purpose of using a light weight Window Manager.

Thanks again for the guide… Please finish up your Linus Tech videos a lot has changed since you started that Collaboration.