ubuntu 18.04 login loop after installing nvidia driver

After I installed driver on ubuntu 18.04, I experienced a problem with nvidia card.

After installing nvidia driver and reboot, I got into login loop and did ctrl+alt+f3 to login.
Then prime-select intel and reboot, I lost my contact to geforce rtx 2070.
When typed nvidia-smi. I got
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

And prime-select nvidia, I can see my graphic cards. But after rebooting, i was in login loop again.
I try to create /etc/X11/xorg.conf and add ‘nogpumanager’ kernel parameter when booting the system and edit in the grub menu. But it does not work for me. I still trapped in the login page.

Attached are the nvidia-bug-report generated from prime-select intel and prime-select nvidia.

To clarify the solution:

sudo prime-select nvidia
  1. find the busid and identifier of the board board controller, which is “PCI:8:0:0” and “ASPEED” for my board
lshw -c display | grep product

product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation
product: ASPEED Graphics Family
product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation
product: NVIDIA Corporation

lshw -c display | grep bus

bus info: pci@0000:01:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:02:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:03:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:04:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:05:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:08:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:81:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:82:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:83:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:84:00.0
capabilities: vga_controller bus_master cap_list rom
bus info: pci@0000:85:00.0
capabilities: vga_controller bus_master cap_list rom

vim /etc/X11/xorg.conf
Section "Device"
    Identifier     "ASPEED"
    Driver         "modesetting"
    BusID          "PCI:8:0:0"
EndSection
  1. add “nogpumanager” kernal boot parameter
    a.
sudo vim /etc/default/grub

b. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append “nogpumanager”.
GRUB_CMDLINE_LINUX_DEFAULT=“nogpumanager quiet splash”
save the file and exit.
c.

sudo update-grub
  1. reboot
    This time you should get into the ubuntu interface.

nvidia-nvidia-bug-report.log (6.26 MB)
intel-nvidia-bug-report.log (522 KB)

No attachments there, did the forum’s malware scanner freak out again?

try below:

1
ctrl+alt +F3 ( whatever Fn) to go to text mode. and login

if you have :
/etc/modprobe.d/blacklist-nouveau.conf
with the following contents:
blacklist nouveau
options nouveau modeset=0
delete it.

3 reboot it. if still loop back

1
ctrl+alt +F3 ( whatever Fn) to go to text mode. and login

2
Regenerate the kernel initramfs:
sudo update-initramfs -u

reboot again.

This time should all OK

I have updated the bug report under the topic.

I tried but after typing update initramfs, I got:
update-initramfs: Generating /boot/initrd.img-4.15.0-39-generic
W: possible missing firmware /lib/firmware/ast_dp501_fw.bin for module ast
W: initramfs-tools configuration sets RESUME=UUID=09e25397-4a2c-4fb0-a605-a7013eecb59c
W: but no matching swap device is available

unfortunately, i still cannot login when prime-select nvidia

Try this:

  • sudo prime-select nvidia
  • add ‘nogpumanager’ kernel parameter
  • create /etc/X11/xorg.conf
Section "Device"
    Identifier     "ASPEED"
    Driver         "modesetting"
    BusID          "PCI:8:0:0"
EndSection
  • reboot

I tried this, created /etc/X11/xorg.conf and added ‘nogpumanager’ kernel parameter when booting the system and edit in the grub menu

But login loop is still there.

Please create a new nvidia-bug-report.log and attach. Since the last time the Xorg logs weren’t included, please also run
sudo journalctl -b0 --no-pager _COMM=gdm-x-session >journal.txt
after trying to log in and attach the output file.

it works.
thanks!

Hello, I have the same issue, I tried the steps given above but it didn’t work. After reboot, the system cannot load graphics drivers and asked to run low graphic mode.
Can you help me please ?
nvidia-bug-report.log.gz (2.55 MB)

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

Thank you for the quick reply, I have uploaded the result.

ixtiyoruz312, you’re using ubuntu 16.04, that has a different GL library layout so it’s a bit more difficult.
You can try this:

--dkms --no-opengl-files

This will leave graphics as-is and only install the kernel driver needed for cuda.
Afterwards, install cuda after downloading and adding the repo with
sudo apt install cuda-toolkit-10-1

Sorry fo the late reply. Generix thank you very much. I appreciate it. It worked.