Solved Help configuring dual monitor using nvidia and intel drivers FreeBSD 12

Hi, I'm trying to use FreeBSD as a desktop using dual monitor configuration. One is attached to an nvidia card, other one is attached to the mainboard card. Only the screen using nvidia shows the desktop environment; the other one (using intel driver) has just a mouse pointer on it but is completely black. Running xrandr only shows one monitor. Searching on old forum posts I understood that nvidia can't be used for dual monitors, but those post where from 2009 so I'm asking this one (I hope things changed).

Please let me know if I'm missing something or maybe I'm not understanding how to configure it the right way (maybe something is getting overridden somewhere). Thanks in advance.

Code:
$ xrandr
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
   1024x768      75.03    60.00 
   800x600       75.00    60.32    56.25 
   640x480       75.00    59.94 
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)

I have nvidia an intel drivers installed. This is the hardware information:

Code:
# pciconf -lv | grep -B3 display
vgapci1@pci0:0:2:0:    class=0x038000 card=0x200d8086 chip=0x01628086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller'
    class      = display
--
vgapci0@pci0:1:0:0:    class=0x030000 card=0x809f1462 chip=0x104a10de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GF119 [GeForce GT 610]'
    class      = display

This is my /etc/rc.conf

Code:
$ cat /etc/rc.conf
hostname="athenaBSD"
keymap="es.acc.kbd"
ifconfig_em0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="yes"
hald_enable="yes"
kld_list="nvidia-modeset i915kms"

I have manually created this extra xorg files as the Xorg -configure command does not produce an usable file (I mean it just put both screens dark).

So for xorg configuration I have:

Code:
# cat /usr/local/etc/X11/xorg.conf.d/00-monitors.conf
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "LG"
    ModelName      "E1941"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "LG"
    ModelName      "L1753S"
EndSection

Code:
# cat /usr/local/etc/X11/xorg.conf.d/01-devices.conf
Section "Device"
    Identifier "Intel card"
    VendorName "Intel Corporation"
    Driver "intel"
    BusID "PCI:0:2:0"
EndSection

Section "Device"
    Identifier "NVIDIA Card"
    VendorName "NVIDIA Corporation"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection

Code:
# cat /usr/local/etc/X11/xorg.conf.d/02-screens.conf
Section "Screen"
    Identifier     "Screen0"
    Device         "NVIDIA card"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Intel card"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

And this is what nvidia-xconfig produces:

Code:
# cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 440.100


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

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

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
 
Searching on old forum posts I understood that nvidia can't be used for dual monitors, but those post where from 2009 so I'm asking this one (I hope things changed).
.....
device = 'GF119 [GeForce GT 610]'

According to the Wikipedia article the GF119 GeForce GT 610 card is a rebranded GeForce GT 520.
Note "Most NVIDIA GPUs older than Kepler support driving up to two display devices simultaneously." in the NVIDIA README chapter. The GT 520 is older than Kepler.


You have the NVIDIA documentation locally: /usr/local/share/doc/NVIDIA_GLX-1.0/html/index.html

Also have a look at x11/nvidia-settings for comfortable configuration.
 
I'm doubtful you will be able to run the Intel and NVidia card at the same time. The NVidia driver replaces a few Xorg libraries and those are incompatible with any other driver.

Searching on old forum posts I understood that nvidia can't be used for dual monitors, but those post where from 2009 so I'm asking this one (I hope things changed).
The NVidia driver is able to drive more than one monitor. But that's not what your situation is. You have one monitor on the NVidia card and one on Intel. That's a completely different setup and has nothing to do with the multi-monitor support of either card.
 
Xorg lost the ability to access multiple monitors on different graphics hardware when it forked from good old XFree86. Multiple monitors only work when connected to the same graphics hardware.
 
Thanks so much for the clarification !! SirDice olli@ I didn't know it was not possible regarding of the drivers.

So I ended up removing the intel driver an my manually created xorg files. Then I attached my another monitor to the same nvidia card (so one is connected to vga and the other one to hdmi). Then I removed the intel driver and tried again. It works!

I did not needed to check the links that T-Daemon pointed to me (thanks) as I was able to easily configure the screen extension using the xfce Display menu.

Have a nice day and thanks again to all of you.
 
So I ended up removing the intel driver an my manually created xorg files. Then I attached my another monitor to the same nvidia card (so one is connected to vga and the other one to hdmi). Then I removed the intel driver and tried again. It works!

oh I forgot to mention (and I write it here if anyone searching for information in the future) that I ran nvidia-xconfig after deleting my xorg files and attaching the other display. I also restarted the pc (maybe not necessary but to make sure no intel driver was effectively loaded).
 
Back
Top