# Xorg Nvidia blank screen Thinkpad T460p



## jrdnull (Oct 21, 2016)

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:

```
clear_tmp_enable="YES"
syslogd_flags="-ss"
hostname="meanas"
keymap="uk"
ifconfig_em0="DHCP"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

linux_enable="YES"
kld_list="nvidia-modeset "

sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
```

I switched from nvidia to nvidia-modeset as stated in the package as Xorg.0.log contains

```
[   349.057] (II) NVIDIA(0): Validated MetaModes:
[   349.057] (II) NVIDIA(0):     "NULL"
```

I've not been able to get any further than a black screen with a solid white cursor in the top left:

 

I have now started xorg.conf again after much fiddling by generating one with nvidia-xconfig. To get the generated config to that point I had to add the BusID to the Device section fix with a "no screens found" fatal error:

```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 367.35  (root@110amd64-quarterly-job-06)  Thu Oct  6 16:54:58 UTC 2016

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"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:2:0:0"
EndSection

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

Xorg.0.log:

```
[  2550.966]
X.Org X Server 1.17.4
Release Date: 2015-10-28
[  2550.966] X Protocol Version 11, Revision 0
[  2550.966] Build Operating System: FreeBSD 11.0-RELEASE-p1 amd64
[  2550.966] Current Operating System: FreeBSD meanas 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[  2550.966] Build Date: 16 October 2016  04:53:46PM
[  2550.966]
[  2550.966] Current version of pixman: 0.34.0
[  2550.966]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  2550.966] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2550.966] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 21 14:52:30 2016
[  2550.967] (==) Using config file: "/etc/X11/xorg.conf"
[  2550.967] (==) ServerLayout "Layout0"
[  2550.967] (**) |-->Screen "Screen0" (0)
[  2550.967] (**) |   |-->Monitor "Monitor0"
[  2550.967] (**) |   |-->Device "Device0"
[  2550.967] (**) |-->Input Device "Keyboard0"
[  2550.967] (**) |-->Input Device "Mouse0"
[  2550.967] (==) Automatically adding devices
[  2550.967] (==) Automatically enabling devices
[  2550.967] (==) Not automatically adding GPU devices
[  2550.967] (==) 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/
[  2550.967] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  2550.967] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  2550.967] (WW) Disabling Keyboard0
[  2550.967] (WW) Disabling Mouse0
[  2550.967] (II) Loader magic: 0x8112f0
[  2550.967] (II) Module ABI versions:
[  2550.967]     X.Org ANSI C Emulation: 0.4
[  2550.967]     X.Org Video Driver: 19.0
[  2550.967]     X.Org XInput driver : 21.0
[  2550.967]     X.Org Server Extension : 9.0
[  2550.967] (--) PCI:*(0:0:2:0) 8086:191b:17aa:5050 rev 6, Mem @ 0xf0000000/16777216, 0xe0000000/268435456, I/O @ 0x0000e000/64, BIOS @ 0x????????/65536
[  2550.967] (--) PCI: (0:2:0:0) 10de:134d:17aa:5050 rev 162, Mem @ 0xf1000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000d000/128
[  2550.967] (II) LoadModule: "glx"
[  2550.968] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  2550.972] (II) Module glx: vendor="NVIDIA Corporation"
[  2550.972]     compiled for 4.0.2, module version = 1.0.0
[  2550.972]     Module class: X.Org Server Extension
[  2550.972] (II) NVIDIA GLX Module  367.44  Wed Aug 17 22:01:17 PDT 2016
[  2550.972] (II) LoadModule: "nvidia"
[  2550.973] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[  2550.973] (II) Module nvidia: vendor="NVIDIA Corporation"
[  2550.973]     compiled for 4.0.2, module version = 1.0.0
[  2550.973]     Module class: X.Org Video Driver
[  2550.973] (II) NVIDIA dlloader X Driver  367.44  Wed Aug 17 21:41:06 PDT 2016
[  2550.973] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  2550.973] (--) Using syscons driver with X support (version 16777218.0)
[  2550.973] (--) using VT number 9

[  2550.974] (II) Loading sub module "fb"
[  2550.974] (II) LoadModule: "fb"
[  2550.974] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[  2550.974] (II) Module fb: vendor="X.Org Foundation"
[  2550.974]     compiled for 1.17.4, module version = 1.0.0
[  2550.974]     ABI class: X.Org ANSI C Emulation, version 0.4
[  2550.974] (II) Loading sub module "wfb"
[  2550.974] (II) LoadModule: "wfb"
[  2550.974] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[  2550.975] (II) Module wfb: vendor="X.Org Foundation"
[  2550.975]     compiled for 1.17.4, module version = 1.0.0
[  2550.975]     ABI class: X.Org ANSI C Emulation, version 0.4
[  2550.975] (II) Loading sub module "ramdac"
[  2550.975] (II) LoadModule: "ramdac"
[  2550.975] (II) Module "ramdac" already built-in
[  2550.975] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  2550.975] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[  2550.975] (==) NVIDIA(0): RGB weight 888
[  2550.975] (==) NVIDIA(0): Default visual is TrueColor
[  2550.975] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[  2550.975] (**) NVIDIA(0): Enabling 2D acceleration
[  2551.127] (II) NVIDIA(0): NVIDIA GPU GeForce 940MX (GM108-A) at PCI:2:0:0 (GPU-0)
[  2551.128] (--) NVIDIA(0): Memory: 2097152 kBytes
[  2551.128] (--) NVIDIA(0): VideoBIOS: 82.08.57.00.22
[  2551.128] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[  2551.128] (II) NVIDIA(0): Validated MetaModes:
[  2551.128] (II) NVIDIA(0):     "NULL"
[  2551.128] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[  2551.128] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[  2551.128] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[  2551.128] (--) Depth 24 pixmap format is 32 bpp
[  2551.128] (II) NVIDIA: Reserving 12288.00 MB of virtual memory for indirect memory
[  2551.128] (II) NVIDIA:     access.
[  2551.162] (II) NVIDIA(0): Built-in logo is bigger than the screen.
[  2551.162] (II) NVIDIA(0): Setting mode "NULL"
[  2551.167] (==) NVIDIA(0): Disabling shared memory pixmaps
[  2551.167] (==) NVIDIA(0): Backing store enabled
[  2551.167] (==) NVIDIA(0): Silken mouse enabled
[  2551.167] (**) NVIDIA(0): DPMS enabled
[  2551.167] (II) Loading sub module "dri2"
[  2551.167] (II) LoadModule: "dri2"
[  2551.167] (II) Module "dri2" already built-in
[  2551.167] (II) NVIDIA(0): [DRI2] Setup complete
[  2551.167] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[  2551.167] (--) RandR disabled
[  2551.167] (II) Initializing extension GLX
[  2551.167] (II) Indirect GLX disabled.
[  2551.267] (II) config/devd: probing input devices...
[  2551.267] (II) config/devd: adding input device (null) (/dev/kbdmux)
[  2551.267] (II) LoadModule: "kbd"
[  2551.267] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[  2551.267] (II) Module kbd: vendor="X.Org Foundation"
[  2551.267]     compiled for 1.17.4, module version = 1.8.1
[  2551.267]     Module class: X.Org XInput Driver
[  2551.267]     ABI class: X.Org XInput driver, version 21.0
[  2551.267] (II) Using input driver 'kbd' for 'kbdmux'
[  2551.268] (**) kbdmux: always reports core events
[  2551.268] (**) kbdmux: always reports core events
[  2551.268] (**) Option "Protocol" "standard"
[  2551.268] (**) Option "XkbRules" "base"
[  2551.268] (**) Option "XkbModel" "pc105"
[  2551.268] (**) Option "XkbLayout" "us"
[  2551.268] (**) Option "config_info" "devd:kbdmux"
[  2551.268] (II) XINPUT: Adding extended input device "kbdmux" (type: KEYBOARD, id 6)
[  2551.269] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[  2551.269] (II) config/devd: adding input device (null) (/dev/sysmouse)
[  2551.269] (II) LoadModule: "mouse"
[  2551.269] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[  2551.269] (II) Module mouse: vendor="X.Org Foundation"
[  2551.269]     compiled for 1.17.4, module version = 1.9.1
[  2551.269]     Module class: X.Org XInput Driver
[  2551.269]     ABI class: X.Org XInput driver, version 21.0
[  2551.269] (II) Using input driver 'mouse' for 'sysmouse'
[  2551.269] (**) sysmouse: always reports core events
[  2551.269] (**) Option "Device" "/dev/sysmouse"
[  2551.269] (==) sysmouse: Protocol: "Auto"
[  2551.269] (**) sysmouse: always reports core events
[  2551.269] (==) sysmouse: Emulate3Buttons, Emulate3Timeout: 50
[  2551.269] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[  2551.269] (**) sysmouse: Buttons: 5
[  2551.269] (**) Option "config_info" "devd:sysmouse"
[  2551.269] (II) XINPUT: Adding extended input device "sysmouse" (type: MOUSE, id 7)
[  2551.269] (**) sysmouse: (accel) keeping acceleration scheme 1
[  2551.269] (**) sysmouse: (accel) acceleration profile 0
[  2551.269] (**) sysmouse: (accel) acceleration factor: 2.000
[  2551.269] (**) sysmouse: (accel) acceleration threshold: 4
[  2551.270] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0
[  2551.270] (II) sysmouse: SetupAuto: protocol is SysMouse
[  2551.319] (II) config/devd: adding input device Mouse (/dev/psm0)
[  2551.319] (II) Using input driver 'mouse' for 'Mouse'
[  2551.319] (**) Mouse: always reports core events
[  2551.319] (**) Option "Device" "/dev/psm0"
[  2551.319] (==) Mouse: Protocol: "Auto"
[  2551.319] (**) Mouse: always reports core events
[  2551.369] (==) Mouse: Emulate3Buttons, Emulate3Timeout: 50
[  2551.369] (**) Mouse: ZAxisMapping: buttons 4 and 5
[  2551.369] (**) Mouse: Buttons: 5
[  2551.369] (**) Option "config_info" "devd:psm0"
[  2551.369] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE, id 8)
[  2551.369] (**) Mouse: (accel) keeping acceleration scheme 1
[  2551.369] (**) Mouse: (accel) acceleration profile 0
[  2551.369] (**) Mouse: (accel) acceleration factor: 2.000
[  2551.369] (**) Mouse: (accel) acceleration threshold: 4
[  2551.384] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 0
[  2551.384] (II) Mouse: SetupAuto: protocol is PS/2
[  2551.848] (II) Mouse: ps2EnableDataReporting: succeeded
```

Any advice on how to proceed from here to get this working would greatly appreciated.


----------



## weyland-yutani (Oct 21, 2016)

I have the same error, but only with freeBSD 11. With 10.3 works well. Someone knows what could happen and how to fix it?


----------



## jrdnull (Oct 21, 2016)

Do you have the same laptop weyland-yutani ?

I've read that I should disable the Intel graphics but there is no BIOS option on this laptop to do that. Is having it inactive in the xorg.conf enough?

- Intel Core i7-6820HQ processor (8MB Cache, Up to 3.6 Ghz)
- 14.0 WQHD(2560 x 1440) IPS Non-Touch
- NVIDIA GeForce 940MX 2GB
- Intel Dual Band Wireless-AC(2x2) 8260, Bluetooth Version 4.1 vPro


----------



## weyland-yutani (Oct 21, 2016)

no, it's a workstation. I think that version of nvidia (367.44) does not work with freeBSD 11.


----------



## jrdnull (Oct 22, 2016)

I've just tried version 357.57 and have the same issue, also tried the beta 375.10.  Loo
Latest log still using beta driver:

```
[   130.215]
X.Org X Server 1.17.4
Release Date: 2015-10-28
[   130.215] X Protocol Version 11, Revision 0
[   130.215] Build Operating System: FreeBSD 11.0-RELEASE-p1 amd64
[   130.215] Current Operating System: FreeBSD meanas 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[   130.215] Build Date: 16 October 2016  04:53:46PM
[   130.215]
[   130.215] Current version of pixman: 0.34.0
[   130.215]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   130.215] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   130.216] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Oct 22 09:12:02 2016
[   130.216] (==) Using config file: "/etc/X11/xorg.conf"
[   130.216] (==) ServerLayout "X.org Configured"
[   130.216] (**) |-->Screen "Screen0" (0)
[   130.216] (**) |   |-->Monitor "Monitor0"
[   130.216] (**) |   |-->Device "Card0"
[   130.216] (==) Automatically adding devices
[   130.216] (==) Automatically enabling devices
[   130.216] (==) Not automatically adding GPU devices
[   130.216] (==) 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/
[   130.216] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   130.216] (**) Extension "Composite" is disabled
[   130.216] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[   130.216] (II) Loader magic: 0x8112f0
[   130.216] (II) Module ABI versions:
[   130.216]     X.Org ANSI C Emulation: 0.4
[   130.216]     X.Org Video Driver: 19.0
[   130.216]     X.Org XInput driver : 21.0
[   130.216]     X.Org Server Extension : 9.0
[   130.216] (--) PCI:*(0:0:2:0) 8086:191b:17aa:5050 rev 6, Mem @ 0xf0000000/16777216, 0xe0000000/268435456, I/O @ 0x0000e000/64, BIOS @ 0x????????/65536
[   130.216] (--) PCI: (0:2:0:0) 10de:134d:17aa:5050 rev 162, Mem @ 0xf1000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000d000/128
[   130.216] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   130.216] (II) LoadModule: "glx"
[   130.217] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   130.221] (II) Module glx: vendor="NVIDIA Corporation"
[   130.221]     compiled for 4.0.2, module version = 1.0.0
[   130.221]     Module class: X.Org Server Extension
[   130.221] (II) NVIDIA GLX Module  375.10  Fri Oct 14 09:27:58 PDT 2016
[   130.221] (II) LoadModule: "nvidia"
[   130.221] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[   130.221] (II) Module nvidia: vendor="NVIDIA Corporation"
[   130.221]     compiled for 4.0.2, module version = 1.0.0
[   130.221]     Module class: X.Org Video Driver
[   130.221] (II) NVIDIA dlloader X Driver  375.10  Fri Oct 14 09:07:39 PDT 2016
[   130.221] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   130.221] (--) Using syscons driver with X support (version 16777218.0)
[   130.221] (--) using VT number 9

[   130.222] (II) Loading sub module "fb"
[   130.222] (II) LoadModule: "fb"
[   130.222] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[   130.222] (II) Module fb: vendor="X.Org Foundation"
[   130.222]     compiled for 1.17.4, module version = 1.0.0
[   130.222]     ABI class: X.Org ANSI C Emulation, version 0.4
[   130.222] (II) Loading sub module "wfb"
[   130.222] (II) LoadModule: "wfb"
[   130.222] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[   130.223] (II) Module wfb: vendor="X.Org Foundation"
[   130.223]     compiled for 1.17.4, module version = 1.0.0
[   130.223]     ABI class: X.Org ANSI C Emulation, version 0.4
[   130.223] (II) Loading sub module "ramdac"
[   130.223] (II) LoadModule: "ramdac"
[   130.223] (II) Module "ramdac" already built-in
[   130.223] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   130.223] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   130.223] (==) NVIDIA(0): RGB weight 888
[   130.223] (==) NVIDIA(0): Default visual is TrueColor
[   130.223] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   130.223] (**) NVIDIA(0): Enabling 2D acceleration
[   130.370] (II) NVIDIA(0): NVIDIA GPU GeForce 940MX (GM108-A) at PCI:2:0:0 (GPU-0)
[   130.370] (--) NVIDIA(0): Memory: 2097152 kBytes
[   130.370] (--) NVIDIA(0): VideoBIOS: 82.08.57.00.22
[   130.370] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[   130.370] (II) NVIDIA(0): Validated MetaModes:
[   130.370] (II) NVIDIA(0):     "NULL"
[   130.370] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[   130.370] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[   130.370] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[   130.370] (--) Depth 24 pixmap format is 32 bpp
[   130.371] (II) NVIDIA: Reserving 12288.00 MB of virtual memory for indirect memory
[   130.371] (II) NVIDIA:     access.
[   130.402] (II) NVIDIA(0): Built-in logo is bigger than the screen.
[   130.402] (II) NVIDIA(0): Setting mode "NULL"
[   130.407] (==) NVIDIA(0): Disabling shared memory pixmaps
[   130.407] (==) NVIDIA(0): Backing store disabled
[   130.407] (==) NVIDIA(0): Silken mouse enabled
[   130.407] (==) NVIDIA(0): DPMS enabled
[   130.407] (II) Loading sub module "dri2"
[   130.407] (II) LoadModule: "dri2"
[   130.407] (II) Module "dri2" already built-in
[   130.407] (II) NVIDIA(0): [DRI2] Setup complete
[   130.407] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[   130.407] (--) RandR disabled
[   130.407] (II) Initializing extension GLX
[   130.407] (II) Indirect GLX disabled.
[   130.481] (II) config/devd: probing input devices...
[   130.481] (II) config/devd: adding input device (null) (/dev/kbdmux)
[   130.481] (II) LoadModule: "kbd"
[   130.481] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[   130.481] (II) Module kbd: vendor="X.Org Foundation"
[   130.481]     compiled for 1.17.4, module version = 1.8.1
[   130.481]     Module class: X.Org XInput Driver
[   130.481]     ABI class: X.Org XInput driver, version 21.0
[   130.481] (II) Using input driver 'kbd' for 'kbdmux'
[   130.481] (**) kbdmux: always reports core events
[   130.481] (**) kbdmux: always reports core events
[   130.481] (**) Option "Protocol" "standard"
[   130.481] (**) Option "XkbRules" "base"
[   130.481] (**) Option "XkbModel" "pc105"
[   130.481] (**) Option "XkbLayout" "us"
[   130.481] (**) Option "config_info" "devd:kbdmux"
[   130.481] (II) XINPUT: Adding extended input device "kbdmux" (type: KEYBOARD, id 6)
[   130.483] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[   130.483] (II) config/devd: adding input device (null) (/dev/sysmouse)
[   130.483] (II) LoadModule: "mouse"
[   130.483] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[   130.483] (II) Module mouse: vendor="X.Org Foundation"
[   130.483]     compiled for 1.17.4, module version = 1.9.1
[   130.483]     Module class: X.Org XInput Driver
[   130.483]     ABI class: X.Org XInput driver, version 21.0
[   130.483] (II) Using input driver 'mouse' for 'sysmouse'
[   130.483] (**) sysmouse: always reports core events
[   130.483] (**) Option "Device" "/dev/sysmouse"
[   130.483] (==) sysmouse: Protocol: "Auto"
[   130.483] (**) sysmouse: always reports core events
[   130.483] (==) sysmouse: Emulate3Buttons, Emulate3Timeout: 50
[   130.483] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[   130.483] (**) sysmouse: Buttons: 5
[   130.483] (**) Option "config_info" "devd:sysmouse"
[   130.483] (II) XINPUT: Adding extended input device "sysmouse" (type: MOUSE, id 7)
[   130.483] (**) sysmouse: (accel) keeping acceleration scheme 1
[   130.483] (**) sysmouse: (accel) acceleration profile 0
[   130.483] (**) sysmouse: (accel) acceleration factor: 2.000
[   130.483] (**) sysmouse: (accel) acceleration threshold: 4
[   130.483] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0
[   130.483] (II) sysmouse: SetupAuto: protocol is SysMouse
[   130.533] (II) config/devd: adding input device Mouse (/dev/psm0)
[   130.533] (II) Using input driver 'mouse' for 'Mouse'
[   130.533] (**) Mouse: always reports core events
[   130.533] (**) Option "Device" "/dev/psm0"
[   130.533] (==) Mouse: Protocol: "Auto"
[   130.533] (**) Mouse: always reports core events
[   130.582] (==) Mouse: Emulate3Buttons, Emulate3Timeout: 50
[   130.582] (**) Mouse: ZAxisMapping: buttons 4 and 5
[   130.582] (**) Mouse: Buttons: 5
[   130.582] (**) Option "config_info" "devd:psm0"
[   130.582] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE, id 8)
[   130.582] (**) Mouse: (accel) keeping acceleration scheme 1
[   130.582] (**) Mouse: (accel) acceleration profile 0
[   130.582] (**) Mouse: (accel) acceleration factor: 2.000
[   130.582] (**) Mouse: (accel) acceleration threshold: 4
[   130.597] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 0
[   130.597] (II) Mouse: SetupAuto: protocol is PS/2
[   131.062] (II) Mouse: ps2EnableDataReporting: succeeded
```

Alas, I don't think I'll be able to get this work because of the Optimus, as listed here: https://download.lenovo.com/pccbbs/mobiles/r07n111w.txt



> ================================================================================
> REFERENCE INFORMATION
> 
> NVIDIA Optimus Technology
> ...



There is no option for me to change the "Graphics Device" as shown in that procedure.


----------



## weyland-yutani (Oct 22, 2016)

have you try with freeBSD 10.3?


----------



## jrdnull (Oct 22, 2016)

No, I've not tried 10.3.

I've just tried with build kernel from drm-next-4.7, got a working desktop on the Intel graphics now. But I'd rather use the Nvidia card if thats possible.


----------



## cduret (Nov 1, 2016)

hi,
I've a thinkpad T420s with discrete nvidia graphic card.
I've just upgrade to freebsd 11 and have the same problem with nvidia driver. I was using this settings successfully with freebsd 10.3

I have the same black screen with white cursor on the top left corner.

Xorg log show no errors :

http://pastebin.com/raw/9wPditje
dmesg show only ACPI error don't know if errors are related :

http://pastebin.com/raw/J2jk0Sqh
My xorg conf so far is :

http://pastebin.com/raw/RYRfmDg5

Any chance to make the nvidia driver working with freebsd 11 ?


----------



## Atsuri (Nov 2, 2016)

jrdnull said:


> I've just tried version 357.57 and have the same issue, also tried the beta 375.10.  Loo
> Alas, I don't think I'll be able to get this work because of the Optimus, as listed here: https://download.lenovo.com/pccbbs/mobiles/r07n111w.txt
> 
> There is no option for me to change the "Graphics Device" as shown in that procedure.



I'm afraid it is indeed Optimus related. Even on GNU/Linux getting an Optimus setup working properly is a bit of a feat. Much more so on FreeBSD. If it's not problematic for you, I would recommend sticking to Intel for now . Maybe in the future we'll get something akin to Bumblebee.


----------



## MacGyver (Nov 2, 2016)

I'm seeing the same thing on my multi head workstation that uses an Nvidia Quadro 2000 (using the 367.44 driver).  I was running FreeBSD 10.3-RELEASE-p7 (actually a more recent patch but p7 is what uname reported) without any problems and I did a freebsd-update to FreeBSD 10.3-RELEASE-p11 and Xorg stopped working, giving me the same black screen with the cursor in the upper left.  After a bit of failed troubleshooting, I decided since it wasn't working that it was a good excuse to upgrade to 11-RELEASE, but still no change. I didn't have this problem after updating my other workstation that uses ATI video.


----------



## cduret (Nov 3, 2016)

Indeed, it is not Optimus related since I have disabled it from the bios. It seems to be nvidia driver.
I have never encountered problems with nvidia driver with freebsd 9 & 10.


----------



## MacGyver (Nov 4, 2016)

It's definitely the nvidia-driver.  After exhausting everything I could think of trying with my xorg config, I reverted back to the previous driver (nvidia-driver-346.96) that I had been using and that got me back up and running.  It's a short term fix and not how I like to do things, but I wanted the box back up.  I should add that this is on FreeBSD 11 for me.


----------



## free-and-bsd (Nov 4, 2016)

weyland-yutani said:


> no, it's a workstation. I think that version of nvidia (367.44) does not work with freeBSD 11.


Wrong, it works fine. Read carefully the documentation about 367.44 nvidia-driver version or the message you see after installing the port. It tells it all.


----------



## MacGyver (Nov 4, 2016)

Yep that did it for me... Good catch free-and-bsd, I had overlooked that bit at the end.  Thanks.


----------



## free-and-bsd (Nov 4, 2016)

MacGyver said:


> Yep that did it for me... Good catch free-and-bsd, I had overlooked that bit at the end.  Thanks.


Yea, I did the same thing


----------



## cduret (Nov 4, 2016)

Ok
sometimes hard to see obvious things
thanks free-and-bsd


----------



## Atsuri (Nov 7, 2016)

So what was the fix in the end? Could it have been related to the new addition of modesetting in the prioprietary nVidia drivers?
Also, could you mark the thread as SOLVED, now that the problem is resolved?


----------



## weyland-yutani (Nov 11, 2016)

free-and-bsd said:


> Wrong, it works fine. Read carefully the documentation about 367.44 nvidia-driver version or the message you see after installing the port. It tells it all.



No, it does not work. I have to downgrade to freeBSD 10.3. I make the indications but it does not work.


----------



## free-and-bsd (Nov 11, 2016)

weyland-yutani said:


> No, it does not work. I have to downgrade to freeBSD 10.3. I make the indications but it does not work.


Here is what it says in /usr/ports/UPDATING on the issue:

```
AFFECTS: users of x11/nvidia-driver
  AUTHOR: cem@FreeBSD.org

  The NVidia driver has been updated to version 367.35.  Starting with
  version 358.09, new kernel module was added, nvidia-modeset.ko.  This
  new driver component works in conjunction with the nvidia.ko kernel
  module to program the display engine of the GPU.

  Users that experience hangs when starting X11 server, or observe

        (II) NVIDIA(0): Validated MetaModes:
        (II) NVIDIA(0):     "NULL"

  messages in their /var/log/Xorg.0.log file should replace ``nvidia''
  with ``nvidia-modeset'' in /boot/loader.conf or /etc/rc.conf files,
  depending on how they prefer to load NVidia driver kernel module.
```
As you can see, no indication that it shouldn't work under 11.0.
So, how did you come by 11.0? Fresh install or upgrade from 10.3? If the latter, then did you rebuild all the ports as well? Or did you use packages for both 11.0 and 10.3?

If you've done all such things properly and still it doesn't work for you, then you really must file a PR.


----------



## weyland-yutani (Nov 12, 2016)

free-and-bsd said:


> Here is what it says in /usr/ports/UPDATING on the issue:
> 
> ```
> AFFECTS: users of x11/nvidia-driver
> ...


My /boot/loader.conf:
kern.geom.label.gptid.enable="0"
zfs_load="YES"
ahci_load="YES"
nvidia-modeset_load="YES"
linux_load="YES"
cuse4bsd_load="YES"

As you can see I have what is necessary but it only works in 10.3 not in 11.0-.


----------



## Atsuri (Nov 12, 2016)

Have you tried just regular:

```
nvidia_load="YES"
```
?
I'm running 11.0, also on a laptop with nVidia graphics, and setting nvidia-modeset_load="YES" doesn't work for me. I guess it's worth a shot .


----------



## weyland-yutani (Nov 12, 2016)

Yes, I have tried it but the error continues. I do not know what can happen. FreeBSD 11.0 with the 346.96 driver worked very well.


----------



## free-and-bsd (Nov 14, 2016)

weyland-yutani said:


> Yes, I have tried it but the error continues.


OK, try this:

```
sysrc kld_list+="nvidia nvidia-modeset linux linsysfs linprocfs"
```
Then you'll really need additional file /usr/local/etc/X11/xorg.d.conf/driver.conf like this:

```
Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   BusID       "PCI:1:0:0"
EndSection
```
 (of course, you must substitute your own BusID from /var/log/Xorg.0.log or just omit that line)
See if this will do it for you. If it doesn't you have to file a PR.

https://forums.freebsd.org/threads/52311/


----------



## weyland-yutani (Nov 17, 2016)

Thanks! free-and-bsd,  It worked for me. I can finally enjoy freeBSD 11¡¡¡


----------



## calicant (May 19, 2017)

Hi jrdnull,

I have the same laptop model and nvidia drivers are not working for me, even in 12.0-CURRENT.
Did you succeed?


----------



## rayit (May 27, 2017)

I am trying/searching for some weeks now to get the nvidia card working also.
I am now working with scfb, but would like to get nvidia working.
Startx gives me blank screen with cursor and non moving mouse:
Anybody some idea's?

If you need more information, please let me know.

pciconf -lvbce
`...
vgapci1@pci0:6:0:0:     class=0x030200 card=0x223217aa chip=0x137a10de rev=0xa2 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GM108GLM [Quadro K620M / Quadro M500M]'
    class      = display
    subclass   = 3D
    bar   [10] = type Memory, range 32, base 0xf3000000, size 16777216, enabled
    bar   [14] = type Prefetchable Memory, range 64, base 0xe0000000, size 268435456, enabled
    bar   [1c] = type Prefetchable Memory, range 64, base 0xf0000000, size 33554432, enabled
    bar   [24] = type I/O Port, range 32, base 0xd000, size 128, enabled
    cap 01[60] = powerspec 3  supports D0 D3  current D0
    cap 05[68] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[78] = PCI-Express 2 endpoint max data 256(256) RO NS
                 link x4(x4) speed 2.5(8.0) ASPM L1(L0s/L1)
    ecap 0002[100] = VC 1 max VC0
    ecap 0018[250] = LTR 1
    ecap 001e[258] = unknown 1
    ecap 0004[128] = Power Budgeting 1
    ecap 000b[600] = Vendor 1 ID 1
    ecap 0019[900] = PCIe Sec 1 lane errors 0`

This is my 10-nvidia.conf file in:
/usr/local/etc/X11/xorg.conf.d/
`Section "Device"
   Identifier "NVIDIA Card"
   VendorName "NVIDIA Corporation"
   Driver "nvidia"
   BusID    "PCI:6:0:0"
 EndSection`

xorg output:
`nvidia1: <Quadro M500M> on vgapci1
vgapci1: child nvidia1 requested pci_enable_io
vgapci1: child nvidia1 requested pci_enable_io
nvidia-modeset: Allocated GPU:0 (GPU-eca7559f-4977-efe0-7f8a-6c257259d39c) @ PCI:0000:06:00.0
nvidia-modeset: Freed GPU:0 (GPU-eca7559f-4977-efe0-7f8a-6c257259d39c) @ PCI:0000:06:00.0
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)
ACPI Warning: \134_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160527/nsarguments-97)`

`nvidia-debugdump -l
Found 1 NVIDIA devices
        Device ID:              0
        Device name:            Quadro M500M
        GPU internal ID:        GPU-eca7559f-4977-efe0-7f8a-6c257259d3`

I tried bith nvidia and nvidia-modeset


----------



## free-and-bsd (May 29, 2017)

Do you have proper input drivers installed?
You need at least x11-drivers/xf86-input-keyboard and x11-drivers/xf86-input-mouse. And in case of a notebook you might want a touchpad solution.

...well, if you're _working_ with scfb, then I suppose you have them. But it won't hurt to ask.


----------



## free-and-bsd (May 29, 2017)

Here's another idea (since you welcomed ideas): are you booting via UEFI? If so, you may try booting in BIOS (legacy) mode instead and see if nvidia will work properly that way.
As for me, I'm using legacy because I'm using GRUB instead of the FreeBSD direct boot methods, and the last time I tried it (about 2 years ago, I guess) graphics didn't work well after booting UEFI mode. It may have changed, but I've never checked...

Here is another idea related to UEFI + nvidia.


----------



## rayit (May 30, 2017)

free-and-bsd said:


> Here's another idea (since you welcomed ideas): are you booting via UEFI? If so, you may try booting in BIOS (legacy) mode instead and see if nvidia will work properly that way.
> As for me, I'm using legacy because I'm using GRUB instead of the FreeBSD direct boot methods, and the last time I tried it (about 2 years ago, I guess) graphics didn't work well after booting UEFI mode. It may have changed, but I've never checked...
> 
> Here is another idea related to UEFI + nvidia.



I tried booting in legacy mode but my laptop stopped.
So I first need to find a way to switch to legacy mode.
As soon as I find some time I will give it a try!

The 
kld_list="nvidia" method did not work for me.
Thanks
Raymond


----------



## free-and-bsd (Jun 16, 2017)

rayit said:


> I tried booting in legacy mode but my laptop stopped.
> So I first need to find a way to switch to legacy mode.


I wonder if it stopped because the installation itself doesn't contain the legacy booting code... You know, these automated installations decide things on their own. Because, as I understand it, ALL the BIOSes are supposed to support this «fallback» feature.


----------

