Black Screen When Booting Up On Ubuntu 18.04 Machine With NVidia Drivers

The symptom:
When I purge then install the activate NVidia drivers (430 and 440 tried so far) and then reboot, the computer shows a black screen. I can’t activate a console with alt+ctrl+F6 (or the other equivalents). The machine has to be restarted the traditional way (i.e. by pressing on the power button until it powers off). To get to a console, I have to repower the machine, hit esc when the machine loads up to the BIOS, enter grub, enter the advanced options, put in nomodeset, reboot computer, select “intel” and then reboot again. I can then enter the GUI as per normal but without any NVidia drivers active.

This is reproducible.

Other symptoms:
Even with an NVidia driver selected, no game I run to test it out sees the discreet graphics card. It only sees the APU.

I cannot run nvidia-settings. It gives me:

ERROR: Unable to load info from any available system

A short description of specifics:

  • ASUS-TUF Gaming laptop:
    AMD Ryzen 5 CPU, AMD Raven APU, GeForce 1650 GTX discreet graphics card. I’ve only had this machine for 3 weeks so it’s a fairly fresh install. The graphics drivers did not work from the start, as soon as I put Ubuntu on it.

  • Drivers tried:
    NVidia 430 and 440 (currently 440 since the 430 that came by default did not work either)

  • OS:
    Ubuntu 18.04 with a kernel recently upgraded to 5.0

  • Other graphics drivers:
    Xorg and the Mesa APU drivers

  • Steps taken to reproduce this problem:

  • purge all NVidia
  • purge ppa
  • reboot
  • set ppa
  • upgrade apt
  • install graphics driver
  • reboot
  • check to see if installed then activate with prime-select
  • test in some game if it sees the right graphics card
  • reboot or shut down comp (black screen of death when reboot)
  • Steps taken to try to solve this problem:
  • remove xorg.conf and have nvidia-xorg recreate it
  • add custom xorg.conf that tells Linux that the GeForce must be the main GPU and put in modesetting option in the AMD APU config
  • blacklist Nouveau, make sure NVidia is not blacklisted by removing any blacklist-nvidia files
  • try different mode settings in Grub
  • updated kernel
  • checked on SecureBoot in BIOS: it is off
  • a bunch of stuff I’m probably forgetting since I’ve tried so many things

lspci | grep ‘VGA’ gives:

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f91 (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c2)

sudo lshw

tuf-gaming-fx505dt-fx505dt
    description: Ordinateur Bloc-notes
    produit: TUF Gaming FX505DT_FX505DT
    fabriquant: ASUSTeK COMPUTER INC.
    version: 1.0
    numéro de série: K9NRCV050153389
    bits: 64 bits
    fonctionnalités: smbios-3.2 dmi-3.2 smp vsyscall32
    configuration: boot=normal chassis=notebook family=TUF Gaming uuid=C96778B2-85D8-406C-9C72-06AB457633CF
  *-core
       description: Carte mère
       produit: FX505DT
       fabriquant: ASUSTeK COMPUTER INC.
       identifiant matériel: 0
       version: 1.0
       numéro de série: K937NRCV0097UDMB
       emplacement: Default string
     *-firmware
          description: BIOS
          fabriquant: American Megatrends Inc.
          identifiant matériel: 0
          version: FX505DT.306
          date: 07/12/2019
          taille: 64KiB
          capacité: 15MiB
          fonctionnalités: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: Mémoire Système
          identifiant matériel: a
          emplacement: Carte mère
          taille: 16GiB
        *-bank:0
             description: SODIMM DDR4 Synchrone Unbuffered (Unregistered) 2667 MHz (0,4 ns)
             produit: M471A1K43DB1-CTD
             fabriquant: Samsung
             identifiant matériel: 0
             numéro de série: 32FD7D54
             emplacement: DIMM 0
             taille: 8GiB
             bits: 64 bits
             horloge: 2667MHz (0.4ns)
        *-bank:1
             description: SODIMM DDR4 Synchrone Unbuffered (Unregistered) 2667 MHz (0,4 ns)
             produit: M471A1K43DB1-CTD
             fabriquant: Samsung
             identifiant matériel: 1
             numéro de série: 32FD7C34
             emplacement: DIMM 0
             taille: 8GiB
             bits: 64 bits
             horloge: 2667MHz (0.4ns)
     *-cache:0
          description: L1 cache
          identifiant matériel: c
          emplacement: L1 - Cache
          taille: 384KiB
          capacité: 384KiB
          horloge: 1GHz (1.0ns)
          fonctionnalités: pipeline-burst internal write-back unified
          configuration: level=1
     *-cache:1
          description: L2 cache
          identifiant matériel: d
          emplacement: L2 - Cache
          taille: 2MiB
          capacité: 2MiB
          horloge: 1GHz (1.0ns)
          fonctionnalités: pipeline-burst internal write-back unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          identifiant matériel: e
          emplacement: L3 - Cache
          taille: 4MiB
          capacité: 4MiB
          horloge: 1GHz (1.0ns)
          fonctionnalités: pipeline-burst internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          produit: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
          fabriquant: Advanced Micro Devices [AMD]
          identifiant matériel: f
          information bus: cpu@0
          version: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
          numéro de série: Unknown
          emplacement: FP5
          taille: 1451MHz
          capacité: 3700MHz
          bits: 64 bits
          horloge: 100MHz
          fonctionnalités: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca cpufreq
          configuration: cores=4 enabledcores=4 threads=8
           *-display
                description: VGA compatible controller
                produit: NVIDIA Corporation
                fabriquant: NVIDIA Corporation
                identifiant matériel: 0
                information bus: pci@0000:01:00.0
                version: a1
                bits: 64 bits
                horloge: 33MHz
                fonctionnalités: pm msi pciexpress vga_controller bus_master cap_list rom
                configuration: driver=nvidia latency=0
                ressources: irq:74 mémoire:f6000000-f6ffffff mémoire:c0000000-cfffffff mémoire:d0000000-d1ffffff portE/S:f000(taille=128) mémoire:f7000000-f707ffff
           *-display
                description: VGA compatible controller
                produit: Picasso
                fabriquant: Advanced Micro Devices, Inc. [AMD/ATI]
                identifiant matériel: 0
                information bus: pci@0000:05:00.0
                version: c2
                bits: 64 bits
                horloge: 33MHz
                fonctionnalités: pm pciexpress msi msix vga_controller bus_master cap_list rom
                configuration: driver=amdgpu latency=0
                ressources: irq:72 mémoire:e0000000-efffffff mémoire:f0000000-f01fffff portE/S:c000(taille=256) mémoire:f7500000-f757ffff mémoire:c0000-dffff

glxinfo|egrep “OpenGL”

OpenGL vendor string: X.Org
OpenGL renderer string: AMD RAVEN (DRM 3.27.0, 5.0.0-37-generic, LLVM 9.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.2.1
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

sudo modprobe nvidia doesn’t return anything and doesn’t return any errors.

/etc/X11/xorg.conf

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

/etc/X11/xorg.conf.d/10-amdgpu.conf

Section "OutputClass"
        Identifier "AMDgpu"
        MatchDriver "amdgpu"
        Driver "modesetting"
EndSection

/etc/X11/xorg.conf.d/10-nvidia-gpu.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "Primary GPU" "Yes"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia-440/xorg"
EndSection

sudo nvidia-smi

Sat Dec 21 17:10:16 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   40C    P0     3W /  N/A |      0MiB /  3911MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

uname -r

5.0.0-37-generic

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.modeset=0 rd.driver.blacklist=nouveau"
GRUB_CMDLINE_LINUX=""

I updated grub after editing this file.

NVidia Bug Report coming soon.

It just seems like there is a conflict between the Raven and the GeForce with the Raven always winning out no matter what I try. Not sure how to get these two things to play nice.

NOTE: apologies for the mishmash of French and English in the logs.
nvidia-bug-report.log.gz (1.08 MB)

Please delete /etc/X11/xorg.conf, then create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing

[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer

If this doesn’t resolve the issue, please create a new nvidia-bug-report.log.

Hi generix.

Thank you very much for your help!

It got me passed the black screen of death issue but unfortunately I can’t launch things like the Steam client. I use Grim Dawn on Steam to check if it sees the NVidia graphics card since it loads up quickly. I have to switch back to the “intel” drivers in order to be able to launch steam.

Since I have to switch to intel, reboot, load Steam, I can’t test the NVidia drivers out. I unfortunately don’t have anything else installed to test the driver out at the moment to see if it is working in apps or games or such.

Any idea why Steam is crashing after log in? What does changing the driver have to do with it??

Again thank you for your time.

Update : nvidia-settings now works. It looks like it overall works.
nvidia-bug-report.log.gz (1.09 MB)

Yeah it only partly works. It works in the browser running WebGL but I can’t actually get the Nvidia drivers to work with anything else. Never had so many problems configuring a Ubuntu machine and this so the fourth one. Not sure what the problem is. It seemed like getting the driver to mount caused other conflicts in the system.

There’s something awefully going wrong. I don’t really know why but it looks like the kernel is now blocking things because the Xorg modesetting driver is doing things wrongly which now breaks other Xorg things. Clusterf*
Please try creating /etc/X11/xorg.conf with contents

Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "nvidia" 0 0
    Inactive       "amd"
EndSection

Section "Device"
    Identifier     "amd"
    Driver         "modesetting"
    Option         "AccelMethod" "none"
    BusID          "PCI:5:0:0"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
    Option         "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
EndSection

Hi Generix and thank you again for your help.

Here is my new xorg.conf that I originally had put in /etc/X11/ but had to move out.

Section "ServerLayout"
	Identifier    "layout"
	Screen     0  "nvidia" 0 0
	Inactive      "amd"
EndSection

Section "Device"
	Identifier    "amd"
	Driver        "modesetting"
	Option        "AccelMethod" "none"
	BusId         "PCI:5:0:0"
EndSection

Section "Device"
	Identifier    "nvidia"
        Driver        "nvidia"
        VendorName    "NVIDIA Corporation"
        BusID         "PCI:1:0:0"
	Option        "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
	Identifier    "nvidia"
	Device        "nvidia"
EndSection

So I typed that up and rebooted and ended up on the black screen of death again. I had to reboot to grub, set nomodeset again and then reboot, move the xorg.conf file and the computer rebooted.

I’ll attach the new bug report as soon as I am done typing up this post.

I forgot to mention in my original post that I switched the UI to lightdm. It didn’t help though because regardless of which UI I use, the behavior is the same as far as the black screen of death goes.

Unfortunately, it also looks like despite using the nvidia drivers:

sudo prime-select query

nvidia

It’s gone back to the mesa ones perhaps because last night I switched over to the Raven in order to be able to use something on the computer:

glxinfo | egrep “OpenGL”

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 9.0.1, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.0.0-devel (git-e6b2af5 2019-12-21 bionic-oibaf-ppa)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 20.0.0-devel (git-e6b2af5 2019-12-21 bionic-oibaf-ppa)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.0-devel (git-e6b2af5 2019-12-21 bionic-oibaf-ppa)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

sudo nvidia-smi

Sun Dec 22 10:04:28 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 1650    On   | 00000000:01:00.0 Off |                  N/A |
| N/A   36C    P8     1W /  N/A |    101MiB /  3911MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       981      G   /usr/lib/xorg/Xorg                           100MiB |
+-----------------------------------------------------------------------------+

nvidia-bug-report.log.gz (1.07 MB)