Trouble getting GTX 1060 to work with Ubuntu 18.04.4 LTS and Nvidia 440.82 drivers

I’m currently in the process of trying to get my GTX 1060 working in Linux, but haven’t had much luck over the past couple of days. My system specifications are below:

> Mac Pro 3,1
> Ubuntu 18.04.4 LTS
> Radeon HD 2600 XT (drives one monitor via DVI)
> Nvidia GeForce GTX 1060 (drives one monitor with DisplayPort, one with HDMI)
> Nvidia driver 440.82
> Kernel version 5.3.0-53-generic
> Display manager is gdm3

Throughout my misadventures, I’ve gotten to various stages, but have never gotten the GTX 1060 monitors to work (other than with using the vanilla Nouveau drivers after a clean install, which has prohibitively slow performance).

I’ve tried multiple driver versions and installation approaches (Nvidia installation scripts with multiple driver versions, ubuntu-drivers autoinstall
with multiple driver versions, etc.). I’ve also tried multiple configurations such as blacklisting the Nouveau drivers, using the nomodeset and nogpumanager grub configurations, and a bunch of other suggestions that I’ve found on the internet. The closest that I’ve ever gotten was to the point where I could actually see a monitor connected to the GTX 1060 in the Settings -> Devices -> Displays menu, though selecting it had no benefit. I don’t remember the steps needed to recreate this scenario. Usually, I modify enough things and end up in a login loop and then reinstall Ubuntu to start fresh.

Currently, after a fresh install of Ubuntu 18.04.4 LTS and the Nvidia 440.82 driver, I’m seeing the following error after running

> echo >&2 "  ERROR: Kernel configuration is invalid.";		
> echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";
> echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";					

I read here that this could be due to a mismatch between the system gcc compiler and the gcc version used to compile the kernel. I ran the following commands and it looks like this isn’t the issue for me:

ada@ada:/usr/src/nvidia-440.82$ uname -r

ada@ada:/usr/src/nvidia-440.82$ cat /proc/version
Linux version 5.3.0-53-generic (buildd@lgw01-amd64-016) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020

ada@ada:/usr/src/nvidia-440.82$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

For some more context, here are some additional outputs:

ada@ada:/usr/src/nvidia-440.82$ lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV630 XT [Radeon HD 2600 XT]
02:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)

ada@ada:/usr/src/nvidia-440.82$ nvidia-smi
Sat May 23 16:58:12 2020       
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
| 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 106...  Off  | 00000000:02:00.0 Off |                  N/A |
|  0%   47C    P8     4W / 150W |      0MiB /  6078MiB |      0%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|  No running processes found                                                 |

In terms of goals, I would like to use the GTX 1060 as my dedicated graphics card for this setup. I don’t really care about the Radeon 2600 XT; the only reason I still have it in this computer is so I can view the rEFInd menu after turning the computer on (in case I want to boot into MacOS, which is installed on another system drive). Also, as reported in this post, NVIDIA X Server Settings currently gives me a blank window when launched.

nvidia-bug-report.log.gz.log (398.5 KB)

Most simple would be to connect the monitor to the nvidia card and create /etc/X11/xorg.conf just containing

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:2:0:0"
    Option         "AllowEmptyInitialConfiguration"

Otherwise, you can also set up PRIME (offload/output)

Edit: the warning message during compilation is always displayed, just ignore. Driver is installed fine.

@generix It worked! Thanks a lot for taking the time to help me with this issue.