Blank optimus laptop screen on xinit after updating to (Fedora-25) kernel v4.10.9-200 and NVIDIA v378.13 (patched) ...

Hello Friends:

After two days of working on this problem, which had several layers, I may be close, but need your help.

After updating the Fedora-25 kernel and proprietary NVIDIA driver for Linux (both versions shown below), when I start the GUI display (XFCE), all the X related processes start, but the laptop screen goes blank. Note that I had to patch the new NVIDIA driver for it to compile properly, and a link to the patch was obtained from a thread in this forum.

So I run the following command to start the X-GUI display and XFCE4-based desktop; the many daemons all start, but the laptop screen goes blank. I can tell everything is running by ssh’ing into the laptop.

user@linux$ exec xinit ${HOME}/.xinitrc-xfce  <-- start X using .xinitrc-xfce file (shown later)

As I walk you through this, everything looks great, yet something is missing or incorrect. Note that this laptop has been running Fedora 22, 23, 24, 25 with the proprietary NVIDIA driver for 2-years; no issues. This just started after a ‘dnf update’.

See below. Any ideas? Thank you in advance.

BEGIN INFORMATION:
Note that I point certain things out throughout, using arrows (like this, <—).

Here is the issue captured in the log file. Notice where it says Could not find provider with name modesetting. Yet I show you later that it does exist.

X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System:  4.9.3-200.fc25.x86_64 
Current Operating System: Linux y700 4.10.9-200.fc25.x86_64 #1 SMP Mon Apr 10 14:48:16 UTC 2017 x86_64

Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.10.9-200.fc25.x86_64 root=/dev/sda2 ro nomodeset gfxpayload=vga=normal quiet rd.driver.blacklist=nouveau net.ifnames=0 biosdevname=0 LANG=en_US.UTF-8

Build Date: 15 March 2017  06:37:12PM
Build ID: xorg-x11-server 1.19.3-1.fc25 
Current version of pixman: 0.34.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 16 22:36:59 2017
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Could not find provider with name modesetting  <-- # This exists in the filesystem (shown later).  

(xfsettingsd:2860): xfsettingsd-CRITICAL **: Stored Xfconf properties disable all outputs, aborting. <-- # Could be an effect of the issue above. Not sure.

Here is the ‘${HOME}/.xinitrc-xfce’ file that I launched X with (above):

xrandr --setprovideroutputsource modesetting NVIDIA-0 <-- This emits the "modesetting" error above.
xrandr --auto
synclient TapButton1=1 TapButton2=3 TapButton3=2
exec xfce4-session || exec xterm -fg red

And here we manually prove that NVIDIA-0 is a provider; but using modesetting is a problem.

user@y700$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x1b9 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-0  <--- Good!

user@y700$ xrandr --setprovideroutputsource modesetting NVIDIA-0
Could not find provider with name modesetting   <--- Not Good. Why?

user@y700$ xrandr --auto

And here is O/S, Hardware and Driver related information:

- Fedora O/S ........................: 25 (FC-25)
- Kernel ............................: 4.10.9-200.fc25.x86_64
- Integrated Graphics Device ........: Intel HD Graphics-530  <---- Unused
- External Graphics Device ..........: NVIDIA GeForce GTX 960M
- BIOS Graphics Card Setting ........: Switchable Mode
- Window Manager ....................: XFCE4
- Display ...........................: Laptop LCD (external monitor not used).
- NVIDIA Driver .....................: Linux Driver Provided By NVIDIA: v378.13 (this needed patching).
- INTEL HD Driver ...................: i915 / modesetting
    [*]No nvidia RPM packages are installed (meaning, "rpm -qa | grep -i nvidia" returns nothing). Proprietary only. [*]There are xorg-x11-* RPM packages installed, and are listed at the end of this post.

Here is the /etc/X11/xorg.conf file (I hand crafted this myself):

Section "ServerLayout"
    Identifier     "Layout0"
    Screen         0 "Laptop-LCD-with-NVIDIA" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Laptop-LCD"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier     "nVidia-GTX-960M"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
    VendorName     "NVIDIA Corporation"
    #Option         "AllowEmptyInitialConfiguration"
EndSection

Section "Device" 
    Identifier     "Intel-HD-Graphics-530" 
    Driver         "modesetting" 
    BusID          "PCI:0:2:0" 
    VendorName     "Intel Corporation"
EndSection 

Section "Screen"
    Identifier     "Laptop-LCD-with-NVIDIA"
    Device         "nVidia-GTX-960M"
    GPUDevice      "nVidia-GTX-960M"
    Monitor        "Laptop-LCD"
    Option         "UseDisplayDevice" "none" # Tried commended and un-commented.
    # Uncomment the above line if your computer has no display devices
    # connected to the NVIDIA GPU.  Leave it commented if you have display
    # devices connected to the NVIDIA GPU that you would like to use. 
EndSection

Section "Screen" 
    Identifier     "Laptop-LCD-with-INTEL" 
    Device         "Intel-HD-Graphics-530" 
    GPUDevice      "Intel-HD-Graphics-530" 
    Monitor        "Laptop-LCD"
    #Option        "UseDisplayDevice" "none" 
EndSection

And finally the sorted list of xorg-x11-* RPM packages installed (sorry for the verbosity):

xorg-x11-drv-amdgpu-1.3.0-1.fc25.x86_64
xorg-x11-drv-ati-7.7.1-1.20160928git3fc839ff.fc25.x86_64
xorg-x11-drv-dummy-0.3.7-1.fc25.x86_64
xorg-x11-drv-evdev-2.10.5-1.fc25.x86_64
xorg-x11-drv-evdev-devel-2.10.5-1.fc25.i686
xorg-x11-drv-evdev-devel-2.10.5-1.fc25.x86_64
xorg-x11-drv-fbdev-0.4.3-25.fc25.x86_64
xorg-x11-drv-geode-2.11.18-2.fc25.i686
xorg-x11-drv-intel-2.99.917-26.20160929.fc25.x86_64
xorg-x11-drv-libinput-0.23.0-3.fc25.x86_64
xorg-x11-drv-libinput-devel-0.23.0-3.fc25.i686
xorg-x11-drv-libinput-devel-0.23.0-3.fc25.x86_64
xorg-x11-drv-nouveau-1.0.13-1.fc25.x86_64
xorg-x11-drv-openchrome-0.5.0-2.fc25.x86_64
xorg-x11-drv-qxl-0.1.5-2.fc25.x86_64
xorg-x11-drv-synaptics-1.9.0-1.fc25.x86_64
xorg-x11-drv-synaptics-devel-1.9.0-1.fc25.i686
xorg-x11-drv-synaptics-devel-1.9.0-1.fc25.x86_64
xorg-x11-drv-vesa-2.3.2-25.fc25.x86_64
xorg-x11-drv-vmware-13.2.1-1.fc25.x86_64
xorg-x11-drv-wacom-0.34.2-1.fc25.x86_64
xorg-x11-drv-wacom-devel-0.34.2-1.fc25.i686
xorg-x11-drv-wacom-devel-0.34.2-1.fc25.x86_64
xorg-x11-fonts-ethiopic-7.5-16.fc24.noarch
xorg-x11-fonts-ISO8859-1-100dpi-7.5-15.fc23.noarch
xorg-x11-fonts-Type1-7.5-16.fc24.noarch
xorg-x11-font-utils-7.5-32.fc25.x86_64
xorg-x11-proto-devel-7.7-20.fc25.noarch
xorg-x11-resutils-7.5-12.fc23.x86_64
xorg-x11-server-common-1.19.3-1.fc25.x86_64
xorg-x11-server-devel-1.19.3-1.fc25.i686
xorg-x11-server-devel-1.19.3-1.fc25.x86_64
xorg-x11-server-source-1.19.3-1.fc25.noarch
xorg-x11-server-utils-7.7-20.fc25.x86_64
xorg-x11-server-Xdmx-1.19.3-1.fc25.x86_64
xorg-x11-server-Xephyr-1.19.3-1.fc25.x86_64
xorg-x11-server-Xnest-1.19.3-1.fc25.x86_64
xorg-x11-server-Xorg-1.19.3-1.fc25.x86_64 --this provides (among other things)--|
   /usr/lib64/xorg/modules/drivers/modesetting_drv.so <-------------------------|

xorg-x11-server-Xspice-0.1.5-2.fc25.x86_64
xorg-x11-server-Xvfb-1.19.3-1.fc25.x86_64
xorg-x11-server-Xwayland-1.19.3-1.fc25.x86_64
xorg-x11-util-macros-1.19.0-5.fc24.noarch
xorg-x11-utils-7.5-21.fc24.x86_64
xorg-x11-xauth-1.0.9-5.fc24.x86_64
xorg-x11-xinit-1.3.4-13.fc25.x86_64
xorg-x11-xinit-session-1.3.4-13.fc25.x86_64
xorg-x11-xkb-utils-7.7-17.fc24.x86_64

P.S. Although bumblebee RPMs are loaded, the service isn’t started (no daemon running). I just mention this here for completeness.

F25 mesa is built with libglvnd support, using bumblebee or the nvidia .run isn’t recommended as both overwrite system files.
The nvidia .run file will try to overwrite most of these files

$ rpm -qal libglvnd\*
/etc/glvnd
/usr/lib/libGLdispatch.so.0
/usr/lib/libGLdispatch.so.0.0.0
/usr/share/doc/libglvnd
/usr/share/doc/libglvnd/README.md
/usr/share/glvnd
/usr/lib64/libOpenGL.so.0
/usr/lib64/libOpenGL.so.0.0.0
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.0.0
/usr/lib64/libGLX.so.0
/usr/lib64/libGLX.so.0.0.0
/usr/lib/libGL.so.1
/usr/lib/libGL.so.1.0.0
/usr/lib/libGLX.so.0
/usr/lib/libGLX.so.0.0.0
/etc/egl/egl_external_platform.d
/etc/glvnd/egl_vendor.d
/usr/lib64/libEGL.so.1
/usr/lib64/libEGL.so.1.0.0
/usr/share/egl/egl_external_platform.d
/usr/share/glvnd/egl_vendor.d
/etc/glvnd
/usr/lib64/libGLdispatch.so.0
/usr/lib64/libGLdispatch.so.0.0.0
/usr/share/doc/libglvnd
/usr/share/doc/libglvnd/README.md
/usr/share/glvnd
/usr/include/glvnd
/usr/include/glvnd/GLdispatchABI.h
/usr/include/glvnd/libeglabi.h
/usr/include/glvnd/libglxabi.h
/usr/lib64/pkgconfig/libglvnd.pc
/usr/lib/libOpenGL.so.0
/usr/lib/libOpenGL.so.0.0.0
/etc/egl/egl_external_platform.d
/etc/glvnd/egl_vendor.d
/usr/lib/libEGL.so.1
/usr/lib/libEGL.so.1.0.0
/usr/share/egl/egl_external_platform.d
/usr/share/glvnd/egl_vendor.d
/usr/lib64/libGLESv1_CM.so.1
/usr/lib64/libGLESv1_CM.so.1.0.0
/usr/lib64/libGLESv2.so.2
/usr/lib64/libGLESv2.so.2.0.0
/usr/lib64/libEGL.so
/usr/lib64/libGL.so
/usr/lib64/libGLESv1_CM.so
/usr/lib64/libGLESv2.so
/usr/lib64/libGLX.so
/usr/lib64/libGLdispatch.so
/usr/lib64/libOpenGL.so
/usr/lib/libGLESv1_CM.so.1
/usr/lib/libGLESv1_CM.so.1.0.0
/usr/lib/libGLESv2.so.2
/usr/lib/libGLESv2.so.2.0.0

bumblebee wasn’t libglvnd compatible last time I checked.
TBH you would be better off using negativo17 or rpmfusion nvidia as they have prime support already

https://pkgs.rpmfusion.org/cgit/nonfree/xorg-x11-drv-nvidia.git/tree/nvidia.conf

P.S nvidia wont even look at your issue unless you provide the request info, see

https://devtalk.nvidia.com/default/topic/522835/linux/if-you-have-a-problem-please-read-this-first/

Thank you for the comprehensive reply @leigh123linux!

You just hit on one of the “several layers” (of problems) that I mentioned at the top of my post. =:)
I didn’t mention the following because the post was already too long.

But, for a while I’ve been using the negativo17 drivers (and, in fact, have the repo in /etc/yum.repos.d/); but I uninstalled those RPM packages just this weekend to figure out this freaking issue. I wouldn’t have otherwise.

Okay, since my first post I got things to work, BUT, not optimally! What did I do:
I simply edited my “/etc/X11/xorg.conf” and “${HOME}/.xinitrc-xfce” files, as shown:

"/etc/xorg.conf" changes:
  - Changed line-3 to be: Screen 0 "Laptop-LCD-with-INTEL" 0 0  # Instead of the NVIDIA one.
  - Commented out line-51

"${HOME}/.xinitrc-xfce" changes:
  - Simply commented out the xrandr commands.

DIGRESSION: You may ask why I thought to try the INTEL device. If I recall correctly, my particular laptop (a Lenovo y700-17isk) has the INTEL HD-530 graphics card hardwired to the laptop LCD (and is not physically switchable); and so it’s possible that the NVIDIA GPU cannot be used to run the display at all. Instead, only applications can be run on the NVIDIA GPU using the optirun(1) prefix command (part of the bumblebee packages and daemon). This was my understanding. And that variation does work. But I suspect there may be a better way; especially given your comment.

Anyway, as you mentioned this is not optimal for a variety of reasons; not the least of which is NVIDIA.run overwriting files (which I don’t like). :(

You gave me hope in reverting back, so here is what I did to do that (basically rewinding) …

./nvidia-installer --uninstall
Re-booted to the previous kernel to remove the latest kernel's '/lib/modules/$(uname -r)' sub-directory, and then,
'dnf reinstalled' the latest kernel RPMs (while still booted to the previous one)
Re-booted to the latest kernel
'dnf reinstalled' all of the libglvnd-* RPMs (in case files were overwritten in the past, as you mentioned).
'dnf installed' the negativo17 nvidia RPMs. (They were happy to be re-invited).
'dnf removed' the bumblebee RPMs.

Regarding the last two items …

user@y700$ rpm -qa | egrep "bumblebee|nvidia"
nvidia-driver-378.13-6.fc25.x86_64
kmod-nvidia-378.13-2.fc25.x86_64
akmod-nvidia-378.13-2.fc25.x86_64
nvidia-driver-cuda-libs-378.13-6.fc25.x86_64
nvidia-driver-libs-378.13-6.fc25.x86_64
nvidia-settings-378.13-1.fc25.x86_64
kmod-nvidia-4.10.9-200.fc25.x86_64-378.13-2.fc25.x86_64
nvidia-libXNVCtrl-378.13-1.fc25.x86_64

user@y700$ lsmod | egrep "nv|video"
nvidia_drm             53248  0
nvidia_modeset        806912  1 nvidia_drm
nvidia              12267520  1 nvidia_modeset
uvcvideo               90112  0
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_core         40960  2 uvcvideo,videobuf2_v4l2
videodev              172032  3 uvcvideo,videobuf2_core,videobuf2_v4l2
media                  40960  2 uvcvideo,videodev
drm_kms_helper        155648  2 i915,nvidia_drm
drm                   352256  4 i915,nvidia_drm,drm_kms_helper
video                  40960  2 i915,ideapad_laptop

user@y700$ modinfo nvidia
filename:       /lib/modules/4.10.9-200.fc25.x86_64/extra/nvidia/nvidia.ko.xz
alias:          char-major-195-*
version:        378.13
supported:      external
license:        NVIDIA
[ ... snip ...]

user@y700$ ls -l /etc/X11/xorg.conf.d
/etc/X11/xorg.conf.d:  
-rw-r--r--  1 root root  378 Apr  4 11:21 10-nvidia.conf  # Added by negativo17 nvidia RPMS (same as github contents).
lrwxrwxrwx  1 root root   44 Apr 16 21:29 50-synaptics.conf -> /usr/share/X11/xorg.conf.d/50-synaptics.conf
-rw-r--r--. 1 root root  232 Nov 25  2015 00-keyboard.conf

Okay, so I’m back to my original configuration, but also the blank screen issue. =:) LoL

Following is the captured error now. Again the X server and all necessary processes appear in a ssh/remote ‘ps -ef’ output; but the screen goes blank (backlit, but still black/blank). This error, which was my original error two days ago, seems to suggest not finding the correct display.

# Note: /etc/X11/xorg.conf has been renamed to try this (so it effectively doesn't exist).
#
user@y700$ exec xinit ${HOME}/.xinitrc-xfce > log.out 2>&1  # Blank screen. Then I kill it via SSH session.

user@y700$ cat ./log.out
X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System:  4.9.3-200.fc25.x86_64 
Current Operating System: Linux y700 4.10.9-200.fc25.x86_64 #1 SMP Mon Apr 10 14:48:16 UTC 2017 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.10.9-200.fc25.x86_64 root=/dev/sda2 ro nomodeset gfxpayload=vga=normal quiet rd.driver.blacklist=nouveau net.ifnames=0 biosdevname=0 LANG=en_US.UTF-8
Build Date: 15 March 2017  06:37:12PM
Build ID: xorg-x11-server 1.19.3-1.fc25 
Current version of pixman: 0.34.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "", Time: Mon Apr 17 15:56:54 2017
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Could not find provider with name modesetting  # <--- triggered by xrandr command in .xinitrc-xfce
(xfsettingsd:2332): xfsettingsd-CRITICAL **: Stored Xfconf properties disable all outputs, aborting.

[ ... snip ... ]
  • So it’s either something wrong in my Xfconf properties disabling all outputs (not sure how to check)
  • Or may have to do with requiring the INTEL HD-530 b/c of the LCD being hard-wired to it (unsure again).
  • Something else…

Any ideas? Thank you!

EDIT-1: Will poke around Xfconf with “xfconf-query -c displays -l” (etc).

Not sure if this is helpful, but might as well provide it. Still looking around.

user@y700$ xfconf-query -c displays -p /Default -l -v

/Default/default              default
/Default/default/Active       true
/Default/default/Position/X   0
/Default/default/Position/Y   0
/Default/default/Primary      false
/Default/default/Reflection   0
/Default/default/RefreshRate  0.000000
/Default/default/Resolution   1920x1080
/Default/default/Rotation     0

/Default/DP-0                 DP-0
/Default/DP-0/Active          true
/Default/DP-0/Position/X      0
/Default/DP-0/Position/Y      0
/Default/DP-0/Primary         false
/Default/DP-0/Reflection      0
/Default/DP-0/RefreshRate     60.000000
/Default/DP-0/Resolution      1600x900
/Default/DP-0/Rotation        0

/Default/DP-3                 Samsung Electric Company 60"
/Default/DP-3/Active          false
/Default/DP-3/Position/X      0
/Default/DP-3/Position/Y      0
/Default/DP-3/Primary         false
/Default/DP-3/Reflection      0
/Default/DP-3/RefreshRate     59.996883
/Default/DP-3/Resolution      1600x900
/Default/DP-3/Rotation        0

/Default/DVI-I-1              Samsung Electric Company 7"
/Default/DVI-I-1/Active       false

/Default/eDP1                 1. LGD 17"   <----- Hmmm (maybe INTEL on LCD)
/Default/eDP1/Active          true
/Default/eDP1/Position/X      0
/Default/eDP1/Position/Y      0
/Default/eDP1/Primary         false        <----- Hmmm
/Default/eDP1/Reflection      0
/Default/eDP1/RefreshRate     60.006001
/Default/eDP1/Resolution      1920x1080
/Default/eDP1/Rotation        0

/Default/HDMI-0               2. Samsung Electric Company 60"
/Default/HDMI-0/Active        true
/Default/HDMI-0/Position/X    0
/Default/HDMI-0/Position/Y    0
/Default/HDMI-0/Primary       false
/Default/HDMI-0/Reflection    0
/Default/HDMI-0/RefreshRate   60.000000
/Default/HDMI-0/Resolution    1920x1080
/Default/HDMI-0/Rotation      0

/Default/LVDS-0               Laptop
/Default/LVDS-0/Active        false
/Default/LVDS-0/Position/X    0
/Default/LVDS-0/Position/Y    0
/Default/LVDS-0/Primary       false
/Default/LVDS-0/Reflection    0
/Default/LVDS-0/RefreshRate   60.010457
/Default/LVDS-0/Resolution    1920x1080
/Default/LVDS-0/Rotation      0

I just noted your kernel boot options.

nomodeset = no modesetting

\o/ That was the final piece.

I stared at that option so many times but said I thinks that’s been there forever, and did nothing. It may have slipped in there when I uninstalled and reinstalled kernels, and it grabbed that option from the Fedora Recovery menuentry, which is where you do want nomodeset. Sigh. =:)

I will mark your original reply as the answer since it (and the thread) has information that will be useful to others.

A couple of wrap-up observations and a embedded question or two:

  • The /etc/X11/xorg.conf that I originally posted works fine now. I could completely remove it and everything still works fine. But having explicit identifiers (that I named in that file) makes debugging /var/log/Xorg.0.log a little easier. However, if there is a good reason to remove it (or future gotchas), I’m happy to take that advice.

  • glxgears and friends now run (for the first time ever) without needing optirun(1) and bumblebeed(8) (which have been completely removed from the system).

  • I’m pretty sure the display is being handled by the NVIDIA card now; which refutes my earlier doubt that this might not be possible on this laptop. In my original /etc/X11/xorg.conf (which I am using), notice that I specified both the Display and GPUDisplay directives to be set to NVIDIA.

  • Finally, I noticed the following lingering errors/notices in /var/log/Xorg.0.log. The randr one looks suspicious. Any thoughts on these welcome.

[   515.239] (EE) modeset(G0): eglInitialize() failed
[   515.239] (EE) modeset(G0): glamor initialization failed
[   515.800] randr: falling back to unsynchronized pixmap sharing

Marking your first answer as the solution. Thank you. =:)