blank screen with Nvidia Optimus on laptop

Hello,

I'm using FreeBSD 13.0-RELEASE-p8. I used the i915kms driver for a long time, but now I want to give x11/nvidia-hybrid-graphics a try. My graphic card requires x11/nvidia-secondary-driver-390.

Here's my config.

pciconf -lv
Code:
vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x0df4 subvendor=0x1b0a subdevice=0x208f
    vendor     = 'NVIDIA Corporation'
    device     = 'GF108M [GeForce GT 540M]'
    class      = display
    subclass   = VGA

xorg.conf:
Code:
Section "Device"
    Identifier     "Device0"
    BusID          "PCI:1:0:0"
    Driver         "nvidia"
EndSection

Without that BusID line, Xorg could not recognize the device ("No device found"), and I only get a blank screen with this line present.

The module nvidia-modeset.ko is loaded into the kernel, and it is compiled with LINUX option, turning this option off hadn't any positive effect by the way.

and the log:
Code:
[    90.095]
X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
[    90.095] Build Operating System: FreeBSD 13.0-RELEASE-p8 amd64
[    90.095] Current Operating System: FreeBSD kangdez 13.0-RELEASE-p8 FreeBSD 13.0-RELEASE-p8 #0: Tue Mar 15 09:36:28 UTC 2022     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[    90.095] Build Date: 18 March 2022  06:09:07PM
[    90.095]
[    90.095] Current version of pixman: 0.40.0
[    90.095]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    90.095] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    90.095] (==) Log file: "/var/log/Xorg.0.log", Time: Sat May 14 10:59:01 2022
[    90.147] (==) Using config file: "/etc/X11/xorg.conf"
[    90.147] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    90.171] (==) No Layout section.  Using the first Screen section.
[    90.171] (==) No screen section available. Using defaults.
[    90.171] (**) |-->Screen "Default Screen Section" (0)
[    90.171] (**) |   |-->Monitor "<default monitor>"
[    90.172] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[    90.172] (**) |   |-->Device "Device0"
[    90.172] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    90.172] (==) Automatically adding devices
[    90.172] (==) Automatically enabling devices
[    90.172] (==) Not automatically adding GPU devices
[    90.189] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    90.320] (==) 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
[    90.320] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    90.320] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[    90.321] (II) Loader magic: 0x435b20
[    90.321] (II) Module ABI versions:
[    90.321]     X.Org ANSI C Emulation: 0.4
[    90.321]     X.Org Video Driver: 24.1
[    90.321]     X.Org XInput driver : 24.1
[    90.321]     X.Org Server Extension : 10.0
[    90.321] (!!) More than one possible primary device found
[    90.321] (--) PCI: (0@0:2:0) 8086:0116:1b0a:2080 rev 9, Mem @ 0xf4400000/4194304, 0xc0000000/268435456, I/O @ 0x0000e000/64, BIOS @ 0x????????/65536
[    90.321] (--) PCI: (1@0:0:0) 10de:0df4:1b0a:208f rev 161, Mem @ 0xf3000000/16777216, 0xd0000000/268435456, 0xe0000000/33554432, I/O @ 0x0000d000/128, BIOS @ 0x????????/65536
[    90.322] (II) LoadModule: "glx"
[    90.333] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    90.424] (II) Module glx: vendor="X.Org Foundation"
[    90.424]     compiled for 1.20.14, module version = 1.0.0
[    90.424]     ABI class: X.Org Server Extension, version 10.0
[    90.424] (II) LoadModule: "nvidia"
[    90.424] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[    90.533] (II) Module nvidia: vendor="NVIDIA Corporation"
[    90.533]     compiled for 4.0.2, module version = 1.0.0
[    90.533]     Module class: X.Org Video Driver
[    90.547] (II) NVIDIA dlloader X Driver  390.144  Wed Jun  2 23:00:51 UTC 2021
[    90.547] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    90.548] (--) Using syscons driver with X support (version 2.0)
[    90.548] (--) using VT number 9

[    90.616] (II) Loading sub module "fb"
[    90.616] (II) LoadModule: "fb"
[    90.616] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[    90.617] (II) Module fb: vendor="X.Org Foundation"
[    90.617]     compiled for 1.20.14, module version = 1.0.0
[    90.617]     ABI class: X.Org ANSI C Emulation, version 0.4
[    90.617] (II) Loading sub module "wfb"
[    90.617] (II) LoadModule: "wfb"
[    90.617] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[    90.625] (II) Module wfb: vendor="X.Org Foundation"
[    90.625]     compiled for 1.20.14, module version = 1.0.0
[    90.626]     ABI class: X.Org ANSI C Emulation, version 0.4
[    90.626] (II) Loading sub module "ramdac"
[    90.626] (II) LoadModule: "ramdac"
[    90.626] (II) Module "ramdac" already built-in
[    90.643] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    90.643] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[    90.643] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[    90.643] (==) NVIDIA(0): RGB weight 888
[    90.643] (==) NVIDIA(0): Default visual is TrueColor
[    90.643] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    90.657] (**) NVIDIA(0): Enabling 2D acceleration
[    90.657] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[    90.657] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[    90.657] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[    90.657] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[    90.657] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
[    91.026] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    91.026] (--) NVIDIA(0):     CRT-0 (boot)
[    91.029] (II) NVIDIA(0): NVIDIA GPU GeForce GT 540M (GF108) at PCI:1:0:0 (GPU-0)
[    91.029] (--) NVIDIA(0): Memory: 1048576 kBytes
[    91.029] (--) NVIDIA(0): VideoBIOS: 70.08.45.00.a1
[    91.029] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    91.030] (--) NVIDIA(GPU-0): CRT-0: connected
[    91.030] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[    91.030] (--) NVIDIA(GPU-0):
[    91.035] (==) NVIDIA(0):
[    91.035] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    91.035] (==) NVIDIA(0):     will be used as the requested mode.
[    91.035] (==) NVIDIA(0):
[    91.035] (II) NVIDIA(0): Validated MetaModes:
[    91.035] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select"
[    91.035] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[    91.043] (WW) NVIDIA(0): CRT-0 does not have an EDID, or its EDID does not contain a
[    91.043] (WW) NVIDIA(0):     maximum image size; cannot compute DPI from CRT-0's EDID.
[    91.043] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[    91.043] (II) NVIDIA: Reserving 6144.00 MB of virtual memory for indirect memory
[    91.043] (II) NVIDIA:     access.
[    91.066] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select"
[    91.147] (==) NVIDIA(0): Disabling shared memory pixmaps
[    91.147] (==) NVIDIA(0): Backing store enabled
[    91.147] (==) NVIDIA(0): Silken mouse enabled
[    91.154] (==) NVIDIA(0): DPMS enabled
[    91.154] (II) Loading sub module "dri2"
[    91.154] (II) LoadModule: "dri2"
[    91.154] (II) Module "dri2" already built-in
[    91.157] (II) NVIDIA(0): [DRI2] Setup complete
[    91.157] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    91.162] (II) Initializing extension Generic Event Extension
[    91.162] (II) Initializing extension SHAPE
[    91.163] (II) Initializing extension MIT-SHM
[    91.163] (II) Initializing extension XInputExtension
[    91.164] (II) Initializing extension XTEST
[    91.164] (II) Initializing extension BIG-REQUESTS
[    91.164] (II) Initializing extension SYNC
[    91.164] (II) Initializing extension XKEYBOARD
[    91.165] (II) Initializing extension XC-MISC
[    91.165] (II) Initializing extension SECURITY
[    91.165] (II) Initializing extension XFIXES
[    91.166] (II) Initializing extension RENDER
[    91.166] (II) Initializing extension RANDR
[    91.166] (II) Initializing extension COMPOSITE
[    91.167] (II) Initializing extension DAMAGE
[    91.167] (II) Initializing extension MIT-SCREEN-SAVER
[    91.168] (II) Initializing extension DOUBLE-BUFFER
[    91.168] (II) Initializing extension RECORD
[    91.168] (II) Initializing extension DPMS
[    91.168] (II) Initializing extension Present
[    91.169] (II) Initializing extension DRI3
[    91.169] (II) Initializing extension X-Resource
[    91.169] (II) Initializing extension XVideo
[    91.169] (II) Initializing extension XVideo-MotionCompensation
[    91.169] (II) Initializing extension GLX
[    91.169] (II) AIGLX: Screen 0 is not DRI2 capable
[    93.509] (II) IGLX: Loaded and initialized swrast
[    93.509] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[    93.509] (II) Initializing extension XFree86-VidModeExtension
[    93.509] (II) Initializing extension XFree86-DGA
[    93.509] (II) Initializing extension XFree86-DRI
[    93.510] (II) Initializing extension DRI2
[    93.510] (II) Initializing extension NV-GLX
[    93.510] (II) Initializing extension NV-CONTROL
[    93.510] (II) Initializing extension XINERAMA
[    94.047] (II) config/devd: probing input devices...
[    94.048] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device atkbd0
[    94.048] (II) config/devd: detected event input: System mouse, bustype=0006, vendor=0000, product=0000, version=0000
[    94.048] (II) config/devd: adding input device /dev/input/event0
[    94.048] (**) System mouse: Applying InputClass "evdev pointer catchall"
[    94.048] (**) System mouse: Applying InputClass "libinput pointer catchall"
[    94.048] (II) LoadModule: "libinput"
[    94.062] (II) Loading /usr/local/lib/xorg/modules/input/libinput_drv.so
[    94.194] (II) Module libinput: vendor="X.Org Foundation"
[    94.194]     compiled for 1.20.14, module version = 0.30.0
[    94.194]     Module class: X.Org XInput Driver
[    94.194]     ABI class: X.Org XInput driver, version 24.1
[    94.194] (II) Using input driver 'libinput' for 'System mouse'
[    94.195] (**) System mouse: always reports core events
[    94.195] (**) Option "Device" "/dev/input/event0"
[    94.195] (**) Option "_source" "server/devd"
[    94.305] (II) event0  - System mouse: is tagged by udev as: Mouse
[    94.306] (II) event0  - System mouse: device is a pointer
[    94.309] (II) event0  - System mouse: device removed
[    94.309] (**) Option "config_info" "devd:/dev/input/event0"
[    94.309] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 6)
[    94.309] (**) Option "AccelerationScheme" "none"
[    94.309] (**) System mouse: (accel) selected scheme none/0
[    94.309] (**) System mouse: (accel) acceleration factor: 2.000
[    94.309] (**) System mouse: (accel) acceleration threshold: 4
[    94.312] (II) event0  - System mouse: is tagged by udev as: Mouse
[    94.314] (II) event0  - System mouse: device is a pointer
[    94.315] (II) config/devd: detected event input: System keyboard multiplexer, bustype=0006, vendor=0000, product=0000, version=0000
[    94.315] (II) config/devd: adding input device /dev/input/event1
[    94.315] (**) System keyboard multiplexer: Applying InputClass "evdev keyboard catchall"
[    94.315] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[    94.315] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
[    94.315] (II) Using input driver 'libinput' for 'System keyboard multiplexer'
[    94.315] (**) System keyboard multiplexer: always reports core events
[    94.315] (**) Option "Device" "/dev/input/event1"
[    94.315] (**) Option "_source" "server/devd"
[    94.318] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[    94.319] (II) event1  - System keyboard multiplexer: device is a keyboard
[    94.322] (II) event1  - System keyboard multiplexer: device removed
[    94.322] (**) Option "config_info" "devd:/dev/input/event1"
[    94.322] (II) XINPUT: Adding extended input device "System keyboard multiplexer" (type: KEYBOARD, id 7)
[    94.322] (**) Option "xkb_rules" "evdev"
[    94.379] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[    94.380] (II) event1  - System keyboard multiplexer: device is a keyboard
[    94.382] (II) config/devd: detected event input: Control Method Lid Switch, bustype=0019, vendor=0000, product=0000, version=0001
[    94.383] (II) config/devd: adding input device /dev/input/event2
[    94.383] (II) No input driver specified, ignoring this device.
[    94.383] (II) This device may have been added with another device file.
[    94.383] (EE) config/devd: error 1 adding device /dev/input/event2
[    94.383] (II) config/devd: detected event input: Sleep Button, bustype=0019, vendor=0000, product=0000, version=0001
[    94.383] (II) config/devd: adding input device /dev/input/event3
[    94.383] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[    94.383] (**) Sleep Button: Applying InputClass "Evdev keyboard"
[    94.383] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[    94.383] (II) Using input driver 'libinput' for 'Sleep Button'
[    94.383] (**) Sleep Button: always reports core events
[    94.383] (**) Option "Device" "/dev/input/event3"
[    94.383] (**) Option "_source" "server/devd"
[    94.385] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[    94.386] (II) event3  - Sleep Button: device is a keyboard
[    94.388] (II) event3  - Sleep Button: device removed
[    94.388] (**) Option "config_info" "devd:/dev/input/event3"
[    94.388] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 8)
[    94.388] (**) Option "xkb_rules" "evdev"
[    94.391] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[    94.392] (II) event3  - Sleep Button: device is a keyboard
[    94.394] (II) config/devd: detected event input: AT keyboard, bustype=0011, vendor=0001, product=0001, version=0000
[    94.394] (II) config/devd: adding input device /dev/input/event4
[    94.394] (**) AT keyboard: Applying InputClass "evdev keyboard catchall"
[    94.394] (**) AT keyboard: Applying InputClass "Evdev keyboard"
[    94.394] (**) AT keyboard: Applying InputClass "libinput keyboard catchall"
[    94.394] (II) Using input driver 'libinput' for 'AT keyboard'
[    94.394] (**) AT keyboard: always reports core events
[    94.394] (**) Option "Device" "/dev/input/event4"
[    94.394] (**) Option "_source" "server/devd"
[    94.396] (II) event4  - AT keyboard: is tagged by udev as: Keyboard
[    94.397] (II) event4  - AT keyboard: device is a keyboard
[    94.402] (II) event4  - AT keyboard: device removed
[    94.402] (**) Option "config_info" "devd:/dev/input/event4"
[    94.402] (II) XINPUT: Adding extended input device "AT keyboard" (type: KEYBOARD, id 9)
[    94.402] (**) Option "xkb_rules" "evdev"
[    94.405] (II) event4  - AT keyboard: is tagged by udev as: Keyboard
[    94.406] (II) event4  - AT keyboard: device is a keyboard
[    94.412] (II) config/devd: detected event input: IntelliMouse Explorer, bustype=0011, vendor=0002, product=0001, version=0000
[    94.412] (II) config/devd: adding input device /dev/input/event5
[    94.412] (**) IntelliMouse Explorer: Applying InputClass "evdev pointer catchall"
[    94.412] (**) IntelliMouse Explorer: Applying InputClass "libinput pointer catchall"
[    94.412] (II) Using input driver 'libinput' for 'IntelliMouse Explorer'
[    94.412] (**) IntelliMouse Explorer: always reports core events
[    94.412] (**) Option "Device" "/dev/input/event5"
[    94.412] (**) Option "_source" "server/devd"
[    94.415] (II) event5  - IntelliMouse Explorer: is tagged by udev as: Mouse
[    94.416] (II) event5  - IntelliMouse Explorer: device is a pointer
[    94.419] (II) event5  - IntelliMouse Explorer: device removed
[    94.419] (**) Option "config_info" "devd:/dev/input/event5"
[    94.419] (II) XINPUT: Adding extended input device "IntelliMouse Explorer" (type: MOUSE, id 10)
[    94.419] (**) Option "AccelerationScheme" "none"
[    94.419] (**) IntelliMouse Explorer: (accel) selected scheme none/0
[    94.419] (**) IntelliMouse Explorer: (accel) acceleration factor: 2.000
[    94.419] (**) IntelliMouse Explorer: (accel) acceleration threshold: 4
[    94.422] (II) event5  - IntelliMouse Explorer: is tagged by udev as: Mouse
[    94.424] (II) event5  - IntelliMouse Explorer: device is a pointer
[    94.427] (II) config/devd: detected event input: A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1, bustype=0003, vendor=09da, product=9090, version=0000
[    94.427] (II) config/devd: adding input device /dev/input/event6
[    94.427] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: Applying InputClass "evdev keyboard catchall"
[    94.427] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: Applying InputClass "Evdev keyboard"
[    94.427] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: Applying InputClass "libinput keyboard catchall"
[    94.427] (II) Using input driver 'libinput' for 'A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1'
[    94.427] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: always reports core events
[    94.427] (**) Option "Device" "/dev/input/event6"
[    94.427] (**) Option "_source" "server/devd"
[    94.429] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: is tagged by udev as: Keyboard
[    94.430] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device is a keyboard
[    94.434] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device removed
[    94.434] (**) Option "config_info" "devd:/dev/input/event6"
[    94.434] (II) XINPUT: Adding extended input device "A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1" (type: KEYBOARD, id 11)
[    94.434] (**) Option "xkb_rules" "evdev"
[    94.437] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: is tagged by udev as: Keyboard
[    94.438] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device is a keyboard
[    94.441] (II) config/devd: detected event input: A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1, bustype=0003, vendor=09da, product=9090, version=0000
[    94.441] (II) config/devd: adding input device /dev/input/event7
[    94.441] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: Applying InputClass "evdev pointer catchall"
[    94.441] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: Applying InputClass "libinput pointer catchall"
[    94.441] (II) Using input driver 'libinput' for 'A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1'
[    94.441] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: always reports core events
[    94.441] (**) Option "Device" "/dev/input/event7"
[    94.441] (**) Option "_source" "server/devd"
[    94.444] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: is tagged by udev as: Mouse
[    94.446] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device is a pointer
[    94.449] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device removed
[    94.449] (**) Option "config_info" "devd:/dev/input/event7"
[    94.449] (II) XINPUT: Adding extended input device "A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1" (type: MOUSE, id 12)
[    94.449] (**) Option "AccelerationScheme" "none"
[    94.449] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: (accel) selected scheme none/0
[    94.449] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: (accel) acceleration factor: 2.000
[    94.449] (**) A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: (accel) acceleration threshold: 4
[    94.452] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: is tagged by udev as: Mouse
[    94.453] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device is a pointer
[    94.456] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device kbdmux0
[    94.456] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device psm0
[    94.456] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device sysmouse
[    94.456] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device ukbd0
[    94.456] (II) config/devd: EVDEV_SUPPORT is enabled, ignoring device ums0
[    95.870] (II) event0  - System mouse: device removed
[    95.870] (II) event1  - System keyboard multiplexer: device removed
[    95.870] (II) event3  - Sleep Button: device removed
[    95.870] (II) event4  - AT keyboard: device removed
[    95.870] (II) event5  - IntelliMouse Explorer: device removed
[    95.870] (II) event6  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device removed
[    95.870] (II) event7  - A4TECH USB Device, class 0/0, rev 1.10/1.03, addr 1: device removed
 
I'm having the same problem.

The Xorg log below is via Nvidia driver version 390. If I try to use 470, Xorg startx, but it just hangs only showing a blank screen and a cursor.

Code:
[   150.992]
X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
[   150.992] Build Operating System: FreeBSD 13.0-RELEASE-p11 amd64
[   150.992] Current Operating System: FreeBSD unix 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac22
12 GENERIC amd64
[   150.993] Build Date: 28 April 2022  01:58:04AM
[   150.993]
[   150.993] Current version of pixman: 0.40.0
[   150.993]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   150.993] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   150.994] (==) Log file: "/var/log/Xorg.0.log", Time: Wed May 18 13:52:04 2022
[   150.994] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   150.994] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   150.996] (==) No Layout section.  Using the first Screen section.
[   150.996] (**) |-->Screen "Screen0" (0)
[   150.996] (**) |   |-->Monitor "<default monitor>"
[   150.998] (**) |   |-->Device "Card0"
[   150.999] (**) |   |-->GPUDevice "NVIDIA Card"
[   150.999] (==) No monitor specified for screen "Screen0".
        Using a default monitor configuration.
[   150.999] (==) Automatically adding devices
[   150.999] (==) Automatically enabling devices
[   150.999] (==) Not automatically adding GPU devices
[   150.999] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   150.999] (==) 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
[   150.999] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   150.999] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[   150.999] (II) Loader magic: 0x435f60
[   150.999] (II) Module ABI versions:
[   150.999]    X.Org ANSI C Emulation: 0.4
[   150.999]    X.Org Video Driver: 24.1
[   150.999]    X.Org XInput driver : 24.1
[   150.999]    X.Org Server Extension : 10.0
[   150.999] (--) PCI:*(0@0:2:0) 8086:3e9b:1028:087c rev 0, Mem @ 0xeb000000/16777216, 0x80000000/268435456, I/O @
0x00004000/64, BIOS @ 0x????????/65536
[   150.999] (--) PCI: (1@0:0:0) 10de:1c8c:1028:087c rev 161, Mem @ 0xec000000/16777216, 0xc0000000/268435456, 0xd0
000000/33554432, I/O @ 0x00003000/128
[   151.000] (II) LoadModule: "glx"
[   151.000] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   151.012] (II) Module glx: vendor="NVIDIA Corporation"
[   151.012]    compiled for 4.0.2, module version = 1.0.0
[   151.012]    Module class: X.Org Server Extension
[   151.012] (II) NVIDIA GLX Module  390.144  Wed Jun  2 22:59:08 UTC 2021
[   151.012] (II) LoadModule: "modesetting"
[   151.012] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so

[   151.012] (II) Module modesetting: vendor="X.Org Foundation"
[   151.012]    compiled for 1.20.14, module version = 1.20.14
[   151.012]    Module class: X.Org Video Driver
[   151.012]    ABI class: X.Org Video Driver, version 24.1
[   151.012] (II) LoadModule: "nvidia"
[   151.012] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[   151.012] (II) Module nvidia: vendor="NVIDIA Corporation"
[   151.012]    compiled for 4.0.2, module version = 1.0.0
[   151.012]    Module class: X.Org Video Driver
[   151.012] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   151.012] (II) NVIDIA dlloader X Driver  390.144  Wed Jun  2 23:00:51 UTC 2021
[   151.012] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   151.013] (--) Using syscons driver with X support (version 2.0)
[   151.013] (--) using VT number 9

[   151.013] (EE) open /dev/dri/card0: No such file or directory
[   151.013] (WW) Falling back to old probe method for modesetting
[   151.013] (EE) open /dev/dri/card0: No such file or directory
[   151.013] (II) Loading sub module "fb"
[   151.013] (II) LoadModule: "fb"
[   151.013] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[   151.014] (II) Module fb: vendor="X.Org Foundation"
[   151.014]    compiled for 1.20.14, module version = 1.0.0
[   151.014]    ABI class: X.Org ANSI C Emulation, version 0.4
[   151.014] (II) Loading sub module "wfb"
[   151.014] (II) LoadModule: "wfb"
[   151.014] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[   151.014] (II) Module wfb: vendor="X.Org Foundation"
[   151.014]    compiled for 1.20.14, module version = 1.0.0
[   151.014]    ABI class: X.Org ANSI C Emulation, version 0.4
[   151.014] (II) Loading sub module "ramdac"
[   151.014] (II) LoadModule: "ramdac"
[   151.014] (II) Module "ramdac" already built-in
[   151.014] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   151.014] (EE) Screen 0 deleted because of no matching config section.
[   151.014] (II) UnloadModule: "modesetting"
[   151.014] (EE) Screen 0 deleted because of no matching config section.
[   151.014] (II) UnloadModule: "nvidia"
[   151.014] (II) UnloadSubModule: "wfb"
[   151.014] (II) UnloadSubModule: "fb"
[   151.014] (EE) Device(s) detected, but none match those in the config file.
[   151.014] (EE)
Fatal server error:
[   151.014] (EE) no screens found(EE)
[   151.014] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[   151.014] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   151.014] (EE)
[   151.015] (EE) Server terminated with error (1). Closing log file.

This is the message I receive from driver 470. Main concern being "this system is not supported by the 340.108 NVIDIA FreeBSD graphics driver release."

Code:
nvidia0: <Unknown> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
NVRM: The NVIDIA GPU 01:00 (PCI ID: 10de:1c8c) installed
NVRM: in this system is not supported by the 340.108 NVIDIA FreeBSD
NVRM: graphics driver release.  Please see 'Appendix A -
NVRM: Supported NVIDIA GPU Products' in this release's README,
NVRM: available on the FreeBSD graphics driver download page at
NVRM: www.nvidia.com.   
nvidia0: NVRM: NVIDIA driver attach failed.     
device_attach: nvidia0 attach returned 6
 
Code:
[   151.014] (EE) Screen 0 deleted because of no matching config section.
[snipped]
[   151.014] (EE) Device(s) detected, but none match those in the config file.

Could you share your xorg.conf?
 
Code:
[   151.014] (EE) Screen 0 deleted because of no matching config section.
[snipped]
[   151.014] (EE) Device(s) detected, but none match those in the config file.

Could you share your xorg.conf?

Hi bkouhi , see below.


/usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf

Code:
Section "Device"
        Identifier "Card0"
        Driver     "nvidia"
        BusID      "PCI:1:0:0"
EndSection


With and without the following config, I still receive the blank screen/cursor at launch of startx

/usr/local/etc/X11/xorg.conf.d/screen-resolution.conf

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