Adventures in NVIDIA-land

June 10, 2019

Recently I’ve gotten back to my affection for Blender, the very fine open source 3D graphics and animation program. And it so happens that one of my previous projects left me with some kickass hardware to use. Now comes the challenge of getting Blender running with my collection of NVIDIA GeForce GTX 1080 graphics cards.

Being a longtime BSD guy, I naturally thought about trying to get it working with my TrueOS Server. And that’s where I hit my first hurdle. NVIDIA support for BSD systems has lagged, and the support for the wider BSD community has also lagged. I tried getting NVIDIA working on my desktop, but could not get it working reliably.

So, faced with the inevitable, I started contemplating putting my hardware back under the Linux flag. What I’ve outlined below are the steps I took to get Ubuntu 18.0.4 LTS, the latest NVIDIA drivers, and Blender 2.80 Beta to cooperate - i.e. not crash and actually work. Fasten your seat belt and remember - use at your own risk.

Installing Ubuntu 18.0.4 LTS, June, 2019

This turned out to be the easiest part. Downloading the image and burning it onto a USB drive (/dev/da0 in my case) was simple on my Project Trident Desktop:

# gpart destroy da0
# gpart create -s MBR da0
# dd if=ubuntu-18.04.2-desktop-amd64.iso of=/dev/da0

I’ve configured my system to not use UEFI when booting, and it booted just fine from the USB stick.

Once the installer is running, taking the defaults seemed to work well up to the “Installation Type”. In my case, I chose to erase my previous OS, and install Ubuntu. I also chose to “Log in automatically” on the “Who Are You?” screen. Five minutes and a reboot later and I had a working Ubuntu system. After updating all the software with the Software Updater application, I was ready to roll.

Ubuntu Base Install

Roadblock

There are several tutorials on the net about installing NVIDIA drivers on Ubuntu systems. Usually it is:

$ ubuntu-drivers devices     (displays what kind of GPU you have installed)
$ sudo ubuntu-drivers autoinstall (tries to install and configure correct driver)

This appears to work, but it does not (June, 2019). After the reboot, you cannot login - you are in a login loop. After some digging it appears that the “autoinstall” option breaks the Xorg configuration for logging in with the Ubuntu display manager. I didn’t dig deeply, but might if I get hung up.

So, another install and update and I was ready to try again.

The second option for installing NVIDIA drivers is usually to install a separate repository from the Ubuntu Graphics Drivers Team:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

If you re-run ‘ubuntu-drivers devices’ command several more drivers show up. You can try to add the latest driver with:

$ sudo apt install nvidia-driver-430

Again, this appears to work, and in this case it did work, except for one minor issue - the installer did not configure Xorg to recognize the driver.

You must reconfigure Xorg yourself with:

$ sudo nvidia-xconifg

and reboot once again.

At this point the NVIDIA driver should be recognized and, if you have a DisplayPort or HDMI cable connected to a second monitor, the graphics card should use the second monitor.

There is an icon for loading the NVIDIA X Server Settings

NVIDIA X Server Settings

application, which should now show you all the deails of your driver:

NVIDIA GPU Settings

Checking It Out

Ok, the driver is installed, let’s confirm that it is working, particularly with Blender.

Web to the Blender OpenData Project and download their benchmarking tool for Linux, saving it to disk. You will need to unzip and run the benchmarks:

$ cd ~/Downloads
$ tar --extract -f blender-benchmark*
$ cd blender-benchmark<TAB>       (hit the tab key to complete the name)
$ ./blender-benchmark

Opening the benchmark tool, you have the option to select the device you want to benchmark:

Benchmark Device Select

and click “QUICK BENCHMARK”. This will start up a rendering benchmark that will use the selected device - in this case the NVIDIA GPU.

Watch the NVIDIA X Server Settings tool, keeping an eye on the “GPU Utilization” field:

View GPU Utilization

It should spike to 90-100% as it renders the images and if so, this means your NVIDIA GPU card is working. Congratulations!

I did the complete benchmark on my CPU and my GPU, and it looks like my setup is a bit above average for both: (Less is better)

Benchmark Results GPU

Benchmark Results CPU

“But Does It Blend?”

Web to the Blender Website and navigate to the Download area. There you should see links for Blender 2.80 Beta Linux 64 bit. Click the link, save to disk, and extract with:

$ cd ~/Downloads
$ tar --extract -f blender-2.80<TAB>  (tab key expands filename)
$ cd blender-2.8<TAB>
$ ./blender

You should see the splash screen for Blender 2.80 Beta.

Blender 2.80 Splash

Note that there are some slight changes to the default input interface, but it is all customizable to be the same as blender 2.7x.

Help the blender community by field testing blender 2.80 and submitting bug reports or patches.

Happy Blending!

– Jim B.