[resolved] Ubuntu: A supported NVIDIA GPU could not be found

I’m trying to run OptiX on my machine that dual boots Linux with Ubuntu 18.04. Everything works when the machine boots under Windows.

When I run any of the OptiX 6 precompiled samples, I get the error: “A supported NVIDIA GPU could not be found”. I know the machine has supported GPUs because it works under Windows.

Running nvidia-smi produces this output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.40.04    Driver Version: 418.40.04    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  On   | 00000000:01:00.0  On |                  N/A |
| 23%   34C    P2    53W / 250W |    479MiB / 11176MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  Quadro RTX 8000     On   | 00000000:02:00.0 Off |                  Off |
| 35%   26C    P8     9W / 260W |      1MiB / 48571MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

When I run my own OptiX-based program, I get the same error when calling rtDeviceGetDeviceCount, and I also get a “Failed to retrieve the display driver version” error from rtGlobalGetAttribute(RT_GLOBAL_ATTRIBUTE_DISPLAY_DRIVER_VERSION_MAJOR).

Have I missed something in the set-up process for Ubuntu?

(Disclaimer: I’m not a Linux user.)

Do CUDA applications run at all? For example the deviceQuery in the CUDA toolkit samples.

I see no 418.40 display driver on the NVIDIA driver download site for Linux 64-bit for either the Quadro RTX 8000 or the GTX 1080.
The 418.30 driver added OptiX 6.0.0 support under Linux, but motion blur was broken in that specific build.
There is a 418.56 driver listed as newest Linux drivers. Maybe try that instead.

From what I learned, that error could indicate that liboptix or libnvidia-rtcore couldn’t be found in the standard search path of the application.
Verify that that libraries are installed and found or use LD_LIBRARY_PATH to add them to the search order.

If that was the problem, then the combination of boards is not going to work as multi-GPU configuration in OptiX 6.0.0. It doesn’t support heterogeneous setups of boards with RT cores (the Quadro RTX 8000 Turing GPU) and without (the GTX 1080 Pascal GPU).

The OptiX SDK examples do not explicitly select the device(s) but use all available CUDA devices.
Try to set CUDA_VISIBLE_DEVICES=0 or =1 to make only one of the GPUs visible to CUDA and run the applications then.

The OptiX Introduction of the OptiX Advanced Samples on github have a --devices command line option to select the devices explicitly.
https://github.com/nvpro-samples/optix_advanced_samples

Indeed, it was a driver issue. It seems that the Nvidia Nouveau driver that comes with Ubuntu does not support OptiX, despite the version number that would suggest otherwise. The precompiled samples and my own code work with the latest driver Linux version (418.56).

A tip for others: I found Ingo Wald’s tutorial immensely helpful for resolving this.