Xorg no screens found(EE) error on Intel+Nvidia Optimus system

Hi all! I am newbie FreeBSD user and trying to successfully install and run FreeBSD. I have a laptop with Intel HD Graphics 530 (Skylake) and Nvidia GeForce GTX 960M. When I try to startx, I am getting the error I wrote on title. I browsed through forums, found so many people encountered with this error, I applied the solutions on this threads, no help. I'm familar with Linux but never run Xorg on console before. Currently I'm writing this on Linux distro. I dont know how to use internet on console. So here's my Xorg.0.log:

Code:
[   445.477]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[   445.477] X Protocol Version 11, Revision 0
[   445.477] Build Operating System: FreeBSD 13.0-CURRENT amd64
[   445.477] Current Operating System: FreeBSD idris-bsd 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r355121: Wed Nov 27 04:20:46 UTC 2019     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[   445.478] Build Date: 30 November 2019  05:58:00AM
[   445.478] 
[   445.478] Current version of pixman: 0.38.4
[   445.478]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   445.478] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   445.478] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Dec  4 18:04:49 2019
[   445.478] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   445.479] (==) No Layout section.  Using the first Screen section.
[   445.479] (**) |-->Screen "Screen0" (0)
[   445.479] (**) |   |-->Monitor "<default monitor>"
[   445.479] (==) No device specified for screen "Screen0".
    Using the first device section listed.
[   445.479] (**) |   |-->Device "Intel Graphics"
[   445.479] (==) No monitor specified for screen "Screen0".
    Using a default monitor configuration.
[   445.479] (==) Automatically adding devices
[   445.479] (==) Automatically enabling devices
[   445.479] (==) Not automatically adding GPU devices
[   445.479] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   445.479] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/
[   445.479] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   445.479] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[   445.480] (II) Loader magic: 0x42a010
[   445.480] (II) Module ABI versions:
[   445.480]     X.Org ANSI C Emulation: 0.4
[   445.480]     X.Org Video Driver: 20.0
[   445.480]     X.Org XInput driver : 22.1
[   445.480]     X.Org Server Extension : 9.0
[   445.480] (--) PCI:*(0:0:2:0) 8086:191b:1043:1d3d rev 6, Mem @ 0xdd000000/16777216, 0xb0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[   445.480] (--) PCI: (0:1:0:0) 10de:139b:1043:1d3d rev 162, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128
[   445.480] (II) LoadModule: "glx"
[   445.480] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   445.484] (II) Module glx: vendor="X.Org Foundation"
[   445.484]     compiled for 1.18.4, module version = 1.0.0
[   445.484]     ABI class: X.Org Server Extension, version 9.0
[   445.484] (==) AIGLX enabled
[   445.484] (II) LoadModule: "intel"
[   445.484] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[   445.485] (II) Module intel: vendor="X.Org Foundation"
[   445.485]     compiled for 1.18.4, module version = 2.99.917
[   445.485]     Module class: X.Org Video Driver
[   445.485]     ABI class: X.Org Video Driver, version 20.0
[   445.485] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[   445.485] (II) intel: Driver for Intel(R) HD Graphics
[   445.485] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[   445.485] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[   445.486] (--) Using syscons driver with X support (version 2.0)
[   445.486] (--) using VT number 9

[   445.499] (EE) No devices detected.
[   445.499] (EE)
Fatal server error:
[   445.499] (EE) no screens found(EE)
[   445.499] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
for help.
[   445.499] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   445.499] (EE)
[   445.513] (EE) Server terminated with error (1). Closing log file.

These are the conf files I added under /usr/local/etc/X11/xorg.conf.d/
intel.conf:


Code:
Section "Device"
    Identifier "Intel Graphics"
    Driver     "intel"
    Option "TearFree" "true"
    Option "TripleBuffer" "true"
    Option "DRI" "true"
    BusID "pci0:0:2:0"
EndSection

screen0.conf

Code:
Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    SubSection "Display"
        Modes "1920x1080"
    EndSubSection
EndSection

pciconf -lv output:


Code:
hostb0@pci0:0:0:0:    class=0x060000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x1910 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:    class=0x060400 rev=0x07 hdr=0x01 vendor=0x8086 device=0x1901 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)'
    class      = bridge
    subclass   = PCI-PCI
vgapci1@pci0:0:2:0:    class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x191b subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'HD Graphics 530'
    class      = display
    subclass   = VGA
none0@pci0:0:4:0:    class=0x118000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x1903 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem'
    class      = dasp
xhci0@pci0:0:20:0:    class=0x0c0330 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa12f subvendor=0x1043 subdevice=0x201f
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:20:2:    class=0x118000 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa131 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Thermal Subsystem'
    class      = dasp
ig4iic0@pci0:0:21:0:    class=0x118000 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa160 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Serial IO I2C Controller'
    class      = dasp
ig4iic1@pci0:0:21:1:    class=0x118000 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa161 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Serial IO I2C Controller'
    class      = dasp
none2@pci0:0:22:0:    class=0x078000 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa13a subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family MEI Controller'
    class      = simple comms
ahci0@pci0:0:23:0:    class=0x010601 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa103 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'HM170/QM170 Chipset SATA Controller [AHCI Mode]'
    class      = mass storage
    subclass   = SATA
pcib2@pci0:0:28:0:    class=0x060400 rev=0xf1 hdr=0x01 vendor=0x8086 device=0xa112 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:3:    class=0x060400 rev=0xf1 hdr=0x01 vendor=0x8086 device=0xa113 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:    class=0x060100 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa14e subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = 'HM170 Chipset LPC/eSPI Controller'
    class      = bridge
    subclass   = PCI-ISA
none3@pci0:0:31:2:    class=0x058000 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa121 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Power Management Controller'
    class      = memory
hdac0@pci0:0:31:3:    class=0x040300 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa170 subvendor=0x1043 subdevice=0x158f
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family HD Audio Controller'
    class      = multimedia
    subclass   = HDA
none4@pci0:0:31:4:    class=0x0c0500 rev=0x31 hdr=0x00 vendor=0x8086 device=0xa123 subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family SMBus'
    class      = serial bus
    subclass   = SMBus
vgapci0@pci0:1:0:0:    class=0x030200 rev=0xa2 hdr=0x00 vendor=0x10de device=0x139b subvendor=0x1043 subdevice=0x1d3d
    vendor     = 'NVIDIA Corporation'
    device     = 'GM107M [GeForce GTX 960M]'
    class      = display
    subclass   = 3D
iwm0@pci0:2:0:0:    class=0x028000 rev=0x59 hdr=0x00 vendor=0x8086 device=0x095a subvendor=0x8086 subdevice=0x5110
    vendor     = 'Intel Corporation'
    device     = 'Wireless 7265'
    class      = network
none5@pci0:3:0:0:    class=0xff0000 rev=0x01 hdr=0x00 vendor=0x10ec device=0x5287 subvendor=0x1043 subdevice=0x202f
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8411B PCI Express Card Reader'
re0@pci0:3:0:1:    class=0x020000 rev=0x12 hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x1043 subdevice=0x200f
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet

I tried Xorg -configure, encountered same erroe, after a reading bit, removed xorg.conf.new and error persists. Any suggestions would be welcomed. Thanks.
 
I updated the log. Although after installing kernel module, startx doesn't give "no device detected" error but it's shown in log.
 
The two GPUs need to use the same driver for the BusID to become relevant. The NVidia driver can only attach to an NVidia card and you only have one of those. Same for the Intel driver, there's only one Intel card. Hence there's no need for the BusID. When you have two NVidia cards (or two of something else) then you would need to supply the BusID to avoid ambiguity.
 
The two GPUs need to use the same driver for the BusID to become relevant. The NVidia driver can only attach to an NVidia card and you only have one of those. Same for the Intel driver, there's only one Intel card. Hence there's no need for the BusID. When you have two NVidia cards (or two of something else) then you would need to supply the BusID to avoid ambiguity.

Removing BusID did the trick. Thank you.
 
I'm actually interested in hearing about compelling non-gaming Optimus use cases.
I'd call it a 'non-use case' but a very important one on my Thinkpad T580. Starting a headless X connected to the GPU using Theron Tarigo's port https://reviews.freebsd.org/D22521 reduces power from ca. 13 W to ca. 8 W.
All other power saving measures from the wiki together save at most 1.5 W (the script to power off the GPU mentioned in the wiki doesn't find any good acpi call for me).
 
Back
Top