1

I have a custom build on Xubuntu 18.04, NVIDIA GTX 1050 graphics card and i'm trying to get the NVIDIA drivers to work. All methods i've tried so far cause the black screen with blinking cursor (Ubuntu 18.10: Installing nvidia drivers leads to black screen after GRUB and Black screen at boot after Nvidia driver installation on Ubuntu 18.04.2 LTS)

What i've tried:

  • Installing from NVIDIA official runfile, from ppa repository, from choosing the driver in Additional Drivers, using versions 435, 440, 390
  • Setting nomodeset, nouveau.modeset=0, nvidia-rpm.modeset=1 in boot options
  • Installing the hwe packages (following Update killed lightdm and xfce4 (Ubuntu 16.04. 4))

Removing quiet splash from boot options, i can see the error is "Failed to start Detect the available GPUs and deal with any system changes." (same as Ubuntu hangs on boot after blackout- Detect the available GPUs).

I've tried replacing lightdm with gdm3 but i get Ubuntu 18.04 Login window loop.

I've no choice except use the Nouveau driver, but i'm experiencing the same problems as Some icons and text randomly become invisible after waking up from sleep (Ubuntu GNOME).

UPDATE: i did apt purge gnome* as i thought it would resolve the display issues. It did, but caused my system to shut down when waking up from suspend (Ubuntu shuts down instead of suspending). Editing /etc/systemd/login.conf made it worse: it shuts down upon login instead (18.04 shuts off immediately after login). I went to reinstall nvidia drivers, leading to boot being stuck on "Started apt Daily download activities" (similar to Boot stuck at “started daily apt upgrade and clean activities” (18.10)). I powered off the laptop and set the timer for apt to start after booting, and it's back to "Failed to start Detect the available GPUs and deal with any system changes." Furthermore, apt is also broken; now apt install anything leads to E: Unable to correct problems, you have held broken packages.

UPDATE 2:

I downgraded the kernel from 5.3 to 4.15, then corrected the broken packages with aptitude. For some reason, the driver install worked after booting to shell, getting wifi (see https://www.linuxbabe.com/command-line/ubuntu-server-16-04-wifi-wpa-supplicant and editing /etc/resolv.conf) then:

apt purge gnome*
reboot
service lightdm stop
apt install nvidia*-390
aptitude install primus nvidia-settings nvidia-profiler
apt install xserver-xorg-input-*18.04*
reboot

I might test using the latest nvidia-440 packages later.

I suspect it's the kernel and installing the hwe packages that made it work (Nvidia drivers broken after kernel update (Ubuntu 18.04 + kernel 5)).

I also disabled display compositing in Window Manager Tweaks and i don't have the disappearing problems anymore (but it could be due to not using the buggy Nouveau driver).

UPDATE 3: Upgrading the kernel to 4.15.0.91 gave me the black screen again and purging/reinstalling nvidia* didn't help. In the end i gave up and kept to 4.15.0.88.

Re-enabled display compositing and installed nvidia-440 without issues.

However, switching to Nvidia drivers causes Screen brightness not working. Running xbacklight gives No outputs have backlight property, but editing the brightness file and xrandr works. I got around this by assigning

perl -e 'foreach $line (`xrandr --verbose`) {if ($line =~ "Brightness: (.+)") {my $b = $1 + 0.1; `xrandr --output eDP-1 --brightness $b`; exit;}}'

to brightness-up.

3 Answers 3

1

What method did you use to install the NVidia drivers? My system also has issues with the Nouveau drivers. Unfortunately I've had times I tried updating the NVidia drivers and was never able to get system working correctly without reinstalling Ubuntu. Anyway, I've noticed that sometimes you can re-install the NVidia drivers only from safe mode or after switching to Nouveau and rebooting. Ubuntu 19.10 works better with NVidia and comes with NVidia v435 (on UbuntuStudio 19.10 I have no problems with either 435 or 440 except a weird freezing when unlocking a user that I don't think is from the NVidia driver).

The last time I had issues this worked for me:

    # I switched to Nouveau drivers first 
    # (I think I had to boot into Safe Mode in order to use Software Updates/Additional Drivers in order to switch to Nouveau)
    $ sudo apt-get purge nvidia*
    # (reboot)
    $ sudo apt-add-repository ppa:graphics-drivers/ppa
    $ sudo apt update
    $ sudo apt install nvidia-driver-435     # use this to install specific version 435
    # I don't think I tried v440 on Ubuntu 18.04
    # (reboot)
    $ nvidia-smi          # after reboot, check version installed)

Luckily Ubuntu 20.04 is coming out soon! :)

2
  • Maybe i'll try upgrading to 19.10 (unfortunately it's not LTS). I used the .run file, which got me into the black screen and blinking cursor. I used apt, which got me into "Failed to start detect GPU" and "Failed to start Light Display Manager". Mar 13, 2020 at 6:23
  • i downgraded the kernel from 5.3 to 4.15 hoping it would be more stable, but it's the same. Thanks for the tip, i'll try installing in recovery mode. Mar 13, 2020 at 6:25
0

I found something else to try. I haven't tried this myself, but I'm going to keep this info in case I need it. Here is something I found at Ubuntu 18.10: Installing nvidia drivers leads to black screen after GRUB .

I had this issue after upgrading from 18.04. I have a nvidia 1070ti GPU and was previously using the nvidia-390 driver successfully with 18.04. 
For me, the upgrade (somehow) completed but left several packages partially installed 
i.e. I noticed several in iu state (not ii as expected) by doing this

dpkg -l | grep nvidia

I finished the install by doing this

sudo dpkg --configure -a
sudo reboot

So, if dpkg -l | grep nvidia shows any packages in the iu state, then try the sudo dpkg --configure -a

0

I posted my issue to Nvidia forums and got a reply that worked almost immediately: https://forums.developer.nvidia.com/t/cuda-install-on-ubuntu-18-04-leads-to-black-screen-kernel-5-3-nvidia-modules-not-loading-kernel-4-15-0-88-custom-build-geforce-1050/120444/2

Copy-pasted here for reference.

  • remove the .run installer driver using the --uninstall option
  • delete /etc/X11/xorg.conf
  • remove the kernel parameter nomodeset if existing
  • install the driver from repo sudo apt install nvidia-driver-440
  • make sure nvidia-prime is installed (sudo apt install nvidia-prime)
  • switch to nvidia sudo prime-select nvidia
  • remove stray blacklist files sudo rm /lib/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf
  • update the initrd sudo update-initramfs -u
  • reboot to 5.3 kernel

Aterwards, install cuda:

  • download the cuda 10.2 .deb
  • add the repo to your system (first 6 steps from install instructions on download page)
  • don’t install cuda
  • instead, run sudo apt install cuda-toolkit-10-2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .