Login Loop after installing nvidia 390.48 drivers on ubuntu 16.04 (notebook Asus ROG with 1050ti)

Hi all,
after I install nvidia 390 open source drivers on Ubuntu I get into a never ending login loop.

I’m trying to search a solution on the internet (askubuntu, devtalk, etc.) but nothing helped me. Tried some solutions like:

  • set nouveau.modeset=0 to the end of linux row in grub
  • acting on .Xauthority
  • Reinstall xorg

I’m using a ROG with a 1050ti.

This is the nvidia-bug-report.log


Someone can help me?


It’s an optimus system, so use only ubuntu driver packages from the graphics ppa. Package nvidia-prime has also to be installed.
Furthermore, you have to remove ‘nomodeset’ from kernel cmdline and run
sudo update-initramfs -u

Works fine! Thanks a lot.

Only one problem, each time turn on the pc, I have to remove that ‘nomodeset’ from the kernel cmdline. Is no there a permanent way to remove that nomodeset?

I try to search in ‘/etc/default/grub’ and I have this:


This mean that in the kernel I should have something like:

linux […] ro quiet splash

Instead I have:

linux […] ro nomodeset.

Why that?

After you remove ‘nomodeset’ from grub config, you have to run
sudo update-grub

Thanks generix, you was very helpful.

No more question.


Maybe some hint: you’ll soon notice tearing, to get rid of that, create a file (as root) 99-prime-sync.conf in /etc/modprobe.d containing

options nvidia_390_drm modeset=1

and run

sudo update-initramfs -u


sudo cat /sys/module/nvidia_drm/parameters/modeset

should return ‘Y’ if done right (after reboot).

Till now there are no problem.

If I’ll notice tearing I’ll apply this hint.


Thank you very much for this fix,

It helped us a lot, before upgrading the systems to the kernels:
$ ls/usr/src/
linux-headers-4.15.0-39-generic linux-headers-4.4.0-139-generic
linux-headers-4.15.0-39 linux-headers-4.4.0-139

we get again the login loop and the following error when executing the command:
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.15.0-39-generic
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915

After rebooting, the system re-enters the login loop.

nvidia-bug-report.log.gz (564 KB)

dmitro.biz, please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

Thank you Generix, very much!
The log is attached before the reboot.
The system works correctly after the next reboot, thanks!

Hello! Dear DevTalk Support!

On new Lenovo laptops, the patch works fine, and, as described in the instructions above: after a reboot, the problem goes away.
But, just received new Dell G5 laptops with the installed clear Ubuntu 16.04 and the Nvidia 390.87 driver required by our software, and with the installed instructions given here that helped us dozens of times, unfortunately, on several identical laptops, - does not work, and I don’t I manage to solve the problem myself.

I attach reports made through ssh terminal.

facesdemo3@facesdemo3-G5-5587:~$ sudo cat /sys/module/nvidia_drm/parameters/modeset
facesdemo3@facesdemo3-G5-5587:~$ lsmod |grep nvidia
nvidia_uvm            765952  8
nvidia_drm             40960  0
nvidia_modeset       1110016  1 nvidia_drm
drm_kms_helper        155648  2 i915,nvidia_drm
drm                   364544  4 i915,drm_kms_helper,nvidia_drm
nvidia              14368768  964 nvidia_modeset,nvidia_uvm
ipmi_msghandler        49152  1 nvidia
facesdemo3@facesdemo3-G5-5587:~$ cat /etc/modprobe.d/99-prime-sync.conf 
options nvidia_390_drm modeset=1
facesdemo3@facesdemo3-G5-5587:~$ cat  /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
facesdemo3@facesdemo3-G5-5587:~$ lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1c20 (rev a1)
facesdemo3@facesdemo3-G5-5587:~$ cat /etc/lsb-release 
facesdemo3@facesdemo3-G5-5587:~$ nvidia-smi
Sun Nov 25 20:00:54 2018       
| NVIDIA-SMI 390.87                 Driver Version: 390.87                    |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 106...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   56C    P5     7W /  N/A |   2048MiB /  6078MiB |      0%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      2685      C   /home/facesdemo3/SmartCameras/dist/run/run   475MiB |
|    0      2694      C   /home/facesdemo3/SmartCameras/dist/run/run   475MiB |
|    0      2695      C   /home/facesdemo3/SmartCameras/dist/run/run   475MiB |
|    0      2799      C   /home/facesdemo3/SmartCameras/dist/run/run   613MiB |
facesdemo3@facesdemo3-G5-5587:~$ sudo nvidia-bug-report.sh

nvidia-bug-report.sh will now collect information about your
system and create the file 'nvidia-bug-report.log.gz' in the current
directory.  It may take several seconds to run.  In some
cases, it may hang trying to capture data generated dynamically
by the Linux kernel and/or the NVIDIA kernel module.  While
the bug report log file will be incomplete if this happens, it
may still contain enough data to diagnose your problem.

Please include the 'nvidia-bug-report.log.gz' log file when reporting
your bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to 'linux-bugs@nvidia.com'.

Running nvidia-bug-report.sh...

If the bug report script hangs after this point consider running with
--safe-mode and --extra-system-data command line arguments.


facesdemo3@facesdemo3-G5-5587:~$ prime-select query

nvidia-bug-report.log.gz (94.7 KB)

The kernel is too old for the intel gpu, please upgrade to the latest HWE:

Thank you very much Generix!
Yes, After

sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

The driver works correctly, the login loop disappears.

I had the same thing happen to me in 19.10 and with nvidia-driver-435. The solution for me was to install lightdm as my display manager.

sudo apt-get install lightdm

lightdm fixed it for me. THANK YOU malanb5