Ubuntu 18.04 hangs on startup after installing nvidia-390

10,313

I've already solved the problem by doing something that's quite hacky, but it worked. If you boot on text mode and then automatically jump to graphical mode then the problem is gone.

I set text mode as the default boot mode ( systemctl set-default multi-user.target ) and then you can set up the command systemctl start graphical.target to automatically run right after startup, or manually run it on text mode every time you need a graphical interface.

After that you can edit your grub files to disable authentication either in text or graphical mode or otherwise you'll have to authenticate twice.

Share:
10,313

Related videos on Youtube

Ruan
Author by

Ruan

Updated on September 18, 2022

Comments

  • Ruan
    Ruan over 1 year

    I installed nvidia-390 drivers on my brand new Ubuntu 18.04 installation and now it freezes during the boot screen that appears before the login screen.

    I solved the problem by entering recovery mode, update grub ( which enables read-write mode ) and then continue to boot.

    However I'd like not to have to enter recovery mode every time I boot my machine. Is there any real solution to this problem?

    I'm on an Asus x370 Pro Prime motherboard and my GPU is a GTX Geforce 1070 Ti.

    Things I have already done:

    • Secure Boot is already disabled both in BIOS and also through mokutil.

    • Replaced 'quiet splash' by 'quiet splash nomodeset' at
      /etc/default/grub

    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      You could check /var/log/Xorg.0.log for any "(EE)" error lines.
    • Ruan
      Ruan almost 6 years
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      When it's "frozen", can you still switch to console (CTRL-ALT-F1) ? I would remove the nouveau driver. Does lsmod show nvidia or nouveau?
    • Ruan
      Ruan almost 6 years
      lsmod shows only nvidia and no nouveau. As for the console, I'll tell you in a few minutes.
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      Xorg is still loading the nouveau driver, "apt-get remove" it perhaps. Did you follow any installation guide? I'm asking because of the "nomodeset".
    • Ruan
      Ruan almost 6 years
      The "nomodeset" was a later fix, it wasn't on the installation guide for nvidia-390.
    • Ruan
      Ruan almost 6 years
      Ctrl-alt-f1 doesn't work after it gets stuck at the logo screen.
    • Ruan
      Ruan almost 6 years
      I also disabled nouveau driver and it had no effect. askubuntu.com/questions/841876/…
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      No, as the kernel driver wasn't loaded anyhow. But Xorg is loading its nouveau driver, so I'd remove that one.
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      Which installation guide did you follow? linuxconfig.org/… ?
    • Ruan
      Ruan almost 6 years
      I followed this one, it's very simple. linuxandubuntu.com/home/…
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      No mention of "update-initramfs -u" in your guide? What does "lspci | grep VGA" give you?
    • Ruan
      Ruan almost 6 years
      @GerardH.Pille It gives me : 28:00.0 VGA compatible controller: NVIDIA Corporation GP104 (rev a1)
    • Ruan
      Ruan almost 6 years
      @GerardH.Pille Yes, the "update-initramfs -u" command wasn't mentioned, although I have already executed it while trying to disable nouveau.
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      One last try, does "lsmod | grep nvidia" give you the same result as here: linuxbsdos.com/2017/06/11/… ?
    • Ruan
      Ruan almost 6 years
      @GerardH.Pille Sort of. (I'm on a Ryzen 7 1700 ). gist.github.com/ruanchaves/0455a00048e3419bea21c38afc1e0d1f
    • Gerard H. Pille
      Gerard H. Pille almost 6 years
      One more test for the "frozenness": can you connect to your system from another device when you have the blackout? You'd need some server running to be able to test that, sshd would be handy. Or, can you do a clean shutdown by pushing the power button? Would also prove your system is still alive, only not responding to the keyboard. BTW, your system makes me jealous anyhow, just last night I was looking for such a config.
    • Ruan
      Ruan almost 6 years
      I've already solved the problem. superuser.com/a/1333437/916782 There may be a true solution out there, maybe downgrading from nvidia-390. I bought this system for deep learning, so taken in this context it's just the bare minimum you need to actually run anything real.
  • Gerard H. Pille
    Gerard H. Pille almost 6 years
    Did you have the problem before you installed the nvidia driver?
  • Ruan
    Ruan almost 6 years
    No. It was a brand new install and everything was working perfectly. I've googled around a little bit and this seems to be a common sort of problem after people install nvidia drivers on Debian-based OSes. However this time none of the traditional fixes worked. I believe things would change if I downgraded from nvidia-390.
  • Gerard H. Pille
    Gerard H. Pille almost 6 years
    Your workaround looks to me as your problem is with system Dee. Wouldn't touch it with a stick but perhaps there's a "wants" wanting in graphical.target.
  • Patrick Da Silva
    Patrick Da Silva almost 5 years
    How many times are we talking? I'm in the same position, but I never saw this working.