Driver installation problems on Ubuntu 18.04 + RTX2070 (external)

I am trying to install the driver for a external RTX2070 (in the Aorus Gaming Box) on my Macbook Pro Touchbar (MacbookPro 14,2) running a fresh Ubuntu 18.04 (dual boot with OSX).

I am not able to attach the GPU during bootup of Ubuntu or the Ubuntu Installer, otherwise my internal screen stays blank, so I always have to attach it after bootup. I also tried ssh in that case.

What I tried:

Installed rEFInd and Ubuntu 18.04 with updates and third party drivers option.

Installed nvidia driver 430

sudo apt-get purge nvidia*
sudo apt autoremove
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-driver-430 nvidia-prime

blacklisted nouveau

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

Added nvidia-drm.modeset=1 to grub, but I am unsure how to verify it

sudo gedit /etc/default/grub
sudo update-initramfs -u
reboot

nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

nvidia-settings

ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
(nvidia-settings:27721): GLib-GObject-CRITICAL **: 18:28:48.855: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 18:28:48.858: PRIME: Requires offloading
** Message: 18:28:48.858: PRIME: is it supported? yes

lspci -k | grep -EA2 ‘VGA|3D’

00:02.0 VGA compatible controller: Intel Corporation Device 5927 (rev 06)
	Subsystem: Apple Inc. Device 0175
	Kernel driver in use: i915
--
42:00.0 VGA compatible controller: NVIDIA Corporation Device 1f02 (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device 37d5
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

gpu-manager log

last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/4.18.0-25-generic/updates/dkms
Found nvidia module: nvidia-uvm.ko
Looking for amdgpu modules in /lib/modules/4.18.0-25-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:5927
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:1f02
BusID "PCI:66@0:0:0"
Is boot vga? no
Error: can't access /sys/bus/pci/devices/0000:42:00.0/driver
The device is not bound to any driver.
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card0", driven by "i915"
Found "/dev/dri/card0", driven by "i915"
output 0:
	card0-eDP-1
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 2
I couldn't open /var/lib/ubuntu-drivers-common/last_gfx_boot for writing.
Error: can't write to /var/lib/ubuntu-drivers-common/last_gfx_boot

I also tried:

sudo prime-select nvidia
sudo nvidia-xconfig
sudo apt install nvidia-modprobe

And tried downloading the .run installer which always fails: “Unable to load the ‘nvidia-drm’ kernel module”

Secure Boot was always off

mokutil --sb-state
This system doesn't support Secure Boot

I really don’t know what else I can do to get it running.
Thank you!

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

You’re running into

ul 14 18:28:09 Tims-MacBookPro kernel: NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
                                        NVRM: BAR0 is 0M @ 0x0 (PCI:0000:42:00.0)
Jul 14 18:28:09 Tims-MacBookPro kernel: NVRM: The system BIOS may have misconfigured your GPU.

It’s a low level resource problem. Unfortunately, the log is flooded with that message, so please create a new nvidia-bug-report.log right after a fresh boot and attaching the gpu.

Thank you very much for your support!

I did a fresh start, attached the GPU and generated a new bug-report.
nvidia-bug-report.log.gz (87.3 KB)

Please check if this works for you:
https://github.com/Dunedan/mbp-2016-linux/issues/60#issuecomment-396311301
In your case, the pcie port is 0000:00:1c.4

Thank you for your support!

I was not able to detect or the remove the card using the pci=realloc kernel parameter, but without any parameters, the ejection and rescaning approach helps to detect the card.

echo 1 > /sys/bus/pci/devices/0000\:00\:1c.4/remove
echo 1 > /sys/bus/pci/rescan

Every 5 seconds everything freezes for a second, because of the nvidia-smi process taking all CPU capacities. I solved this perfomance issue with the nvidia-drm.modeset=1 kernel parameter.

Currently, my monitor, which is connected to the eGPU, is detected in the display settings but stays black. This is maybe because of the logged PKCS#7 signature error:

[ 1331.195180] nvidia-nvlink: Nvlink Core is being innitialized, major device number 509
[ 1331.196221] nvidia 0000:09:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[ 1331.296034] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  430.26  Tue Jun  4 17:40:52 CDT 2019
[ 1331.303732] PKCS#7 signature not signed with a trusted key
[ 1331.304647] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  430.26  Tue Jun  4 17:45:09 CDT 2019
[ 1331.307119] PKCS#7 signature not signed with a trusted key
[ 1331.311562] [drm] [nvidia-drm] [GPU ID 0x00000900] Loading driver
[ 1331.311565] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:09:00.0 on minor 1
[ 1331.321494] PKCS#7 signature not signed with a trusted key
[ 1331.326388] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 507
[ 1334.867814] [drm] [nvidia-drm] [GPU ID 0x00000900] Unloading driver
[ 1334.896701] nvidia-modeset: Unloading
[ 1334.996152] nvidia-uvm: Unloaded the UVM driver in 8 mode
[ 1335.025445] nvidia-nvlink: Unregistered the Nvlink Core, major device number 509
[ 1335.190972] PKCS#7 signature not signed with a trusted key
[ 1335.199471] PKCS#7 signature not signed with a trusted key

This occurs like matt-deboer described it on github in the link you provided. He solved this by using the .run-Installer. In the past, the .run installer always failed with an error “unable to load the nvidia-drm kernel module”, but this time I was able to install the driver. The PKCS error is still once present, as it is visible in the newer bug-report. As far as I know, this error happens because I did’t sign the module during installation, for which I wasn’t asked anyway. I think it should not matter, since secure-boot is disabled? What can I do to get the driver and display working?
nvidia-bug-report.log.gz (1.08 MB)
nvidia-bug-report.log.old.gz (1.13 MB)

Don’t use the .run installer driver, please uninstall it using the --uninstall option. Then use either the driver from the official ubuntu repo or the ubuntu graphics drivers ppa.
Afterwards, make sure nvidia-prime is installed and run
sudo prime-select nvidia

Thanks for the quick response. I uninstalled the .run package and installed from the graphics driver ppa as mentioned in my first post. During installation the following errors appeared. Not sure if they are relevant or not:

Loading new nvidia-430.26 DKMS files...
Building for 4.18.0-25-generic
Building for architecture x86_64
Building initial module for 4.18.0-25-generic
This system doesn't support Secure Boot
Secure Boot not enabled on this system.
Done.

nvidia:
Running module version sanity check.
/usr/sbin/dkms: line 784: find_module: command not found
modinfo: ERROR: missing module or filename.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-25-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
/usr/sbin/dkms: line 784: find_module: command not found
modinfo: ERROR: missing module or filename.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-25-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
/usr/sbin/dkms: line 784: find_module: command not found
modinfo: ERROR: missing module or filename.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-25-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
/usr/sbin/dkms: line 784: find_module: command not found
modinfo: ERROR: missing module or filename.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-25-generic/updates/dkms/

depmod...

DKMS: install completed.

After the installation I did

sudo prime-select nvidia

After using nvidia-xconfig, I could see my external display (eGPU-attached) in the system settings of the OS.

root@timsmac:/home/tim# nvidia-xconfig
WARNING: Unable to locate/open X configuration file.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
New X configuration file written to '/etc/X11/xorg.conf'

As before the error

PKCS#7 signature not signed with a trusted key

is still present multiple times in the log. Note: The device-ejection/rescanning-procedure was executed approximately 1 minute after boot.

[   69.629844] PKCS#7 signature not signed with a trusted key
[   69.641069] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[   69.641355] NVRM: No NVIDIA graphics adapter found!
[   69.641441] nvidia-nvlink: Unregistered the Nvlink Core, major device number 511
[   69.710235] usb 4-2: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[   69.724322] pci_bus 0000:0a: busn_res: [bus 0a-3f] is released
[   69.773910] r8152 4-2:1.0 eth0: v1.09.9
[   69.797216] r8152 4-2:1.0 enx00e04c68004e: renamed from eth0
[   69.862108] PKCS#7 signature not signed with a trusted key
[   69.874333] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[   69.874670] NVRM: No NVIDIA graphics adapter found!
[   69.874780] nvidia-nvlink: Unregistered the Nvlink Core, major device number 511
[   69.898193] IPv6: ADDRCONF(NETDEV_UP): enx00e04c68004e: link is not ready
[   69.903342] IPv6: ADDRCONF(NETDEV_UP): enx00e04c68004e: link is not ready
[   70.039545] pci_bus 0000:08: busn_res: [bus 08-3f] is released

nvidia-bug-report.log.gz (1.15 MB)

Don’t use nvidia-xconfig. Don’t have an xorg.conf, delete it.

Ok, I deleted it and the error is still present.
nvidia-bug-report.log.gz (1.13 MB)

Hi Team,

I have bought 12 new machines for our office. There is a Quadro P600 mobile card on the laptops.
I have to download the drivers from the Nvidia website. When I try to install.

Here are a few errors coming in

  1. libglvnd incomplete installation
  2. unable to load the nvidia-drm kernel module

I have attached the nvidia-installer.log with this

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Tue Jul 30 18:37:22 2019
installer version: 378.13

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

nvidia-installer command line:
./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 12 CPUs online; setting concurrency level to 12.
-> License accepted.
-> Installing NVIDIA driver version 378.13.
-> Running distribution scripts
executing: ‘/usr/lib/nvidia/pre-install’…
-> done.
-> The distribution-provided pre-install script failed! Are you sure you want to continue? (Answer: Continue installation)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)
-> Installing both new and classic TLS OpenGL libraries.
-> Installing both new and classic TLS 32bit OpenGL libraries.
-> Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
-> Will install GLVND GLX client libraries.
-> Will install GLVND EGL client libraries.
-> Skipping GLX non-GLVND file: “libGL.so.378.13”
-> Skipping GLX non-GLVND file: “libGL.so.1”
-> Skipping GLX non-GLVND file: “libGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.378.13”
-> Skipping EGL non-GLVND file: “libEGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.1”
-> Skipping GLX non-GLVND file: “./32/libGL.so.378.13”
-> Skipping GLX non-GLVND file: “libGL.so.1”
-> Skipping GLX non-GLVND file: “libGL.so”
-> Skipping EGL non-GLVND file: “./32/libEGL.so.378.13”
-> Skipping EGL non-GLVND file: “libEGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.1”
Looking for install checker script at ./libglvnd_install_checker/check-libglvnd-install.sh
executing: ‘/bin/sh ./libglvnd_install_checker/check-libglvnd-install.sh’…
Checking for libglvnd installation.
Checking libGLdispatch…
Checking libGLdispatch dispatch table
Checking call through libGLdispatch
All OK
libGLdispatch is OK
Checking for libGLX
libGLX is OK
Checking entrypoint library libOpenGL.so.0
Checking call through libGLdispatch
Checking call through library libOpenGL.so.0
dlopen(“libOpenGL.so.0”) failed: libOpenGL.so.0: cannot open shared object file: No such file or directory
-> An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries. (Answer: Install and overwrite existing files)
Will install libglvnd libraries.
Will install libEGL vendor library config file to /usr/share/glvnd/egl_vendor.d
-> Searching for conflicting files:
-> done.
-> Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (378.13):
executing: ‘/sbin/ldconfig’…
-> done.
-> Driver file installation is complete.
-> Installing DKMS kernel module:
ERROR: Failed to run /usr/sbin/dkms build -m nvidia -v 378.13 -k 4.15.0-1045-oem:
Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
‘make’ -j12 NV_EXCLUDE_BUILD_MODULES=’’ KERNEL_UNAME=4.15.0-1045-oem modules…(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 378.13 not found
Error! Bad return status for module build on kernel: 4.15.0-1045-oem (x86_64)
Consult /var/lib/dkms/nvidia/378.13/build/make.log for more information.
-> error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Hi Team,

I have downloaded the latest version of drivers for P600 from www.nvidia.com and tried to install it. It doesn’t help me. Please refer the below nvidia-installer.log for your reference

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Tue Jul 30 18:50:27 2019
installer version: 430.40

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

nvidia-installer command line:
./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 12 CPUs online; setting concurrency level to 12.
-> Installing NVIDIA driver version 430.40.
-> There appears to already be a driver installed on your system (version: 378.13). As part of installing this driver (version: 430.40), the existing driver will be uninstalled. Are you sure you want to continue? (Answer: Continue installation)
-> Running distribution scripts
executing: ‘/usr/lib/nvidia/pre-install’…
-> done.
-> The distribution-provided pre-install script failed! Are you sure you want to continue? (Answer: Continue installation)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)
-> Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
-> Will install GLVND GLX client libraries.
-> Will install GLVND EGL client libraries.
-> Skipping GLX non-GLVND file: “libGL.so.430.40”
-> Skipping GLX non-GLVND file: “libGL.so.1”
-> Skipping GLX non-GLVND file: “libGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.430.40”
-> Skipping EGL non-GLVND file: “libEGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.1”
-> Skipping GLX non-GLVND file: “./32/libGL.so.430.40”
-> Skipping GLX non-GLVND file: “libGL.so.1”
-> Skipping GLX non-GLVND file: “libGL.so”
-> Skipping EGL non-GLVND file: “./32/libEGL.so.430.40”
-> Skipping EGL non-GLVND file: “libEGL.so”
-> Skipping EGL non-GLVND file: “libEGL.so.1”
-> Uninstalling the previous installation with /usr/bin/nvidia-uninstall.
Looking for install checker script at ./libglvnd_install_checker/check-libglvnd-install.sh
executing: ‘/bin/sh ./libglvnd_install_checker/check-libglvnd-install.sh’…
Checking for libglvnd installation.
Checking libGLdispatch…
Checking libGLdispatch dispatch table
Checking call through libGLdispatch
All OK
libGLdispatch is OK
Checking for libGLX
libGLX is OK
Checking for libEGL
libEGL is OK
Checking entrypoint library libOpenGL.so.0
Checking call through libGLdispatch
Checking call through library libOpenGL.so.0
dlopen(“libOpenGL.so.0”) failed: libOpenGL.so.0: cannot open shared object file: No such file or directory
Checking entrypoint library libGL.so.1
Checking call through libGLdispatch
Checking call through library libGL.so.1
All OK
Entrypoint library libGL.so.1 is OK

Found libglvnd libraries: libGL.so.1 libEGL.so.1 libGLX.so.0 libGLdispatch.so.0
Missing libglvnd libraries: libOpenGL.so.0

-> An incomplete installation of libglvnd was found. All of the essential libglvnd libraries are present, but one or more optional components are missing. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries. (Answer: Install and overwrite existing files)
Will install libglvnd libraries.
Will install libEGL vendor library config file to /usr/share/glvnd/egl_vendor.d
-> Searching for conflicting files:
-> done.
-> Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (430.40):
executing: ‘/sbin/ldconfig’…
-> done.
-> Driver file installation is complete.
-> Installing DKMS kernel module:
-> done.
ERROR: Unable to load the ‘nvidia-drm’ kernel module.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

It’s been over a week now, @generix any ideas how I could get my external/internal display running?

@kishore.venkatesh I think you should start a new thread for your problem, since it does not really relate to this problem.

TimonH, this looks like you’re removing and readding the pci bus while the nvidia driver is loaded, so everything goes haywire so X doesn’t even detect the intel gpu anymore.

Thank you very much for your help. I am sorry, but given your answer, I am not sure what I am doing wrong or what I can do to solve this. Sorry if my last question is not accurate, because my current situation is still as follows: If I boot with the GPU attached, both of my screens stay black. If I boot without the GPU attached, my internal screen works and I can do the remove/rescan process to detect the card, but the external screen stays black and I think my internal screen is only powered by my internal card.
Thank you!

Unload the nvidia driver before remove/rescan, afterwards load it again, then start X.

After a fresh start I attached the GPU and tried to unload the driver with rmmod. Unloading failed multiple times either because the module nvidia was not loaded or loaded and currently in use. Forcing the unloading did not work either. As you can see in my first post, the system permanently tries to load the module. Using watch with a frequency of 0.1s for the lsmod command shows this high-frequent loading/unloading behavior of the nvidia module as well.

I also tried to blacklisting the module. Blacklisting with a modprobe blacklist config file did not prevent it from starting. Blacklisting with a system startup parameter prevents the start, but insprobe, modprobe and nvidia-modprobe could not load it after remove/rescan of the GPU.

Any update on this issue?
I also have problem to install Nvidia driver on Ubuntu 18.04 , RTX2070.
After the driver installation(440.64), os cannot even boot by nomodeset parameter.

Please open a new thread, run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).