Ubuntu 18.04, Nvidia driver 440. Most steps I've done from links:
1. Purge anything related to nvidia.
sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
2. Reinstall nvidia driver.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
ubuntu-drivers devices
sudo apt install nvidia-driver-440
3. Steps from the Nvidia forum
sudo apt install --reinstall nvidia-prime
sudo prime-select nvidia
sudo update-initramfs -u
4. Create /etc/modprobe.d/blacklist-nouveau.conf file
Including the following in the .conf file:
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
options nouveau modeset=0`
5. Reboot
sudo reboot
Black screen after login.. So I did an insanity check in Recovery mode (root).
nvidia-smi and lshw -c video can be seen in this snapshot.
Everything looks good, but the issue still persists.
Following Cannot get NVIDIA graphics card to work on Ubuntu 18.04, I disabled BIOS Secure boot and rebooted, but I was still unable to solve it.
