HOWTO: Setup Xorg with NVIDIA's driver

tobik@

Daemon
Developer

Thanks: 1,345
Messages: 1,909

#1
  1. If you are following the handbook on configuring Xorg, ignore what the handbook says about running Xorg -configure.
  2. Don't run Xorg -configure
  3. If you already followed the handbook and created an xorg.conf make sure to remove /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf before proceeding: rm -f /etc/X11/xorg.conf /usr/local/etc/X11/xorg.conf
  4. Install x11/nvidia-driver: pkg install nvidia-driver

    For some older cards you need to use x11/nvidia-driver-340 or x11/nvidia-driver-304 instead. Consult NVIDIA's download page to see which driver version you need. Note that there is no need (and it's even counterproductive) to download the driver from that page.
  5. Run sysrc kld_list+="nvidia-modeset" to add an entry to /etc/rc.conf to load the kernel modules at boot. sysrc(8) is a nice utility that safely edits /etc/rc.conf for you.

    nvidia-modeset is only available for driver versions >= 358.009, if you to use an older version use sysrc kld_list+="nvidia" instead.
  6. Either reboot with shutdown -r now or load the required kernel modules now with kldload nvidia-modeset or kldload nvidia
  7. Create the /usr/local/etc/X11/xorg.conf.d directory:
    mkdir -p /usr/local/etc/X11/xorg.conf.d
  8. Use your favourite editor to create /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf with the following contents:
    Code:
    Section "Device"
            Identifier "NVIDIA Card"
            VendorName "NVIDIA Corporation"
            Driver "nvidia"
    EndSection
  9. At this point you can continue following the rest of the handbook on setting up a display manager and desktop environment.
 
Last edited:

protocelt

Daemon

Thanks: 406
Messages: 1,253

#2
Thanks for this! Just want to add that the Linux compatibility option is on by default in the port so the linux(4) kernel module needs to be loaded by adding linux_load="YES" to /boot/loader.conf. I'm not sure however if this is loaded at boot automatically as a dependent module when the Nvidia kernel driver is loaded or not. I always set up my environment before installing ports when installing FreeBSD. :)

Edit: Just checked and linux.ko is loaded automatically as a dependent module at boot but if installing x11/nvidia-driver from ports it will need to be loaded as a prerequisite to installing the port unless the Linux compatibility option is turned off.
 

protocelt

Daemon

Thanks: 406
Messages: 1,253

#3
For users having tearing problems when using compositing with Nvidia Kepler and newer based cards:

From what I understand, starting with Nvidia's Kepler based GPUs, Nvidia removed the hardware support for tearing/Vsync in the GPU and added additions to control this in the driver instead. For many users of FreeBSD, Linux and even Windows in some cases, this does not prevent tearing very well if at all. Nvidia's answer to this is it's newer G-Sync technology built into some monitors and supported by some cards. If you do not have a card and monitor that supports G-Sync and have tearing issues, there is a workaround.

Enabling the options "ForceFullCompositionPipeline" and "TripleBuffer" in the /usr/local/etc/X11/xorg.conf/10-nvidia.conf file referenced above should fix the tearing issues. The drawback is a slight penalty in performance but for every day desktop use, this shouldn't really be noticed at all. It may be noticed more when playing games under FreeBSD, though YMMV. I didn't notice much of a difference at all myself in my limited testing.

If you are following tobik's instructions above, your 10-nvidia.conf file would look similar to the following with these changes included:

Code:
Section "Device"
        Identifier     "NVIDIA Card"
        VendorName     "NVIDIA Corporation"
        Driver         "nvidia"
        Option         "AccelMethod" "none"
        Option         "TripleBuffer" "True"
        Option         "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
EndSection
I tested this using both compositing under KDE as well as x11-wm/compton.
 

dlegrand

Active Member

Thanks: 52
Messages: 172

#4
For users having tearing problems when using compositing with Nvidia Kepler and newer based cards:

From what I understand, starting with Nvidia's Kepler based GPUs, Nvidia removed the hardware support for tearing/Vsync in the GPU and added additions to control this in the driver instead. For many users of FreeBSD, Linux and even Windows in some cases, this does not prevent tearing very well if at all. Nvidia's answer to this is it's newer G-Sync technology built into some monitors and supported by some cards. If you do not have a card and monitor that supports G-Sync and have tearing issues, there is a workaround.

Enabling the options "ForceFullCompositionPipeline" and "TripleBuffer" in the /usr/local/etc/X11/xorg.conf/10-nvidia.conf file referenced above should fix the tearing issues. The drawback is a slight penalty in performance but for every day desktop use, this shouldn't really be noticed at all. It may be noticed more when playing games under FreeBSD, though YMMV. I didn't notice much of a difference at all myself in my limited testing.

If you are following tobik's instructions above, your 10-nvidia.conf file would look similar to the following with these changes included:

Code:
Section "Device"
        Identifier     "NVIDIA Card"
        VendorName     "NVIDIA Corporation"
        Driver         "nvidia"
        Option         "AccelMethod" "none"
        Option         "TripleBuffer" "True"
        Option         "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
EndSection
I tested this using both compositing under KDE as well as x11-wm/compton.
Hi,

Thank you very much, I was looking for that trick for a long time !

My video adapter is an Nvidia GT610 and tearing disappears with your instructions. But another problem appears : my mouse cursor disappears when it approach the top of the screen.
I am using FreeBSD 10.2-RELEASE-p9 and xorg-7.7_2 with fvwm-2.6.5_7.
 

protocelt

Daemon

Thanks: 406
Messages: 1,253

#5
But another problem appears : my mouse cursor disappears when it approach the top of the screen.
I am using FreeBSD 10.2-RELEASE-p9 and xorg-7.7_2 with fvwm-2.6.5_7.
This issue is fixed in newer versions of the Nvidia driver which have not been pulled into the ports tree yet.
 

bald_bohemian

New Member


Messages: 14

#7
  1. If you are following the handbook on configuring Xorg, ignore what the handbook says about running Xorg -configure.
  2. Don't run Xorg -configure
  3. If you already followed the handbook and created an xorg.conf make sure to remove /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf before proceeding: rm -f /etc/X11/xorg.conf /usr/local/etc/X11/xorg.conf
  4. Install x11/nvidia-driver: pkg install x11/nvidia-driver

    For some older cards you need to use x11/nvidia-driver-340 or x11/nvidia-driver-304 instead. Consult NVIDIA's download page to see which driver version you need. Note that there is no need (and it's even counterproductive) to download the driver from that page.
  5. Run sysrc kld_list+=nvidia to add an entry to /etc/rc.conf to load the kernel module at boot. sysrc(8) is a nice utility that safely edits /etc/rc.conf for you. Alternatively, if you like that better you can add nvidia_load="YES" to /boot/loader.conf
  6. Either reboot with shutdown -r now or load the kernel module with kldload nvidia
  7. Create the /usr/local/etc/X11/xorg.conf.d directory:
    mkdir -p /usr/local/etc/X11/xorg.conf.d
  8. Use your favourite editor to create /usr/local/etc/X11/xorg.conf.d/10-nvidia.conf with the following contents:
    Code:
    Section "Device"
            Identifier "NVIDIA Card"
            VendorName "NVIDIA Corporation"
            Driver "nvidia"
    EndSection
  9. At this point you can continue following the rest of the handbook on setting up a display manager and desktop environment.
I tried going to this page to find out which version of the driver I should use. The only information I was able to find is that I would need version 361.28. Is there a way to translate this version number to whether I need the 330, 304 or regular nvidia-driver? Thank you
 
OP
OP
T

tobik@

Daemon
Developer

Thanks: 1,345
Messages: 1,909

#8
I tried going to this page to find out which version of the driver I should use. The only information I was able to find is that I would need version 361.28. Is there a way to translate this version number to whether I need the 330, 304 or regular nvidia-driver? Thank you
There's no port for that version yet AFAICT :( The version numbers should correspond with the port versions.

What GPU do you have?
 

protocelt

Daemon

Thanks: 406
Messages: 1,253

#12
For users that are having problems or have questions about Xorg and Nvidia GPUs, please create a new thread for your question in a support forum that would be more appropriate.

If you have a question directly related to this Howto/FAQ, or have something to add to it, you are always still welcome to post it to this thread.

Thanks!
 
OP
OP
T

tobik@

Daemon
Developer

Thanks: 1,345
Messages: 1,909

#13
A quick note for those who want to build x11/nvidia-driver or related ports themselves.
Make sure you have the correct source tree in /usr/src. Errors like
Code:
make[2]: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree. Set SYSDIR to override
*** Error code 1
during building or
Code:
KLD nvidia:ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
when loading the driver are strong hints that you have either no sources or the wrong sources installed.

For FreeBSD 10.3-RELEASE you can fetch the correct tree via one of these two methods:
  1. svnlite checkout https://svn.freebsd.org/base/releng/10.3 /usr/src
  2. Or grab and extract the src.txz tarball (it's the one you can select in the installer as well):
    Code:
    fetch https://download.freebsd.org/ftp/releases/amd64/10.3-RELEASE/src.txz
    tar -C / -xf src.txz
    Starting an update with freebsd-update fetch and freebsd-update install is recommend even if you've already updated previously. freebsd-update will make sure that the sources match the most recent patch level.
 
Last edited:

ILUXA

Aspiring Daemon

Thanks: 348
Messages: 565

#14
For users having tearing problems when using compositing with Nvidia Kepler and newer based cards:
Code:
  Option  "MetaModes" "nvidia-auto-select +0+0 { [b]ForceFullCompositionPipeline[/b] = On }"
"ForceCompositionPipeline" works better for me (GeForce 9 Series).
Code:
Option         "metamodes" "1280x1024 +0+0 { [b]ForceCompositionPipeline[/b] = On }"
I'm using it in "Screen" section in /etc/X11/xorg.conf
Code:
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "metamodes" "1280x1024 +0+0 { ForceCompositionPipeline = On }"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
http://http.download.nvidia.com/XFree86/FreeBSD-x86_64/340.96/README/configtwinview.html said:
⚫ "ForceCompositionPipeline": possible values are "On" or "Off". The NVIDIA X driver can use a composition pipeline to apply X screen transformations and rotations. "ForceCompositionPipeline" can be used to force the use of this pipeline, even when no transformations or rotations are applied to the screen.

⚫ "ForceFullCompositionPipeline": possible values are "On" or "Off". This option implicitly enables "ForceCompositionPipeline" and additionally makes use of the composition pipeline to apply ViewPortOut scaling.
Also it is possible to start your WM (window manager) with right resolution with this fix via ~/.xinitrc:
Code:
#!/bin/sh
[u]nvidia-settings --assign CurrentMetaMode="1280x1024 +0+0 { ForceCompositionPipeline = On }"[/u]
exec /usr/local/bin/wmaker
(x11/nvidia-settings should be installed).
 

free-and-bsd

Aspiring Daemon

Thanks: 67
Messages: 643

#15
Interesting!
I have two computers with (older) NVIDIA cards, both run 11.0-CURRENT, and neither ever needed ANY /usr/local/etc/X11/xorg.conf.d/*.conf file to explicitly inform my system to use NVIDIA driver.

However, what I did need was to instruct Xorg how to handle my dual monitors the way I needed it. The problem was, while using one screen for 2 monitors it would always put them in the "wrong" order -- and me not being able to physically swap them for certain reasons. So, instead of physically swapping them I figured out the far more gracious ;) way to do that.

DON'T use any nvidia-settings or nvidia-xconfig or any such stuff. They are WAY too complicated for this simple task! Both will create huge and overly complicated xorg.conf file stuffed with specific nvidia-related options and settings you don't really need for a simple task of using 2 monitors with default driver-decided settings in the needed order.

It just took me to put a simple twin.conf file into /usr/local/etc/X11/xorg.conf.d:
Code:
Section "ServerLayout"
  Identifier "myLayout"
  Screen 0   "myScreen" 0 0
EndSection

Section "Device"
  Identifier   "Card0"
  Driver   "nvidia"
  VendorName   "NVIDIA Corporation"
EndSection

Section "Screen"
Identifier  "myScreen"
  Device  "Card0"
  Option   "MetaModes"   "DFP-1:nvidia-auto-select,DFP-0:nvidia-auto-select"
  Option   "MetaModeOrientation"   "DFP-1 LeftOf DFP-0"
EndSection
I've taken the exact data (DFP-1 and such) from /var/log/Xorg.0.log, BTW. It clearly reports there whether it is using configuration from /usr/local/etc/X11/xorg.conf.d or not, and why not. So it wouldn't use anything defined in "Screen" section alone unless a "Device" section be present as well. But with monitors and input devices it seems quite safe to stay with defaults.

I'm putting this here partly because this is just as simple as they come, while whatever I've found on the web was far more complicated (even at the very helpful Arch Wiki page).
 

Lucky

New Member


Messages: 5

#18
Hey guys! Thank you everyone for your input here as it's been a great help so far. (3 days at this so far... and yes... losing my mind) Could I please ask for a little assistance though... I get a black screen with the cursor frozen in the center and have to force it to exit.
Can anyone see where my problem is.
System. freebsd 11.1 with a nvidia 1050 card attached to an external Monitor via HDMI

rc.conf
Code:
hald_enable="YES"
dbus_enable="YES"
/boot/loader.conf
Code:
linux_load="YES" # have tried with this loaded from rc.conf as well
nvidia_load="YES"  # have tried with and without this included
nvidia_name="nvidia"  # have tried with and without this included
nvidia_modeset_load="YES"
nvidia_modeset_name="nvidia-modeset"
Via latest updated ports
xorg
nvidia-driver
nvidia-xconfig
nvidia-settings



Script I'm now using # have tried everything on this page and every other page on every search engine result (even minimal as well as free-and-bsd's examples)

Code:
Section "ServerLayout"
  Identifier "Default Layout"
  Screen 0 "HDMI1"
EndSection
Section "Module"
  Load "glx"
EndSection
Section "Monitor"
  Identifier "HDMI"
EndSection
Section "Device"
  Identifier "NVIDIA"
  Driver "nvidia"
  BusID "PCI:1:0:0"
  VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
  Identifier "HDMI1"
  Device "NVIDIA"
  Monitor "HDMI"
  DefaultDepth 24
  Option "IgnoreEDID" "True"
  Option "ConnectedMonitor" "DFP-1"
  Option "UseDisplayDevice" "DFP-1"
  SubSection "Display"
    Depth 24
    Modes "1024x768_60"
  EndSubSection
EndSection
And this is what's going on in the background before I exit the black screen... I feel like I have a mouse problem that's causing it to hang as it always seems to end the log file on the mouse...

Thank you to anyone that's kind enough to help me out here. Much appreciated...

Code:
X.Org X Server 1.18.4
Release Date: 2016-07-19
[    37.423] X Protocol Version 11, Revision 0
[    37.423] Build Operating System: FreeBSD 11.1-RELEASE amd64
[    37.423] Current Operating System: FreeBSD bsd 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[    37.423] Build Date: 29 October 2017  04:22:44PM
[    37.423]
[    37.423] Current version of pixman: 0.34.0
[    37.423]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    37.423] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    37.423] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Oct 29 16:53:16 2017
[    37.488] (==) Using config file: "/etc/X11/xorg.conf"
[    37.527] (==) ServerLayout "Default Layout"
[    37.527] (**) |-->Screen "HDMI1" (0)
[    37.527] (**) |   |-->Monitor "HDMI"
[    37.528] (**) |   |-->Device "NVIDIA"
[    37.528] (==) Automatically adding devices
[    37.528] (==) Automatically enabling devices
[    37.528] (==) Not automatically adding GPU devices
[    37.549] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    37.656] (==) 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/
[    37.656] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    37.656] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[    37.662] (II) Loader magic: 0x80cc10
[    37.663] (II) Module ABI versions:
[    37.663]     X.Org ANSI C Emulation: 0.4
[    37.663]     X.Org Video Driver: 20.0
[    37.663]     X.Org XInput driver : 22.1
[    37.663]     X.Org Server Extension : 9.0
[    37.663] (--) PCI:*(0:0:2:0) 8086:591b:1558:850a rev 4, Mem @ 0xdd000000/16777216, 0xa0000000/536870912, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[    37.663] (--) PCI: (0:1:0:0) 10de:1c8d:1558:850a rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128
[    37.663] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[    37.663] (II) LoadModule: "glx"
[    37.677] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    38.327] (II) Module glx: vendor="NVIDIA Corporation"
[    38.327]     compiled for 4.0.2, module version = 1.0.0
[    38.327]     Module class: X.Org Server Extension
[    38.328] (II) NVIDIA GLX Module  384.90  Tue Sep 19 17:25:09 PDT 2017
[    38.342] (II) LoadModule: "nvidia"
[    38.342] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[    38.420] (II) Module nvidia: vendor="NVIDIA Corporation"
[    38.420]     compiled for 4.0.2, module version = 1.0.0
[    38.420]     Module class: X.Org Video Driver
[    38.429] (II) NVIDIA dlloader X Driver  384.90  Tue Sep 19 17:02:53 PDT 2017
[    38.429] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    38.431] (--) Using syscons driver with X support (version 2.0)
[    38.431] (--) using VT number 9

[    38.443] (II) Loading sub module "fb"
[    38.443] (II) LoadModule: "fb"
[    38.443] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[    38.449] (II) Module fb: vendor="X.Org Foundation"
[    38.449]     compiled for 1.18.4, module version = 1.0.0
[    38.449]     ABI class: X.Org ANSI C Emulation, version 0.4
[    38.449] (II) Loading sub module "wfb"
[    38.449] (II) LoadModule: "wfb"
[    38.450] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[    38.458] (II) Module wfb: vendor="X.Org Foundation"
[    38.458]     compiled for 1.18.4, module version = 1.0.0
[    38.458]     ABI class: X.Org ANSI C Emulation, version 0.4
[    38.458] (II) Loading sub module "ramdac"
[    38.458] (II) LoadModule: "ramdac"
[    38.458] (II) Module "ramdac" already built-in
[    38.479] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    38.479] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[    38.479] (==) NVIDIA(0): RGB weight 888
[    38.479] (==) NVIDIA(0): Default visual is TrueColor
[    38.479] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    38.495] (**) NVIDIA(0): Option "ConnectedMonitor" "DFP-1"
[    38.495] (**) NVIDIA(0): Option "UseDisplayDevice" "DFP-1"
[    38.495] (**) NVIDIA(0): Enabling 2D acceleration
[    38.495] (**) NVIDIA(0): ConnectedMonitor string: "DFP-1"
[    38.904] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    38.904] (--) NVIDIA(0):     DFP-0
[    38.904] (--) NVIDIA(0):     DFP-1
[    38.904] (**) NVIDIA(0): Using ConnectedMonitor string "DFP-1".
[    38.905] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 1050 (GP107-A) at PCI:1:0:0 (GPU-0)
[    38.905] (--) NVIDIA(0): Memory: 2097152 kBytes
[    38.905] (--) NVIDIA(0): VideoBIOS: 86.07.2a.00.47
[    38.905] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    38.905] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    38.905] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[    38.905] (--) NVIDIA(GPU-0): DFP-0: 1440.0 MHz maximum pixel clock
[    38.905] (--) NVIDIA(GPU-0):
[    38.905] (--) NVIDIA(GPU-0): DFP-1: connected
[    38.905] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[    38.905] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[    38.905] (--) NVIDIA(GPU-0):
[    38.993] (WW) NVIDIA(0): No valid modes for "DFP-1:1280x720_60"; removing.
[    38.993] (WW) NVIDIA(0):
[    38.993] (WW) NVIDIA(0): Unable to validate any modes; falling back to the default mode
[    38.993] (WW) NVIDIA(0):     "nvidia-auto-select".
[    38.993] (WW) NVIDIA(0):
[    38.994] (II) NVIDIA(0): Validated MetaModes:
[    38.994] (II) NVIDIA(0):     "DFP-1:nvidia-auto-select"
[    38.994] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[    38.997] (WW) NVIDIA(0): DFP-1 does not have an EDID, or its EDID does not contain a
[    38.997] (WW) NVIDIA(0):     maximum image size; cannot compute DPI from DFP-1's EDID.
[    38.997] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[    38.997] (--) Depth 24 pixmap format is 32 bpp
[    38.998] (II) NVIDIA: Reserving 24576.00 MB of virtual memory for indirect memory
[    38.998] (II) NVIDIA:     access.
[    39.056] (II) NVIDIA(0): Setting mode "DFP-1:nvidia-auto-select"
[    39.142] (==) NVIDIA(0): Disabling shared memory pixmaps
[    39.142] (==) NVIDIA(0): Backing store enabled
[    39.142] (==) NVIDIA(0): Silken mouse enabled
[    39.143] (==) NVIDIA(0): DPMS enabled
[    39.143] (WW) NVIDIA(0): Option "IgnoreEDID" is not used
[    39.143] (II) Loading sub module "dri2"
[    39.143] (II) LoadModule: "dri2"
[    39.143] (II) Module "dri2" already built-in
[    39.143] (II) NVIDIA(0): [DRI2] Setup complete
[    39.143] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    39.144] (--) RandR disabled
[    39.150] (II) Initializing extension GLX
[    39.150] (II) Indirect GLX disabled.
[    39.738] (II) config/devd: probing input devices...
[    39.738] (II) config/devd: adding input device (null) (/dev/kbdmux)
[    39.738] (II) LoadModule: "kbd"
[    39.747] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[    39.748] (II) Module kbd: vendor="X.Org Foundation"
[    39.748]     compiled for 1.18.4, module version = 1.9.0
[    39.748]     Module class: X.Org XInput Driver
[    39.748]     ABI class: X.Org XInput driver, version 22.1
[    39.748] (II) Using input driver 'kbd' for 'kbdmux'
[    39.748] (**) kbdmux: always reports core events
[    39.748] (**) kbdmux: always reports core events
[    39.748] (**) Option "Protocol" "standard"
[    39.748] (**) Option "XkbRules" "base"
[    39.748] (**) Option "XkbModel" "pc105"
[    39.748] (**) Option "XkbLayout" "us"
[    39.748] (**) Option "config_info" "devd:kbdmux"
[    39.748] (II) XINPUT: Adding extended input device "kbdmux" (type: KEYBOARD, id 6)
[    39.751] (II) config/devd: kbdmux is enabled, ignoring device ukbd0
[    39.751] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[    39.751] (II) config/devd: adding input device (null) (/dev/sysmouse)
[    39.751] (II) LoadModule: "mouse"
[    39.751] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[    39.763] (II) Module mouse: vendor="X.Org Foundation"
[    39.763]     compiled for 1.18.4, module version = 1.9.2
[    39.763]     Module class: X.Org XInput Driver
[    39.763]     ABI class: X.Org XInput driver, version 22.1
[    39.763] (II) Using input driver 'mouse' for 'sysmouse'
[    39.763] (**) sysmouse: always reports core events
[    39.763] (**) Option "Device" "/dev/sysmouse"
[    39.763] (==) sysmouse: Protocol: "Auto"
[    39.763] (**) sysmouse: always reports core events
[    39.763] (==) sysmouse: Emulate3Buttons, Emulate3Timeout: 50
[    39.763] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[    39.763] (**) sysmouse: Buttons: 5
[    39.763] (**) Option "config_info" "devd:sysmouse"
[    39.763] (II) XINPUT: Adding extended input device "sysmouse" (type: MOUSE, id 7)
[    39.763] (**) sysmouse: (accel) keeping acceleration scheme 1
[    39.763] (**) sysmouse: (accel) acceleration profile 0
[    39.763] (**) sysmouse: (accel) acceleration factor: 2.000
[    39.763] (**) sysmouse: (accel) acceleration threshold: 4
[    39.763] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0
[    39.763] (II) sysmouse: SetupAuto: protocol is SysMouse
[    39.763] (II) config/devd: device /dev/ums0 already opened
[    39.821] (II) config/devd: adding input device Mouse (/dev/psm0)
[    39.821] (II) Using input driver 'mouse' for 'Mouse'
[    39.821] (**) Mouse: always reports core events
[    39.821] (**) Option "Device" "/dev/psm0"
[    39.821] (==) Mouse: Protocol: "Auto"
[    39.821] (**) Mouse: always reports core events
[    39.880] (==) Mouse: Emulate3Buttons, Emulate3Timeout: 50
[    39.880] (**) Mouse: ZAxisMapping: buttons 4 and 5
[    39.880] (**) Mouse: Buttons: 5
[    39.880] (**) Option "config_info" "devd:psm0"
[    39.880] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE, id 8)
[    39.880] (**) Mouse: (accel) keeping acceleration scheme 1
[    39.880] (**) Mouse: (accel) acceleration profile 0
[    39.880] (**) Mouse: (accel) acceleration factor: 2.000
[    39.880] (**) Mouse: (accel) acceleration threshold: 4
[    39.898] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 0
[    39.898] (II) Mouse: SetupAuto: protocol is PS/2
[    40.348] (II) Mouse: ps2EnableDataReporting: succeeded
[    61.077] Failed to switch from vt09 to vt02: Device busy
[    69.107] (II) config/devd: terminating backend...
[    69.107] (II) UnloadModule: "mouse"
[    69.107] (II) UnloadModule: "mouse"
[    69.107] (II) UnloadModule: "kbd"
[    69.360] (II) NVIDIA(GPU-0): Deleting GPU-0
[    69.361] (II) Server terminated successfully (0). Closing log file.
 
Last edited by a moderator:

free-and-bsd

Aspiring Daemon

Thanks: 67
Messages: 643

#19
IMPORTANT: HALD is DISABLED in default builds of X. DEVD is now used for keyboard | mouse automatic configuration, and it JUST works.
It seems, you need these in your rc.conf (I've had them all this while, without them the frozen mouse problem):
Code:
moused_enable="YES"
mouse_type="auto"
devd_enable="YES"
Script I'm now using
Do you place that "script" of yours in /etc/X11/xorg.conf? With the new nvidia-driver it uses /usr/local/etc/X11/xorg.conf.d directory for configuration files.For example, I have a monitor.conf containing sections "Monitor" and "Device", and driver.conf having only "Device" section.
It seems also, that all the stuff about "connected monitors" and such is silently ignored by nvidia-driver, as well as this line:
Code:
Modes "1024x768_60"
(see below in your log). This type of string seems to work with nvidia-driver, like others have posted above:
Code:
Option      "MetaModes" "CRT-0:1280x1024+0+0"
(you put DFP-1 instead of CRT-0 and your resolution).
So now you can analyze your log file
:
[ 37.488] (==) Using config file: "/etc/X11/xorg.conf"
... blablabla...
[ 38.905] (--) NVIDIA(GPU-0): DFP-0: disconnected
[ 38.905] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[ 38.905] (--) NVIDIA(GPU-0): DFP-0: 1440.0 MHz maximum pixel clock
[ 38.905] (--) NVIDIA(GPU-0):
[ 38.905] (--) NVIDIA(GPU-0): DFP-1: connected
[ 38.905] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[ 38.905] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[ 38.905] (--) NVIDIA(GPU-0):
[ 38.993] (WW) NVIDIA(0): No valid modes for "DFP-1:1280x720_60"; removing.
[ 38.993] (WW) NVIDIA(0):
[ 38.993] (WW) NVIDIA(0): Unable to validate any modes; falling back to the default mode
[ 38.993] (WW) NVIDIA(0): "nvidia-auto-select".
[ 38.993] (WW) NVIDIA(0):
[ 38.994] (II) NVIDIA(0): Validated MetaModes:
[ 38.994] (II) NVIDIA(0): "DFP-1:nvidia-auto-select"
[ 38.994] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[ 38.997] (WW) NVIDIA(0): DFP-1 does not have an EDID, or its EDID does not contain a
[ 38.997] (WW) NVIDIA(0): maximum image size; cannot compute DPI from DFP-1's EDID.
[ 38.997] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[ 38.997] (--) Depth 24 pixmap format is 32 bpp
...
[ 39.143] (WW) NVIDIA(0): Option "IgnoreEDID" is not used
...
[ 61.077] Failed to switch from vt09 to vt02: Device busy
[ 69.107] (II) config/devd: terminating backend...
[ 69.107] (II) UnloadModule: "mouse"
[ 69.107] (II) UnloadModule: "mouse"
[ 69.107] (II) UnloadModule: "kbd"
[ 69.360] (II) NVIDIA(GPU-0): Deleting GPU-0
[ 69.361] (II) Server terminated successfully (0). Closing log file.
1) You see it IS using configuration file at /etc/X11/xorg.conf — this way you can make sure whether or not your conf is used.
2) Your connected monitor is indeed DFP-1, but it doesn't seem to supply EDID, and the driver seems to be unable to determine the valid modes without it. And option "IgnoreEDID" is not used by the driver.
I had that problem with one of my monitors (it suddenly stopped supplying EDID!), so I found EDID file for my particular monitor model by googling and supplied it via xorg.conf, and it worked. There is a config option to supply EDID from file.
3) Per this log your mouse/keyboard must be all right... So your frozen mouse may result from enabling HALD and not enabling DEVD, which by default must be the other way around. Or maybe both are enabled? Need to fix that.

Don't know that thing about switching from vt09 to vt02. You should know better what you're doing on your computer.
 

Lucky

New Member


Messages: 5

#20
IMPORTANT: HALD is DISABLED in default builds of X. DEVD is now used for keyboard | mouse automatic configuration, and it JUST works.
It seems, you need these in your rc.conf (I've had them all this while, without them the frozen mouse problem):
Code:
moused_enable="YES"
mouse_type="auto"
devd_enable="YES"
Do you place that "script" of yours in /etc/X11/xorg.conf? With the new nvidia-driver it uses /usr/local/etc/X11/xorg.conf.d directory for configuration files.For example, I have a monitor.conf containing sections "Monitor" and "Device", and driver.conf having only "Device" section.
It seems also, that all the stuff about "connected monitors" and such is silently ignored by nvidia-driver, as well as this line: (see below in your log). This type of string seems to work with nvidia-driver, like others have posted above:
Code:
Option      "MetaModes" "CRT-0:1280x1024+0+0"
(you put DFP-1 instead of CRT-0 and your resolution).
So now you can analyze your log file1) You see it IS using configuration file at /etc/X11/xorg.conf — this way you can make sure whether or not your conf is used.
2) Your connected monitor is indeed DFP-1, but it doesn't seem to supply EDID, and the driver seems to be unable to determine the valid modes without it. And option "IgnoreEDID" is not used by the driver.
I had that problem with one of my monitors (it suddenly stopped supplying EDID!), so I found EDID file for my particular monitor model by googling and supplied it via xorg.conf, and it worked. There is a config option to supply EDID from file.
3) Per this log your mouse/keyboard must be all right... So your frozen mouse may result from enabling HALD and not enabling DEVD, which by default must be the other way around. Or maybe both are enabled? Need to fix that.

Don't know that thing about switching from vt09 to vt02. You should know better what you're doing on your computer.




I forgot how incredibly kind and helpful freebsd people are! Thank you free-and-bsd! Still not much luck. Trying with the xorg.conf file from a linux install to get a base. Still won't load though. Lots of trail and error...
 

Lucky

New Member


Messages: 5

#22
Well it seems from your X log that devd is working. Does your mouse work in console mode before you start X?
On the system, I am getting some "acpi-warning-argument-4-type-mismatch"
ACPI Warning: \_SB_.PCI0.RP01.PXSX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package]

Day 4 and I really am losing it. I've tried so many combos and read so much on the subject, but just can't get it. Was just hoping I could get a desktop like kde or gnome running on the lappy under bsd and use it as the main os... The only option that's worked is running scfb driver @ 800x600
Can you see if I'm missing anything? Here's the system and files I've been working with. I'm SO grateful for your help as I feel as though I'm not alone on this, but not sure my options anymore. I've tried to the conf files from a nvdia driven kubuntu install, but still wasn't able to get it working on bsd. All I get is a black screen with a mouse cursor in the middle when I startx and the desktop just runs behind the scenes... Don't care about the external monitor. Just the lappy monitor, but even unplugged, (only lappy screen), still same results...

If you can see something I'm missing, could you 'PLEASE" let me know.
And... free-and-bsd for all your help so far, I have to say, thank you so much!



RC.CONF
Code:
hostname="bsd"
keymap="jp.106.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
linux_enable="YES"
lpd_enable="NO"
cupsd_enable="YES"
apache24_enable="YES"
kld_list="nvidia-modeset"

LOADER.CONF
Code:
kern.ipc.shmseg=1024
kern.ipc.shmmni=1024
kern.maxproc=10000
mmc_load="YES"
mmcsd_load="YES"
sdhci_load="YES"
fuse_load="YES"
coretemp_load="YES"
tmpfs_load="YES"
aio_load="YES"
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"
nvidia_modeset_load="YES"
kern.vty=vt
XORG.CONF
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 384.59  (root@bsd)  Mon Oct 30 11:28:46 AEDT 2017

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen      0  "HDMI SCREEN" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Module"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
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 "Monitor"

    # Horizsync    30-71
    # Vertrefresh    50-160
    Identifier     "HDMI"
    VendorName     "Samsung"
    ModelName      "Samsung SyncMaster 793S/793V/CM173G"
    HorizSync       24.0 - 94.0
    VertRefresh     24.0 - 87.0
    Gamma           1
    ModeLine       "640x480@60" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
    ModeLine       "640x480@72" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync
    ModeLine       "640x480@75" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
    ModeLine       "640x480@85" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
    ModeLine       "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
    ModeLine       "800x600@72" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
    ModeLine       "800x600@75" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
    ModeLine       "800x600@85" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
    ModeLine       "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
    ModeLine       "832x624@75" 57.284 832 864 928 1152 624 625 628 667 -hsync -vsync
    ModeLine       "1024x768@85" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
    ModeLine       "1024x768@75" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
    ModeLine       "1024x768@70" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768@43" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync interlace
    ModeLine       "1152x864@75" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
    ModeLine       "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
    ModeLine       "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine       "1400x1050@60" 122.61 1400 1488 1640 1880 1050 1051 1054 1087 -hsync +vsync
EndSection

Section "Device"
    Identifier     "intel"
    Driver         "modesetting"
    Option         "AccelMethod" "None"
    BusID          "PCI:0:2:0"
EndSection

Section "Device"
    Identifier     "NVIDIA 1050"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA [GeForce GTX 1050]"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "intel"
    Device         "intel"
    Monitor        "HDMI"
EndSection

Section "Screen"
    Identifier     "HDMI SCREEN"
    Device         "NVIDIA 1050"
    Monitor        "HDMI"
    DefaultDepth    24
    Option         "DFP-0" "96 x 96"
    Option         "ModeValidation" "AllowNonEdidModes"
    Option         "IgnoreEDIDChecksum" "DFP-0"
 # Option "AllowEmptyInitialConfiguration" "on"
    Option         "ConnectedMonitor" "DFP-0"
    Option         "UseDisplayDevice" "DFP-0"
    Option         "MetaModes" "DFP-0:nvidia-auto-select,DFP-1:nvidia-auto-select"
 # Option   "MetaModeOrientation"   "DFP-0 LeftOf DFP-1"
    Option         "ConstrainCursor" "off"
    Option         "UseEDID" "false"
    SubSection     "Display"
        Depth       24
        Modes      "1024x768@70" "1024x768@60" "1024x768@75" "1024x768@43" "1024x768@85" "1152x864@75" "832x624@75" "1280x960@60" "800x600@60" "1280x1024@60" "800x600@85" "1400x1050@60" "800x600@75" "800x600@72" "800x600@56" "640x480@85" "640x480@75" "640x480@72" "640x480@60"
    EndSubSection
EndSection
XORG.0.LOG

Code:
[  1579.733]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[  1579.733] X Protocol Version 11, Revision 0
[  1579.734] Build Operating System: FreeBSD 11.0-RELEASE-p13 amd64
[  1579.734] Current Operating System: FreeBSD bsd 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[  1579.734] Build Date: 19 October 2017  09:03:10AM
[  1579.734]
[  1579.734] Current version of pixman: 0.34.0
[  1579.734]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  1579.734] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1579.734] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Oct 30 12:00:44 2017
[  1579.734] (==) Using config file: "/etc/X11/xorg.conf"
[  1579.734] (==) ServerLayout "Default Layout"
[  1579.734] (**) |-->Screen "HDMI SCREEN" (0)
[  1579.734] (**) |   |-->Monitor "HDMI"
[  1579.734] (**) |   |-->Device "NVIDIA 1050"
[  1579.734] (**) |   |-->GPUDevice "NVIDIA 1050"
[  1579.734] (**) |-->Input Device "Keyboard0"
[  1579.734] (**) |-->Input Device "Mouse0"
[  1579.734] (==) Automatically adding devices
[  1579.734] (==) Automatically enabling devices
[  1579.734] (==) Not automatically adding GPU devices
[  1579.734] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1579.734] (==) 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/
[  1579.734] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  1579.734] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  1579.734] (WW) Disabling Keyboard0
[  1579.734] (WW) Disabling Mouse0
[  1579.734] (II) Loader magic: 0x813b70
[  1579.734] (II) Module ABI versions:
[  1579.734]     X.Org ANSI C Emulation: 0.4
[  1579.734]     X.Org Video Driver: 20.0
[  1579.734]     X.Org XInput driver : 22.1
[  1579.734]     X.Org Server Extension : 9.0
[  1579.734] (--) PCI:*(0:0:2:0) 8086:591b:1558:850a rev 4, Mem @ 0xdd000000/16777216, 0xa0000000/536870912, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[  1579.734] (--) PCI: (0:1:0:0) 10de:1c8d:1558:850a rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128
[  1579.734] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  1579.734] (II) LoadModule: "glx"
[  1579.734] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  1579.738] (II) Module glx: vendor="NVIDIA Corporation"
[  1579.738]     compiled for 4.0.2, module version = 1.0.0
[  1579.738]     Module class: X.Org Server Extension
[  1579.738] (II) NVIDIA GLX Module  384.90  Tue Sep 19 17:25:09 PDT 2017
[  1579.738] (II) LoadModule: "nvidia"
[  1579.738] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[  1579.738] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1579.738]     compiled for 4.0.2, module version = 1.0.0
[  1579.738]     Module class: X.Org Video Driver
[  1579.738] (II) NVIDIA dlloader X Driver  384.90  Tue Sep 19 17:02:53 PDT 2017
[  1579.738] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1579.738] (--) Using syscons driver with X support (version 2.0)
[  1579.738] (--) using VT number 9

[  1579.740] (II) Loading sub module "fb"
[  1579.740] (II) LoadModule: "fb"
[  1579.740] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[  1579.740] (II) Module fb: vendor="X.Org Foundation"
[  1579.740]     compiled for 1.18.4, module version = 1.0.0
[  1579.740]     ABI class: X.Org ANSI C Emulation, version 0.4
[  1579.740] (II) Loading sub module "wfb"
[  1579.740] (II) LoadModule: "wfb"
[  1579.740] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[  1579.740] (II) Module wfb: vendor="X.Org Foundation"
[  1579.740]     compiled for 1.18.4, module version = 1.0.0
[  1579.740]     ABI class: X.Org ANSI C Emulation, version 0.4
[  1579.740] (II) Loading sub module "ramdac"
[  1579.740] (II) LoadModule: "ramdac"
[  1579.740] (II) Module "ramdac" already built-in
[  1579.740] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1579.740] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[  1579.740] (==) NVIDIA(0): RGB weight 888
[  1579.740] (==) NVIDIA(0): Default visual is TrueColor
[  1579.740] (**) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[  1579.740] (**) NVIDIA(0): Option "ModeValidation" "AllowNonEdidModes"
[  1579.740] (**) NVIDIA(0): Option "ConstrainCursor" "off"
[  1579.740] (**) NVIDIA(0): Option "UseEDID" "false"
[  1579.740] (**) NVIDIA(0): Option "ConnectedMonitor" "DFP-0"
[  1579.740] (**) NVIDIA(0): Option "IgnoreEDIDChecksum" "DFP-0"
[  1579.740] (**) NVIDIA(0): Option "MetaModes" "DFP-0:nvidia-auto-select,DFP-1:nvidia-auto-select"
[  1579.740] (**) NVIDIA(0): Option "UseDisplayDevice" "DFP-0"
[  1579.740] (**) NVIDIA(0): Enabling 2D acceleration
[  1579.740] (**) NVIDIA(0): ConnectedMonitor string: "DFP-0"
[  1579.740] (**) NVIDIA(0): Ignoring EDIDs
[  1579.952] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[  1579.953] (--) NVIDIA(0):     DFP-0
[  1579.953] (--) NVIDIA(0):     DFP-1
[  1579.953] (**) NVIDIA(0): Using ConnectedMonitor string "DFP-0".
[  1579.953] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 1050 (GP107-A) at PCI:1:0:0 (GPU-0)
[  1579.953] (--) NVIDIA(0): Memory: 2097152 kBytes
[  1579.953] (--) NVIDIA(0): VideoBIOS: 86.07.2a.00.47
[  1579.953] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[  1579.953] (--) NVIDIA(GPU-0): DFP-0: connected
[  1579.953] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[  1579.953] (--) NVIDIA(GPU-0): DFP-0: 1440.0 MHz maximum pixel clock
[  1579.953] (--) NVIDIA(GPU-0):
[  1579.953] (--) NVIDIA(GPU-0): DFP-1: disconnected
[  1579.953] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[  1579.953] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[  1579.953] (--) NVIDIA(GPU-0):
[  1579.953] (**) NVIDIA(GPU-0): Mode Validation Overrides for DFP-0:
[  1579.953] (**) NVIDIA(GPU-0):     AllowNonEdidModes
[  1579.962] (II) NVIDIA(0): Validated MetaModes:
[  1579.962] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select,DFP-1:nvidia-auto-select"
[  1579.962] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[  1579.983] (WW) NVIDIA(0): DFP-0 does not have an EDID, or its EDID does not contain a
[  1579.983] (WW) NVIDIA(0):     maximum image size; cannot compute DPI from DFP-0's EDID.
[  1579.983] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[  1579.983] (--) Depth 24 pixmap format is 32 bpp
[  1579.983] (II) NVIDIA: Reserving 24576.00 MB of virtual memory for indirect memory
[  1579.983] (II) NVIDIA:     access.
[  1580.007] (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select,DFP-1:nvidia-auto-select"
[  1580.055] (==) NVIDIA(0): Disabling shared memory pixmaps
[  1580.055] (==) NVIDIA(0): Backing store enabled
[  1580.055] (==) NVIDIA(0): Silken mouse enabled
[  1580.055] (==) NVIDIA(0): DPMS enabled
[  1580.055] (WW) NVIDIA(0): Option "DFP-0" is not used
[  1580.055] (II) Loading sub module "dri2"
[  1580.055] (II) LoadModule: "dri2"
[  1580.055] (II) Module "dri2" already built-in
[  1580.055] (II) NVIDIA(0): [DRI2] Setup complete
[  1580.055] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[  1580.055] (--) RandR disabled
[  1580.055] (II) Initializing extension GLX
[  1580.055] (II) Indirect GLX disabled.
[  1580.119] (II) config/devd: probing input devices...
[  1580.119] (II) config/devd: adding input device (null) (/dev/kbdmux)
[  1580.119] (II) LoadModule: "kbd"
[  1580.119] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[  1580.119] (II) Module kbd: vendor="X.Org Foundation"
[  1580.119]     compiled for 1.18.4, module version = 1.9.0
[  1580.119]     Module class: X.Org XInput Driver
[  1580.119]     ABI class: X.Org XInput driver, version 22.1
[  1580.119] (II) Using input driver 'kbd' for 'kbdmux'
[  1580.119] (**) kbdmux: always reports core events
[  1580.119] (**) kbdmux: always reports core events
[  1580.119] (**) Option "Protocol" "standard"
[  1580.119] (**) Option "XkbRules" "base"
[  1580.119] (**) Option "XkbModel" "pc105"
[  1580.119] (**) Option "XkbLayout" "us"
[  1580.119] (**) Option "config_info" "devd:kbdmux"
[  1580.119] (II) XINPUT: Adding extended input device "kbdmux" (type: KEYBOARD, id 6)
[  1580.120] (II) config/devd: kbdmux is enabled, ignoring device ukbd0
[  1580.121] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[  1580.121] (II) config/devd: adding input device (null) (/dev/sysmouse)
[  1580.121] (II) LoadModule: "mouse"
[  1580.121] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[  1580.121] (II) Module mouse: vendor="X.Org Foundation"
[  1580.121]     compiled for 1.18.4, module version = 1.9.2
[  1580.121]     Module class: X.Org XInput Driver
[  1580.121]     ABI class: X.Org XInput driver, version 22.1
[  1580.121] (II) Using input driver 'mouse' for 'sysmouse'
[  1580.121] (**) sysmouse: always reports core events
[  1580.121] (**) Option "Device" "/dev/sysmouse"
[  1580.121] (==) sysmouse: Protocol: "Auto"
[  1580.121] (**) sysmouse: always reports core events
[  1580.121] (==) sysmouse: Emulate3Buttons, Emulate3Timeout: 50
[  1580.121] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[  1580.121] (**) sysmouse: Buttons: 5
[  1580.121] (**) Option "config_info" "devd:sysmouse"
[  1580.121] (II) XINPUT: Adding extended input device "sysmouse" (type: MOUSE, id 7)
[  1580.121] (**) sysmouse: (accel) keeping acceleration scheme 1
[  1580.121] (**) sysmouse: (accel) acceleration profile 0
[  1580.121] (**) sysmouse: (accel) acceleration factor: 2.000
[  1580.121] (**) sysmouse: (accel) acceleration threshold: 4
[  1580.121] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0
[  1580.121] (II) sysmouse: SetupAuto: protocol is SysMouse
[  1580.121] (II) config/devd: device /dev/ums0 already opened
[  1580.183] (II) config/devd: adding input device Mouse (/dev/psm0)
[  1580.183] (II) Using input driver 'mouse' for 'Mouse'
[  1580.183] (**) Mouse: always reports core events
[  1580.183] (**) Option "Device" "/dev/psm0"
[  1580.183] (==) Mouse: Protocol: "Auto"
[  1580.183] (**) Mouse: always reports core events
[  1580.243] (==) Mouse: Emulate3Buttons, Emulate3Timeout: 50
[  1580.243] (**) Mouse: ZAxisMapping: buttons 4 and 5
[  1580.243] (**) Mouse: Buttons: 5
[  1580.243] (**) Option "config_info" "devd:psm0"
[  1580.243] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE, id 8)
[  1580.243] (**) Mouse: (accel) keeping acceleration scheme 1
[  1580.243] (**) Mouse: (accel) acceleration profile 0
[  1580.243] (**) Mouse: (accel) acceleration factor: 2.000
[  1580.243] (**) Mouse: (accel) acceleration threshold: 4
[  1580.263] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 0
[  1580.263] (II) Mouse: SetupAuto: protocol is PS/2
[  1580.711] (II) Mouse: ps2EnableDataReporting: succeeded
[  1584.684] (--) NVIDIA(GPU-0): DFP-0: connected
[  1584.684] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[  1584.684] (--) NVIDIA(GPU-0): DFP-0: 1440.0 MHz maximum pixel clock
[  1584.684] (--) NVIDIA(GPU-0):
[  1584.684] (--) NVIDIA(GPU-0): DFP-1: disconnected
[  1584.684] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[  1584.684] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[  1584.684] (--) NVIDIA(GPU-0):
[  1592.611] (II) config/devd: terminating backend...
[  1592.611] (II) UnloadModule: "mouse"
[  1592.611] (II) UnloadModule: "mouse"
[  1592.611] (II) UnloadModule: "kbd"
[  1592.869] (II) NVIDIA(GPU-0): Deleting GPU-0
[  1592.871] (II) Server terminated successfully (0). Closing log file.
 
Last edited by a moderator:

free-and-bsd

Aspiring Daemon

Thanks: 67
Messages: 643

#23
1) CORRECT this in your /etc/rc.conf: remove the line hald_enable="YES".
2) Too much in your configuration file. Just try what the OP suggests. You can try my working configuration that I've been using ever since the new driver was uploaded, it works. You put just these 2 files into /usr/local/etc/X11/xorg.conf.d directory:
a) nvidia.conf:
Code:
Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   BusID       "PCI:1:0:0"
EndSection
That's all! And you will notice, (1) it is the same as the OP suggests and (2) there is no "modesetting" stuff here.
b) monitor.conf:
Code:
Section "Monitor"
    Identifier   "DFP-0"
    Option   "Enable" "true"
EndSection

Section "Device"
    Identifier   "Card0"
    Driver   "nvidia"
    VendorName   "NVIDIA Corporation"
    Option   "MetaModes" "DFP-0:nvidia-auto-select"
EndSection
This inspired by your own Xorg log, so just start with that... Don't think you need the glx module section at all, it's been my impression that nvidia-driver loads whatever other stuff it thinks necessary...

So to try it from the top, you put ONLY these two files in the xorg.conf.d directory (see above) and REMOVE all the xorg.conf files you have either in /etc/X11 or in /usr/local/etc/X11. Well if they're precious to you, you can just move them to some secure place, for further experiments maybe.

With the /etc/rc.conf hald_enable string removed you can reboot, then from your console type $startx .

Imean, don't start with complicated setup, start with generic and simple. Whatever is needed for X to work need not be complicated, it does everything automatically these days... Well, if you're as lucky as your nick suggests :).
 

Lucky

New Member


Messages: 5

#24
1) CORRECT this in your /etc/rc.conf: remove the line hald_enable="YES".

[ 231.184]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[ 231.184] X Protocol Version 11, Revision 0
[ 231.184] Build Operating System: FreeBSD 11.0-RELEASE-p13 amd64
[ 231.184] Current Operating System: FreeBSD bsd 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
[ 231.184] Build Date: 19 October 2017 09:03:10AM
[ 231.184]
[ 231.184] Current version of pixman: 0.34.0
[ 231.184] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 231.184] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 231.184] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Oct 30 15:04:31 2017
[ 231.186] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[ 231.186] (==) No Layout section. Using the first Screen section.
[ 231.186] (==) No screen section available. Using defaults.
[ 231.186] (**) |-->Screen "Default Screen Section" (0)
[ 231.186] (**) | |-->Monitor "<default monitor>"
[ 231.186] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 231.186] (**) | |-->Device "Card0"
[ 231.186] (**) | |-->GPUDevice "Card0"
[ 231.186] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 231.186] (==) Automatically adding devices
[ 231.186] (==) Automatically enabling devices
[ 231.186] (==) Not automatically adding GPU devices
[ 231.187] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 231.190] (==) 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/
[ 231.190] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[ 231.190] (II) The server relies on devd to provide the list of input devices.
If no devices become available, reconfigure devd or disable AutoAddDevices.
[ 231.190] (II) Loader magic: 0x813b70
[ 231.190] (II) Module ABI versions:
[ 231.190] X.Org ANSI C Emulation: 0.4
[ 231.190] X.Org Video Driver: 20.0
[ 231.190] X.Org XInput driver : 22.1
[ 231.190] X.Org Server Extension : 9.0
[ 231.190] (--) PCI:*(0:0:2:0) 8086:591b:1558:850a rev 4, Mem @ 0xdd000000/16777216, 0xa0000000/536870912, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[ 231.191] (--) PCI: (0:1:0:0) 10de:1c8d:1558:850a rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128
[ 231.191] (II) LoadModule: "glx"
[ 231.192] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[ 231.255] (II) Module glx: vendor="NVIDIA Corporation"
[ 231.255] compiled for 4.0.2, module version = 1.0.0
[ 231.255] Module class: X.Org Server Extension
[ 231.256] (II) NVIDIA GLX Module 384.90 Tue Sep 19 17:25:09 PDT 2017
[ 231.256] (II) LoadModule: "nvidia"
[ 231.256] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[ 231.262] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 231.262] compiled for 4.0.2, module version = 1.0.0
[ 231.262] Module class: X.Org Video Driver
[ 231.262] (II) NVIDIA dlloader X Driver 384.90 Tue Sep 19 17:02:53 PDT 2017
[ 231.262] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 231.263] (--) Using syscons driver with X support (version 2.0)
[ 231.263] (--) using VT number 9

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

free-and-bsd

Aspiring Daemon

Thanks: 67
Messages: 643

#25
[ 231.269] (EE) Device(s) detected, but none match those in the config file.
Why won't you just tell which laptop model (looks like METABOX, but which one?) you are using? In your previous log NVIDIA driver showed a lot, now it says the above...

I suspect you have a laptop with two graphical adapters. If so, their usage must be configurable via BIOS.
 
Top