6

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.

Hamada
  • 145
cnstlungu
  • 186
  • 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 ? – Adupa Vasista Jun 28 '20 at 10:17

8 Answers8

2

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
Thomas
  • 21
1

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.

e76d587d9
  • 119
  • 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.

    – cnstlungu Apr 24 '20 at 06:13
  • 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. – e76d587d9 Apr 25 '20 at 04:14
  • 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 – cnstlungu Apr 25 '20 at 09:40
  • 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. – e76d587d9 Apr 26 '20 at 04:35
  • 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 – cnstlungu Apr 26 '20 at 10:06
  • 1
    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! – e76d587d9 Apr 28 '20 at 08:27
  • 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 – Greg G May 12 '20 at 08:11
  • 1
    "...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. – Janne Heikkinen Jun 28 '20 at 15:45
  • 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 – Ievgen Oct 25 '20 at 15:52
1

I found the Ubuntu kernel commit causing this for me. Details are at the end of this reply.


Information for the work-around

Without building kernel with the commit reversed, the work-around with all Focal Fossa 5.4 and 5.6 kernels I tested was using nvidia_drm.modeset=1. It can be used eg. in the two following ways:

1: Modifying Grub's configuration, so that the parameter is added to kernel command line when booting, by editing the file:

/etc/default/grub

Like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia_drm.modeset=1"

After this we need to run sudo update-grub, to add the parameter to the GRUB configuration at /boot/grub/grub.cfg.

2: Instead of the kernel command line parameter, the parameter can be defined in modprobe's configuration:

Creating file (name doesn't matter as long as it is in /etc/modprobe.d and ends .conf):

/etc/modprobe.d/nvidia-modeset.conf

With contents:

options nvidia_drm modeset=1

And since nvidia_drm is not built into the kernel, this should be the preferred way.


After reversing this commit, I was able to build latest Focal Fossa 5.4 kernel that did not cause X to freeze. I have also made an bug report about the issue.

This same code is in Bionic kernels also but does not cause X to freeze with them. Something else in the Focal Fossa kernel has changed since Bionic that causes including this commit to freeze X.

Committed by Andrea Righi andrea.righi@canonical.com 25.11.2019 14.56.25 +0100

commit be779101bc2fc3f675a1df11c4abaec017add984 Author: Andy Whitcroft apw@canonical.com Date: Wed Apr 16 19:40:57 2014 +0100

UBUNTU: SAUCE: vt -- maintain bootloader screen mode and content until vt switch

Introduce a new VT mode KD_TRANSPARENT which endevours to leave the current content of the framebuffer untouched. This allows the bootloader to insert a graphical splash and have the kernel maintain it until the OS splash can take over. When we finally switch away (either through programs like plymouth or manually) the content is lost and the VT reverts to text mode.

BugLink: http://bugs.launchpad.net/bugs/1308685 Signed-off-by: Andy Whitcroft apw@canonical.com

0

I entered a TTY, e.g. by Ctrl+Alt+F2, and then followed the solution here: https://linuxconfig.org/how-to-disable-blacklist-nouveau-nvidia-driver-on-ubuntu-20-04-focal-fossa-linux

  1. Create a file /etc/modprobe.d/blacklist-nvidia-nouveau.conf with sudo privileges with the following content.
blacklist nouveau
options nouveau modeset=0
  1. sudo reboot now
Claire
  • 148
  • 6
0

The following fixed similar issues on a Lenovo T460s with intel HD Graphics 520 after upgrading from 19.10 to 20.04LTS.

I followed the first half of #4 in this guide: https://ubuntuforums.org/showthread.php?t=2442390

The short version is that there are some issues regarding certain graphics drivers in the 5.4 kernel that ships with Ubuntu 20.04. The fix is to manually update to 5.6. Do this by running the following commands:

sudo apt update

sudo apt install linux-modules-5.6.0-1008-oem linux-image-5.6.0-1008-oem linux-oem-5.6-headers-5.6.0-1008

glaux
  • 123
0

This hint is for those that tried all the other suggestions without success.

The same problem described in this question happened to my old PC when I installed Ubuntu 20.04 on April, 2020. In my case the motherboard was configured to preallocate memory to the internal graphics card automatically. I solved the problem by changing it from "AUTO" to "512 MB". I don't know why changing the shared memory for internal Intel graphics made the dedicated Nvidia card work, but it just worked.

Look at this screen photo:

Asrock UEFI Setup Utility

This is the result of free:

$ free --kibi
              total       usada       livre    compart.  buff/cache  disponível
Mem.:       7593116     2044328     3772060      136516     1776728     3915140
Swap:      20180540           0    20180540

My old machine: ASRock H61M-HG4, i5-3330, 8GB RAM, GeForce GTX 1050 2GB.

karel
  • 114,770
0

(upgrading 18.04 to 20.04)

After trying so many tips, this was the miraculous solution:

remove /etc/X11/xorg.conf as suggested here https://forums.developer.nvidia.com/t/ubuntu-18-lts-nvidia-440-unable-to-make-nvidia-the-primary-display-driver/107632

-1

Before dancing around with NVIDIA driver versions, check if your computer BIOS version is not too old.

Particularly for my Dell Vostro 5459 laptop with NVIDIA 930M GPU and stock BIOS version 1.0.4, after upgrading Linux Mint from 19.3 to 20 (based on Ubuntu 20.04 LTS), it refused to work with any NVIDIA driver version and froze with black screen on boot. Fresh Linux Mint 20 reinstall didn't helped as well.

I noticed that BIOS version for Vostro 5459 was updated to 1.1.1 and decided to upgrade it. After the BIOS upgrade, the NVIDIA driver instantly came alive.

Krotow
  • 101
  • 1
  • 3