Black screen after installing Nvidia drivers

After installing the Nvidia drivers I get a black screen (with a cursor, and nothing else. I can also access the tty).

I tried 2 different ways :

  • http://www.opensuse-guide.org/3d.php following this guide (tried the 1click method 2 times, and the terminal one just says “Nothing to do.”)
  • through YAST (Software Repositories/Nvidia/selecting the drivers)

I must say I dual boot and my gpu works just fine ; I was using Leap 15.3 just before and I didn’t have any issue installing the driver.

Card is a Geforce 1060.

Please help.

Post

inxi -Ga

Result of inxi -Ga

Graphics:  Device-1: Intel IvyBridge GT2 [HD Graphics 4000] vendor: ASRock driver: i915 v: kernel bus-ID: 00:02.0
           chip-ID: 8086:0162 class-ID: 0380
           Device-2: NVIDIA GP106 [GeForce GTX 1060 6GB] vendor: Gigabyte driver: nvidia v: 515.48.07
           alternate: nouveau,nvidia_drm bus-ID: 02:00.0 chip-ID: 10de:1c03 class-ID: 0300
           Display: server: X.org 1.20.3 driver: loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: intel,nv
           tty: 128x48
           Message: Advanced graphics data unavailable in console. Try -G --display

Upload full output of “journalctl -b” immediately after boot to https://susepaste.org

https://susepaste.org/59080822

All looks good. The only suspicious log entries are

Jun 23 19:37:10 localhost kernel: [drm:drm_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to grab modeset ownership
Jun 23 19:37:10 localhost kernel: [drm:drm_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to grab modeset ownership
Jun 23 19:37:10 localhost kernel: [drm:drm_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to grab modeset ownership

but according to Ubuntu 21.10 - "Failed to grab modeset ownership" with 495.44 - Linux - NVIDIA Developer Forums this can be ignored. Can you post /var/log/Xorg.log.0 (I assume SDDM is still using it)? If you disable auto-login, do you get display manager greeter screen with password request? Also, you apparently have Optimus system. Where your monitor output is connected - to Intel or nVidia card?

Can you post /var/log/Xorg.log.0 (I assume SDDM is still using it)?

I don’t know if it is. if you tell me how to check it, I can tell you. for the file, here it is : SUSE Paste

If you disable auto-login, do you get display manager greeter screen with password request?

no, I have the same thing, black screen with my mouse cursor. No difference.

Also, you apparently have Optimus system. Where your monitor output is connected - to Intel or nVidia card?

All my monitors are connected to my Nvidia card.

May be X or your desktop environment are using Intel as primary output. Could you log in on tty or remotely and run

DISPLAY=:0 xrandr

I realized that I forgot to mention I’m using KDE (I thought it was so obvious to go Leap x KDE that I didn’t mention it until now, lol). But anyway,

DISPLAY=:0 xrandr
No protocol specified
No protocol specified
Can't open display :0

(“No protocol specified” is written twice for some reason).

Try to boot without these kernel parameters:

preempt=full security=apparmor

Same thing, black screen, mouse cursor, nothing different.

Did you do it as root or your user? And please, always include full command including prompt and following prompt after command output.

I tried with both root and user, and both gave me exactly this output.
As for including the full command, I would have, if I didn’t have to write everything down manually from a photo I take everytime because I have to reboot between each post (I am typing from my Windows partition right now until I can get my Leap to work at more than 10 fps with the Nvidia driver).
I’ll be careful to from now on (as long as it stays reasonable, otherwise i’ll just take photos. I’m not writting down 30 lines or more!)

OK, this is the problem of non-default Xauthority file. In log you posted earlier:

un 23 19:37:06 localhost sddm[1075]: Running: /usr/bin/X -nolisten tcp **-auth /run/sddm/{483efc77-2e6d-4e8b-bd19-1899217f8cc0}** -background none -noreset -displayfd 17 -seat seat0 vt7

Please, check current X process, something like

ps -efw | grep /usr/bin/X

Note the current value of -auth parameter. Then run

XAUTHORITY=full-value-of-X-auth-parameter DISPLAY=:0 xrandr

E.g. I have

bor@bor-Latitude-E5450:~$ ps -efw | grep /usr/bin/X
bor         3395    2014  4 Jun22 ?        02:43:13 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1001/.mutter-Xwaylandauth.XHB6N1 -listen 4 -listen 5 -displayfd 6 -initfd 7

so I would run

XAUTHORITY=/run/user/1001/.mutter-Xwaylandauth.XHB6N1 DISPLAY=:0 xrandr

When I cannot copy-paste I usually redirect command output to a file and then edit it to add full command and run as shell script.

So the first command gave me

root      1079  1077  0 20:11 tty7     00:00:01 /usr/bin/X -nolisten tcp -auth /run/sddm/{1fcbf44c-09b9-45cd-b820-8b88a61a39f8} -background none -noreset -displayfd 17 -seat seat0 vt7
suse-usr  1726  1605  0 20:19 tty2     00:00:00 grep --color=auto /usr/bin/X

I tried to run it as both user and root, same output.
Anyway, I then followed your example command:


#XAUTHORITY=/run/sddm/{1fcbf44c-09b9-45cd-b820-8b88a61a39f8} DISPLAY=:0 xrandr

Screen 0: minimum 8 x 8, current 5200 x 1200, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 1360x768+1920+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1360x768      60.02*+
   1920x1080     59.94    50.00    29.97    25.00    23.98    60.05    60.00    50.04  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 connected 1920x1200+3280+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+  74.93  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+  59.88  
   1920x1080     60.00  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
VGA-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-3 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)

OK apparently this connector is marked as primary which may cause your desktop environment to output on it, but there is nothing connected.

HDMI-0 connected 1360x768+1920+0 (normal left inverted right x axis y axis) 160mm x 90mm
DP-0 connected 1920x1200+3280+0 (normal left inverted right x axis y axis) 518mm x 324mm
DVI-D-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm

So you have three monitors. Do you have any output on any of them? Do you know how they are configured in your desktop environment? Which one is your main monitor where you expect to see your GUI?

What you may try now - according to Xorg.log the last connection DVI-D-1 is where boot messages go

     8.358] (--) NVIDIA(0):     DFP-4 (boot)
...
     8.427] (--) NVIDIA(GPU-0): DELL P2421 (DFP-4): connected
     8.427] (--) NVIDIA(GPU-0): DELL P2421 (DFP-4): Internal TMDS
     8.427] (--) NVIDIA(GPU-0): DELL P2421 (DFP-4): 330.0 MHz maximum pixel clock

So you could try to run

xrandr --output DVI-D-1 --primary

(of course you always need to prepend those two environment variables). If your primary monitor is another one, chose --output accordingly.

I indeed have 3 (a tv (HDMI) and 2 monitors (DVI and DP)). My main monitor, as configured in the DE, is either the DP or DVI, but I don’t remember if I configured the DE to tell it which is the main monitor (but if I did, I selected the DVI one).
But in any case, I don’t have anything displayed on any of them (other than the mouse cursor or the tty).

xrandr --output DVI-D-1 --primary

I tried this command as both user and root, and out of curiosity I tried to switch the DVI-D-1 to DP-0 and HDMI-0 and all gave me the usual

Can't open display

In fact, and I don’t know if it matters, but I couldn’t use the autocompletion with tab (tabbing would immediately give me the “Can’t open display” message).

Sorry, I am bad at spoon feeding. Hopefully someone else picks up.

To the op, I think it is best to reinstall your nvidia driver, but before doing so
clear some of the nvidia folder first.
Things to look up to clear is the
/usr/share/nvidia/
/etc/X11/xorg.conf “if you have”

And just be sure that you have this:

blacklist nouveau

in /etc/modprobe.d/50-blacklist.conf
If you don’t have 50-blacklist.conf
Create the file and put “blacklist nouveau”
and do a

mkinitrd

after saving it.

The thing I don’t undertand here and needs clarification is when does the black screen occur, after the grub booted or after the login?
Are you sure you are set to boot in a graphical interface?
What kind of login prompt or what is the look of the login prompt it shows after grub booted?

when does the black screen occur, after the grub booted or after the login?

it was after grub. I set my user to log in automatically so I can not say whether it happens before or after the user logged in.

Are you sure you are set to boot in a graphical interface?

I had not changed any settings regarding this; unless installing the driver implicitly changed that setting then yes, it should have boot into a graphic interface.

What kind of login prompt or what is the look of the login prompt it shows after grub booted?

there was nothing at all after grub. I’d get past grub and literally get nothing except a black screen and cursor. no blinking underscore, no message of any kind.

Thank you for your help.
After spending 3 days without a computer, I regrettably went back to Kubuntu. Considering I didn’t encounter this bug with Kubuntu it’s probably Leap related ; unfortunately it’ll stay a mystery.
If a mod can change my thread to “solved” or whatever fit this situation, it’d be cool.