Login freeze after update to 20.04

19,883

Solution 1

This link might help you : https://itsfoss.com/fix-ubuntu-freezing/

If you don't care about nvidia drivers, what worked for me is this in TTY :

sudo apt-get purge 'nvidia-*'
sudo apt install xserver-xorg-video-nouveau
reboot

Solution 2

If you choose to use proprietary binary drivers (as the nvidia-* drivers are) then you really need to approach NVIDIA to get support for them. The drivers are completely outside of the Linux kernel, and so kernel developers and Linux distributions like Ubuntu shouldn't provide end-user support for them.

That said, if you want to go down this path, you'll need to ensure the version of nvidia-* binary drivers which you install provides support for the Linux 5.4 kernel shipped in Ubuntu 20.04.


To install the latest NVIDIA proprietary drivers, you may need to disable the open source drivers first on boot:

Boot the computer and hit the Shift key to bring up the GRUB boot menu. Highlight the Ubuntu entry in the GRUB boot menu and press the E key.

Add nouveau.modeset=0 (you should use this instead of instead of nouveau.nomodeset=0) to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1

Enter user name and password - execute:

sudo apt-get update
sudo apt-get install nvidia-driver-440
sudo reboot  

Generally it is recommended to use the NVIDIA drivers from the restricted Ubuntu repositories. This package was only updated for Ubuntu 20.04 two days ago (22 April 2020), so it's quite bleeding edge, and might be why your prior testing with a nvidia 440+ series did not work.

Alternative

As you have to find NVIDIA drivers (440.31+) which support the Linux 5.4 kernel shipped by Ubuntu, you could also install the latest official NVIDIA drivers. The xorg-edgers PPA does not provide the drivers anymore and was replaced by GPU Drivers PPA.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-graphics-drivers-440
sudo reboot

After the installation adding the kernel parameter nouveau.modeset=0 is not necessary anymore.

Share:
19,883

Related videos on Youtube

cnstlungu
Author by

cnstlungu

Updated on September 18, 2022

Comments

  • cnstlungu
    cnstlungu over 1 year

    I have just upgraded from 18.04 to 20.04 on a Dell XPS 9560. The login screen was frozen and with no response on input from the mouse or keyboard.

    I have booted using a recovery mode option and purged nvidia* and now I am able to log in. I can successfully login only to Ubuntu on Wayland.

    If I login to regular Ubuntu, my computer freezes again immediately. On tty or Wayland, should I install nvidia drivers again (tried nvidia-440 and nvidia-435), I cannot even log in again.

    I've also tried adding nouveau.nomodeset=0 to GRUB_CMDLINE_LINUX_DEFAULT, but it made no difference in my case.

    I would really appreciate any advice.

    • Adupa Vasista
      Adupa Vasista almost 4 years
      Please update the question by adding how did you install the drivers in 18.04 prior upgrade to 20.04. Did you install by executing a run file ?
  • cnstlungu
    cnstlungu about 4 years
    Thanks. If I install nvidia-driver-440 I'm not even able to login in or switch to TTY - total freeze on login screen. I have to go to recovery mode and purge nvidia. For nvidia-graphics-drivers-440 version, I get 'unable to locate package'. Just to be clear, I don't necessarily want the nvidia drivers, I just want to be able to boot into regular Ubuntu. Appreciate your help.
  • e76d587d9
    e76d587d9 about 4 years
    Okay, in that case then please remove the nvidia binary drivers with: $ sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}') and $ sudo apt autoremove, then ensure nouveau userspace drivers are there with $ sudo apt install xserver-xorg-video-nouveau. You will want to boot with nouveau.modeset=0 kernel parameter set until a Linux 5.8 kernel is used, to address a known bug with the NVIDIA Pasal-family of mobile GPUs which ship in the Dell XPS 9560.
  • cnstlungu
    cnstlungu about 4 years
    I'm afraid the above steps didn't work for me. I still can log in into Wayland, but logging into regular Ubuntu freezes my PC. Thanks
  • e76d587d9
    e76d587d9 about 4 years
    If it's only happening with a regular Ubuntu (X11) session, then try looking in the file .xsession-errors for errors. There are links to do so findable in Google or AskUbuntu. This problem may not be directly related to your graphics drivers, but rather something in your X11 configuration. That log should be illuminating.
  • cnstlungu
    cnstlungu about 4 years
    I did try to generate a new X11 conf file using nvidia-config but it still didn't work out. I ended up moving to another distro (Pop!_OS 20.04 beta) and things work now. Probably a clean install of Ubuntu would have done the job as well. Thanks
  • e76d587d9
    e76d587d9 almost 4 years
    Ah yes, getting a binary tool nvidia-config to generate an X11 conf file for the open source driver stack would likely cause problems launching X11, but not Wayland (which was as you reported). Anyway, happy that it is working with a clean installation of a distribution!
  • Greg G
    Greg G almost 4 years
    After login into terminal: INFO: task kworker/u16:0:8 blocked for more than 120 seconds "echo 0 > /proc/sys/kernel/hung_task_timeout_sec" disables this message
  • Janne Heikkinen
    Janne Heikkinen almost 4 years
    "...then you really need to approach NVIDIA to get support for them..." In this case it seems that it is Canonical that should be approached, to get their kernel fixed. The problem has been introduced into Canonical's kernel sometime after end of November 2019. It could also have been in the mainline vanilla kernel, but was fixed at some point and the fix was never included into Canonical's kernel.
  • Ievgen
    Ievgen over 3 years
    Suggested above solutions didn't help to solve the issue in my case (nvidia 1050 ti). Before the OS load started to freeze at logo load stage I installed vulkan-sdk and updated few libs (don't remember what exactly). Suggested methods of installing driver 1) nvidia-driver-440 propr 2) nvidia-driver-455 public 3) any one from the list of Software Update center didn't help to resolve logo freeze. Also adding grub boot flags nvidia_drm.modeset=1 etc didn't help. .xsession-errors file does not show any errors. I did all that checks after running sudo apt-get purge nvidia* in recovery mode
  • mikewhatever
    mikewhatever over 3 years
    LM is not Ubuntu. It is off topic here.
  • Krotow
    Krotow over 3 years
    I believe too old BIOS will cause same glitch in both Ubuntu and Ubuntu based Mint.
  • pravin
    pravin over 2 years
    This leaves my screen blank.. no ui.. I can use the terminal tho..