Dual monitors with 2 videos driver with xrandr 1.4

i915intelmulti-monitornvidiaxrandr

I'm trying to dual-screen with 2 differents video card drivers (i915 & nvidia) but as you can see xrandr is only listing nvidia provider. I am using Arch Linux. I unsuccessfully tried finding where xrandr gets the provider list.

[x@epoch ~]$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x279 cap: 0x1, Source Output crtcs: 4 outputs: 6 associated providers: 0 name:NVIDIA-0

[x@epoch /etc/X11]$ sudo lshw -numeric -c video
*-display               
       description: VGA compatible controller
       product: GK104 [GeForce GTX 770] [10DE:1184]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:48 memory:f6000000-f6ffffff memory:e0000000-e7ffffff memory:e8000000-e9ffffff ioport:e000(size=128) memory:f7000000-f707ffff
  *-display
       description: Display controller
       product: Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:162]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm bus_master cap_list
       configuration: driver=i915 latency=0
       resources: irq:47 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64)

Is there any reason why it can't see the i915 one ?

Best Answer

You have to define your GPU's in /etc/X11/xorg.conf like this:

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

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "<BusID for NVIDIA device here>"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    # Uncomment this 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.
    #Option "UseDisplayDevice" "none"
EndSection

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

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

you can activate the non-NVIDIA card with the folowing commands:

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

source: NVIDIA Linux documentation Chapter 33

Related Question