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

http://paste.ubuntu.com/p/MHvpvF6PQ4/

Someone can help me?

Thanks.

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
afterwards.

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:

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
GRUB_CMDLINE_LINUX=“”

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.

Bye

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

afterwards.

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.

Thanks.

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
nvidia-390-390.87

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.

Thanks!
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.
[url]https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/[/url]

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
N
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_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# 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 ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

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

# 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'
#GRUB_GFXMODE=640x480

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

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# 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 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
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.

 complete.

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

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

The kernel is too old for the intel gpu, please upgrade to the latest HWE:
[url]https://wiki.ubuntu.com/Kernel/LTSEnablementStack[/url]

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