After 5 days of trial and error I finally manged to dual boot Ubuntu 18.04.5 LTS on my "bleeding edge" hardware. So if you also want to:
- Dual boot along windows (with NVIDIA GPU)
- Install NVIDIA drivers and CUDA for Machine Learning/Robotics
This post if for you. I really hope it can help someone who may face my same problems. Let's get to it.
P.S: My problem was not due to the NVIDIA GPU problems, but WIFI card. I had to remove it from my PC for Ubuntu to finally stop freezing. Debugging without using splash and quiet really helped, so do the same as your problem might be something different that you think.
1. Prepare USB boot using server image (UBUNTU SERVER)
I will assume you are dual booting along with windows. So create the partition you will be installing Ubuntu on. Download an Ubuntu server image, and we will be installing the GUI later (after having installed our GPU drivers) in order to avoid freezes and nouveau driver problems.
Good. Now you have your partition and a bootable USB (I suggest using Rufus to create a bootable USB)
2. Install Ubuntu
I will skip the installation process, as this is straightforward. Just disable secure boot, fast boot, and boot inside your USB. Finally install the ubuntu server and reboot.
If you have problems booting it might be a nouveau driver issue so just add nouveau.modeset=0 inside the Linux kernel call at the end of the line.
3. Install GUI
After you install Ubuntu server it is time to install the GUI.
- Install tasksel (sudo apt-get install tasksel)
- Install gui (sudo tasksel)
Once the GUI is installed. DO NOT BOOT yet, as we first need to install the GPU driver.
4.a Install NVIDIA GPU Drivers (easy way)
Ok. There is the easy way to the less easy way to install these. I chose the less easy way. If you want the easy way just run these three commands:
- sudo apt-add-repository ppa:graphics-drivers/ppa
- sudo apt-get update
- sudo apt-get install nvidia-driver-455 (you have to check which version is for your GPU).
4.b Install NVIDIA GPU Drivers (RUN FILE)
I decided to install the latest drivers through nvidia. I therefore downloaded the driver through NVIDIA's website and then I disable the nouveau driver and blacklisted it:
- sudo apt --purge remove xserver-xorg-video-nouveau
- crate a blacklist file inside modeprobe.d as explained in the link (https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux)
- Run the nvidia driver run file
5. Install CUDA
Similarly to the NVIDIA drivers I used the run file. Just download the cuda toolkit from the NVIDIA website and run it.
This should be all.
PLEASE NOTE THAT THIS IS JUST WHAT I REMEMBERED. So I might have some step, but overall this is the approach. Below you can find the links that really helped me getting to where I am right now (replying to the post from an Ubuntu installation :)).
Here are useful links (READ THEM):
https://www.pugetsystems.com/labs/hpc/The-Best-Way-To-Install-Ubuntu-18-04-with-NVIDIA-Drivers-and-any-Desktop-Flavor-1178/
How do I install NVIDIA and CUDA drivers into Ubuntu?
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation
Good luck :)
dmesg -we
and look for any concrete errors. Dmesg shows kernel messages and hang + reboot sounds like a kernel panic. Please add anything you find to your question. – Béné Dec 27 '20 at 12:55