# How to avoid Optimus on a Dell XPS L502X?



## Meinold (Aug 12, 2021)

*Edit:* When I started this thread I didn’t know that Optimus was the true cause of my Xorg problems. Now I am hoping to be able to make Xorg work without Optimus…

Hello,

I am aware that other users before me seem to have had the same problem but unfortunately I was not able to solve it with the information I studied…

I have a fresh installation of FreeBSD 13.0-RELEASE:
`uname -a`

```
FreeBSD localhost 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
```

I am unable to run Xorg successfully. Xorg does start but I get a black screen with a cursor in the top left corner. It looks exactly as shown in this thread:









						Xorg Nvidia blank screen Thinkpad T460p
					

I installed FreeBSD 11.0-RELEASE on my new laptop last night and I've been unsuccessful in getting twm started up with startx. Everything is installed via pkg.  loader.conf:  geom_eli_load="YES" vfs.root.mountfrom="ufs:ada0p3.eli"  if_iwm_load="YES" iwm8000Cfw_load="YES"   rc.conf...




					forums.freebsd.org
				




My machine is a laptop: Dell XPS L502X
Two graphic cards are present:
`pciconf -lv`

```
vgapci1@pci0:0:2:0:    class=0x030000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x0116 subvendor=0x1028 subdevice=0x050e
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family Integrated Graphics Controller'
    class      = display
    subclass   = VGA
vgapci0@pci0:1:0:0:    class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x0df4 subvendor=0x1028 subdevice=0x050e
    vendor     = 'NVIDIA Corporation'
    device     = 'GF108M [GeForce GT 540M]'
    class      = display
    subclass   = VGA
```

The machine boots in BIOS mode:
`sysctl machdep.bootmethod`

```
machdep.bootmetho: BIOS
```

I do use the nvidia-driver-390-390.143_1 as is recommended for the GT 540M by NVIDIA.

Here are my relevant configuration files:

/etc/rc.conf

```
clear_tmp_enable="YES"
clean_tmp_X=YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
fsck_y_enable="YES"
swapexd_enable=YES"
mixer_enable="YES"
snddetect_enable="YES"
hostname="localhost"
keymap="de.kbd"
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
ntpdate_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
powerd_enable="YES"
powerd_flags="-b adaptive -a hiadaptive"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"
pflog_flags=""
microcode_update_enable="YES"
dbus_enable="YES"
hald_enable="YES"
avahi_daemon_enable="YES"
linux_load="YES"
kld_list="geom_eli fusefs coretemp cpuctl nvidia-modeset"
```

/usr/local/etc/X11/xorg.conf.d/card.conf

```
Section "device"
    Identifier "Card0"
    BusID "PCI:1:0:0"
    Option "DPMS"
    VendorName "NVIDIA Corporation
    Driver "nvidia"
EndSection
```

/usr/local/etc/X11/xorg.conf.d/keyboard.conf

```
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "de"
    Option "XkbVariant" "neo"
    Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection
```

/usr/local/etc/X11/xorg.conf.d/flags.conf

```
Section "ServerFlags"
    Option "DontZap" "off"
EndSection
```

`nvidia-xconfig` generates the following /etc/X11/xorg.conf (which I tried seperately instead of the aforementioned configuration files with no improvement)

```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 460.73.01

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    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"
    BusID    "PCI:1:0:0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
```

/var/log/Xorg.0.log

```
[   728.334]
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[   728.334] Build Operating System: FreeBSD 13.0-RELEASE-p3 amd64
[   728.334] Current Operating System: FreeBSD adelheid 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[   728.335] Build Date: 04 July 2021  07:24:23AM
[   728.335]
[   728.335] Current version of pixman: 0.40.0
[   728.335]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   728.335] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   728.335] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug 12 09:27:22 2021
[   728.339] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   728.339] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   728.342] (==) No Layout section.  Using the first Screen section.
[   728.342] (==) No screen section available. Using defaults.
[   728.342] (**) |-->Screen "Default Screen Section" (0)
[   728.342] (**) |   |-->Monitor "<default monitor>"
[   728.344] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   728.344] (**) |   |-->Device "NVIDIA Card0"
[   728.344] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   728.344] (**) Option "DontZap" "off"
[   728.344] (==) Automatically adding devices
[   728.344] (==) Automatically enabling devices
[   728.344] (==) Not automatically adding GPU devices
[   728.344] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   728.345] (WW) The directory "/usr/local/share/fonts/misc/" does not exist.
[   728.345]     Entry deleted from font path.
[   728.346] (WW) The directory "/usr/local/share/fonts/Type1/" does not exist.
[   728.347]     Entry deleted from font path.
[   728.347] (WW) The directory "/usr/local/share/fonts/100dpi/" does not exist.
[   728.347]     Entry deleted from font path.
[   728.347] (WW) The directory "/usr/local/share/fonts/75dpi/" does not exist.
[   728.347]     Entry deleted from font path.
[   728.347] (==) FontPath set to:
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    catalogue:/usr/local/etc/X11/fontpath.d
[   728.347] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   728.347] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   728.347] (II) Loader magic: 0x435a90
[   728.347] (II) Module ABI versions:
[   728.347]     X.Org ANSI C Emulation: 0.4
[   728.347]     X.Org Video Driver: 24.1
[   728.347]     X.Org XInput driver : 24.1
[   728.347]     X.Org Server Extension : 10.0
[   728.348] (!!) More than one possible primary device found
[   728.348] (--) PCI: (0@0:2:0) 8086:0116:1028:050e rev 9, Mem @ 0xf1400000/4194304, 0xe0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/65536
[   728.348] (--) PCI: (1@0:0:0) 10de:0df4:1028:050e rev 161, Mem @ 0xf0000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/65536
[   728.349] (II) LoadModule: "glx"
[   728.350] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   728.582] (II) Module glx: vendor="NVIDIA Corporation"
[   728.582]     compiled for 4.0.2, module version = 1.0.0
[   728.582]     Module class: X.Org Server Extension
[   728.582] (II) NVIDIA GLX Module  390.143  Fri Mar 12 07:20:16 UTC 2021
[   728.583] (II) LoadModule: "nvidia"
[   728.583] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[   728.595] (II) Module nvidia: vendor="NVIDIA Corporation"
[   728.596]     compiled for 4.0.2, module version = 1.0.0
[   728.596]     Module class: X.Org Video Driver
[   728.597] (II) NVIDIA dlloader X Driver  390.143  Fri Mar 12 07:22:21 UTC 2021
[   728.597] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   728.598] (--) Using syscons driver with X support (version 2.0)
[   728.598] (--) using VT number 9

[   728.625] (II) Loading sub module "fb"
[   728.625] (II) LoadModule: "fb"
[   728.625] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[   728.627] (II) Module fb: vendor="X.Org Foundation"
[   728.627]     compiled for 1.20.11, module version = 1.0.0
[   728.627]     ABI class: X.Org ANSI C Emulation, version 0.4
[   728.627] (II) Loading sub module "wfb"
[   728.627] (II) LoadModule: "wfb"
[   728.627] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[   728.629] (II) Module wfb: vendor="X.Org Foundation"
[   728.629]     compiled for 1.20.11, module version = 1.0.0
[   728.629]     ABI class: X.Org ANSI C Emulation, version 0.4
[   728.629] (II) Loading sub module "ramdac"
[   728.629] (II) LoadModule: "ramdac"
[   728.629] (II) Module "ramdac" already built-in
[   728.633] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   728.633] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[   728.633] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   728.633] (==) NVIDIA(0): RGB weight 888
[   728.633] (==) NVIDIA(0): Default visual is TrueColor
[   728.633] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   728.635] (**) NVIDIA(0): Enabling 2D acceleration
[   729.139] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[   729.139] (--) NVIDIA(0):     CRT-0 (boot)
[   729.139] (--) NVIDIA(0):     DFP-0
[   729.142] (II) NVIDIA(0): NVIDIA GPU GeForce GT 540M (GF108) at PCI:1:0:0 (GPU-0)
[   729.142] (--) NVIDIA(0): Memory: 2097152 kBytes
[   729.142] (--) NVIDIA(0): VideoBIOS: 70.08.44.00.11
[   729.142] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[   729.145] (--) NVIDIA(GPU-0): CRT-0: connected
[   729.145] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[   729.145] (--) NVIDIA(GPU-0):
[   729.146] (--) NVIDIA(GPU-0): DFP-0: disconnected
[   729.146] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[   729.146] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[   729.146] (--) NVIDIA(GPU-0):
[   729.150] (==) NVIDIA(0):
[   729.150] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[   729.150] (==) NVIDIA(0):     will be used as the requested mode.
[   729.150] (==) NVIDIA(0):
[   729.150] (II) NVIDIA(0): Validated MetaModes:
[   729.151] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select"
[   729.151] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[   729.157] (WW) NVIDIA(0): CRT-0 does not have an EDID, or its EDID does not contain a
[   729.157] (WW) NVIDIA(0):     maximum image size; cannot compute DPI from CRT-0's EDID.
[   729.157] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[   729.158] (II) NVIDIA: Reserving 6144.00 MB of virtual memory for indirect memory
[   729.158] (II) NVIDIA:     access.
[   729.302] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select"
[   729.347] (==) NVIDIA(0): Disabling shared memory pixmaps
[   729.347] (==) NVIDIA(0): Backing store enabled
[   729.347] (==) NVIDIA(0): Silken mouse enabled
[   729.350] (**) NVIDIA(0): DPMS enabled
[   729.351] (II) Loading sub module "dri2"
[   729.351] (II) LoadModule: "dri2"
[   729.351] (II) Module "dri2" already built-in
[   729.352] (II) NVIDIA(0): [DRI2] Setup complete
[   729.352] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[   729.353] (II) Initializing extension Generic Event Extension
[   729.354] (II) Initializing extension SHAPE
[   729.354] (II) Initializing extension MIT-SHM
[   729.355] (II) Initializing extension XInputExtension
[   729.356] (II) Initializing extension XTEST
[   729.356] (II) Initializing extension BIG-REQUESTS
[   729.356] (II) Initializing extension SYNC
[   729.357] (II) Initializing extension XKEYBOARD
[   729.357] (II) Initializing extension XC-MISC
[   729.358] (II) Initializing extension SECURITY
[   729.358] (II) Initializing extension XFIXES
[   729.358] (II) Initializing extension RENDER
[   729.359] (II) Initializing extension RANDR
[   729.359] (II) Initializing extension COMPOSITE
[   729.360] (II) Initializing extension DAMAGE
[   729.360] (II) Initializing extension MIT-SCREEN-SAVER
[   729.361] (II) Initializing extension DOUBLE-BUFFER
[   729.361] (II) Initializing extension RECORD
[   729.362] (II) Initializing extension DPMS
[   729.362] (II) Initializing extension Present
[   729.362] (II) Initializing extension DRI3
[   729.362] (II) Initializing extension X-Resource
[   729.362] (II) Initializing extension XVideo
[   729.362] (II) Initializing extension XVideo-MotionCompensation
[   729.362] (II) Initializing extension XFree86-VidModeExtension
[   729.363] (II) Initializing extension XFree86-DGA
[   729.363] (II) Initializing extension XFree86-DRI
[   729.363] (II) Initializing extension DRI2
[   729.364] (II) Initializing extension GLX
[   729.364] (II) Initializing extension GLX
[   729.364] (II) Indirect GLX disabled.
[   729.364] (II) Initializing extension NV-GLX
[   729.364] (II) Initializing extension NV-CONTROL
[   729.364] (II) Initializing extension XINERAMA
[   729.462] (II) config/udev: Adding input device System mouse (/dev/input/event0)
[   729.463] (**) System mouse: Applying InputClass "libinput pointer catchall"
[   729.463] (II) LoadModule: "libinput"
[   729.463] (II) Loading /usr/local/lib/xorg/modules/input/libinput_drv.so
[   729.504] (II) Module libinput: vendor="X.Org Foundation"
[   729.504]     compiled for 1.20.11, module version = 0.30.0
[   729.504]     Module class: X.Org XInput Driver
[   729.504]     ABI class: X.Org XInput driver, version 24.1
[   729.505] (II) Using input driver 'libinput' for 'System mouse'
[   729.505] (**) System mouse: always reports core events
[   729.505] (**) Option "Device" "/dev/input/event0"
[   729.505] (**) Option "_source" "server/udev"
[   729.519] (II) event0  - System mouse: is tagged by udev as: Mouse
[   729.519] (II) event0  - System mouse: device is a pointer
[   729.520] (II) event0  - System mouse: device removed
[   729.520] (**) Option "config_info" "udev:/dev/input/event0"
[   729.520] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 6)
[   729.520] (**) Option "AccelerationScheme" "none"
[   729.520] (**) System mouse: (accel) selected scheme none/0
[   729.520] (**) System mouse: (accel) acceleration factor: 2.000
[   729.520] (**) System mouse: (accel) acceleration threshold: 4
[   729.521] (II) event0  - System mouse: is tagged by udev as: Mouse
[   729.521] (II) event0  - System mouse: device is a pointer
[   729.521] (II) config/udev: Adding input device System keyboard multiplexer (/dev/input/event1)
[   729.521] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[   729.521] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
[   729.521] (II) Using input driver 'libinput' for 'System keyboard multiplexer'
[   729.521] (**) System keyboard multiplexer: always reports core events
[   729.521] (**) Option "Device" "/dev/input/event1"
[   729.521] (**) Option "_source" "server/udev"
[   729.522] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[   729.522] (II) event1  - System keyboard multiplexer: device is a keyboard
[   729.522] (II) event1  - System keyboard multiplexer: device removed
[   729.522] (**) Option "config_info" "udev:/dev/input/event1"
[   729.522] (II) XINPUT: Adding extended input device "System keyboard multiplexer" (type: KEYBOARD, id 7)
[   729.522] (**) Option "xkb_rules" "evdev"
[   729.556] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[   729.556] (II) event1  - System keyboard multiplexer: device is a keyboard
[   729.556] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[   729.556] (**) Power Button: Applying InputClass "Evdev keyboard"
[   729.556] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[   729.556] (II) Using input driver 'libinput' for 'Power Button'
[   729.556] (**) Power Button: always reports core events
[   729.556] (**) Option "Device" "/dev/input/event2"
[   729.556] (**) Option "_source" "server/udev"
[   729.557] (II) event2  - Power Button: is tagged by udev as: Keyboard
[   729.557] (II) event2  - Power Button: device is a keyboard
[   729.557] (II) event2  - Power Button: device removed
[   729.557] (**) Option "config_info" "udev:/dev/input/event2"
[   729.557] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
[   729.557] (**) Option "xkb_rules" "evdev"
[   729.558] (II) event2  - Power Button: is tagged by udev as: Keyboard
[   729.558] (II) event2  - Power Button: device is a keyboard
[   729.558] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[   729.558] (**) Sleep Button: Applying InputClass "Evdev keyboard"
[   729.558] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[   729.558] (II) Using input driver 'libinput' for 'Sleep Button'
[   729.558] (**) Sleep Button: always reports core events
[   729.558] (**) Option "Device" "/dev/input/event3"
[   729.558] (**) Option "_source" "server/udev"
[   729.559] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[   729.559] (II) event3  - Sleep Button: device is a keyboard
[   729.559] (II) event3  - Sleep Button: device removed
[   729.559] (**) Option "config_info" "udev:/dev/input/event3"
[   729.559] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 9)
[   729.559] (**) Option "xkb_rules" "evdev"
[   729.560] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[   729.560] (II) event3  - Sleep Button: device is a keyboard
[   729.560] (II) config/udev: Adding input device Control Method Lid Switch (/dev/input/event4)
[   729.560] (II) No input driver specified, ignoring this device.
[   729.560] (II) This device may have been added with another device file.
[   729.560] (II) config/udev: Adding input device AT keyboard (/dev/input/event5)
[   729.560] (**) AT keyboard: Applying InputClass "Evdev keyboard"
[   729.560] (**) AT keyboard: Applying InputClass "libinput keyboard catchall"
[   729.560] (II) Using input driver 'libinput' for 'AT keyboard'
[   729.560] (**) AT keyboard: always reports core events
[   729.560] (**) Option "Device" "/dev/input/event5"
[   729.560] (**) Option "_source" "server/udev"
[   729.561] (II) event5  - AT keyboard: is tagged by udev as: Keyboard
[   729.561] (II) event5  - AT keyboard: device is a keyboard
[   729.561] (II) event5  - AT keyboard: device removed
[   729.561] (**) Option "config_info" "udev:/dev/input/event5"
[   729.561] (II) XINPUT: Adding extended input device "AT keyboard" (type: KEYBOARD, id 10)
[   729.561] (**) Option "xkb_rules" "evdev"
[   729.562] (II) event5  - AT keyboard: is tagged by udev as: Keyboard
[   729.562] (II) event5  - AT keyboard: device is a keyboard
[   729.562] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event6)
[   729.562] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput pointer catchall"
[   729.562] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[   729.562] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[   729.562] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons"
[   729.562] (II) LoadModule: "synaptics"
[   729.563] (II) Loading /usr/local/lib/xorg/modules/input/synaptics_drv.so
[   729.564] (II) Module synaptics: vendor="X.Org Foundation"
[   729.564]     compiled for 1.20.11, module version = 1.9.1
[   729.564]     Module class: X.Org XInput Driver
[   729.564]     ABI class: X.Org XInput driver, version 24.1
[   729.564] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad'
[   729.564] (**) SynPS/2 Synaptics TouchPad: always reports core events
[   729.564] (**) Option "Device" "/dev/input/event6"
[   729.713] (II) synaptics: SynPS/2 Synaptics TouchPad: ignoring touch events for semi-multitouch device
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5398 (res 42)
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4728 (res 70)
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left right double triple
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product 0x7
[   729.713] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[   729.713] (**) SynPS/2 Synaptics TouchPad: always reports core events
[   729.750] (**) Option "config_info" "udev:/dev/input/event6"
[   729.750] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 11)
[   729.750] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MinSpeed is now constant deceleration 2.5
[   729.750] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MaxSpeed is now 1.75
[   729.750] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) AccelFactor is now 0.039
[   729.750] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
[   729.750] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 1
[   729.750] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[   729.750] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[   729.814] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[   732.420] (II) event0  - System mouse: device removed
[   732.421] (II) event1  - System keyboard multiplexer: device removed
[   732.421] (II) event2  - Power Button: device removed
[   732.421] (II) event3  - Sleep Button: device removed
[   732.421] (II) event5  - AT keyboard: device removed
```

When I have Xorg running with the black screen and then switch to another TTY and back again, the black screen is disappeared. Xorg is still running as you can see above but another error message is shown:

```
ACPI Warning: \_SB.PCI0.PEG0.PEGP._dsm: ACPI Warning: \_SB.PCI0.PEG0.PEGP._dsm: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20201113/nsarguments-212)
Aug 12 09:27:23 localhost kernel: nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device VGA-0
```

I appreciate any help very much.


----------



## SirDice (Aug 12, 2021)

You may have a system that uses Optimus. In which case you might need x11/nvidia-hybrid-graphics



Meinold said:


> /usr/local/etc/X11/xorg.conf.d.card





Meinold said:


> /usr/local/etc/X11/xorg.conf.d.keyboard





Meinold said:


> /usr/local/etc/X11/xorg.conf.d.flags


Are those typos? /usr/local/etc/X11/xorg.conf.d/ is a _directory_. 




Meinold said:


> `nvidia-xconfig` generates the following /etc/X11/xorg.conf (which I tried with no improvement)


Yeah, remove that, you don't need it. It's the old way of configuring Xorg.


----------



## Meinold (Aug 12, 2021)

SirDice said:


> You may have a system that uses Optimus. In which case you might need x11/nvidia-hybrid-graphics


I will try it and report back!



> Are those typos?


Those were indeed typos. I corrected them in my post. Sorry for that!


----------



## Meinold (Aug 12, 2021)

I have now removed nvidia-driver-390-390.143_1 and installed nvidia-hybrid-graphics-390-0.5. To the /etc/rc.conf I have added `nvidia_xorg_enable="YES"`. And finally I have set in /usr/local/etc/X11/xorg.conf.d/card.conf the driver to `Driver nvidia_xorg`. Is that the right driver name?

After a reboot `dmesg` reports the following:


```
nvidia0: <GeForce GT 540M> on vgapci0
vgapci0: child nividia0 requested pci_enable_io
vgapci0: child nividia0 requested pci_enable_io
ACPI Warning: \134_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20201113/nsarguments-212)
nvidia0:detached
nvidia0: <GeForce GT 540M> on vgapci0
vgapci0: child nividia0 requested pci_enable_io
vgapci0: child nividia0 requested pci_enable_io
```

And Xorg does not start now (perhaps due to my wrong driver name in the card.conf).

/var/log/Xorg.0.log

```
[  1391.105]
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[  1391.105] Build Operating System: FreeBSD 13.0-RELEASE-p3 amd64
[  1391.105] Current Operating System: FreeBSD adelheid 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[  1391.106] Build Date: 04 July 2021  07:24:23AM
[  1391.106]
[  1391.106] Current version of pixman: 0.40.0
[  1391.106]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  1391.106] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1391.106] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug 12 14:24:46 2021
[  1391.107] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[  1391.107] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  1391.107] (==) No Layout section.  Using the first Screen section.
[  1391.107] (==) No screen section available. Using defaults.
[  1391.107] (**) |-->Screen "Default Screen Section" (0)
[  1391.107] (**) |   |-->Monitor "<default monitor>"
[  1391.108] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[  1391.108] (**) |   |-->Device "NVIDIA Card0"
[  1391.108] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[  1391.108] (**) Option "DontZap" "off"
[  1391.108] (==) Automatically adding devices
[  1391.108] (==) Automatically enabling devices
[  1391.108] (==) Not automatically adding GPU devices
[  1391.108] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1391.108] (WW) The directory "/usr/local/share/fonts/misc/" does not exist.
[  1391.108]     Entry deleted from font path.
[  1391.108] (WW) The directory "/usr/local/share/fonts/Type1/" does not exist.
[  1391.108]     Entry deleted from font path.
[  1391.108] (WW) The directory "/usr/local/share/fonts/100dpi/" does not exist.
[  1391.108]     Entry deleted from font path.
[  1391.108] (WW) The directory "/usr/local/share/fonts/75dpi/" does not exist.
[  1391.108]     Entry deleted from font path.
[  1391.108] (==) FontPath set to:
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    catalogue:/usr/local/etc/X11/fontpath.d
[  1391.108] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  1391.109] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1391.109] (II) Loader magic: 0x435a90
[  1391.109] (II) Module ABI versions:
[  1391.109]     X.Org ANSI C Emulation: 0.4
[  1391.109]     X.Org Video Driver: 24.1
[  1391.109]     X.Org XInput driver : 24.1
[  1391.109]     X.Org Server Extension : 10.0
[  1391.109] (!!) More than one possible primary device found
[  1391.109] (--) PCI: (0@0:2:0) 8086:0116:1028:050e rev 9, Mem @ 0xf1400000/4194304, 0xe0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/65536
[  1391.109] (--) PCI: (1@0:0:0) 10de:0df4:1028:050e rev 161, Mem @ 0xf0000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/65536
[  1391.109] (II) LoadModule: "glx"
[  1391.109] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  1391.112] (II) Module glx: vendor="X.Org Foundation"
[  1391.112]     compiled for 1.20.11, module version = 1.0.0
[  1391.112]     ABI class: X.Org Server Extension, version 10.0
[  1391.112] (II) LoadModule: "nvidiaxorg"
[  1391.112] (WW) Warning, couldn't open module nvidiaxorg
[  1391.112] (EE) Failed to load module "nvidiaxorg" (module does not exist, 0)
[  1391.112] (EE) No drivers available.
[  1391.112] (EE)
Fatal server error:
[  1391.112] (EE) no screens found(EE)
[  1391.112] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[  1391.112] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1391.112] (EE)
[  1391.113] (EE) Server terminated with error (1). Closing log file.
```


----------



## grahamperrin@ (Aug 13, 2021)

Change the subject line here, if you can.

Attention: 



Meinold said:


> [ 1391.112] (EE) Failed to load module "nvidiaxorg" (module does not exist, 0)




The file generated by nvidia-xconfig is good for e.g. kernel module nvidia-modeset (without hybrid graphics) but conflicts with i915kms.

Beyond that, I probably can't help; <https://forums.freebsd.org/threads/81493/> was my lazy failed experiment with hybrid graphics.


----------



## Meinold (Aug 14, 2021)

grahamperrin said:


> Change the subject line here, if you can.


I hope that the new title is more appropriate.

Is it possible to forgo Optimus and just use one graphics card and disable the other (I can’t disable them in the BIOS settings, though)? If so, could somebody please tell me to what needs to be done for that?


----------



## grahamperrin@ (Aug 14, 2021)

Meinold said:


> … can’t disable them in the BIOS settings, …



Hmm.



Meinold said:


> … just use one graphics card …



Remove/undo configurations relating to Intel and NVIDIA graphics, then try:

sysrc kld_list-="i915kms nvidia-modeset"
shutdown -r now
pkg delete graphics/gpu-firmware-kmod graphics/drm-fbsd13-kmod x11/nvidia-hybrid-graphics
pkg autoremove
pkg install -q -y x11/nvidia-driver-390 x11/nvidia-xconfig && nvidia-xconfig
sysrc kld_list+="nvidia"
kldload nvidia
Try starting X. If it will not start, then maybe:

kldunload nvidia && kldload nvidia-modeset


----------



## Phishfry (Aug 14, 2021)

Meinold said:


> ACPI Warning: \134_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20201113/nsarguments-212)


I can't help to wonder what [Package] this needs.
I have several Dell Lattitude E6430 but one with Optimus never worked well with FreeBSD.
From the graphics issue to the fans running full blast.
The fans speeds are also a result of malformed ACPI. So maybe there is issue with Dell ACPI and Optimus.


----------



## Meinold (Aug 15, 2021)

grahamperrin said:


> Hmm.
> 
> Remove/undo configurations relating to Intel and NVIDIA graphics, then try:
> 
> ...


Thank you very much. Unfortunately both `nvidia` as well as `nvidia-modeset` give me the black screen as mentioned in my opening post. However, with `nvidia-modeset` I get an additional warning (apart from the already shown ACPI warning that appears with both of them) after starting Xorg:


```
Aug 15 08:58:44 localhost kernel: nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device VGA-0
```

`nvidia-modeset`: /var/log/Xorg.0.log

```
[    55.076]
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[    55.076] Build Operating System: FreeBSD 13.0-RELEASE-p3 amd64
[    55.076] Current Operating System: FreeBSD adelheid 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[    55.077] Build Date: 04 July 2021  07:24:23AM
[    55.077] 
[    55.077] Current version of pixman: 0.40.0
[    55.077]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    55.077] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    55.077] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Aug 15 08:58:43 2021
[    55.081] (==) Using config file: "/etc/X11/xorg.conf"
[    55.081] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    55.083] (==) ServerLayout "Layout0"
[    55.083] (**) |-->Screen "Screen0" (0)
[    55.083] (**) |   |-->Monitor "Monitor0"
[    55.084] (**) |   |-->Device "Device0"
[    55.084] (**) |-->Input Device "Keyboard0"
[    55.084] (**) |-->Input Device "Mouse0"
[    55.084] (==) Automatically adding devices
[    55.084] (==) Automatically enabling devices
[    55.084] (==) Not automatically adding GPU devices
[    55.084] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    55.085] (WW) The directory "/usr/local/share/fonts/misc/" does not exist.
[    55.085]     Entry deleted from font path.
[    55.087] (WW) The directory "/usr/local/share/fonts/Type1/" does not exist.
[    55.087]     Entry deleted from font path.
[    55.087] (WW) The directory "/usr/local/share/fonts/100dpi/" does not exist.
[    55.087]     Entry deleted from font path.
[    55.087] (WW) The directory "/usr/local/share/fonts/75dpi/" does not exist.
[    55.087]     Entry deleted from font path.
[    55.087] (==) FontPath set to:
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    catalogue:/usr/local/etc/X11/fontpath.d
[    55.087] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    55.087] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    55.087] (WW) Disabling Keyboard0
[    55.087] (WW) Disabling Mouse0
[    55.087] (II) Loader magic: 0x435a90
[    55.087] (II) Module ABI versions:
[    55.087]     X.Org ANSI C Emulation: 0.4
[    55.087]     X.Org Video Driver: 24.1
[    55.087]     X.Org XInput driver : 24.1
[    55.087]     X.Org Server Extension : 10.0
[    55.088] (!!) More than one possible primary device found
[    55.088] (--) PCI: (0@0:2:0) 8086:0116:1028:050e rev 9, Mem @ 0xf1400000/4194304, 0xe0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/65536
[    55.088] (--) PCI: (1@0:0:0) 10de:0df4:1028:050e rev 161, Mem @ 0xf0000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/65536
[    55.088] (II) LoadModule: "glx"
[    55.090] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    55.311] (II) Module glx: vendor="NVIDIA Corporation"
[    55.312]     compiled for 4.0.2, module version = 1.0.0
[    55.312]     Module class: X.Org Server Extension
[    55.312] (II) NVIDIA GLX Module  390.143  Fri Mar 12 07:20:16 UTC 2021
[    55.312] (II) LoadModule: "nvidia"
[    55.312] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[    55.324] (II) Module nvidia: vendor="NVIDIA Corporation"
[    55.324]     compiled for 4.0.2, module version = 1.0.0
[    55.324]     Module class: X.Org Video Driver
[    55.326] (II) NVIDIA dlloader X Driver  390.143  Fri Mar 12 07:22:21 UTC 2021
[    55.326] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    55.326] (--) Using syscons driver with X support (version 2.0)
[    55.326] (--) using VT number 9

[    55.352] (II) Loading sub module "fb"
[    55.352] (II) LoadModule: "fb"
[    55.352] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[    55.353] (II) Module fb: vendor="X.Org Foundation"
[    55.353]     compiled for 1.20.11, module version = 1.0.0
[    55.353]     ABI class: X.Org ANSI C Emulation, version 0.4
[    55.353] (II) Loading sub module "wfb"
[    55.353] (II) LoadModule: "wfb"
[    55.354] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[    55.355] (II) Module wfb: vendor="X.Org Foundation"
[    55.355]     compiled for 1.20.11, module version = 1.0.0
[    55.355]     ABI class: X.Org ANSI C Emulation, version 0.4
[    55.355] (II) Loading sub module "ramdac"
[    55.355] (II) LoadModule: "ramdac"
[    55.355] (II) Module "ramdac" already built-in
[    55.359] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    55.359] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[    55.359] (==) NVIDIA(0): RGB weight 888
[    55.359] (==) NVIDIA(0): Default visual is TrueColor
[    55.359] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    55.361] (**) NVIDIA(0): Enabling 2D acceleration
[    55.826] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    55.826] (--) NVIDIA(0):     CRT-0 (boot)
[    55.826] (--) NVIDIA(0):     DFP-0
[    55.829] (II) NVIDIA(0): NVIDIA GPU GeForce GT 540M (GF108) at PCI:1:0:0 (GPU-0)
[    55.829] (--) NVIDIA(0): Memory: 2097152 kBytes
[    55.829] (--) NVIDIA(0): VideoBIOS: 70.08.44.00.11
[    55.829] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    55.832] (--) NVIDIA(GPU-0): CRT-0: connected
[    55.832] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[    55.832] (--) NVIDIA(GPU-0):
[    55.833] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    55.833] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    55.833] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[    55.833] (--) NVIDIA(GPU-0):
[    55.837] (==) NVIDIA(0):
[    55.837] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    55.837] (==) NVIDIA(0):     will be used as the requested mode.
[    55.837] (==) NVIDIA(0):
[    55.838] (II) NVIDIA(0): Validated MetaModes:
[    55.838] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select"
[    55.838] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[    55.844] (++) NVIDIA(0): DPI set to (75, 75); computed from -dpi X commandline option
[    55.845] (II) NVIDIA: Reserving 6144.00 MB of virtual memory for indirect memory
[    55.845] (II) NVIDIA:     access.
[    55.973] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select"
[    56.004] (==) NVIDIA(0): Disabling shared memory pixmaps
[    56.004] (==) NVIDIA(0): Backing store enabled
[    56.004] (==) NVIDIA(0): Silken mouse enabled
[    56.007] (**) NVIDIA(0): DPMS enabled
[    56.008] (II) Loading sub module "dri2"
[    56.008] (II) LoadModule: "dri2"
[    56.008] (II) Module "dri2" already built-in
[    56.009] (II) NVIDIA(0): [DRI2] Setup complete
[    56.009] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    56.010] (II) Initializing extension Generic Event Extension
[    56.011] (II) Initializing extension SHAPE
[    56.011] (II) Initializing extension MIT-SHM
[    56.011] (II) Initializing extension XInputExtension
[    56.012] (II) Initializing extension XTEST
[    56.013] (II) Initializing extension BIG-REQUESTS
[    56.013] (II) Initializing extension SYNC
[    56.013] (II) Initializing extension XKEYBOARD
[    56.014] (II) Initializing extension XC-MISC
[    56.014] (II) Initializing extension SECURITY
[    56.014] (II) Initializing extension XFIXES
[    56.014] (II) Initializing extension RENDER
[    56.015] (II) Initializing extension RANDR
[    56.016] (II) Initializing extension COMPOSITE
[    56.016] (II) Initializing extension DAMAGE
[    56.017] (II) Initializing extension MIT-SCREEN-SAVER
[    56.017] (II) Initializing extension DOUBLE-BUFFER
[    56.018] (II) Initializing extension RECORD
[    56.018] (II) Initializing extension DPMS
[    56.018] (II) Initializing extension Present
[    56.018] (II) Initializing extension DRI3
[    56.018] (II) Initializing extension X-Resource
[    56.018] (II) Initializing extension XVideo
[    56.019] (II) Initializing extension XVideo-MotionCompensation
[    56.019] (II) Initializing extension XFree86-VidModeExtension
[    56.019] (II) Initializing extension XFree86-DGA
[    56.019] (II) Initializing extension XFree86-DRI
[    56.020] (II) Initializing extension DRI2
[    56.020] (II) Initializing extension GLX
[    56.020] (II) Initializing extension GLX
[    56.020] (II) Indirect GLX disabled.
[    56.020] (II) Initializing extension NV-GLX
[    56.020] (II) Initializing extension NV-CONTROL
[    56.021] (II) Initializing extension XINERAMA
[    56.119] (II) config/udev: Adding input device System mouse (/dev/input/event0)
[    56.119] (**) System mouse: Applying InputClass "libinput pointer catchall"
[    56.119] (II) LoadModule: "libinput"
[    56.120] (II) Loading /usr/local/lib/xorg/modules/input/libinput_drv.so
[    56.159] (II) Module libinput: vendor="X.Org Foundation"
[    56.159]     compiled for 1.20.11, module version = 0.30.0
[    56.159]     Module class: X.Org XInput Driver
[    56.159]     ABI class: X.Org XInput driver, version 24.1
[    56.159] (II) Using input driver 'libinput' for 'System mouse'
[    56.159] (**) System mouse: always reports core events
[    56.159] (**) Option "Device" "/dev/input/event0"
[    56.159] (**) Option "_source" "server/udev"
[    56.173] (II) event0  - System mouse: is tagged by udev as: Mouse
[    56.173] (II) event0  - System mouse: device is a pointer
[    56.174] (II) event0  - System mouse: device removed
[    56.174] (**) Option "config_info" "udev:/dev/input/event0"
[    56.174] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 6)
[    56.174] (**) Option "AccelerationScheme" "none"
[    56.174] (**) System mouse: (accel) selected scheme none/0
[    56.174] (**) System mouse: (accel) acceleration factor: 2.000
[    56.174] (**) System mouse: (accel) acceleration threshold: 4
[    56.175] (II) event0  - System mouse: is tagged by udev as: Mouse
[    56.175] (II) event0  - System mouse: device is a pointer
[    56.175] (II) config/udev: Adding input device System keyboard multiplexer (/dev/input/event1)
[    56.175] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[    56.175] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
[    56.175] (II) Using input driver 'libinput' for 'System keyboard multiplexer'
[    56.175] (**) System keyboard multiplexer: always reports core events
[    56.175] (**) Option "Device" "/dev/input/event1"
[    56.175] (**) Option "_source" "server/udev"
[    56.176] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[    56.176] (II) event1  - System keyboard multiplexer: device is a keyboard
[    56.176] (II) event1  - System keyboard multiplexer: device removed
[    56.176] (**) Option "config_info" "udev:/dev/input/event1"
[    56.176] (II) XINPUT: Adding extended input device "System keyboard multiplexer" (type: KEYBOARD, id 7)
[    56.176] (**) Option "xkb_rules" "evdev"
[    56.210] (II) event1  - System keyboard multiplexer: is tagged by udev as: Keyboard
[    56.210] (II) event1  - System keyboard multiplexer: device is a keyboard
[    56.210] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[    56.210] (**) Power Button: Applying InputClass "Evdev keyboard"
[    56.210] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[    56.210] (II) Using input driver 'libinput' for 'Power Button'
[    56.210] (**) Power Button: always reports core events
[    56.210] (**) Option "Device" "/dev/input/event2"
[    56.210] (**) Option "_source" "server/udev"
[    56.211] (II) event2  - Power Button: is tagged by udev as: Keyboard
[    56.211] (II) event2  - Power Button: device is a keyboard
[    56.211] (II) event2  - Power Button: device removed
[    56.211] (**) Option "config_info" "udev:/dev/input/event2"
[    56.211] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
[    56.211] (**) Option "xkb_rules" "evdev"
[    56.212] (II) event2  - Power Button: is tagged by udev as: Keyboard
[    56.212] (II) event2  - Power Button: device is a keyboard
[    56.212] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[    56.212] (**) Sleep Button: Applying InputClass "Evdev keyboard"
[    56.212] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[    56.212] (II) Using input driver 'libinput' for 'Sleep Button'
[    56.212] (**) Sleep Button: always reports core events
[    56.212] (**) Option "Device" "/dev/input/event3"
[    56.212] (**) Option "_source" "server/udev"
[    56.213] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[    56.213] (II) event3  - Sleep Button: device is a keyboard
[    56.213] (II) event3  - Sleep Button: device removed
[    56.213] (**) Option "config_info" "udev:/dev/input/event3"
[    56.213] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 9)
[    56.213] (**) Option "xkb_rules" "evdev"
[    56.214] (II) event3  - Sleep Button: is tagged by udev as: Keyboard
[    56.214] (II) event3  - Sleep Button: device is a keyboard
[    56.214] (II) config/udev: Adding input device Control Method Lid Switch (/dev/input/event4)
[    56.214] (II) No input driver specified, ignoring this device.
[    56.214] (II) This device may have been added with another device file.
[    56.214] (II) config/udev: Adding input device AT keyboard (/dev/input/event5)
[    56.214] (**) AT keyboard: Applying InputClass "Evdev keyboard"
[    56.214] (**) AT keyboard: Applying InputClass "libinput keyboard catchall"
[    56.214] (II) Using input driver 'libinput' for 'AT keyboard'
[    56.214] (**) AT keyboard: always reports core events
[    56.214] (**) Option "Device" "/dev/input/event5"
[    56.214] (**) Option "_source" "server/udev"
[    56.215] (II) event5  - AT keyboard: is tagged by udev as: Keyboard
[    56.215] (II) event5  - AT keyboard: device is a keyboard
[    56.215] (II) event5  - AT keyboard: device removed
[    56.215] (**) Option "config_info" "udev:/dev/input/event5"
[    56.215] (II) XINPUT: Adding extended input device "AT keyboard" (type: KEYBOARD, id 10)
[    56.215] (**) Option "xkb_rules" "evdev"
[    56.216] (II) event5  - AT keyboard: is tagged by udev as: Keyboard
[    56.216] (II) event5  - AT keyboard: device is a keyboard
[    56.216] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event6)
[    56.216] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput pointer catchall"
[    56.216] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[    56.216] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[    56.216] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons"
[    56.216] (II) LoadModule: "synaptics"
[    56.217] (II) Loading /usr/local/lib/xorg/modules/input/synaptics_drv.so
[    56.218] (II) Module synaptics: vendor="X.Org Foundation"
[    56.218]     compiled for 1.20.11, module version = 1.9.1
[    56.218]     Module class: X.Org XInput Driver
[    56.218]     ABI class: X.Org XInput driver, version 24.1
[    56.218] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad'
[    56.218] (**) SynPS/2 Synaptics TouchPad: always reports core events
[    56.218] (**) Option "Device" "/dev/input/event6"
[    56.367] (II) synaptics: SynPS/2 Synaptics TouchPad: ignoring touch events for semi-multitouch device
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5398 (res 42)
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4728 (res 70)
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left right double triple
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product 0x7
[    56.367] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[    56.367] (**) SynPS/2 Synaptics TouchPad: always reports core events
[    56.404] (**) Option "config_info" "udev:/dev/input/event6"
[    56.404] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 11)
[    56.404] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MinSpeed is now constant deceleration 2.5
[    56.404] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MaxSpeed is now 1.75
[    56.404] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) AccelFactor is now 0.039
[    56.404] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
[    56.404] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 1
[    56.404] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[    56.404] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[    56.460] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[    60.799] (II) event0  - System mouse: device removed
[    60.799] (II) event1  - System keyboard multiplexer: device removed
[    60.799] (II) event2  - Power Button: device removed
[    60.799] (II) event3  - Sleep Button: device removed
[    60.799] (II) event5  - AT keyboard: device removed
```

Is there still any hope? OpenBSD installs just fine with Xorg on this laptop, by the way…


----------



## grahamperrin@ (Aug 15, 2021)

Meinold said:


> … Is there still any hope?



I think so;



Meinold said:


> OpenBSD installs just fine with Xorg on this laptop, …



If OpenBSD can do it then I guess, FreeBSD should too. 

It might help to compare with an X.Org log from a successful run of OpenBSD, but first:



Meinold said:


> [ 55.081] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"



– what's in that directory?


----------



## Meinold (Aug 15, 2021)

grahamperrin said:


> It might help to compare with an X.Org log from a successful run of OpenBSD


I would have to remove FreeBSD and then reinstall OpenBSD for that…


grahamperrin said:


> what's in that directory?


There are four files in that folder (I didn't create them):

/usr/local/share/X11/xorg.conf.d/10-quirks.conf

```
# Collection of quirks and blacklist/whitelists for specific devices.


# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
# http://bugs.freedesktop.org/show_bug.cgi?id=22442
Section "InputClass"
        Identifier "ThinkPad HDAPS accelerometer blacklist"
        MatchProduct "ThinkPad HDAPS accelerometer data"
        Option "Ignore" "on"
EndSection

# https://bugzilla.redhat.com/show_bug.cgi?id=523914
# Mouse does not move in PV Xen guest
# Explicitly tell evdev to not ignore the absolute axes.
Section "InputClass"
        Identifier "Xen Virtual Pointer axis blacklist"
        MatchProduct "Xen Virtual Pointer"
        Option "IgnoreAbsoluteAxes" "off"
        Option "IgnoreRelativeAxes" "off"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=55867
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
Section "InputClass"
        Identifier "Tag trackballs as XI_TRACKBALL"
        MatchProduct "trackball"
        MatchDriver "evdev"
        Option "TypeName" "TRACKBALL"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=62831
# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
Section "InputClass"
        Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
        MatchProduct "La-VIEW Technology Naos 5000 Mouse"
        MatchDriver "evdev"
        Option "TypeName" "MOUSE"
EndSection
```

/usr/local/share/X11/xorg.conf.d/20-evdev-kbd.conf

```
Section "InputClass"
    Identifier        "Evdev keyboard"
    MatchDevicePath        "/dev/input/event*"
    MatchIsKeyboard        "on"
    Option            "XkbRules" "evdev"
EndSection
```

/usr/local/share/X11/xorg.conf.d/40-libinput.conf

```
# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection
```

/usr/local/share/X11/xorg.conf.d/70-synaptics.conf

```
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
#       MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
```


----------



## grahamperrin@ (Aug 15, 2021)

```
vgapci0@pci0:1:0:0:    class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x0df4 subvendor=0x1028 subdevice=0x050e
    vendor     = 'NVIDIA Corporation'
    device     = 'GF108M [GeForce GT 540M]'
    class      = display
    subclass   = VGA
```

It's true (below) that x11/nvidia-driver-390 is proper, however I wonder what will happen with x11/nvidia-driver …

<https://www.nvidia.com/Download/driverResults.aspx/177157/en-us> currently 390.144

<https://www.nvidia.com/Download/driverResults.aspx/179601/en-us> currently 470.63.01



Meinold said:


> … black screen as mentioned in my opening post. …



Is that in response to `startx`, or for a display manager e.g. SDDM?


----------



## Meinold (Aug 15, 2021)

I thank everyone for your kind help but I have set to myself a limit that if I can‘t get FreeBSD to run properly till today I will just skip it. Others have already confirmed that the given hardware is not exactly suitable for this OS. But I will certainly try it again with other hardware in the future. I did learn quite a bit from this whole process.


----------

