Nvidia drivers not working with GeForce GTX 1650 Mobile / Max-Q

Bug #1871041 reported by fcole90
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-440 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

*** WORKAROUND AVAILABLE ***
See comment 12: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-440/+bug/1871041/comments/12

*** Original Description ***

I recently installed Ubuntu 20.04 on a Dell XPS 15, which has a GeForce GTX 1650 Mobile / Max-Q. I installed version 440 because it introduced support for this card: https://www.nvidia.com/download/driverResults.aspx/146189/en-us

However, I don't think it's working correctly because if I run nvidia-smi, it cannot communicate with my card.

```
$ 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-prime is on nvidia, and I rebooted since selecting it. However nvidia-config doesn't display the typical options you find when your nvidia card is active.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: nvidia-driver-440 440.64-0ubuntu3
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu22
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon Apr 6 10:58:21 2020
InstallationDate: Installed on 2020-04-03 (2 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200401)
SourcePackage: nvidia-graphics-drivers-440
UpgradeStatus: No upgrade log present (probably fresh install)

*** Update and likely underlying issue ***

Given that the workaround to disable Secure Boot made the driver work, I suspect that the issue is actually that when the drivers are installed and signed (with SB active), then the keys are either not imported correctly or mokmanager was not triggered to be loaded upon next reboot. This causes that even if trying to sign the dkms modules, SB finds them to be untrusted and won't allow the nvidia driver to be loaded.

Revision history for this message
fcole90 (fcole90) wrote :
Revision history for this message
fcole90 (fcole90) wrote :

```
$ sudo lshw -C display
  *-display UNCLAIMED
       description: 3D controller
       product: TU117M [GeForce GTX 1650 Mobile / Max-Q]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:ed000000-ed07ffff
  *-display
       description: VGA compatible controller
       product: UHD Graphics 630 (Mobile)
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:178 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff
```

Revision history for this message
fcole90 (fcole90) wrote :

```
$ sudo 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'

```

Revision history for this message
fcole90 (fcole90) wrote :

```
$ nvidia-detector
nvidia-driver-440
```

Revision history for this message
fcole90 (fcole90) wrote :

```
$ nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:24661): GLib-GObject-CRITICAL **: 11:45:08.430: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 11:45:08.433: PRIME: Requires offloading
** Message: 11:45:08.433: PRIME: is it supported? yes
** Message: 11:45:08.466: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 11:45:08.466: PRIME: on-demand mode: "1"
** Message: 11:45:08.466: PRIME: is "on-demand" mode supported? yes
```

Revision history for this message
fcole90 (fcole90) wrote :

```
nvidia-debugdump --list
Error: nvmlInit(): Driver Not Loaded
```

Revision history for this message
fcole90 (fcole90) wrote :

I have secureboot ON, when I installed the drivers I was prompted to type a password, which was said it was going to be asked later, at install time. The password was never asked instead.

Revision history for this message
fcole90 (fcole90) wrote :

```
ls /lib/modprobe.d/blacklist-nvidia.conf
ls: cannot access '/lib/modprobe.d/blacklist-nvidia.conf': No such file or directory
```

Revision history for this message
fcole90 (fcole90) wrote :

I unistalled and reinstalled the driver, now I get:

```
$ sudo nvidia-xconfig
[sudo] password for fabio:

Using X configuration file:
"/etc/X11/xorg.conf".
Backed up file '/etc/X11/xorg.conf'
as '/etc/X11/xorg.conf.backup'
New X configuration file written to
'/etc/X11/xorg.conf'
```

Revision history for this message
fcole90 (fcole90) wrote :

However, it still doesn't work

```
$ nvidia-settings -V

WARNING: NV-CONTROL extension not found on this Display.

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:7678): GLib-GObject-CRITICAL **: 13:06:09.464: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 13:06:09.466: PRIME: Requires offloading
** Message: 13:06:09.466: PRIME: is it supported? yes
** Message: 13:06:09.495: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 13:06:09.495: PRIME: on-demand mode: "1"
** Message: 13:06:09.495: PRIME: is "on-demand" mode supported? yes

```
$ 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.
```

Revision history for this message
fcole90 (fcole90) wrote :

I tried to disable Secure Boot, but Ubuntu hangs on startup if I do any of the following:
- `sudo mokutil --disable-validation` -> it asks me a a password and then it is correctly asked upon boot from MOK managment
- Disable Secure Boot from UEFI "BIOS"
- Change Secure Boot to Audit instad of Deploy
- Any combination of the previous

Ubuntu only boots with Secure Boot ON, mode Deploy and with validation enabled.

Revision history for this message
fcole90 (fcole90) wrote :

I could workaround the issue:

Following the method discussed here: https://forums.developer.nvidia.com/t/newly-installed-drivers-are-not-found-when-nvidia-smi-is-called/82686/7

If you have Secure Boot enabled and the nvidia drivers installed, if you try to disable Secure Boot you won't be able to load the GUI (in the boot you stop before reaching GDM3). So you need to uninstall and purge your drivers and their configuration.

```
sudo apt purge '^.*nvidia*'
sudo apt install ubuntu-desktop
sudo apt purge "^.*cublas*"
sudo apt purge "^.*cuda*"
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
sudo apt autoremove
sudo reboot now
```

While rebooting, disable Secure Boot and let then Ubuntu load completely.

The in a terminal you can:
```
sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo reboot now
```

Let Ubuntu boot again, then everything should work correctly:

```
nvidia-smi
Mon Apr 6 14:27:26 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64 Driver Version: 440.64 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 1650 Off | 00000000:01:00.0 Off | N/A |
| N/A 62C P8 5W / N/A | 385MiB / 3914MiB | 5% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1309 G /usr/lib/xorg/Xorg 28MiB |
| 0 1775 G /usr/lib/xorg/Xorg 141MiB |
| 0 2066 G /usr/bin/gnome-shell 96MiB |
| 0 5204 G ...AAAAAAAAAAAAAAgAAAAAAAAA --shared-files 107MiB |
+-----------------------------------------------------------------------------+
```

fcole90 (fcole90)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-440 (Ubuntu):
status: New → Confirmed
Revision history for this message
harsha (harshakp) wrote :

Thanks!! it worked

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.