# [SOLVED] Nvidia Optimus: XrandR missing NVIDIA-0 provider

## Arthanis

I have a MSI GS65 laptop, and I have successfully setup my desktop environment with 3D acceleration on intel with modesetting by following: https://wiki.gentoo.org/wiki/Intel

That being said, using Intel, I do not have a /etc/X11/xorg.conf file, only /etc/X11/xorg.conf.d/20-modesetting.conf file containing the following snippet:

```

 cat /etc/X11/xorg.conf.d/20-modesetting.conf 

Section "Device"

    Identifier  "Intel Graphics"

    Driver      "modesetting"

    Option      "AccelMethod"    "glamor"

    Option      "DRI"            "3"

    Option   "TearFree"   "true"

EndSection

```

When I start X by running 

```
startxfce4
```

 (as I avoid login managers), everything works fine with direct rendering on glxinfo and whatnot:

```

glxinfo |grep -i direct

direct rendering: Yes

    GL_ARB_derivative_control, GL_ARB_direct_state_access, 

    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, 

    GL_ARB_half_float_vertex, GL_ARB_indirect_parameters, 

    GL_ARB_multi_draw_indirect, GL_ARB_occlusion_query2, 

    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, 

    GL_ARB_indirect_parameters, GL_ARB_instanced_arrays, 

    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect, 

```

Also, this is the output of my cat /var/log/Xorg.0.log: https://pastebin.com/2DjkmQN6

Here is my current /etc/portage/make.conf

```

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

COMMON_FLAGS="-O2 -pipe -march=native"

CFLAGS="${COMMON_FLAGS}"

CXXFLAGS="${COMMON_FLAGS}"

FCFLAGS="${COMMON_FLAGS}"

FFLAGS="${COMMON_FLAGS}"

MAKEOPTS="-j13" 

GRUB_PLATFORMS="efi-64 efi-32 multiboot"

# NOTE: This stage was built with the bindist Use flag enabled

PORTDIR="/usr/portage"

DISTDIR="/usr/portage/distfiles"

PKGDIR="/usr/portage/packages"

# This sets the language of build output to English.

# Please keep this setting intact when reporting bugs.

LC_MESSAGES=C

# EMERGE_DEFAULT_OPTS is set automatically by livecd-tools autoconfig during first live boot.

# This should be equal to number of processors, see "man emerge" for details.

#EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=12 --load-average=12 --quiet-build=n"

EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=1 --quiet-build=n"

VIDEO_CARDS="intel i965"

INPUT_DEVICES="synaptics libinput"

USE="acpi alsa bluetooth cryptsetup jpeg gtk libkms pdf png pulseaudio upower xfce samba -gnome -kde -sendmail"

GENTOO_MIRRORS="ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"

L10N="en"

```

Also, I'm running 

```
Linux msi-gs65 4.19.23-gentoo #4 SMP Sun Feb 24 14:30:20 PST 2019 x86_64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz GenuineIntel GNU/Linux

```

 and running the following modules:

```

lsmod 

Module                  Size  Used by

rfcomm                 32768  12

fuse                  110592  3

dm_crypt               40960  1

algif_skcipher         16384  0

btusb                  49152  0

btrtl                  16384  1 btusb

btbcm                  16384  1 btusb

btintel                20480  1 btusb

bluetooth             417792  38 btrtl,btintel,btbcm,btusb,rfcomm

ecdh_generic           24576  2 bluetooth

iwlmvm                327680  0

dm_mod                126976  3 dm_crypt

mac80211              675840  1 iwlmvm

wmi_bmof               16384  0

intel_rapl             24576  0

mxm_wmi                16384  0

msi_wmi                16384  0

i915                 1626112  9

x86_pkg_temp_thermal    16384  0

intel_powerclamp       16384  0

i2c_algo_bit           16384  1 i915

iwlwifi               294912  1 iwlmvm

drm_kms_helper        159744  1 i915

syscopyarea            16384  1 drm_kms_helper

sysfillrect            16384  1 drm_kms_helper

aesni_intel           200704  10

alx                    45056  0

sysimgblt              16384  1 drm_kms_helper

aes_x86_64             20480  1 aesni_intel

fb_sys_fops            16384  1 drm_kms_helper

crypto_simd            16384  1 aesni_intel

cryptd                 20480  3 crypto_simd,aesni_intel

mdio                   16384  1 alx

glue_helper            16384  1 aesni_intel

drm                   397312  7 drm_kms_helper,i915

joydev                 24576  0

intel_gtt              24576  1 i915

xhci_pci               16384  0

i2c_i801               24576  0

cfg80211              651264  3 iwlmvm,iwlwifi,mac80211

agpgart                36864  2 intel_gtt,drm

rfkill                 24576  6 bluetooth,cfg80211

xhci_hcd              208896  1 xhci_pci

intel_pch_thermal      16384  0

wmi                    24576  3 wmi_bmof,msi_wmi,mxm_wmi

coretemp               16384  0

efivarfs               16384  1

```

However, since my laptop also contains a GTX 1070, I tried to follow https://wiki.gentoo.org/wiki/NVIDIA/Optimus to set it up, as I'm trying to avoid bumblebee as much as I can.

So, changed 

```
VIDEO_CARDS="intel i965"
```

 to 

```
VIDEO_CARDS="intel i965 nvidia"
```

, which pulls a rebuild of xorg-drivers.

```

[I] x11-base/xorg-drivers

     Available versions:  1.20 **9999 {INPUT_DEVICES="elographics evdev joystick keyboard libinput mouse synaptics vmmouse void wacom" VIDEO_CARDS="amdgpu ast dummy fbdev freedreno geode glint i915 i965 intel mga nouveau nv nvidia omap qxl r128 radeon radeonsi siliconmotion tdfx tegra vc4 vesa via virtualbox vmware voodoo"}

     Installed versions:  1.20(03:42:33 PM 02/24/2019)(INPUT_DEVICES="libinput synaptics -elographics -evdev -joystick -keyboard -mouse -vmmouse -void -wacom" VIDEO_CARDS="i965 intel nvidia -amdgpu -ast -dummy -fbdev -freedreno -geode -glint -i915 -mga -nouveau -nv -omap -qxl -r128 -radeon -radeonsi -siliconmotion -tdfx -tegra -vc4 -vesa -via -virtualbox -vmware -voodoo")

     Homepage:            https://www.gentoo.org/

     Description:         Meta package containing deps on all xorg drivers

```

Then I proceeded to follow the wiki.

Emerge the following version and use flags for nvidia-drivers:

```

emerge -av nvidia-drivers

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.

 * Use eselect news read to view new items.

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N     ] dev-libs/jansson-2.11::gentoo  USE="-doc -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB

[ebuild  N     ] app-eselect/eselect-opencl-1.1.0-r4::gentoo  0 KiB

[ebuild  N     ] virtual/linux-sources-3::gentoo  USE="-firmware" 0 KiB

[ebuild  N     ] x11-libs/libvdpau-1.1.1::gentoo  USE="dri -doc -test" ABI_X86="32 (64) (-x32)" 0 KiB

[ebuild  N     ] sys-power/acpid-2.0.31::gentoo  USE="(-selinux)" 0 KiB

[ebuild  N     ] x11-drivers/nvidia-drivers-415.27:0/415::gentoo  USE="X acpi driver kms multilib tools -compat -gtk3 -static-libs -uvm -wayland" ABI_X86="32 (64) (-x32)" 0 KiB

Total: 6 packages (6 new), Size of downloads: 0 KiB

```

So, now I have nvidia drivers properly installed and loaded modules:

```

lsmod |grep nvidia

nvidia_drm             40960  1

nvidia_modeset       1003520  1 nvidia_drm

nvidia              16752640  1 nvidia_modeset

ipmi_msghandler        49152  1 nvidia

drm_kms_helper        159744  2 nvidia_drm,i915

drm                   397312  11 drm_kms_helper,nvidia_drm,i915

```

Also, nvidia card seems to be properly detected:

```

 dmesg |grep -i nvidia

[    2.168914] nvidia: loading out-of-tree module taints kernel.

[    2.169470] nvidia: module license 'NVIDIA' taints kernel.

[    2.185599] nvidia-nvlink: Nvlink Core is being initialized, major device number 246

[    2.185771] nvidia 0000:01:00.0: enabling device (0006 -> 0007)

[    2.185850] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none

[    2.397942] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  415.27  Thu Dec 20 17:25:03 CST 2018 (using threaded interrupts)

[    4.722003] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  415.27  Thu Dec 20 17:06:08 CST 2018

[    4.728618] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver

[    4.731113] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1

[    4.760436] nvidia-smi (2227) used greatest stack depth: 12504 bytes left

```

```

nvidia-smi 

Sun Feb 24 15:58:09 2019       

+-----------------------------------------------------------------------------+

| NVIDIA-SMI 415.27       Driver Version: 415.27       CUDA Version: 10.0     |

|-------------------------------+----------------------+----------------------+

| 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 107...  Off  | 00000000:01:00.0 Off |                  N/A |

| N/A   53C    P0    29W /  N/A |      0MiB /  8119MiB |      0%      Default |

+-------------------------------+----------------------+----------------------+

                                                                               

+-----------------------------------------------------------------------------+

| Processes:                                                       GPU Memory |

|  GPU       PID   Type   Process name                             Usage      |

|=============================================================================|

|  No running processes found                                                 |

+-----------------------------------------------------------------------------+

```

So I now proceed to remove /etc/X11/xorg.conf.d/20-modesetting.conf and use nvidia-xconfig to generate the following /etc/X11/xorg.conf file:

```

# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig:  version 415.27

Section "ServerLayout"

    Identifier     "Layout0"

    Screen      0  "Screen0"

    Inactive       "Device1"

EndSection

Section "Device"

    Identifier     "Device0"

    Driver         "nvidia"

    VendorName     "NVIDIA Corporation"

    BusID          "PCI:1:0:0"

EndSection

Section "Device"

    Identifier     "Device1"

    Driver         "modesetting"

    VendorName     "Unknown"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Device0"

    DefaultDepth    24

    Option         "AllowEmptyInitialConfiguration" "True"

    SubSection     "Display"

        Depth       24

    EndSubSection

EndSection

Section "Screen"

    Identifier "Screen1"

    Device "Device1"

EndSection

```

As per documentation, the following commands are crucial for making it work before running startxfce4 or else you get a black screen:

```

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

```

But when I run this, I get an error:

```

xrandr --setprovideroutputsource modesetting NVIDIA-0

Could not find provider with name NVIDIA-0

```

And, unsurprisingly, there is no NVIDIA-0 provider:

```

xrandr --listproviders

Providers: number : 1

Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting

```

XrandR version:

```

[I] x11-apps/xrandr

     Available versions:  1.4.3 1.5.0

     Installed versions:  1.5.0(03:54:29 AM 02/18/2019)

     Homepage:            https://www.x.org/wiki/ https://cgit.freedesktop.org/

     Description:         primitive command line interface to RandR extension

```

If I ignore this and run startxfce4 regardless, I get the dreaded black screen, but Xorg seems to work with nvidia, but without actual screen output. According to logs: https://pastebin.com/LGeTbqt2

Given all the above, I believe that the only thing missing is the XRandR output redirection. Does anyone have any idea on why the NVIDIA-0 provider isn't listed, and how to fix this? Thanks in advance.Last edited by Arthanis on Sat May 16, 2020 9:27 pm; edited 1 time in total

----------

## krinn

I think it's the lack of informations about your monitor.

I never totally get optimus right, but if i'm not wrong, i think the monitor is attach to the intel card, and the nvidia drivers are unable to "see" the monitor themselves because none is attach to the nvidia card.

As the drivers see no monitor, they cannot compute any valid mode to use, resulting in black screen and no mode validate.

To me, you have just forgotten the https://wiki.gentoo.org/wiki/NVIDIA/Optimus#Using_a_specific_monitor_via_EDID step, and doing it should solve your issue.

If i could suggest, i find the provided xorg.conf example https://wiki.gentoo.org/wiki/NVIDIA/Optimus#Example_xorg.conf_for_EDID pretty good at showing how your xorg.conf should look like (specially look at the device section where you see the nvidia card)

----------

## Arthanis

First of all, thank you so much for your response. I forgot to mention that I had tried the edid firmware before and thought I had it loaded, however, I just realized this:

```

dmesg |grep -i edid

[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.19.23-gentoo root=/dev/nvme0n1p6 ro drm_kms_helper.edid_firmware=edid/monitor.bin

[    0.290430] Kernel command line: BOOT_IMAGE=/vmlinuz-4.19.23-gentoo root=/dev/nvme0n1p6 ro drm_kms_helper.edid_firmware=edid/monitor.bin

[    2.136694] drm_kms_helper: unknown parameter 'edid_firmware' ignored

```

I'm gonna fix this and do some more testing and update here.

----------

## Arthanis

I fixed the kernel options to load the EDID, however the kernel now complains that the specified EDID is 256 bytes in size, and it expected 128 bytes.

I didn't have much luck googling for this. The only relevant information I found was this, from wikipedia:

EDID structure versions range from v1.0 to v1.4; all these define upwards-compatible 128-byte structures. Version 2.0 defined a new 256-byte structure but it has been deprecated and replaced by v1.3 which supports multiple extension blocks.[citation needed] HDMI versions 1.0–1.3c use EDID structure v1.3.[1]

So I'm not sure on how to proceed here, or if maybe this should be its own topic. Any advise is appreciated.

----------

## hhfeuer

Try adding

```
    Option         "AccelMethod" "none"

    BusID          "PCI:0:2:0"

```

to the intel device section.

----------

## Arthanis

This is how I got the edid:

```

 get-edid > /lib/firmware/edid/monitor.bin 

This is read-edid version 3.0.2. Prepare for some fun.

Attempting to use i2c interface

No EDID on bus 1

No EDID on bus 2

No EDID on bus 3

No EDID on bus 4

No EDID on bus 6

No byte reading on this bus...

Problem requesting slave address: Bad file descriptor

No byte reading on this bus...

Problem requesting slave address: Bad file descriptor

No byte reading on this bus...

Problem requesting slave address: Bad file descriptor

No byte reading on this bus...

Problem requesting slave address: Bad file descriptor

2 potential busses found: 0 5

Will scan through until the first EDID is found.

Pass a bus number as an option to this program to go only for that one.

Bus 0 doesn't really have an EDID...

256-byte EDID successfully retrieved from i2c bus 5

Looks like i2c was successful. Have a good day.

```

Parsing the edid :

```

parse-edid < /lib/firmware/edid/monitor.bin 

Checksum Correct

Section "Monitor"

   Identifier "m�"

   ModelName "m�"

   VendorName "AUO"

   # Monitor Manufactured week 16 of 2017

   # EDID version 1.4

   # Digital Display

   DisplaySize 340 190

   Gamma 2.20

   Option "DPMS" "false"

EndSection

```

I still get an error during kernel bootup:

```

 dmesg |grep -i edid

[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.19.23-gentoo root=/dev/nvme0n1p6 ro drm.edid_firmware=edid/monitor.bin

[    0.286276] Kernel command line: BOOT_IMAGE=/vmlinuz-4.19.23-gentoo root=/dev/nvme0n1p6 ro drm.edid_firmware=edid/monitor.bin

[    2.173390] [drm:drm_load_edid_firmware [drm]] *ERROR* Size of EDID firmware "edid/monitor.bin" is invalid (expected 128, got 256

```

----------

## Vaernil

I'm sorry if I'm digging up a dead topic, but I have exactly the same problem with my laptop Clevo N850HK, and this is the only google result that has similar issue.

I've been trying to make the hybrid graphics work for months and I'm at my wit's end.

```
dmesg | grep -i edid                                                                                                                                                                                                                                              

[    0.000000] Command line: \kernel-genkernel-x86_64-5.3.11-gentoo root=/dev/nvme0n1p7 rootfstype=ext4 drm.edid_firmware=edid/1920x1080_Clevo_N850HK.bin initrd=\initramfs-genkernel-x86_64-5.3.11-gentoo

[    0.143425] Kernel command line: \kernel-genkernel-x86_64-5.3.11-gentoo root=/dev/nvme0n1p7 rootfstype=ext4 drm.edid_firmware=edid/1920x1080_Clevo_N850HK.bin initrd=\initramfs-genkernel-x86_64-5.3.11-gentoo

[    8.640349] [drm:edid_load] *ERROR* Size of EDID firmware "edid/1920x1080_Clevo_N850HK.bin" is invalid (expected 128, got 256

```

```
xrandr --listproviders                                                                                                                                                                                                                                                  

Providers: number : 1

Provider 0: id: 0x46 cap: 0x2, Sink Output crtcs: 3 outputs: 4 associated providers: 0 name:modesetting
```

Can someone shed some light as to how to proceed?

@Arthanis, did you ever make it work?

----------

## Arthanis

Sadly, I didn't, still at the same problem. Please let me know if you have any progress on that.

----------

## NTwoO

Strangely enough I have the same problem. My system worked, but after a restart things are missing... The kernel looks to boot correctly with everything in the green...

Here the output of dmesg |grep -i nvidia

```
[   10.122378] nvidia: loading out-of-tree module taints kernel.

[   10.122383] nvidia: module license 'NVIDIA' taints kernel.

[   10.122383] Disabling lock debugging due to kernel taint

[   10.130702] nvidia-nvlink: Nvlink Core is being initialized, major device number 244

[   10.133194] nvidia 0000:01:00.0: enabling device (0000 -> 0003)

[   10.177138] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  440.44  Sun Dec  8 03:38:56 UTC 2019

```

nvidia-smi produces

```

+-----------------------------------------------------------------------------+

| NVIDIA-SMI 440.44       Driver Version: 440.44       CUDA Version: 10.2     |

|-------------------------------+----------------------+----------------------+

| 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 1650    Off  | 00000000:01:00.0 Off |                  N/A |

| N/A   51C    P0     6W /  N/A |      0MiB /  3914MiB |      0%      Default |

+-------------------------------+----------------------+----------------------+

                                                                               

+-----------------------------------------------------------------------------+

| Processes:                                                       GPU Memory |

|  GPU       PID   Type   Process name                             Usage      |

|=============================================================================|

|  No running processes found                                                 |

```

I noticed that the nvidia card is not under /dev/dri.

----------

## hedmo

Arthanis

this is the problem:

```

[   262.421] (II) NVIDIA(GPU-0): Deleting GPU-0

```

the NVIDIA card cannot find an attached screen  and deleting the provider.if you have the bios GPU switch,switch to DGPU  and see if it is working

regards hedmo

----------

## Arthanis

 *hedmo wrote:*   

> Arthanis
> 
> this is the problem:
> 
> ```
> ...

 

Hedmo, I have no idea what tjhis option looks like. Can you send me a picture of yours on your BIOS or something? Thanks in advance.

----------

## Arthanis

Ok, so after more than a year, I was finally able to make everything work for nvidia, without bumblebee, just using Nvidia prime offloading.}

So, the main reason for the missing provider on XrandR was that my nvidia-drivers package had, for some reason, -kms use flag, which prevented it to install nvidia-drm driver (kernel modesetting). Also, there were some changes on how nvidia deals with different opengl backends that probably helped to get it working.

So, to make it work:

Step 0: Purge anything you might have related to bumblebee/primusrun/virtualgl on your system. Also, vanquish any xorg.conf file you might have, on both /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/* . Finally, properly setup intel gpu drivers (more info here: https://wiki.gentoo.org/wiki/NVIDIA/Optimus

Step 1:Enable +kms use flags for nvidia-drivers

Step 2: Enable +libglvnd use flag on portage and re-emerge world with 

```
 emerge -avN @world @system
```

 . This should pull the following packages , plus 

```
media-libs/libglvnd
```

:

```

[IP-] [  ] media-libs/mesa-19.3.5:0

[IP-] [  ] x11-base/xorg-server-1.20.7:0/1.20.7

[IP-] [  ] x11-drivers/nvidia-drivers-440.82:0/440

```

This might be blocked because of eselect-opengl package, because libglvnd made it obsolete. If there is any conflict, it is safe to unmerge it.

Step 3: Go to nvidia documentation for the driver version you're using , such as https://download.nvidia.com/XFree86/Linux-x86_64/440.82/README/primerenderoffload.html and set the Xorg config files as instructed. I used 

```
nvidia-xconfig --prime 
```

 just to get the correct BusID and threw the rest of the file away.

Step 4: Add the following option to you kernel boot paramater (mine was on /etc/default/grub and running grub2-mkconfig): 

```
nvidia-drm.modeset=1
```

Step 5: Add this to your .xinitrc file (I don't use DMs):

```
xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto
```

My complete result file was:

```
xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

exec startxfce4

```

Step 5: Reboot. Test if nvidia KMS is set up properly by running 

```
cat /sys/module/nvidia_drm/parameters/modeset
```

, which should yield 'Y'

Step 6: Start X. At this point, you should have a functional setup, and can run the nvidia-settings gui and configure everything from there. On my setup, there was a couple of caveats:

   - For some reason, everytime I start X for the first time after the reboot, X only detects my external monitor and not the laptop native one (???). If I close and restart X, then it works as expected. Minor annoyance, my guess is that this has to do with some "wake up" the driver does on the gpu after running the first time. Please hit me up if there is a workaround to that.

   - After I boot with both monitors, for some reason Pulse doesn't detect the HDMI device for sound. I restart pulseaudio after X by running 

```
pulseaudio -k
```

, and then it works as expected.

Bonus 1: nvidia-settings could not manage one of the monitors (the laptop one) because it is managed by XrandR, so you have to use that to properly position it. I used 

```
lxrandr
```

 to do it through GUI

Bonus 2: I was having screen tearing issues, which was solved by adding these to my nvidia screen on Xorg:

```

    Option         "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"

    Option         "AllowIndirectGLXProtocol" "off"

    Option         "TripleBuffer" "on"

```

Complete 

```
 /etc/X11/xorg.conf.d/10nvidia-prime.conf 
```

 file:

```

Section "ServerLayout"

    Identifier "layout"

    Screen 0 "nvidia"

    Inactive "intel"

EndSection

Section "Device"

    Identifier "nvidia"

    Driver "nvidia"

    BusID "PCI:1:0:0"

EndSection

Section "Screen"

    Identifier "nvidia"

    Device "nvidia"

    Option "AllowEmptyInitialConfiguration"

    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"

    Option "UseNvKmsCompositionPipeline" "off"

    Option  "AllowIndirectGLXProtocol" "off"

    Option  "TripleBuffer" "on"

EndSection

Section "Device"

    Identifier "intel"

    Driver "modesetting"

    Option      "AccelMethod"    "glamor"

    Option      "DRI"            "3"

    Option   "TearFree"   "true"

EndSection

Section "Screen"

    Identifier "intel"

    Device "intel"

EndSection

```

Bonus 3: It might be possible to use only intel when on single monitor, to save power, by using bbswitch module. Havent tried it yet tho.

Marking this as solved, thanks for all the effort.Last edited by Arthanis on Wed Jun 24, 2020 5:14 pm; edited 1 time in total

----------

## alamahant

Out of curiosity -

Is vdpau working for you?

Thanks a lot..

 :Very Happy: 

----------

## Arthanis

 *alamahant wrote:*   

> Out of curiosity -
> 
> Is vdpau working for you?
> 
> Thanks a lot..
> ...

 

Not sure, how do I test this?

Also, I can confirm, you can use purely intel (no nvidia GLX, no multimonitor, but more power saving and less power) by doing:

- Wipe every Xorg.conf, and replacing with:

```

Section "Device"

    Identifier  "Intel Graphics"

    Driver      "modesetting"

    Option      "AccelMethod"    "glamor"

    Option      "DRI"            "3"

    Option   "TearFree"   "true"

EndSection

```

- And running:

```

rmmod nvidia_modeset

rmmod nvidia_drm

rmmod nvidia

modprobe bbswitch

echo "OFF" >> /proc/acpi/bbswitch

```

And then start X.

----------

