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
  • 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
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: bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-367/… – 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.