Black screen when booting using Nvidia Driver in Prime configuration

Hi,

This is my first post here so going to try and do a decent job of explaining the issue…

The issue is I have a laptop which has a graphics card (Nvidia 1050ti) which dosn’t connect directly to the screen and therefore am trying to use it to do all the graphics work and pass that through the Intel GPU to the display. This is what I believe can work in accordance with https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/1

So some more details …

The laptop is a Dell XPS 9570 (i7 8750H & Nvidia 1050 TI), I’m running Tumbleweed with KDE and fully upto date, kernel 4.18.12-1-default.

So currently, I’ve https://wiki.archlinux.org/index.php/NVIDIA_Optimus done that almost to the letter keeping in mind SDDM.

Additionally I was having issues with GLX. It seemed when Nvidia drivers loaded it was using the xorg GLX module. I fixed this however, with this setup…


drwxr-xr-x 1 root root  32 Aug 31 21:14 nvidia
drwxr-xr-x 1 root root  28 Aug 28 09:51 xorg
lrwxrwxrwx 1 root root  23 Oct 13 20:08 libglx.so -> nvidia/nvidia-libglx.so
lrwxrwxrwx 1 root root  27 Aug 21 08:27 libglx.so.bac -> /etc/alternatives/libglx.so

By doing the above I was able to remove nearly all issues which seemed relevant from the xorg.0.log.

Now I was about to give up hope when it booted to a black screen still but then I checked “nvidia-smi” and could see everything was running.


Sun Oct 14 18:00:18 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.87                 Driver Version: 390.87                    |
|-------------------------------+----------------------+----------------------+
| 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 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P8    N/A /  N/A |     53MiB /  4042MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      2158      G   /usr/bin/X                                     5MiB |
|    0      2850      G   X                                             11MiB |
|    0      2969      G   /usr/bin/kwin_x11                             11MiB |
|    0      2973      G   /usr/bin/krunner                               1MiB |
|    0      2975      G   /usr/bin/plasmashell                          21MiB |
+-----------------------------------------------------------------------------+

Upon seeing this I tried a few commands which all seemed to imply the display was not connected, but nothing I did seemed to provide a conclusive error? and now I’m stuck.

For reference below is my Xorg.conf file …


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

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "UseDisplayDevice" "None"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

this is my xorg.log file https://pastebin.com/jPSNmdqD

This is sddm’s log output https://pastebin.com/cCAGEJms

Any help would be amazing, I’ve kinda run out of things to try now, it seems so close as I can see Nvidia card is running the stuff but just now showing me anything.

I had a similar black-screen problem after fresh installs of openSUSE 11 to openSUSE 13 several times. The problem was that my standard auto-login user wasn’t in the »video« group. I fixed it each time by logging into a text console and typing:

sudo usermod -a -G video *yourusername*

Then you can reboot or have systemd start the required services:

 **systemctl** isolate **graphical.target**

Good luck!

Thanks, for this I will give this a test as soon as I can and let you know

Cheers! Any success yet?

Hello,

I’m having exactly the same problem like above right now on my laptop. I have opensuse leap 15, an Intel integrated graphics, Nvidia K2100M, I’m using Nvidia proprietary drivers and suse-prime to switch between them.

I’ve tried your solution, it displays the plymouth animation now, but then the screen turns all black again.

Any help would be highly appreciated.

Thanks,
Sijisu

Could you log into a console and post the results of the following command?

grep '\(WW\|EE\)' ~/.xsession-errors /var/log/Xorg.0.log

This line instructs grep to search the user-local and system-global Xorg logs for any line marked as a warning (WW) or an error (EE).

Here it is:

/var/log/Xorg.0.log:    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
/var/log/Xorg.0.log:    13.592] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.
/var/log/Xorg.0.log:    14.886] (WW) modeset(G0): Option "AllowEmptyInitialConfiguration" is not used
/var/log/Xorg.0.log:    15.570] (EE) evdev: TPPS/2 IBM TrackPoint: Unable to query fd: Inappropriate ioctl for device
/var/log/Xorg.0.log:    15.600] (EE) PreInit returned 2 for "TPPS/2 IBM TrackPoint"
/var/log/Xorg.1.log:    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
/var/log/Xorg.1.log:[105368.517] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.
/var/log/Xorg.1.log:[105368.521] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
/var/log/Xorg.1.log:[105368.533] (WW) Warning, couldn't open module intel
/var/log/Xorg.1.log:[105368.533] (EE) Failed to load module "intel" (module does not exist, 0)
/var/log/Xorg.1.log:[105369.286] (WW) Falling back to old probe method for fbdev
/var/log/Xorg.1.log:[105369.869] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied


Thank you, sijisu.

If you’re using the SDDM display manager installed by YaST as a default: https://wiki.gentoo.org/wiki/SDDM recommends adding the user »sddm« to the video group:

root #usermod -a -G video sddm

I vaguely remember trying that recommendation when I still was using SDDM (thinking along the lines of »oh right, sddm has to access video, it has to be given permission via the video group, makes sense« before I switched from sddm to bare-bones kdm: old, but much faster with auto-logins). But it’s many years in the past, so my memory might mix that one up with my other usermod tip upthread. Still, worth a try.

I have to say, mobile graphics chips baffle me a bit. Trying to make sense of it all, and searching the web for those DRM »permission denied« errors, it occured to me that none of the discussions I found would recommend *»Option “UseDisplayDevice” “None”«. * A comment on StackExchamge reads that it was »only available on Quadro and Tesla GPU«, not the Dell’s 1050ti. I’d backup the existing xorg.conf (xorg.conf.d) configuration and try to remove the line in question for a quick test.

According to this Ask-Ubuntu thread the bbswitch tool could still be of help. Considering the original post over there was in summer 2018 and the thread is still going, useful information could come out of it for openSUSE users as well. For example, there seems to be interplay between several subsystems (ACPI, modeset, docking, GPU power, display backlight etc), quite frankly exceeding my mostly desktop-driven experience (I use a Zotac GTX 1050 with an ASUS mini-ITX board and an old Core i5 in my main machine).

Finally, a BIOS update is recommended in this Arch Linux thread — can’t hurt, but this is already digging in the dark; a crapshot, if you will. The important thing:

  • test systematically
  • one change at a time, to avoid confusion
  • write down roughly what you changed and how the system acts differenly from before

Each time, check dmesg and »journalctl -b« as well as any newly created Xorg log files for any changes; also, the log file of your display manager (I think /var/log/sddm.log in case of SDDM, or in my case, KDM: /var/log/kdm.log). Cheers, and happy testing!