GPU driver installation (NVIDIA-Linux-x86_64-450.57.run)

Hello there,
I have a Gigabyte Sabre17-GV8 machine running on Intel® Core i7-8750H CPU @ 2.20GHz × 12 with GP107M [GeForce GTX 1050 Mobile]. I have a dual boot with Ubuntu 20.04 and windows.

uname -r
5.4.0-42-generic

I initially tried to install additional drivers from "software and Update "Using NVIDIA driver metapackage from NVIDIA-driver-440 (proprietary). But I have issues with enroll MOK.

sudo mokutil --list-enrolled
(returns nothing)

buntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C8Dsv00001558sd0000872Bbc03sc00i00
vendor : NVIDIA Corporation
model : GP107M [GeForce GTX 1050 Mobile]
driver : nvidia-driver-440-server - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-440 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin

lspci -vnn | grep -E ‘VGA|Display’
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b] (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] [10de:1c8d] (rev a1) (prog-if 00 [VGA controller])

find /usr/lib/modules -name nvidia.ko
/usr/lib/modules/5.4.0-42-generic/updates/dkms/nvidia.ko

vidia-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.

I tired to do these additional steps:

generate under /home/amiagarw two keys: Nvidia.der and Nvidia.key

openssl req -new -x509 -newkey rsa:2048 -keyout /home/amiagarw/Nvidia.key -outform DER -out /home/amiagarw/Nvidia.der -nodes -days 36500 -subj “/CN=NVIDIA GeForce GTX 1050 Drivers”

Add it to kernel
sudo /usr/src/linux-headers-(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der (modinfo -n nvidia)

Enroll public key (nvidia.der) to MOK (Machine Owner Key):
sudo mokutil --enable-validation
sudo mokutil --import /home/amiagarw/Nvidia.der

In the above commands it asks for a password and I tired both short and long passwords like 12345678, coolblue.
I have an azerty keyboard (french) so a word like coolblue is same in both qwerty and azerty.

Each time I reboot and go to the MOK option, it asks for a password and the password never matches.

In my BIOS I have no option to disable secure boot state.

I also tried to install NVIDIA-Linux-x86_64-450.57.run but it failed.
sudo ./NVIDIA-Linux-x86_64-450.57.run --dkms

var/log/nvidia-installer.log
nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Mon Aug 10 20:35:42 2020
installer version: 450.57

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
./nvidia-installer
–dkms

Using: nvidia-installer ncurses v6 user interface
-> Detected 12 CPUs online; setting concurrency level to 12.
-> Installing NVIDIA driver version 450.57.
-> An alternate method of installing the NVIDIA driver was detected. (This is usually a package provided by your distributor.) A driver installed via that method may integrate better with your system than a driver installed by nvidia-installer.

Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:

The NVIDIA driver provided by Ubuntu can be installed by launching the “Software & Updates” application, and by selecting the NVIDIA driver from the “Additional Drivers” tab.

(Answer: Continue installation)
-> Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
Looking for install checker script at ./libglvnd_install_checker/check-libglvnd-install.sh
executing: ‘/bin/sh ./libglvnd_install_checker/check-libglvnd-install.sh’…
Found libglvnd libraries: libGLESv2.so.2 libGLESv1_CM.so.1 libOpenGL.so.0 libEGL.so.1 libGLX.so.0 libGL.so.1
Found non-libglvnd libraries:
Missing libraries:
libglvnd appears to be installed.
Will not install libglvnd libraries.
-> Skipping GLVND file: “libOpenGL.so.0”
-> Skipping GLVND file: “libOpenGL.so”
-> Skipping GLVND file: “libGLESv1_CM.so.1.2.0”
-> Skipping GLVND file: “libGLESv1_CM.so.1”
-> Skipping GLVND file: “libGLESv1_CM.so”
-> Skipping GLVND file: “libGLESv2.so.2.1.0”
-> Skipping GLVND file: “libGLESv2.so.2”
-> Skipping GLVND file: “libGLESv2.so”
-> Skipping GLVND file: “libGLdispatch.so.0”
-> Skipping GLVND file: “libGLX.so.0”
-> Skipping GLVND file: “libGLX.so”
-> Skipping GLVND file: “libGL.so.1.7.0”
-> Skipping GLVND file: “libGL.so.1”
-> Skipping GLVND file: “libGL.so”
-> Skipping GLVND file: “libEGL.so.1.1.0”
-> Skipping GLVND file: “libEGL.so.1”
-> Skipping GLVND file: “libEGL.so”
-> Skipping GLVND file: “./32/libOpenGL.so.0”
-> Skipping GLVND file: “libOpenGL.so”
-> Skipping GLVND file: “./32/libGLdispatch.so.0”
-> Skipping GLVND file: “./32/libGLESv2.so.2.1.0”
-> Skipping GLVND file: “libGLESv2.so.2”
-> Skipping GLVND file: “libGLESv2.so”
-> Skipping GLVND file: “./32/libGLESv1_CM.so.1.2.0”
-> Skipping GLVND file: “libGLESv1_CM.so.1”
-> Skipping GLVND file: “libGLESv1_CM.so”
-> Skipping GLVND file: “./32/libGL.so.1.7.0”
-> Skipping GLVND file: “libGL.so.1”
-> Skipping GLVND file: “libGL.so”
-> Skipping GLVND file: “./32/libGLX.so.0”
-> Skipping GLVND file: “libGLX.so”
-> Skipping GLVND file: “./32/libEGL.so.1.1.0”
-> Skipping GLVND file: “libEGL.so.1”
-> Skipping GLVND file: “libEGL.so”
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’ (450.57):
executing: ‘/usr/sbin/ldconfig’…
-> done.
-> Driver file installation is complete.
-> Installing DKMS kernel module:
ERROR: Failed to find dkms on the system!
-> 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.

Again: sudo ./NVIDIA-Linux-x86_64-450.57.run
without the dkms option, I see the following error:

An X.509 certificate containing the public signing key will be installed to /usr/share/nvidia/nvidia-modsign-crt-xxxxxxx.der.
The SHA1 fingerprint of this certificate is: xx:xx…:xx.
This certificate must be added to a key database which is trusted by your kernel in order for the kernel to be able to verify the module signature.

The signed kernel module failed to load. Secure boot is enabled on this system, so this is likely because the kernel does not trust any key which is capable of verifying the module signature. Would you like to install the signed kernel module anyway?
Note that if this module loading failure is due to the lack of a trusted signature, you will not be able to load the installed module until after a key that can verify the module signature is added to a key database that is trusted by the kernel. This will likely require rebooting your computer.

Questions:

  1. Which is a better option? Install the available package from Ubuntu’s "software and Update "Using NVIDIA driver metapackage from NVIDIA-driver-440 (proprietary) or using the file NVIDIA-Linux-x86_64-450.57.run.
  2. How can I overcome the issues with enroll MOK for secure boot state? in the case while using the package available from Ubuntu
  3. “The signed kernel module failed to load.” scenario while running NVIDIA-Linux-x86_64-450.57.run

Thanks for your help.