Problem installing NVIDIA 430.50 driver on Ubuntu 18.04

My GPU is GTX 1660Ti on a HP desktop.
Dual boot system: pre-installed Windows 10 and Ubuntu 18.04 that I installed.
The GTX 1660Ti seems work fine on Windows 10.
I am not sure this has anything to do with the driver installing, so I just put it here:
Both Windows and Ubuntu boot on a SSD, and they also share a HDD hard drive.

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002182sv0000103Csd00008556bc03sc00i00
vendor   : NVIDIA Corporation
manual_install: True
driver   : nvidia-driver-430 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

I have used the three ways to install NVIDIA driver, neither works.

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install build-essential libc6:i386
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"

Then, try three ways to install the driver.

sudo ubuntu-drivers autoinstall


sudo apt install nvidia-driver-430


sudo telinit 3
sudo bash

And here is some options that I chose when I install it manually (third way).

The distribution-provided pre-install script failed! Are you sure you want to continue?
Continue installation

The target kernel has CONFIG_MODULE_SIG set, which means that it supports crytographic signatures on kernel modules…Would you like to sign the NVIDIA kernel module?
Sign the kernel module

Would you like to sign the NVIDIA kernel module with an existing key pair, or would you like to generate a new one?
Generate a new key pair

The NVIDA kernel module was successfully signed with a newly generated key pair. Would you like to delete the private signing key?

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 enable 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?
Install signed kernel module

Install NVIDIA’s 32-bit compatibility libraries?

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.
Don’t install libglvnd fi

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 have attached the nvidia-bug-report.log.gz

What should I do?
I am not a expert on Linux, I just follow the tutorial online.
I am trying to do some machine learning, so I probably have to install CUDA after correctly installing driver too.

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

Secure boot is enabled, so the nvidia driver doesn’t load. Either uninstall the .run installer using the --uninstall option, then reinstall the repo driver like you did initially and disable secure boot in bios or leave secure boot enabled, then reinstall Ubuntu and during install choose the option to “install third-party software” and select the nvidia driver, this will properly set up module signing.