3

When I was trying to install Ubuntu I got a black screen too, but back then, I press e to edit GRUB, and modified quiet splash --- to quiet splash nomodeset and successfully installed Ubuntu.

But everytime I boot Ubuntu, the only picture I can see is the login page, after that the only thing left in screen is black. I know Ubuntu booted successfully because when I pressed Alt+Ctrl+T and typed reboot, it worked, even I only got a black screen. So I guess nvidia is responsible for this.

I tried holding Shift while booting Ubuntu, but I couldn't enter GRUB menu, I pressed Esc and only got GRUB command line, so how can I solve this?

Kulfy
  • 17,696
  • The login screen use TTY 1 and the ubuntu session use TTY 2. You can switch to a command line interface (TTY 3) with "ctrl + alt + F3". If the issue is from the Nvidia driver you should be able fix it with commands. I can't help further because i don't use Nvidia. – Jeryosh Jun 03 '20 at 13:34
  • @Jerare Thanks for comment, I saw command line with "ctrl + alt + F3", but only few seconds later it turned to black again. – GrumpyMelon Jun 03 '20 at 14:16

1 Answers1

4

This black/blank screen is caused by nouveau kernel drivers.

Nouveau is the open-source graphics driver for NVIDIA graphics cards.

They should be disabled at grub during boot or tty before you login.

SOLUTION A

You need to update your grub with nouveau.modeset=0 at the line starting with GRUB_CMDLINE_LINUX_DEFAULT="

You can do this by clicking e at boot time to edit grub or before you login by switching to tty.
To switch to tty click on ctrl + alt + f3/f4

  1. In tty login and type

    nano /etc/default/grub
    

    to edit grub. Type nouveau.modeset=0 after quiet splash to disable loading of nouveau kernel drivers.

  2. Then type

    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"
    
  3. Confirm the content of the new modprobe config file:

    cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
    

    It should have an output similar to the one below:

    blacklist nouveau 
    options nouveau modeset=0
    
  4. Update kernel initramfs

    Enter the following linux command to regenerate initramfs:

    sudo update-initramfs -u
    
  5. Update Grub

    Enter the following command to update grub

    sudo update-grub
    
  6. Reboot your computer.

    sudo reboot
    


SOLUTION B

To disable the Nouveau kernel driver:

  1. Remove the installed NVIDIA drivers:

    sudo apt-get purge "nvidia*"
    sudo apt autoremove
    
  2. Create a new file named /etc/modprobe.d/disable-nouveau.conf with the following lines:

    blacklist nouveau
    blacklist lbm-nouveau
    options nouveau modeset=0
    alias nouveau off
    alias lbm-nouveau off
    
  3. Append this line to /etc/modprobe.d/nouveau-kms.conf:

    options nouveau modeset=0
    
  4. Update the boot environment for your kernel:

    sudo update-initramfs -u
    
  5. Reboot your computer and you should get a low resolution GUI which indicates that nouveau graphics driver is not being used.


SOLUTION C

  1. Cleanup all nvidia package ( remove all nvidia related packages).

    sudo apt-get remove nvidia* && sudo apt autoremove
    

    If you get the following error it means that you never had an nvidia package installed and is ok:

    no matches found: nvidia*
    
  2. Now install some required dependencies:

    sudo apt-get install dkms build-essential linux-headers-generic
    
  3. Black list nouveau driver (block and disable nouveau kernel driver)

    sudo vim /etc/modprobe.d/blacklist.conf
    
  4. Append the follow lines to the blacklist.conf:

    blacklist nouveau 
    blacklist lbm-nouveau
    options nouveau modeset=0
    alias nouveau off
    alias lbm-nouveau off
    
  5. Disable the Kernel nouveau by typing the following commands:

    echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf 
    
  6. Update the boot environment for your kernel:

    sudo update-initramfs -u
    
  7. Finally update and reboot:

    reboot
    

I hope this helps.

References

  1. How to disable nouveau driver link 1
  2. How to disable nouveau driver link 2
  3. How to remove nouveau kernel driver
  4. How to remove nouveau-kernel-driver-Nvidia-install