Black Screen on GeForce GTX 1050 Ti Mobile with nvidia-driver-470

Hello.
I’m getting a black screen after installation of the nvidia-driver-470 on a fresh Ubuntu 20.04 installation on a notebook with a GeForce GTX 1050 Ti Mobile and an intell graphic card.
Every time I boot the machine I got this black screen, so I switch to tty2 by pressing ctrl + alt + F2 and back with ctrl + alt + F1, then the ubuntu login screen is displayed and I am able to login.

Here is my bug report:
nvidia-bug-report.log.gz (379.6 KB)

I would appreciate some help here in order to solve the problem.

I have changed to the nvidia-driver-460 and now it seems that everything is working good. So I believe that the problem is on the 470 driver version.
I will test to use the system some more time with this driver to certify that now the problem is over.

Since I have changed to nvidia-driver-460, two days ago, my system was ok but today the same problem happened again. My notebook has two graphics cards this nvidia and an intel graphics and I use three monitors (the notebook one + a LG widescreen and + an old LG Flatron) and I’ve noticed that the monitor on the intel graphics port is not working when this happens so I think that maybe the problem is not on the nvidea driver itself or it is some conflict. I’ll have to investigate more.

It seems that the problem I have is the bug with the i915 module and the kernel as pointed by generix in this post:

I’ve switched back to nvidia-driver-470. Things are working for now and that is strange. It seems that something is unstable on this environment. I will keep testing some more time.

I think I have found the solution for my specific problem. It is an xorg-server ubuntu package bug.
Reading my last nvidia-bug-report, I was able to find this:

set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (II) Module fb: vendor="X.Org Foundation"
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]:         compiled for 1.20.11, module version = 1.0.0
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]:         ABI class: X.Org ANSI C Emulation, version 0.4
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: Xorg: ../../../../dix/privates.c:384: dixRegisterPrivateKey: Assertion `!global_keys[type].created' failed.
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) Backtrace:
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x558b821b660c]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x60) [0x7faf6b6603c0]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0xcb) [0x7faf6b49d18b]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x12b) [0x7faf6b47c859]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) unw_get_proc_name failed: no unwind info found [-10]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7faf6b47c729]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (__assert_fail+0x46) [0x7faf6b48df36]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 6: /usr/lib/xorg/Xorg (dixRegisterPrivateKey+0x239) [0x558b82073a99]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 7: /usr/lib/xorg/modules/libglamoregl.so (glamor_init+0xcf) [0x7fa96654237f]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) unw_get_proc_name failed: no unwind info found [-10]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 8: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7fa966580d0d]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) unw_get_proc_name failed: no unwind info found [-10]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 9: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7fa966578fd6]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 10: /usr/lib/xorg/Xorg (AddGPUScreen+0xf5) [0x558b82055315]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 11: /usr/lib/xorg/Xorg (xf86PlatformMatchDriver+0xa44) [0x558b820b03d4]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 12: /usr/lib/xorg/Xorg (xf86PlatformDeviceCheckBusID+0x225) [0x558b820b5e15]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 13: /usr/lib/xorg/Xorg (config_fini+0xa4a) [0x558b820b201a]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 14: /usr/lib/xorg/Xorg (config_fini+0x15eb) [0x558b820b2bbb]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 15: /usr/lib/xorg/Xorg (config_init+0xd) [0x558b820b15ad]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 16: /usr/lib/xorg/Xorg (InitInput+0xb9) [0x558b82094c59]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 17: /usr/lib/xorg/Xorg (InitFonts+0x36d) [0x558b82058f7d]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 18: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0x7faf6b47e0b3]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) 19: /usr/lib/xorg/Xorg (_start+0x2e) [0x558b82042a6e]
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: Fatal server error:
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) Caught signal 6 (Aborted). Server aborting
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: Please consult the The X.Org Foundation support
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]:          at http://wiki.x.org
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]:  for help.
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE)
set 15 13:22:11 mymachinename /usr/lib/gdm3/gdm-x-session[961]: (EE) Server terminated with error (1). Closing log file.
set 15 13:22:33 mymachinename /usr/lib/gdm3/gdm-x-session[1324]: (--) Log file renamed from "/var/log/Xorg.pid-1324.log" to "/var/log/Xorg.0.log"

Then searching the web for this global_keys creation failure I was able to find the solution in this xorg-server bug.

The problem listed there is exactly the same I was facing and the solution was listed by PJSingh5000 (pjsingh5000) in the previous link. I will copy it here if someone else looking for a solution find this post:

  1. Edit the file /lib/udev/rules.d/61-gdm.rules.
sudo vim /lib/udev/rules.d/61-gdm.rules

The original file looks like this:

# disable Wayland on Hi1710 chipsets
 ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/lib/gdm3/gdm-disable-wayland"
 # disable Wayland when using the proprietary nvidia driver
 DRIVER=="nvidia", RUN+="/usr/lib/gdm3/gdm-disable-wayland"

Comment all of the lines as shown:

# disable Wayland on Hi1710 chipsets
# ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/lib/gdm3/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
# DRIVER=="nvidia", RUN+="/usr/lib/gdm3/gdm-disable-wayland"

Save the file and exit :wq!

  1. Ensure that the Wayland is not disabled in GDM.
sudo vim /etc/gdm3/custom.conf

Comment the “WaylandEnable” line, if it is not already commented, as shown:

# WaylandEnable=false

If changed save the file. Exit vim.

  1. Finally, reboot.

It seems to have solved the problem in my machine but I will keep testing it for a few more days to be sure.

Explanation by PJSingh5000 (pjsingh5000) in the link above

The /lib/udev/rules.d/61-gdm.rules file is supposed to prevent GDM from displaying the Wayland session option when the NVIDIA proprietary drivers are installed, since NVIDIA does not support Wayland.

However, in Ubuntu 20.04, there seems to be another redundant mechanism or rule that also prevents GDM from displaying the Wayland session option. I suspect this, because even after making the above change, the Wayland session option is still not displayed in GDM. (Setting WaylandEnable=true in /etc/gdm3/custom.conf has no effect).

Therefore, I have a hunch that there are two conflicting rules, and disabling one of the rules (i.e. /lib/udev/rules.d/61-gdm.rules) seems to remove the conflict.

I confirm that my system is OK now, so the solution has worked fine.