Black screen on Xorg autoconfig

Hello, all, this is my first post. I have been using FreeBSD for a bit, but this is my first attempt running it on bare metal. Installs, boots, and runs mostly just fine, great in fact, but I just cannot get the X11 session to run properly. Hardware is an Alienware 15 R3 with an Intel i7-7700HQ CPU and NVIDIA 1060 6GB GPU. I have one display (built-in, you probably guessed) and two GPUs thanks to the i7's iGPU.

I installed Xorg, xfce, lightdm, drm-kmod (for Intel), and nvidia-drm-kmod-580 (for NVIDIA, obviously). I enabled the Intel and NVIDIA drivers with # sysrc kld_list="i915kms nvidia-modeset", and then the first thing I tried was to start X with no auto or manual configuration with startx. X failed to launch, with the following pulled from /var/log/Xorg.0.log:
Code:
[   153.678] 
X.Org X Server 1.21.1.24
X Protocol Version 11, Revision 0
[   153.678] Current Operating System: FreeBSD baklava 15.1-RELEASE FreeBSD 15.1-RELEASE releng/15.1-n283562-96841ea08dcf GENERIC amd64
[   153.678]  
[   153.678] Current version of pixman: 0.46.4
[   153.678] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   153.678] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   153.679] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 16 22:04:44 2026
[   153.776] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   153.806] (==) No Layout section.  Using the first Screen section.
[   153.806] (==) No screen section available. Using defaults.
[   153.806] (**) |-->Screen "Default Screen Section" (0)
[   153.806] (**) |   |-->Monitor "<default monitor>"
[   153.806] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[   153.807] (**) Allowing byte-swapped clients
[   153.807] (==) Automatically adding devices
[   153.807] (==) Automatically enabling devices
[   153.807] (==) Automatically adding GPU devices
[   153.807] (==) Automatically binding GPU devices
[   153.807] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   153.973] (==) 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/,
	catalogue:/usr/local/etc/X11/fontpath.d
[   153.973] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   153.973] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[   153.974] (II) Module ABI versions:
[   153.974] 	X.Org ANSI C Emulation: 0.4
[   153.975] 	X.Org Video Driver: 25.2
[   153.975] 	X.Org XInput driver : 24.4
[   153.975] 	X.Org Server Extension : 10.0
[   153.984] (II) xfree86: Adding drm device (/dev/dri/card0)
[   153.984] (II) Platform probe for /dev/dri/card0
[   153.984] (--) PCI: (0@0:2:0) 8086:591b:1028:0774 rev 4, Mem @ 0xdb000000/16777216, 0x70000000/268435456, I/O @ 0x0000f000/64
[   153.984] (--) PCI:*(1@0:0:0) 10de:1c60:1028:07c0 rev 161, Mem @ 0xdc000000/16777216, 0xb0000000/268435456, 0xc0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/65536
[   153.984] (II) LoadModule: "glx"
[   154.013] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   154.112] (II) Module glx: vendor="X.Org Foundation"
[   154.112] 	compiled for 1.21.1.24, module version = 1.0.0
[   154.112] 	ABI class: X.Org Server Extension, version 10.0
[   154.113] (==) Matched intel as autoconfigured driver 0
[   154.113] (==) Matched nv as autoconfigured driver 1
[   154.113] (==) Matched modesetting as autoconfigured driver 2
[   154.113] (==) Matched scfb as autoconfigured driver 3
[   154.113] (==) Matched vesa as autoconfigured driver 4
[   154.113] (==) Assigned the driver to the xf86ConfigLayout
[   154.113] (II) LoadModule: "intel"
[   154.114] (WW) Warning, couldn't open module intel
[   154.114] (EE) Failed to load module "intel" (module does not exist, 0)
[   154.114] (II) LoadModule: "nv"
[   154.114] (WW) Warning, couldn't open module nv
[   154.115] (EE) Failed to load module "nv" (module does not exist, 0)
[   154.115] (II) LoadModule: "modesetting"
[   154.115] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[   154.132] (II) Module modesetting: vendor="X.Org Foundation"
[   154.132] 	compiled for 1.21.1.24, module version = 1.21.1
[   154.132] 	Module class: X.Org Video Driver
[   154.132] 	ABI class: X.Org Video Driver, version 25.2
[   154.133] (II) LoadModule: "scfb"
[   154.133] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[   154.152] (II) Module scfb: vendor="X.Org Foundation"
[   154.152] 	compiled for 1.21.1.23, module version = 0.0.5
[   154.152] 	ABI class: X.Org Video Driver, version 25.2
[   154.152] (II) LoadModule: "vesa"
[   154.152] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[   154.166] (II) Module vesa: vendor="X.Org Foundation"
[   154.166] 	compiled for 1.21.1.24, module version = 2.6.0
[   154.167] 	Module class: X.Org Video Driver
[   154.167] 	ABI class: X.Org Video Driver, version 25.2
[   154.167] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   154.167] (II) scfb: driver for wsdisplay framebuffer: scfb
[   154.167] (II) VESA: driver for VESA chipsets: vesa
[   154.167] (--) Using syscons driver with X support (version 2.0)
[   154.167] (--) using VT number 9

[   154.172] (WW) Falling back to old probe method for modesetting
[   154.172] (II) modeset(1): using default device
[   154.173] (WW) Falling back to old probe method for scfb
[   154.173] scfb trace: probe start
[   154.173] (II) scfb(2): using default device
[   154.173] scfb trace: probe done
[   154.173] (II) modeset(G0): using drv /dev/dri/card0
[   154.173] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   154.173] (EE) Screen 0 deleted because of no matching config section.
[   154.173] (II) UnloadModule: "modesetting"
[   154.173] (EE) 
Fatal server error:
[   154.173] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[   154.173] (EE) 
[   154.173] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   154.173] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   154.173] (EE) 
[   154.179] (EE) Server terminated with error (1). Closing log file.

The next thing I tried was to run # Xorg -configure, which produced the following /root/xorg.conf.new:
Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/share/fonts/misc/"
	FontPath     "/usr/local/share/fonts/TTF/"
	FontPath     "/usr/local/share/fonts/OTF/"
	FontPath     "/usr/local/share/fonts/Type1/"
	FontPath     "/usr/local/share/fonts/100dpi/"
	FontPath     "/usr/local/share/fonts/75dpi/"
	FontPath     "catalogue:/usr/local/etc/X11/fontpath.d"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "kmsdev"             	# <str>
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "DoubleShadow"       	# [<bool>]
        #Option     "Atomic"             	# [<bool>]
        #Option     "VariableRefresh"    	# [<bool>]
        #Option     "UseGammaLUT"        	# [<bool>]
        #Option     "AsyncFlipSecondaries" 	# [<bool>]
	Identifier  "Card0"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "kmsdev"             	# <str>
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "DoubleShadow"       	# [<bool>]
        #Option     "Atomic"             	# [<bool>]
        #Option     "VariableRefresh"    	# [<bool>]
        #Option     "UseGammaLUT"        	# [<bool>]
        #Option     "AsyncFlipSecondaries" 	# [<bool>]
	Identifier  "Card1"
	Driver      "modesetting"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

I ran X with the new config file with # X -config /root/xorg.conf.new, which technically produced an X11 session, but it's just a black screen, and the cursor doesn't work ― which is funny because the cursor works in the shell thanks to moused.

Any help is greatly appreciated!!! <3
 
The next thing I tried was to run # Xorg -configure,
Please stop using that old configuration command. The config it generates is entirely ignored nowadays.

For NVidia add a /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf:
Code:
Section "Screen"
  Identifier "Screen0"
  Driver "nvidia"
EndSection

You might need to add a BusID, because you effectively have two video cards, and you'll need to tell X which is which.
 
Back
Top