Build an Ubuntu Compatible Deep Learning Computer for Nvidia RTX 3080.

Original article was published by Matthes Krull on Deep Learning on Medium


Build an Ubuntu Compatible Deep Learning Computer for Nvidia RTX 3080.

Recently, I decided to switch from a Laptop for my Deep Learning Projects to an old-school desktop since I was tired of driver problems.

What I will cover:

  • Which Ubuntu compatible components to buy and why?
  • How to install Ubuntu 18.04.5?

Not covered: How to install NVIDIA Drivers.

Ubuntu Compatible Components

Here you find the components I chose to buy.

Those are affiliate links. I think it’s generally a nice way to show appreciation since I get a small commission when you purchase that product on Amazon 🙂

Explanation for the choice of Components

Mainboard

The most important part here is the Gigabyte X570. A lot of thoughts went into this decision since the mainboard is the part that usually causes the main headaches regarding drivers. Personally, I had the requirement that it must be known to be compatible with Ubuntu and that it should support PCI Express 4.0 for having a future proof system (if we want to upgrade to the new AMD CPU generation). Unfortunately, there is no list on the internet which covers every hardware and its compatibility with Linux (besides super outdated ones). That’s why chose this mainboard based on user reports. Also, I read ASRock, MSI, and others used to be regularly more incompatible than Gigabyte. For Wifi, I wanted to rely on an external solution (not part of the mainboard) since I can make the perfect Ubuntu compatible (and mainboard independent) choice:

Wifi and Bluetooth

Compatibility was more important for me than having the latest and greatest, however, these components are anyways very good. The USB Bluetooth and Wifi USB adapter are both Plug-and-play (!!!!), a dream for everybody whoever had issues with drivers! When you purchase the TP-Link Wifi stick it is important that you buy the 3. (latest) generation since gen 1 and 2 cause problems (Check out the bad reviews on Amazon for the former two generations. However, the third generation works perfectly fine. I read about in a Forum that a user used hundreds of these sticks on different Linux distributions without any problems. I lost the link, unfortunately.). The Bluetooth adapter from the brand Plugable is also very convenient and works out of the box as well.

CPU

I chose the AMD Ryzen 7 3700X since it has the best price-performance ratio on the market right now. You do not gain much in terms of performance from buying the new 10. Intel Generation and it is on average 100 Euro more expensive. Also, the AMD supports PCI Express 4.0 which enables us to make a nice decision for the Hard Drive.

Hard Drive

I am going for the 1TB Gigabyte AORUS M.2 2280 PCIe 4.0 since it does not cost much more (~30 Euros more) than the already very fast and famous Samsung EVO 970 Plus (3500MB/​s read & 3200MB/​s write), but is even faster (5000MB/​s read & 4400MB/​s write) with its PCI Express 4.0 support. The cool thing here is, that it is relatively inexpensive to get state-of-the-art storage technology: So go for it! (IMPORTANT: This will only work on mainboards which support PCI Express 4.0, otherwise it is pointless to buy into this relatively expensive storage).

GPU

To the time of writing this article, there is not much known between the pros and cons of certain models so buy whatever Nvidia 3080 card feels right for you and check out YouTube while new info arrives.

Memory / RAM

I use the 32GB Corsair Vengeance LPX DDR4–3600 since they are relatively cheap, have no RGB, and a low profile which makes it easier for our big CPU cooler to fit. Also, the 3600 MHz are a plus and worth ~15 Euros more in comparison to 3200 MHz ones.

Power

The 750 Watt be quiet! Gold is an easy choice since be quiet! has a great reputation as a manufacturer for high-quality silent components. Also, 750 Watts is recommended for 3080, so it fits perfectly.

CPU cooler

I went for the Noctua NH-D15 since it is much quieter than the stock cooler of AMD (I tried that one first). If you want to save ~100 Euro you can skip it, but since I wanted a silent build, there was no way around Noctua. Tests even showed that this one is less noisy and equally (if not more) efficient than water coolers. In general, I don’t like water coolers, since the pump makes noise and is more likely to fail (and therefore damage the whole system) than air coolers.

Installation Ubuntu 18.04.5

After you assembled everything and try to install Ubuntu 18.04 there are few tricks that must be considered. But one step after another.

Make a bootable USB stick

  1. Download Ubuntu 18.04.5 here. This version contains Kernel 5.4 which works great on our Mainboard!
  2. On another Ubuntu Computer, open Startup Disk Creator (which should be preinstalled). Choose the downloaded Ubuntu 18.04.5 file and the USB stick and click on “Make Startup Disk”.
Select the Ubuntu file and the USB stick and click on “Make Startup Disk”.

Install Ubuntu

When you turn on your new computer (with the USB stick plugged in) and press F12 you will be displayed several options. BETTER DO NOT DO THIS: Following will cause an error and in my case made it very hard to reverse the caused damage: If you click on “UEFI: USB” and in the following menu on “Install Ubuntu” you probably will be faced with the error “No irq handler for vector” and the installation freezes. You have to shut down the computer by holding your power button now 🙁 Also, it might be possible that you have a black screen after reboot. Try another PCI slot for your GPU in that case. Helped for me.

To solve this problem we have to disable “CSM support” and “Secure Boot“ in the bios and add a boot option.

  1. Boot the system and press F12. Click on “Enter Setup” to enter the BIOS.

2. On the right select “Advanced Mode”.

3. In “Boot” click on “CSM Support” -> “Disabled”

4. On the same page double click on the new option “Secure Boot” and here disable “Secure Boot” (was the default in my case).

5. Save the BIOS and reboot with pressing F12 again.

6. Here, we observe that the last two options are missing now and select “UEFI: USB”.

7. Select “Install Ubuntu” with arrow keys but do NOT press enter! Press e instead.

8. After you press e, the following screen shows up and you can add boot options. We need only one boot option: Therefore navigate with your arrow keys to behind

quiet splash — — —

and write

nomodeset

(which instructs the kernel to not load video drivers).

9. Press F10 to save the file and Ubuntu will start now with our old error “No irq handler for vector”, but this time does not freeze and continues to install 🙂

Now, you can do continue with your installation …. But one thing was still bothering me:

Set memory / RAM clock speed correctly

By default, your memory will only run on 2137,34 MHz as can be seen on the right-hand side of your bios.

Since we want 3600 Mhz we need to manually set the correct speed. Therefore go to “Tweaker” and enable “Profile1” under “Extreme Memory Profile (X.M.P)”. Now, save and restart the computer.

We observe, that the memory speed it set correctly now to 3600 MHz 🙂

Summary

I paid the greatest attention to the compatibility with Ubuntu 18.04 to get rid of all the driver-related issues I had so far with other systems. Ubuntu works perfectly fine now and I hope it will for you as well!