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.
 
Tried this way, error message said Section "Screen" can contain *either* Identifier or Driver, not both. I commented out the Identifier line, and after an error message about framebuffer mode, I entered the BusID, and the error that followed said that Section "Screen" cannot contain BusIDs.

I created a discrete file, /usr/local/etc/X11/xorg.conf.d/10-monitor.conf, with the following contents,
Code:
Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    SubSection "Display"
    Modes "1920x1080"
    EndSubSection
EndSection
and /usr/local/etc/X11/xorg.conf.d/20-drivers.conf,
Code:
Section "Device"
    Identifier "Card0"
    Driver "modesetting"
    BusID "pci0:0:2:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver "nvidia"
    BusID "pci0:1:0:0"
EndSection

Errors say failed to load "nvidia" (also happened when I tried nvidia-modeset), and "VGA arbiter: cannot open kernel arbiter, no multi-card support". Here's the log:
Code:
[   175.693] 
X.Org X Server 1.21.1.24
X Protocol Version 11, Revision 0
[   175.693] Current Operating System: FreeBSD baklava 15.1-RELEASE FreeBSD 15.1-RELEASE releng/15.1-n283562-96841ea08dcf GENERIC amd64
[   175.693]  
[   175.693] Current version of pixman: 0.46.4
[   175.693]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   175.693] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   175.694] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jul 22 21:06:21 2026
[   175.790] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   175.791] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   175.841] (==) No Layout section.  Using the first Screen section.
[   175.841] (**) |-->Screen "Screen0" (0)
[   175.841] (**) |   |-->Monitor "<default monitor>"
[   175.842] (**) |   |-->Device "Card0"
[   175.842] (**) |   |-->GPUDevice "Card1"
[   175.842] (==) No monitor specified for screen "Screen0".
    Using a default monitor configuration.
[   175.842] (**) Allowing byte-swapped clients
[   175.842] (==) Automatically adding devices
[   175.842] (==) Automatically enabling devices
[   175.842] (==) Automatically adding GPU devices
[   175.842] (==) Automatically binding GPU devices
[   175.842] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   176.013] (==) 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
[   176.013] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   176.013] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   176.014] (II) Module ABI versions:
[   176.014]     X.Org ANSI C Emulation: 0.4
[   176.014]     X.Org Video Driver: 25.2
[   176.014]     X.Org XInput driver : 24.4
[   176.014]     X.Org Server Extension : 10.0
[   176.023] (II) xfree86: Adding drm device (/dev/dri/card0)
[   176.023] (II) Platform probe for /dev/dri/card0
[   176.023] (--) PCI: (0@0:2:0) 8086:591b:1028:0774 rev 4, Mem @ 0xdb000000/16777216, 0x70000000/268435456, I/O @ 0x0000f000/64
[   176.023] (--) 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
[   176.023] (II) LoadModule: "glx"
[   176.061] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   176.155] (II) Module glx: vendor="X.Org Foundation"
[   176.155]     compiled for 1.21.1.24, module version = 1.0.0
[   176.155]     ABI class: X.Org Server Extension, version 10.0
[   176.156] (II) LoadModule: "modesetting"
[   176.156] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[   176.172] (II) Module modesetting: vendor="X.Org Foundation"
[   176.172]     compiled for 1.21.1.24, module version = 1.21.1
[   176.172]     Module class: X.Org Video Driver
[   176.172]     ABI class: X.Org Video Driver, version 25.2
[   176.172] (II) LoadModule: "nvidia"
[   176.173] (WW) Warning, couldn't open module nvidia
[   176.173] (EE) Failed to load module "nvidia" (module does not exist, 0)
[   176.173] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   176.173] (--) Using syscons driver with X support (version 2.0)
[   176.173] (--) using VT number 9

[   176.178] (WW) Falling back to old probe method for modesetting
[   176.179] (II) modeset(0): using default device
[   176.179] (II) modeset(G0): using drv /dev/dri/card0
[   176.179] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   176.179] (EE) 
Fatal server error:
[   176.179] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[   176.179] (EE) 
[   176.179] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   176.179] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   176.179] (EE) 
[   176.184] (EE) Server terminated with error (1). Closing log file.
 
Here's the log:
Code:
[   176.172] (II) LoadModule: "nvidia"
[   176.173] (WW) Warning, couldn't open module nvidia
[   176.173] (EE) Failed to load module "nvidia" (module does not exist, 0)
Looks like Xorg can't find the Nvidia driver for Xorg: nvidia_drv.so.
Are you using latest or quarterly packages?

Please post the result of:
pkg which /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
pkg query -x '[%R] %o %n %v' '^drm-(51.-|6..?-)?kmod|(^nvidia-(d|k))'

P.S. putting Driver "nvidia" in Section "Device" is correct; best not use Xorg -configure as mentioned.
 
I am using the '580' version of the driver because on my Linux system, it's the last available version for my GTX 1060. Maybe seeking out the 580 version specifically was a bad call? Idk for sure

Here are the results of pkg which /usr/local/lib/xorg/modules/drivers/nvidia_drv.so:
Code:
/usr/local/lib/xorg/modules/drivers/nvidia_drv.so was not found in the database
and the results of pkg query -x '[%R] %o %n %v' '^drm-(51.-|6..?-)?kmod|(^nvidia-(d|k))':
Code:
[FreeBSD-ports-kmods] graphics/drm-66-kmod drm-66-kmod 6.6.25.1501000_8
[FreeBSD-ports] graphics/drm-kmod drm-kmod 20260508
[FreeBSD-ports] graphics/nvidia-drm-66-kmod-580 nvidia-drm-66-kmod-580 580.173.02.1500068_1
[FreeBSD-ports] x11/nvidia-kmod-580 nvidia-kmod-580 580.173.02.1500068

Do you think I'd have success with the plain 'nvidia-drm-kmod' package, as per the Handbook?
 
Do you have the package xf86-video-nv installed?
And is the screen black because it's displaying a desktop on another screen? Do all of your adapters have monitors attached?
 
Does x11/nvidia-driver-580 sanely installed?
I assume NO as of your comment in #5 here.

As of requirements from kmods builder admins, I, as one of the maintainers of NVIDIA GPU related ports, have stopped devpending on x11/nvidia-driver by each of graphics/nvidia-drm-*-kmod. But as x11/nvidia-driver (not only x11/nvidia-kmod) is mandatory to work with X11 (regardless xorg or xlibre) and/or Wayland, decided to make graphics/nvidia-drm-kmod metaport to depend on x11/nvidia-driver.

So do graphics/nvidia-drm-kmod-devel and graphics/nvidia-drm-580, to New Feature branch (-devel) or legacy 580 branch each.

And even after the above is sorted, your current configuration shouldn't work.

To allow hybrid graphics (Optimus) to work, /boot/modules/nvidia-drm.ko is mandatory now. This automatically pulls in /boot/modules/nvidia-modeset.ko and /boot/modules/nvidia-modeset.ko pulls in /boot/modules/nvidia.ko as their dependency. The actual driver kmod is /boot/modules/nvidia.ko and other kmods are for additional interface layers with required supports.

So what you need to set in kld_list is NOT intermediate nvidia-modeset, but nvidia-drm.

And you also need hw.nvidiadrm.modeset=1 line in your /boot/loader.conf. This is a tunable that needs to be 100% assured to be set BEFORE nvidia-drm.ko is loaded, so it you're setting it in /etc/sysctl.conf, it's too late phase to do.

Do you think I'd have success with the plain 'nvidia-drm-kmod' package, as per the Handbook?
No. The last branch supporting your GPU is 580. Plain ones and -devel variants shouldn't work for you.
So you're "basically" in right direction with some strange glitches.

And re-reading this thread, noticed that you're on 15.1.
So you need to build at least
  • x11/nvidia-kmod-580
  • graphics/nvidia-drm-612-kmod-580
from ports, sync'ing your /usr/src exactly the same with your running kernel. This is because of the unfortunate fact that kmods builders doesn't build NVIDIA related kmods other than x11/nvidia-kmod alone, thus, only oldest supported minor versions per major version has sane pre-built pkgs.

If you're using vanilla 15.1-RELEASE, it would be commit 96841ea08dcfa84b954a32dc5ae1a26c28966cf4.
If you've already upgraded to 15.1-RELEASE-p1, it would be commit 0f691888dc56a068f74c213bc87b32939b6b354e and cloning releng/15.1 branch as-is should be OK, as it's the latest for now.

Do you have the package xf86-video-nv installed?
It could be harmful rather than helpful.
If installed, at least x11-servers/xorg-server automatically tries to attach it, but it's only for quite outdated, old generations of GPUs. So it should be installed only when the GPU is known to be too old that even x11/nvidia-{kmod|driver}-304 already dropped supports for it.

And is the screen black because it's displaying a desktop on another screen?
As far as I know, when I've purchased ThinkPad P52, at least some notebooks doesn't connect NVIDIA dGPU to internal monitor and connect to limited DP or HDMI only when iGPU is disabled via UEFI firmware, thus, if I want to display the output of dGPU into internal monitor, hybrid graphics was madatory, which I don't want to configure.
Only I could find stating dGPU can output to internal display without hybrid graphics in manufacturer's site or user's manual available via Internet at the moment was P52 only, so I've forced to purchase it.
Note that the internal LCD panel of P52 seems to have multiple DP interfaces on it and connecting both to iGPU and dGPU. I hope this implementation to be mandated legally!
 
I changed "nvidia-modeset" in /etc/rc.conf to "nvidia-drm", rebooted, ran startx, and caused a kernel panic. I pasted the crash dump here: https://pastebin.com/PBuqni49

Retried with "nvidia-drm-61-kmod-580" instead of 66, kernel panic again.

Uninstalled nvidia-kmod-580 and nvidia-drm-61-kmod-580, reinstalled "nvidia-kmod-580" and installed "nvidia-drm-66-kmod-580" from /usr/ports ports collection this time. Now I get errors in my log instead of a kernel panic.
Here is the contents of /var/log/Xorg.0.log when /usr/local/etc/X11/xorg.conf.d/10-monitor.conf points to "Card0" (intel):
Code:
[  1330.166] 
X.Org X Server 1.21.1.24
X Protocol Version 11, Revision 0
[  1330.166] Current Operating System: FreeBSD baklava 15.1-RELEASE FreeBSD 15.1-RELEASE releng/15.1-n283562-96841ea08dcf GENERIC amd64
[  1330.166]  
[  1330.166] Current version of pixman: 0.46.4
[  1330.166]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  1330.166] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1330.166] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Jul 28 21:44:11 2026
[  1330.166] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[  1330.166] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  1330.166] (==) No Layout section.  Using the first Screen section.
[  1330.166] (**) |-->Screen "Screen0" (0)
[  1330.166] (**) |   |-->Monitor "<default monitor>"
[  1330.167] (**) |   |-->Device "Card0"
[  1330.167] (**) |   |-->GPUDevice "Card1"
[  1330.167] (==) No monitor specified for screen "Screen0".
    Using a default monitor configuration.
[  1330.167] (**) Allowing byte-swapped clients
[  1330.167] (==) Automatically adding devices
[  1330.167] (==) Automatically enabling devices
[  1330.167] (==) Automatically adding GPU devices
[  1330.167] (==) Automatically binding GPU devices
[  1330.167] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1330.167] (==) 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
[  1330.167] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  1330.167] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1330.167] (II) Module ABI versions:
[  1330.167]     X.Org ANSI C Emulation: 0.4
[  1330.167]     X.Org Video Driver: 25.2
[  1330.167]     X.Org XInput driver : 24.4
[  1330.167]     X.Org Server Extension : 10.0
[  1330.172] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1330.172] (II) Platform probe for /dev/dri/card0
[  1330.172] (--) PCI: (0@0:2:0) 8086:591b:1028:0774 rev 4, Mem @ 0xdb000000/16777216, 0x70000000/268435456, I/O @ 0x0000f000/64
[  1330.172] (--) 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
[  1330.172] (II) LoadModule: "glx"
[  1330.172] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  1330.173] (II) Module glx: vendor="X.Org Foundation"
[  1330.173]     compiled for 1.21.1.24, module version = 1.0.0
[  1330.173]     ABI class: X.Org Server Extension, version 10.0
[  1330.173] (II) LoadModule: "modesetting"
[  1330.173] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[  1330.173] (II) Module modesetting: vendor="X.Org Foundation"
[  1330.173]     compiled for 1.21.1.24, module version = 1.21.1
[  1330.173]     Module class: X.Org Video Driver
[  1330.173]     ABI class: X.Org Video Driver, version 25.2
[  1330.173] (II) LoadModule: "nvidia"
[  1330.173] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[  1330.173] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1330.174]     compiled for 1.6.99.901, module version = 1.0.0
[  1330.174]     Module class: X.Org Video Driver
[  1330.174] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1330.174] (II) NVIDIA dlloader X Driver  580.173.02  Tue Jun 23 07:56:03 UTC 2026
[  1330.174] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1330.174] (--) Using syscons driver with X support (version 2.0)
[  1330.174] (--) using VT number 9

[  1330.179] (WW) Falling back to old probe method for modesetting
[  1330.179] (II) modeset(0): using default device
[  1330.179] (II) modeset(G0): using drv /dev/dri/card0
[  1330.179] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1330.179] (EE) 
Fatal server error:
[  1330.179] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[  1330.179] (EE) 
[  1330.179] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  1330.179] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1330.179] (EE) 
[  1330.184] (EE) Server terminated with error (1). Closing log file.
Here are the contents of the same log when /usr/local/etc/X11/xorg.conf.d/10-monitor.conf points to Card1 (nvidia):
Code:
[  1377.875] 
X.Org X Server 1.21.1.24
X Protocol Version 11, Revision 0
[  1377.875] Current Operating System: FreeBSD baklava 15.1-RELEASE FreeBSD 15.1-RELEASE releng/15.1-n283562-96841ea08dcf GENERIC amd64
[  1377.876]  
[  1377.876] Current version of pixman: 0.46.4
[  1377.876]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  1377.876] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1377.876] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Jul 28 21:44:58 2026
[  1377.876] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[  1377.876] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  1377.876] (==) No Layout section.  Using the first Screen section.
[  1377.876] (**) |-->Screen "Screen0" (0)
[  1377.876] (**) |   |-->Monitor "<default monitor>"
[  1377.876] (**) |   |-->Device "Card1"
[  1377.876] (**) |   |-->GPUDevice "Card0"
[  1377.876] (==) No monitor specified for screen "Screen0".
    Using a default monitor configuration.
[  1377.876] (**) Allowing byte-swapped clients
[  1377.876] (==) Automatically adding devices
[  1377.876] (==) Automatically enabling devices
[  1377.876] (==) Automatically adding GPU devices
[  1377.876] (==) Automatically binding GPU devices
[  1377.876] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1377.877] (==) 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
[  1377.877] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  1377.877] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1377.877] (II) Module ABI versions:
[  1377.877]     X.Org ANSI C Emulation: 0.4
[  1377.877]     X.Org Video Driver: 25.2
[  1377.877]     X.Org XInput driver : 24.4
[  1377.877]     X.Org Server Extension : 10.0
[  1377.882] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1377.882] (II) Platform probe for /dev/dri/card0
[  1377.882] (--) PCI: (0@0:2:0) 8086:591b:1028:0774 rev 4, Mem @ 0xdb000000/16777216, 0x70000000/268435456, I/O @ 0x0000f000/64
[  1377.882] (--) 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
[  1377.882] (II) LoadModule: "glx"
[  1377.882] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  1377.883] (II) Module glx: vendor="X.Org Foundation"
[  1377.883]     compiled for 1.21.1.24, module version = 1.0.0
[  1377.883]     ABI class: X.Org Server Extension, version 10.0
[  1377.883] (II) LoadModule: "nvidia"
[  1377.883] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[  1377.883] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1377.883]     compiled for 1.6.99.901, module version = 1.0.0
[  1377.883]     Module class: X.Org Video Driver
[  1377.883] (II) LoadModule: "modesetting"
[  1377.883] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[  1377.883] (II) Module modesetting: vendor="X.Org Foundation"
[  1377.883]     compiled for 1.21.1.24, module version = 1.21.1
[  1377.883]     Module class: X.Org Video Driver
[  1377.883]     ABI class: X.Org Video Driver, version 25.2
[  1377.883] (II) NVIDIA dlloader X Driver  580.173.02  Tue Jun 23 07:56:03 UTC 2026
[  1377.883] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1377.883] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1377.883] (--) Using syscons driver with X support (version 2.0)
[  1377.883] (--) using VT number 9

[  1377.889] (WW) Falling back to old probe method for modesetting
[  1377.889] (II) modeset(0): using default device
[  1377.889] (II) modeset(G0): using drv /dev/dri/card0
[  1377.889] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1377.889] (EE) Screen 0 deleted because of no matching config section.
[  1377.889] (II) UnloadModule: "modesetting"
[  1377.889] (EE) Device(s) detected, but none match those in the config file.
[  1377.889] (EE) 
Fatal server error:
[  1377.889] (EE) no screens found(EE) 
[  1377.889] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  1377.889] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1377.889] (EE) 
[  1377.894] (EE) Server terminated with error (1). Closing log file.
 
If you can disable iGPU via UEFI firmware configs AND your monitor is internally connected both to iGPU and NVIDIA dGPU like in my ThinkPad P52, the easiest solution is to disable iGPU. In this case, NVIDIA dGPU should become /dev/dri/card0.

But if your dGPU cannot display to your internal monitor even if your UEFI firmware has option to disable iGPU (means, display outputs from dGPU is possible only via hybrid graphics), you need to configure PRIME without disabling iGPU.

In this case, follow Austin's guide here. This page should be considered "official", as Austin is the person who ported nvidia-drm.ko to FreeBSD.

Anyway, I've looked for "official" info with the above for Alienware 15 R3 as non-customer, non-NDA'ed developer and non-agency regular user, but cannot find needed data at all.

Note that Lenovo provides what I wanted at "Graphics Devide" part of th page 81 (noted as page 63) of their Users Guide for P52, and when they describe this way for ThinkPads, as far as I've experienced, dGPU can display to internal monitor without helps of iGPU. But not sure about other manufacturers.
 
Tried this way, error message said Section "Screen" can contain *either* Identifier or Driver, not both.
Yeah, because I was stupid and copy/pasted the wrong thing. Sorry about that. It should have been a Section "Device", not Section "Screen".
 
Back
Top