2

Problem

I cannot get my NVIDIA 1050 TI to work with Ubuntu 18.04 and 18.10 (I updated, same issues). Every time I switch from the built-in drivers to the ones from ppa:graphics-drivers, a reboot will lead to a black screen, from which I can't get anywhere.

I always have to boot into recovery mode, purge the nvidia packages, and try again. My monitor is connected to the DP port on the NVIDIA card; it's an AOC 4K 60Hz display.

I have tried the following versions of the NVIDIA drivers via apt:

  • 396
  • 410
  • 415

Update: The problem is not GDM3 or lightdm (I've tried both), it's actually that the screen where I get asked the LUKS password is not shown. When I type my password blindly, I can continue to the login screen!

Related questions / discussions

I have seen the following posts:

Some bug reports:

Any idea what I could look for? Where would I find logs that give me an indication of the error?

More info

Detailed info about the device:

➜ lspci | grep -i vga
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)

The problem is the same on both 4.15 and 4.18 kernels (18.04, 18.10). My current kernel:

Linux voltaire 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

My apt-cache policy:

linux-headers-generic:
  Installed: 4.18.0.13.14
  Candidate: 4.18.0.13.14
  Version table:
 *** 4.18.0.13.14 500
        500 http://ubuntu.inode.at/ubuntu cosmic-updates/main amd64 Packages
        500 http://ubuntu.inode.at/ubuntu cosmic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4.18.0.10.11 500
        500 http://ubuntu.inode.at/ubuntu cosmic/main amd64 Packages

Output I get when installing the latest nvidia-driver-415 package:

Loading new nvidia-415.25 DKMS files...
Building for 4.18.0-13-generic
Building for architecture x86_64
Building initial module for 4.18.0-13-generic
Secure Boot not enabled on this system.
Done.

nvidia:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-13-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-13-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-13-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-13-generic/updates/dkms/

depmod...

DKMS: install completed.
Setting up nvidia-driver-415 (415.25-0ubuntu0~gpu18.10.1) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...
Processing triggers for initramfs-tools (0.131ubuntu15) ...
update-initramfs: Generating /boot/initrd.img-4.18.0-13-generic
slhck
  • 940
  • Can you confirm that the dkms modules succeeds in building? Could you also add output of lspci | grep -i vga – Anders F. U. Kiær Dec 30 '18 at 14:21
  • is this a desktop or laptop? you could look at eg. output from when you installed it. Or you could do something like this: sudo updatedb && locate nvidia.ko – Anders F. U. Kiær Dec 30 '18 at 17:29
  • For instance when running sudo apt install nvidia-driver-415 it will show somthing like `nvidia-uvm.ko: Running module version sanity check.
    • Original module
      • No original module exists within this kernel
    • Installation
      • Installing to /lib/modules/4.15.0-43-generic/kernel/drivers/char/drm/

    depmod...

    DKMS: install completed.`

    – Anders F. U. Kiær Dec 30 '18 at 17:32
  • That would make sense. Could you also add output of uname -a and apt-cache policy linux-headers-generic before installing drivers? – Anders F. U. Kiær Dec 30 '18 at 17:41
  • @AndersF.U.Kiær Updated my post. Unfortunately, the same issue. Any idea where I could find a log? The interesting thing is that the black screen already occurs before the prompt for the LUKS password. – slhck Dec 30 '18 at 18:12
  • Try the solution I posted :) – Anders F. U. Kiær Dec 30 '18 at 18:19

1 Answers1

1

You have to load the proprietary Nvidia drivers from initramfs.

/etc/initramfs-tools/modules

# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
nvidia
nvidia-drm
nvidia-modeset
nvidia-uvm

You could also check the content of /etc/modprobe.d/nvidia-graphics-drivers.conf, should be something like this:

options nvidia-drm modeset=1
blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off

Make sure to update initramfs. sudo update-initramfs -u -k all

To work around bug with still black screen on typing password, try the following: edit /etc/default/grub change the two lines to be like this:

GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

apply it with running sudo update-grub

Reboot, and hopefully enjoy!

  • I have no such nvidia entries in the modules file, and there is no file from nvidia in modprobe.d after installing the nvidia-driver-415 package. Or are you saying that I have to manually load the entries in the modules file? Shouldn't that be done automatically? – slhck Dec 30 '18 at 19:31
  • I got one step further. The black screen is only shown when I have to type in my LUKS password. Once I type it in blindly, I can continue to the login screen! – slhck Dec 30 '18 at 19:55
  • Seems to be this issue: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-367/+bug/1638983 – slhck Dec 30 '18 at 20:01
  • Did you create the file? and modified the initramfs module list? i assume yes? then you could do some changes to grub and you should be set. All you need to work around that bug is to remove splash and quiet from grub. check updated answer. – Anders F. U. Kiær Dec 30 '18 at 21:16
  • I did not create the modules file – it was already present. Nor did I modify it, as I assumed that if the entries were really needed, they'd already be there. Since the NVIDIA drivers work fine after typing in the LUKS password, I assume no changes are needed in these files? I'll check the GRUB options tomorrow. Thanks for your help so far! – slhck Dec 30 '18 at 21:47
  • I am confused, can you tell me which modifications you did and did not do? – Anders F. U. Kiær Dec 30 '18 at 21:53
  • I did not do any modifications. I just installed the drivers again, typed the password blindly, and it worked. – slhck Dec 30 '18 at 21:57
  • Ok to clearify it. The addition in modules file is really needed for the initramfs to have your graphicdriver. It is the initramfs that show the screen where you decrypt your drive. GRUB options should not be necessary, but is nice to change because you get a clue about what is happening :) – Anders F. U. Kiær Dec 30 '18 at 22:50
  • It worked! I tried both empty options for GRUB as well as nomodeset. The resolution is wrong, but I don't care at this point. I have yet to try the other additions you mentioned. – slhck Dec 31 '18 at 09:11
  • To get the resolution you want for boot you will actually have to use modeset => options nvidia-drm modeset=1, but it will only work if the driver is available at initramfs. – Anders F. U. Kiær Dec 31 '18 at 10:56