# Number of created screens does not match number of detected



## time1 (Dec 20, 2013)

Hi all. When *I* enter `Xorg -configure` *I* get the error:


```
Number of created screens does not match number of detected devices. Configuration failed.
```

Here is xorg.conf.new:

```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "record"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "HWcursor"           	# [<bool>]
        #Option     "NoAccel"            	# [<bool>]
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "UseFBDev"           	# [<bool>]
        #Option     "Rotate"             	# [<str>]
        #Option     "VideoKey"           	# <i>
        #Option     "FlatPanel"          	# [<bool>]
        #Option     "FPDither"           	# [<bool>]
        #Option     "CrtcNumber"         	# <i>
        #Option     "FPScale"            	# [<bool>]
        #Option     "FPTweak"            	# <i>
        #Option     "DualHead"           	# [<bool>]
	Identifier  "Card0"
	Driver      "nv"
	VendorName  "NVIDIA Corporation"
	BoardName   "GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M]"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "DefaultRefresh"     	# [<bool>]
        #Option     "ModeSetClearScreen" 	# [<bool>]
	Identifier  "Card1"
	Driver      "vesa"
	VendorName  "Intel Corporation"
	BoardName   "3rd Gen Core processor Graphics Controller"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
```

When I enter `startx` I get the blank screen, how do I turn X off? 

`% setxkbmap -option terminate:ctrl_alt_bksp` writes:  
	
	



```
Cannot open display "default display"
```


----------



## trh411 (Dec 20, 2013)

*Re: Number of created screens does not match number of detec*

I've seen the suggestion floating around that suggests removing the ~/.Xauthority file will clear up the error mentioned in the subject. I've never had the opportunity to try it.

You can always exit X by pressing `CTRL-ALT-F1`. If you get a blank screen when starting X, I have to ask what your ~/.xinitrc file looks like? You do have one, right? Also, how are you star_t_ing X... `startx` or `xinit`?

It looks like you've got two graphics cards on your system, on-board Intel and off-board Nvidia. Are you trying to set up multi-monitor?


----------



## time1 (Dec 20, 2013)

*Re: Number of created screens does not match number of detec*

Hmm, I do not have a ~/.Xauthority.



> You can always exit X by pressing CTRL-ALT-F1



I tried, but it did not help.



> Are you trying to set up multi-monitor?


No, *I* just want to run X.Org on my laptop, *I* do not know where the second monitor came from.



> `startx` or `xinit`


`startx`

.xinitrc:

```
xterm &

exec icewm-session
```


----------



## wblock@ (Dec 20, 2013)

*Re: Number of created screens does not match number of detec*

Turn off one of the graphics devices in the BIOS, then delete xorg.conf.new and xorg.conf.  Then try `startx` without creating xorg.conf at all.


----------



## time1 (Dec 20, 2013)

*Re: Number of created screens does not match number of detec*

Thank you very much! But, unfortunately, there is only an option in the BIOS to use only integrated or both. Can you recommend an alternative solution?

There is a new problem that I have not encountered before. When I press Ctrl+Alt+1 the screen becomes just white. What could it be? And how to change monitor brightness? `xgamma` _is_ not working.


----------



## wblock@ (Dec 20, 2013)

*Re: Number of created screens does not match number of detec*

Delete one of the Device entries from xorg.conf and the Monitor and Screen entries that refer to it.  Try removing the NVidia one first.

Ctrl-Alt-F1 will not work until the new KMS console support is included.  Although the screen is not visible, typed commands to start X or shut down should still work.

Please start a new thread for unrelated questions (like `xgamma`).  Although it's not clear how that would work if X does not start.

Please start formatting your posts as shown in http://forums.freebsd.org/showthread.php?t=8816.


----------



## time1 (Dec 25, 2013)

*Re: Number of created screens does not match number of detec*

Ok...



> Ctrl-Alt-F1 will not work until the new KMS console support is included



Then how to turn it off? X starts good but when *I* try Ctrl+Alt+F1 the monitor becomes just white.


----------



## Martillo1 (Dec 26, 2013)

*Re: Number of created screens does not match number of detec*



			
				time1 said:
			
		

> unfortunately, there is only an option in the BIOS to use only integrated or both...


Try "only integrated".


----------



## time1 (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*

I tried to make it work with the card Nvidia 710m but no result. Here is my xorg.conf:


```
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
   Option          "AllowEmptyInput" "off"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath     "/usr/local/lib/X11/fonts/misc/"
   FontPath     "/usr/local/lib/X11/fonts/TTF/"
   FontPath     "/usr/local/lib/X11/fonts/OTF"
   FontPath     "/usr/local/lib/X11/fonts/Type1/"
   FontPath     "/usr/local/lib/X11/fonts/100dpi/"
   FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "dbe"
   Load  "dri"
   Load  "dri2"
   Load  "extmod"
   Load  "record"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/sysmouse"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
   Modeline "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +VSync
EndSection

Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   VendorName  "NVIDIA Corporation"
   BoardName   "GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M]"
   BusID       "PCI:1:0:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   DefaultDepth 24   

   SubSection "Display"
      Viewport   0 0
      Depth     24
      Modes "1368x768_60.00"
   EndSubSection
EndSection
```

Logs:


```
Current version of pixman: 0.32.4
   Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jan  3 16:12:33 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(**) Option "AllowEmptyInput" "off"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
   Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
   Entry deleted from font path.
(**) FontPath set to:
   /usr/local/lib/X11/fonts/TTF/,
   /usr/local/lib/X11/fonts/OTF,
   /usr/local/lib/X11/fonts/TTF/,
   /usr/local/lib/X11/fonts/OTF
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(II) Loader magic: 0x7c05e0
(II) Module ABI versions:
   X.Org ANSI C Emulation: 0.4
   X.Org Video Driver: 6.0
   X.Org XInput driver : 7.0
   X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(!!) More than one possible primary device found
(--) PCI: (0:0:2:0) 8086:0166:1025:0647 Intel Corporation 3rd Gen Core processor Graphics Controller rev 9, Mem @ 0xb3000000/4194304, 0xc0000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
(--) PCI: (0:1:0:0) 10de:1140:1025:0691 NVIDIA Corporation GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] rev 161, Mem @ 0xb2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00002000/128, BIOS @ 0x????????/65536
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.0.0
   Module class: X.Org Server Extension
   ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.0.0
   ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.1.0
   ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.0.0
   Module class: X.Org Server Extension
   ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.13.0
   Module class: X.Org Server Extension
   ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
   compiled for 4.0.2, module version = 1.0.0
   Module class: X.Org Server Extension
(II) NVIDIA GLX Module  319.32  Wed Jun 19 13:40:51 PDT 2013
(II) Loading extension GLX
(II) LoadModule: "nvidia"
(II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
   compiled for 4.0.2, module version = 1.0.0
   Module class: X.Org Video Driver
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.9.0
   Module class: X.Org XInput Driver
   ABI class: X.Org XInput driver, version 7.0
(II) LoadModule: "kbd"
(II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.8.0
   Module class: X.Org XInput Driver
   ABI class: X.Org XInput driver, version 7.0
(II) NVIDIA dlloader X Driver  319.32  Wed Jun 19 13:21:30 PDT 2013
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is:
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.0.0
   ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/local/lib/xorg/modules/libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.0.0
   ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/local/lib/xorg/modules/libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
   compiled for 1.7.7, module version = 1.1.0
   ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) Jan 03 16:12:34 NVIDIA(0): Enabling 2D acceleration
(--) Jan 03 16:12:34 NVIDIA(0): No display subsystem found
(II) Jan 03 16:12:34 NVIDIA(0): Implicitly enabling NoScanout
(WW) Jan 03 16:12:34 NVIDIA(0): Failed to enable display hotplug notification
(II) Jan 03 16:12:34 NVIDIA(0): NVIDIA GPU GeForce 710M (GF117) at PCI:1:0:0 (GPU-0)
(--) Jan 03 16:12:34 NVIDIA(0): Memory: 2097152 kBytes
(--) Jan 03 16:12:34 NVIDIA(0): VideoBIOS: 75.17.48.00.08
(II) Jan 03 16:12:34 NVIDIA(0): Detected PCI Express Link width: 8X
(--) Jan 03 16:12:34 NVIDIA(0): Valid display device(s) on GeForce 710M at PCI:1:0:0
(--) Jan 03 16:12:34 NVIDIA(0):     none
(II) Jan 03 16:12:34 NVIDIA(0): Validated MetaModes:
(II) Jan 03 16:12:34 NVIDIA(0):     "nvidia-auto-select"
(II) Jan 03 16:12:34 NVIDIA(0): Virtual screen size determined to be 640 x 480
(WW) Jan 03 16:12:34 NVIDIA(0): Unable to get display device for DPI computation.
(==) Jan 03 16:12:34 NVIDIA(0): DPI set to (75, 75); computed from built-in default
(--) Depth 24 pixmap format is 32 bpp
(II) Jan 03 16:12:34 NVIDIA: Reserving 3072.00 MB of virtual memory for indirect memory
(II) Jan 03 16:12:34 NVIDIA:     access.
(II) Jan 03 16:12:34 NVIDIA(0): Setting mode "nvidia-auto-select"
(EE) Jan 03 16:12:34 NVIDIA(0): Failed to initiate mode change.
(EE) Jan 03 16:12:34 NVIDIA(0): Failed to complete mode change
(II) Jan 03 16:12:34 NVIDIA(0): Built-in logo is bigger than the screen.
(II) Loading extension NV-GLX
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(==) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing extension GLX
(**) Option "Protocol" "auto"
(**) Option "Device" "/dev/sysmouse"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/sysmouse"
(==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5 6 7"
(**) Mouse0: ZAxisMapping: buttons 4, 5, 6 and 7
(**) Mouse0: Buttons: 7
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(**) Mouse0: (accel) keeping acceleration scheme 1
(**) Mouse0: (accel) acceleration profile 0
(II) Mouse0: SetupAuto: hw.iftype is 4, hw.model is 0
(II) Mouse0: SetupAuto: protocol is SysMouse
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Option "XkbRules" "base"
(**) Option "XkbModel" "pc105"
(**) Option "XkbLayout" "us"
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"
```

It seems that the driver does not work with this card, even though it finds it. Do you have any ideas?


----------



## trh411 (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*



			
				time1 said:
			
		

> I tried to make it work with the card Nvidia 710m but no result.
> It seems that the driver does not work with this card, even though it finds it. Do you have any ideas?


Exactly what did you do to try to make it work with the nvidia driver? You can't just change 'nv' to 'nvidia' in the xorg.conf file. You have to actually build the nvidia driver and then load it at boot time. If you follow these instructions http://www.freebsd.org/doc/en/articles/compiz-fusion/nvidia-setup.html, you should be able to get the nvidia driver working. It looks like you've done some of the steps, but it is unclear whether or not you've modified your /boot/loader.conf file or actually built the x11/nvidia-driver-304, which I'm thinking is the one you need for your card.


----------



## time1 (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*

Of course I built the module (x11/nvidia-driver) and loaded it (`kldload nvidia`) but apparently it does not work with this card. At least the Nvidia 710M is in the list of supported iron I have not found. And you?


----------



## trh411 (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*



			
				time1 said:
			
		

> Of course I built the module (x11/nvidia-driver) and loaded it (`kldload nvidia`) but apparently it does not work with this card. At least the Nvidia 710M is in the list of supported iron I have not found. And you?


Like I stated in my post, I think you need the x11/nvidia-driver-304 as specified here http://www.nvidia.com/object/IO_32667.html. The GeForce 7000M / nForce 610M is listed in the 304.xx section. The x11/ndidia-driver installs the 331.xx driver.


----------



## protocelt (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*



			
				trh411 said:
			
		

> time1 said:
> 
> 
> 
> ...



The OP mentioned that his BIOS only has options for enabling the integrated GPU or both. That would lead me to believe he is possibly using an NVidia Optimus enabled laptop (he didn't mention what model laptop it is). That being said, I don't think the NVidia GPU will work at all with any driver version at this time in his case as there is no option in his BIOS or a hardware switch to enable the "discrete" or "dedicated" GPU only. Only the integrated Intel GPU (if supported) would work under FreeBSD using the KMS drivers if that is the case.  That is my understanding at least. I would follow @wblock's advice mentioned previously in this thread to get things functioning if the Integrated Intel GPU in his laptop is supported by the KMS drivers.


----------



## trh411 (Jan 4, 2014)

*Re: Number of created screens does not match number of detec*



			
				protocelt said:
			
		

> The OP mentioned that his BIOS only has options for enabling the integrated GPU or both. That would lead me to believe he is possibly using an NVidia Optimus enabled laptop (He didn't mention what model laptop it is). That being said, I don't think the NVidia GPU will work at all with any driver version at this time in his case as there is no option in his BIOS or a hardware switch to enable the "discrete" or "dedicated" GPU only. Only the integrated Intel GPU (if supported) would work under FreeBSD using the KMS drivers if that is the case.  That is my understanding at least. I would follow @wblock's advice mentioned previously in this thread to get things functioning if the Integrated Intel GPU in his laptop is supported by the KMS drivers.


If that is correct, you are right. Trying to get Nvidia to work would be futile.


----------



## time1 (Jan 6, 2014)

*Re: Number of created screens does not match number of detec*

304 does not work.


```
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan  4 18:50:49 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(**) Option "AllowEmptyInput" "off"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
	Entry deleted from font path.
(**) FontPath set to:
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(II) Loader magic: 0x7c05e0
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.4
	X.Org Video Driver: 6.0
	X.Org XInput driver : 7.0
	X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(!!) More than one possible primary device found
(--) PCI: (0:0:2:0) 8086:0166:1025:0647 Intel Corporation 3rd Gen Core processor Graphics Controller rev 9, Mem @ 0xb3000000/4194304, 0xc0000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
(--) PCI: (0:1:0:0) 10de:1140:1025:0691 NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] rev 161, Mem @ 0xb2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00002000/128, BIOS @ 0x????????/65536
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.1.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.13.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Server Extension
(II) NVIDIA GLX Module  331.20  Wed Oct 30 17:20:17 PDT 2013
(II) Loading extension GLX
(II) LoadModule: "nvidia"
(II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Video Driver
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.9.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(II) LoadModule: "kbd"
(II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.8.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(II) NVIDIA dlloader X Driver  331.20  Wed Oct 30 17:01:18 PDT 2013
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: 
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/local/lib/xorg/modules/libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) Jan 04 18:50:49 NVIDIA(0): Enabling 2D acceleration
(II) Jan 04 18:50:49 NVIDIA(0): NVIDIA GPU GeForce 710M (GF117) at PCI:1:0:0 (GPU-0)
(--) Jan 04 18:50:49 NVIDIA(0): Memory: 2097152 kBytes
(--) Jan 04 18:50:49 NVIDIA(0): VideoBIOS: 75.17.48.00.08
(II) Jan 04 18:50:49 NVIDIA(0): Detected PCI Express Link width: 8X
(--) Jan 04 18:50:49 NVIDIA(0): Valid display device(s) on GeForce 710M at PCI:1:0:0
(--) Jan 04 18:50:49 NVIDIA(0):     none
(II) Jan 04 18:50:49 NVIDIA(0): Validated MetaModes:
(II) Jan 04 18:50:49 NVIDIA(0):     "NULL"
(II) Jan 04 18:50:49 NVIDIA(0): Virtual screen size determined to be 640 x 480
(WW) Jan 04 18:50:49 NVIDIA(0): Unable to get display device for DPI computation.
(==) Jan 04 18:50:49 NVIDIA(0): DPI set to (75, 75); computed from built-in default
(--) Depth 24 pixmap format is 32 bpp
(II) Jan 04 18:50:49 NVIDIA: Reserving 3072.00 MB of virtual memory for indirect memory
(II) Jan 04 18:50:49 NVIDIA:     access.
(II) Jan 04 18:50:49 NVIDIA(0): Setting mode "NULL"
(EE) Jan 04 18:50:49 NVIDIA(0): Failed to initiate mode change.
(EE) Jan 04 18:50:49 NVIDIA(0): Failed to complete mode change
(II) Jan 04 18:50:49 NVIDIA(0): Built-in logo is bigger than the screen.
(II) Loading extension NV-GLX
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(==) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing extension GLX
(**) Option "Protocol" "auto"
(**) Option "Device" "/dev/sysmouse"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/sysmouse"
(==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5 6 7"
(**) Mouse0: ZAxisMapping: buttons 4, 5, 6 and 7
(**) Mouse0: Buttons: 7
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(**) Mouse0: (accel) keeping acceleration scheme 1
(**) Mouse0: (accel) acceleration profile 0
(II) Mouse0: SetupAuto: hw.iftype is 4, hw.model is 0
(II) Mouse0: SetupAuto: protocol is SysMouse
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Option "XkbRules" "base"
(**) Option "XkbModel" "pc105"
(**) Option "XkbLayout" "us"
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) Jan 04 18:51:34 NVIDIA(0): Setting mode "NULL"
(EE) Jan 04 18:51:34 NVIDIA(0): Failed to initiate mode change.
(EE) Jan 04 18:51:34 NVIDIA(0): Failed to complete mode change
(**) Option "BaudRate" "1200"
(**) Option "StopBits" "2"
(**) Option "DataBits" "8"
(**) Option "Parity" "None"
(**) Option "Vmin" "1"
(**) Option "Vtime" "0"
(**) Option "FlowControl" "None"
(II) Jan 04 18:51:37 NVIDIA(0): Setting mode "NULL"
(EE) Jan 04 18:51:37 NVIDIA(0): Failed to initiate mode change.
(EE) Jan 04 18:51:37 NVIDIA(0): Failed to complete mode change
(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"
(II) Jan 04 19:09:49 NVIDIA(GPU-0): Deleting GPU-0
```

And VESA has big bugs:

The white screen.
I can not edit monit*o*r brightness. And sudo do not helps. And is there some X configurator for VESA?


----------



## asteriskRoss (Jan 7, 2014)

*Re: Number of created screens does not match number of detec*

I had a problem similar to this with my laptop that has an Intel Haswell integrated graphics (not supported in 9.2-RELEASE) and an Nvidia card (supported by an Nvidia proprietary driver).  I spent a whole day trying to get it working but did eventually succeed and have been meaning to try to replicate the symptoms and make a post somewhere so that others can avoid the same trauma.  There's never enough time...

The short version is that the dual graphics card setup involves some magic where the graphics card that is connected to the laptop monitor can be switched electronically; unfortunately this is not supported by the FreeBSD Nvidia drivers (at least, that's what I gleaned from the Nvidia driver documentation).  To make it all work, I booted into Windows and installed the latest Nvidia drivers.  I then used either the Windows Nvidia configuration tool or Windows settings (apologies as I can't remember which and don't have my laptop to hand) to explicitly connect the Nvidia graphics card to the laptop monitor.  When I rebooted into FreeBSD it worked first time.  I assume that the Windows Nvidia driver has some extra functionality that means it can change some magic hardware setting that is preserved across boots such that the Nvidia card is connected to the laptop monitor.

The line in your X.Org log that makes me think you are experiencing a similar problem is this one:


			
				time1 said:
			
		

> ```
> (--) Jan 04 18:50:49 NVIDIA(0): Valid display device(s) on GeForce 710M at PCI:1:0:0
> (--) Jan 04 18:50:49 NVIDIA(0):     none
> ```



This means that the your Nvidia card is working fine but there is no monitor connected to it.  I found that I could get my Nvidia card working fine on an external monitor, connecting via the laptop mini port.  If you have the right connectors, I suggest that is the first thing you try to satisfy yourself that it will be possible to do the same by connecting an external monitor and running (changing xorg.config.new to the path of the configuration file you want to use). For this step I recollect I had configured multiple screens in my xorg.conf, with the Intel one using the vesa driver and the Nvidia one using the nvidia driver: `# Xorg -config xorg.conf.new -retro`

With luck your external monitor will show the patterned X screen with an X-shaped cursor floating in the middle.  If it doesn't work please post your log output.

If that is successful, I suggest you try the following:

 Boot into Windows (assuming you have it installed, if not, you may need to install it at least temporarily)
 Install the latest Windows Nvidia drivers
 Use the Nvidia configuration tool or Windows control panel (sorry I can't remember which) to force the Nvidia card to be associated with the laptop monitor. This may require some kind of hotkey to be pressed and a reboot.
 Boot into FreeBSD.
 Try again to configure X.Org; hopefully this time your laptop monitor will be connected.

If you manage to get it working, you may also want to strip down your xorg.conf file as the Nvidia driver loads all its required modules anyway.  If we get here I'll post my xorg.conf as an example.  I haven't yet made time to configure hot-plugging external monitors so perhaps we can tackle that one together  

I'm also starting out writing FreeBSD device drivers so added to my task list is to try to figure out what the Windows driver does with the Nvidia card and see whether I can write something that would at least allow the setting to be changed without needing a Windows installation.


----------



## time1 (Jan 7, 2014)

*Re: Number of created screens does not match number of detec*

Thanks dude, but it _does_ not works. In the attachments there are the screenshots what that *I* _have_ done in *W*indows. I think you do not have the 710M. With the 304 driver _the_ computer just rebooted after starting X.Org, and there w_ere_n't new records in the log file. So *I* installed the latest freebsd FreeBSD driver.

With only the notebook monitor:

xorg.conf


```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option	       "AllowEmptyInput" "off"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "record"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	VendorName  "NVIDIA Corporation"
	BoardName   "GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth 24	

	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
```

Logs:


```
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jan  7 19:12:28 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(**) Option "AllowEmptyInput" "off"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
	Entry deleted from font path.
(**) FontPath set to:
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(II) Loader magic: 0x7c05e0
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.4
	X.Org Video Driver: 6.0
	X.Org XInput driver : 7.0
	X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(!!) More than one possible primary device found
(--) PCI: (0:0:2:0) 8086:0166:1025:0647 Intel Corporation 3rd Gen Core processor Graphics Controller rev 9, Mem @ 0xb3000000/4194304, 0xc0000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
(--) PCI: (0:1:0:0) 10de:1140:1025:0691 NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] rev 161, Mem @ 0xb2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00002000/128, BIOS @ 0x????????/65536
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.1.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.13.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Server Extension
(II) NVIDIA GLX Module  331.20  Wed Oct 30 17:20:17 PDT 2013
(II) Loading extension GLX
(II) LoadModule: "nvidia"
(II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Video Driver
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.9.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(II) LoadModule: "kbd"
(II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.8.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(II) NVIDIA dlloader X Driver  331.20  Wed Oct 30 17:01:18 PDT 2013
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: 
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/local/lib/xorg/modules/libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) Jan 07 19:12:28 NVIDIA(0): Enabling 2D acceleration
(II) Jan 07 19:12:28 NVIDIA(0): NVIDIA GPU GeForce 710M (GF117) at PCI:1:0:0 (GPU-0)
(--) Jan 07 19:12:28 NVIDIA(0): Memory: 2097152 kBytes
(--) Jan 07 19:12:28 NVIDIA(0): VideoBIOS: 75.17.48.00.08
(II) Jan 07 19:12:28 NVIDIA(0): Detected PCI Express Link width: 8X
(--) Jan 07 19:12:28 NVIDIA(0): Valid display device(s) on GeForce 710M at PCI:1:0:0
(--) Jan 07 19:12:28 NVIDIA(0):     none
(II) Jan 07 19:12:28 NVIDIA(0): Validated MetaModes:
(II) Jan 07 19:12:28 NVIDIA(0):     "NULL"
(II) Jan 07 19:12:28 NVIDIA(0): Virtual screen size determined to be 640 x 480
(WW) Jan 07 19:12:28 NVIDIA(0): Unable to get display device for DPI computation.
(==) Jan 07 19:12:28 NVIDIA(0): DPI set to (75, 75); computed from built-in default
(--) Depth 24 pixmap format is 32 bpp
(II) Jan 07 19:12:28 NVIDIA: Reserving 3072.00 MB of virtual memory for indirect memory
(II) Jan 07 19:12:28 NVIDIA:     access.
(II) Jan 07 19:12:28 NVIDIA(0): Setting mode "NULL"
(EE) Jan 07 19:12:28 NVIDIA(0): Failed to initiate mode change.
(EE) Jan 07 19:12:28 NVIDIA(0): Failed to complete mode change
(II) Jan 07 19:12:28 NVIDIA(0): Built-in logo is bigger than the screen.
(II) Loading extension NV-GLX
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(==) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing extension GLX
(**) Option "Protocol" "auto"
(**) Option "Device" "/dev/sysmouse"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/sysmouse"
(==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5 6 7"
(**) Mouse0: ZAxisMapping: buttons 4, 5, 6 and 7
(**) Mouse0: Buttons: 7
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(**) Mouse0: (accel) keeping acceleration scheme 1
(**) Mouse0: (accel) acceleration profile 0
(II) Mouse0: SetupAuto: hw.iftype is 4, hw.model is 0
(II) Mouse0: SetupAuto: protocol is SysMouse
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Option "XkbRules" "base"
(**) Option "XkbModel" "pc105"
(**) Option "XkbLayout" "us"
(**) Option "XkbOptions" "terminate:ctrl_alt_bksp"
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"
(II) Jan 07 19:12:44 NVIDIA(GPU-0): Deleting GPU-0
```

And with two monitors there are no logs. The big mon*i*tor turning off and the screen are just black (after `xorg -configure` and `X -config /root/xorg.conf.new -retro`). And *I* just turn off the notebook power. I*n* the log file there are only old records.


```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "record"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	VendorName  "NVIDIA Corporation"
	BoardName   "GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M]"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "DefaultRefresh"     	# [<bool>]
        #Option     "ModeSetClearScreen" 	# [<bool>]
	Identifier  "Card1"
	Driver      "vesa"
	VendorName  "Intel Corporation"
	BoardName   "3rd Gen Core processor Graphics Controller"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
```

So, *I* don't know hot to solve _the_ problem. It is only not wo*r*king, and not working, and NOT working.


----------



## asteriskRoss (Jan 7, 2014)

*Re: Number of created screens does not match number of detec*

Right. The good news is that your Windows screenshot and X.Org logs are consistent with my experience: the Nvidia card is not currently being used by your monitor.  Your xorg.conf looks more or less like mine and I see you explicitly set the BusID so all good there.

The (possible) bad news is that the key to my achieving success was that my laptop supports "switchable graphics". With a little searching, I see this appears to be different from Nvidia Optimus where selection of the graphics card happens at run-time.  So, success is likely to hang on whether you have switchable graphics or Nvidia Optimus.  If the latter, I'm afraid I agree with @protocelt, @trh411 and @wblock in that pursuing the Intel with KMS is your only option.  I have my fingers crossed for you.  What's your laptop model?

Details of what I just tried and can recall from when I was configuring originally:
For reference, my laptop is an Alienware 17 with an Nvidia GTX 770m graphics card.  I don't have any BIOS configuration options to enable or disable graphics adapters but I do have a magic hot-key (Fn + F5) that changes which is connected to my laptop monitor.

Booting into Windows, it appears to be using only the Nvidia; my Nvidia Settings screen for PhysX shows my laptop screen connected to the Nvidia card and clicking on _Advanced_ in the display properties shows it is using the Nvidia driver.  The Nvidia icon is in the system tray.

One cheeky press of Fn + F5 later (a button labelled I/D GFX) and I get a dialog saying "Switchable graphics key press detected" and an offer to reboot. After the reboot into Windows, I have the Intel icon in the system tray instead of the Nvidia one.  The Nvidia Settings screen for PhysX shows my laptop screen connected to the Intel card and clicking on _Advanced_ in the display properties shows it is using the Intel driver.  Booting into FreeBSD, X.Org fails to start, although sees both graphics cards.  Interestingly my /var/log/Xorg.0.log file does indicate it knows about my displays (DFP-0 and DFP-1) which I don't remember seeing when I was doing my configuration originally.  However, I do have the familiar "Failed to assign any connected display devices to X screen 0" culminating in "Fatal server error: no screens found".  This was previously where I could get the Nvidia card working, but only with an external monitor.  I will also note that using the vesa driver with my Intel card corrupted my console when switching back, though it was still functional and became visible again using vidcontrol(1) to set a higher resolution mode.

Another reboot into Windows, Fn + F5 and yet another reboot later and we're back to Nvidia Utopia.  FreeBSD boots and X.Org starts fine.  FreeBSD still sees both cards.


----------



## time1 (Jan 11, 2014)

*Re: Number of created screens does not match number of detec*



> What's your laptop model?


Acer v3-571g



> I will also note that using the vesa driver with my Intel card corrupted my console when switching back, though it was still functional and became visible again using vidcontrol(1) to set a higher resolution mode.



Do you know how to make VESA work normally? I think I just install Freebsd FreeBSD on the other laptop. Did not expect that there will be such problems with VESA. The Nvidia driver has this advantage: there is a friendly graphical configurator, you can comfortably adjust the display on the connected monitor, etc.


----------



## protocelt (Jan 11, 2014)

*Re: Number of created screens does not match number of detec*

I understand you want to use the NVidia card, however using the NVidia card in that particular laptop model is not supported under FreeBSD at this time. Your only option is to use the Intel KMS drivers. Please also note, switching to console mode after starting Xorg when using the KMS drivers is not supported yet so a blank screen when switching is expected behavior.


----------



## time1 (Jan 11, 2014)

*Re: Number of created screens does not match number of detec*

And when will it be supported? And how should I switch to another console? And how do I change the brightness?


----------



## protocelt (Jan 11, 2014)

*Re: Number of created screens does not match number of detec*

The Newcons project will add support for console mode switching while using the KMS drivers. As to when it will be finished and usable, I don't know, sorry. Is there a specific reason you need to switch to console mode while running Xorg as opposed to just opening an XTerm or similar terminal window?

To be honest, if you want/need all of the hardware on that particular laptop supported, you might have a much easier time installing a Linux based Desktop OS. You could also try PC-BSD, a fully pre-configured Desktop OS based on FreeBSD.


----------



## time1 (Jan 12, 2014)

*Re: Number of created screens does not match number of detec*



> To be honest, if you want/need all of the hardware on that particular laptop supported, you might have a much easier time installing a Linux based Desktop OS. You could also try PC-BSD, a fully pre-configured Desktop OS based on FreeBSD.



No , it is not for me. Why does nobody tell me about the brightness controls using the VESA driver?

And when i *I* killing the Xorg i *I* get the white screen too.


----------



## time1 (Jan 15, 2014)

*Re: Number of created screens does not match number of detec*

Good news! Here is the reply from Nvidia team:



> Hello,
> 
> Thank you for your submission
> 
> ...



I hope that it will work.


----------



## time1 (Jan 20, 2014)

*Re: Number of created screens does not match number of detec*

Does not work. Driver does not see the display.


----------



## Gorpdogg (Jun 5, 2016)

I was experiencing the same issue until I did the following:


I installed the driver
From the installer, I chose to automatically update Xorg file
After multiple times the GUI failed to run, I went into the BIOS, clicked on the display or graphics section, and unchecked the box for Nvidia Optumus technology. I disabled it.

Nvidia Optimus technology only works with Windows and if you are on a Dell, I bet this is the problem.


----------

