# Example X-Org config file for setting up 2 separate
# X-Screens on a Optimus Laptop, where the Intel iGPU is
# hard-wired to the internal Laptop flatpanel and the
# external USB-C port (useable for DisplayPort/HDMI/
# DVI/VGA output via adapters), whereas the NVidia dGPU
# is hard-wired to a HDMI output port.
#
# This config file is for use with the NVidia proprietary
# graphics driver under "Optimus" / PRIME sync slave output
# mode.
#
# We assign X-Screen 0 to the Intel iGPU, so the NVidia gpu
# does the rendering, but the Intel gpu does the display on
# the laptop flat-panel or the USB-C output.
#
# X-Screen 1 is assigned to the NVidia gpu directly for
# display on the NVidias physical HDMI output port.
#
# This specific config file would work on the
# "Razer Blade 2016" "VR ready" gaming laptop wth
# Intel HD 530 Skylake iGPU and NVidia GeForce 1060M
# Pascal dGPU.

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia0"
    Screen 1 "nvidia1"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

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

Section "Device"
    Identifier "nvidia0"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
    Screen 0
EndSection

Section "Screen"
    Identifier "nvidia0"
    Device "nvidia0"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Section "Device"
    Identifier "nvidia1"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
    Screen 1
    Option "UseDisplayDevice" "DFP-0"
EndSection

Section "Screen"
    Identifier "nvidia1"
    Device "nvidia1"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

