Nvida dGPU on laptop

So i finally got fedora 23 installed on my lenovo y70-70 laptop. i want to use my dGPU but the screen connects through the iGPU. i can care less about using optimus. when i try to install the Proprietary Nvidia drivers and reboot to X. it crashes. i get the error "(EE) No screens found." anyone know how to config X to use the iGPU screen but render on the dGPU

Specs
I7-4710HQ
Nvidia GTX 860M
Intel HD 4200
1TB HDD
8GB of ram

Install the intel drivers, configure xorg:

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
EndSection

You may want to add other options, for example here's mine, same specs as yours, literally same specs.

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   BusID       "PCI:0:2:0"
   Option      "AccelMethod"  "sna"
   Option      "TearFree" "True"
EndSection

Your PCI BUS may not be the same (unlikely), to find out issue lspci | grep VGA
You should get something like this:

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

00:02.0 is the PCI BUS.

Now to use the dGPU for anything that isn't driving X, you need to install bumblebee: https://fedoraproject.org/wiki/Bumblebee

Once correctly installed it provides access to the dGPU using one of these utilities: optirun or primusrun. Primusrun is the preferred method.

For example if I want to run glxgears using the dGPU I'll do: primusrun glxgears or optirun glxgears.

welcome to linux , where it's almost easier to design a gpu driver then install one.

The procedure is quite easy. On arch it's somewhat easier to do since you don't have to add any repos, but even of fedora is straightforward.

On a side note I personally had no issues using only the Nvidia drivers, xorg launches fine using the dGPU only. But I have a different laptop. Bumblebee is useful because it let's you use the dGPU only if needed. It will automatically turn off when you quit the program that's been using it, resulting in better battery life.

is it possible to use the dGPU to drive x and programs by default.

If X.Org X server version 1.17.2 or higher is installed you have to use this xorg configuration [1]:

Section "Module"
    Load "modesetting"
EndSection
Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Next, add the following two lines to the beginning of your ~/.xinitrc:

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

alright will try that when i get home.

nope. i still get the (EE) No screens found error.

Well, then I have no clue.

If you don't find a solution you might have to swallow the optimus pill.

yeah need to find out how to configure x to use iGPU as a screen.

Thanks for the help.

Wouldn't it be /etc/X11/xinit/xinitrc.d/ ?

.xinitrc would only work if he is starting x directly.

Nope, if a .xinitrc is found in the user's home directory it will be executed overriding the default one.

She can try adding a script inside /etc/X11/xinit/xinitrc.d/ with:

#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Ya, the problem is that you have to use optimus if you have a muxless laptop. The dGPU can only output to a screen through the iGPU in muxless laptops. This is the case with with my laptop, not sure about yours.

Then I must be lucky that I can drive the screen using only the dGPU.

Ya you must have a laptop w/ hardware muxing.

alright. will try to get optimus setup tomorrow.

OK status report. after breaking fedora, along with my windows install, i have optimus installed. when i use optimus i get a error like "DRM permission denied". i have tried running this as sudo and still the same result. I have also noticed a error along the lines of "nouveau DRM lookup table failed."

Have a look at https://wiki.archlinux.org/index.php/bumblebee#NOUVEAU.280.29:_.5Bdrm.5D_failed_to_set_drm_interface_version

They're both issues with bumblebee, as reported here and here.

alright thanks will try that out.