Black screen after installing nvidia-460 driver on Legion 7i laptop (GeForce RTX 2070 with Max-Q)

I have installed Ubuntu 20.04 (kernel 5.8.0-40) on a Lenovo Legion 7i with GeForce RTX 2070 with Max-Q design. With nouveau driver Ubuntu works fine. But once I installed nvidia-460 driver and restarted the computer, it booted into black screen. The laptop also has an Intel GPU, but I did prime-select nvidia. On my system there were no /etc/X11/xorg.conf, /lib/modprobe.d/blacklist-nvidia.conf, /etc/modprobe.d/blacklist-nvidia.conf, so earlier solutions didn’t quite apply to my case. Attached please find the bug report. Thanks so much for the help!

nvidia-bug-report.log.gz (346.6 KB)

1 Like

The notebook doesn’t have an intel gpu, only the discrete nvidia. Might be switched off in bios. Doesn’t matter, though.
The nvidia kernel driver is loading fine but Xorg doesn’t start, maybe it’s trying to run Wayland but can’t because you set ‘nomodeset’.
Please try to disable wayland:
https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-20-04-desktop

Thanks for the help! Because the previous bug report was generated under the recovery mode, it had ‘nomodeset’ (normal boot doesn’t have nomodeset). This time I removed ‘nomodeset’ when booting into the recovery mode, followed the link to disable Wayland, and typed ‘startx’. Then it gets to the black screen again. Normal reboot also goes into black screen.

It’s good to know that the driver is loading fine. Could it be that the driver installation changed some Xorg settings so that Xorg doesn’t start properly? Would you please gives me some suggestions what to look for? I saw on a post suggested below and I wonder that applies to my settings. Thank you again!

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

nvidia-bug-report.log.gz (397.6 KB)

The log from when you used startx was caught and the xserver started just fine, detected the internal screen and switched to 1920x1080 resolution. So it’s odd you just saw a black screen. My guesses would be either a brightness problem, some weird incompatibility between the nvidia driver and your display or the display being disabled for unknown reasons.
Please check 1) if you can turn up the brightness using the keyboard and 2) connect an external monitor or TV.

1 Like

Exciting!! When the laptop was connected to an external monitor, Ubuntu booted into GUI successfully! I can unplug the external monitor (no reboot) and adjust screen brightness just fine.

However, if I boot the laptop without external monitor connected, it booted into black screen and screen brightness cannot be adjusted. Then I plug in the external monitor, the external monitor shows the 2nd ubuntu desktop, while the laptop screen is still black.

Is there something can be done to boot it normally without the external monitor connected? Here I attached the bug report after I unplugged the external monitor, while booting with the external monitor connected. Thanks!
nvidia-bug-report.log.gz (389.4 KB)

Please check if there’s a file
/var/lib/gdm3/.config/monitors.xml
and delete it.

Or try the other way round: boot/login to desktop with external monitor, unplug it, then copy
~/.config/monitors.xml to /var/lib/gdm3/.config/

Hmmm… somehow neither path has monitors.xml.

That’s rather odd, should be auto-created in any case. does it show up if you use the gnome control center and play around with monitor positions?

Yes! By adjusting the relative positions between the two display, the gnome-control-center created ~/.config/monitors.xml

However, copied ~/config/monitors.xml to /var/lib/gdm3/.config/ didn’t do the trick…

Sounds like some weird gdm bug. Please post the output of
ps a |grep X
while on desktop.

like this? Currently I have external monitor connected.

$ ps a | grep X
    900 tty1     Sl+    0:02 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3
   1472 tty2     Sl+    0:47 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
   8767 pts/1    S+     0:00 grep --color=auto X

Please try this:
boot to black screen
switch th vt3 (ctrl+alt+f3)
Do you see a login?
log in
run
sudo -s

XAUTHORITY=/run/user/125/gdm/Xauthority DISPLAY=:0 xrandr --output DFP-5 --auto

switch back to vt1 (ctrl+alt+f1)
does the sceen come alive?

When boot to black screen, I wasn’t allowed to switch to vt3 (ctrl+alt+f3 no response; same for other terminals). Can I do that under normal boot or recovery mode?

That wouldn’t help. Please rule out a gdm bug by installing and switching to lightdm.

I followed this instruction to switch to lightdm, but still booted into black screen. Still cannot switch to vt3 or others. Also, not sure whether this info helps. When I booted into black screen, it doesn’t respond to keyboard (so ctrl-art-del doesn’t work), and I had to press the power button to shutdown the computer. It was like this from the beginning.

Btw, thanks so much to stay with me and help me out. Really appreciated!

I’m following this closely as I have this exact situation and I confirm my 7i’s monitor turns on when I plug in a HDMI cable. Without a second screen I go from the Grub boot menu to pitch black and I cannot switch to text terminal nor reboot via Ctrl+Alt+Del. Turning the luminosity up via Fn+Up combo has no effect. I haven’t tried the monitors.xml trick yet but I see other people saying it didn’t work.

Looks like some really weird incompatibility of the nvidia driver with the panel built into this notbook model, so only nvidia can fix it. Maybe send your nvidia-bug-reports.log to linux-bugs[at]nvidia.com for increased attention. Also check for a bios update available.

1 Like

Will do that. I’m posting here a new bug report (which I’ll send to mentioned email) I obtained while connected via ssh into the dark machine with the issue.
I launched the 7i with no 2nd screens, made sure the issue happened (screen is black) connected and launched nvidia-bug-report.sh; finally pulled the file. Here it is.
nvidia-bug-report.log.gz (282.5 KB)