Solved Xorg issues

I seem to have a number of small issues. I say small because it starts and runs, but I have three monitors and only one is working.

First the Xorg -config gives me "Number of created screens does not match number of detected devices".

Code:
X.Org X Server 1.14.7
Release Date: 2014-06-05
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 10.1-RELEASE amd64
Current Operating System: FreeBSD freebsd.webbrews.com 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 28 December 2014  12:37:00AM

Current version of pixman: 0.32.6
        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: Thu Jan  1 11:17:59 2015
List of video drivers:
        intel
        mach64
        radeon
        ati
        nv
        r128
        openchrome
        vesa
(++) Using config file: "/root/xorg.conf.new"
Number of created screens does not match number of detected devices.
  Configuration failed.
(EE) Server terminated with error (2). Closing log file.

Second, the Xorg.log did complain about not having fbdev. I'm not sure why when I have an Nvidia card but I installed it. I still get errors though as you can see in the log.

Code:
[15-01-01 12:19]root@/home/larry#grep EE /var/log/Xorg.0.log.old
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[152348.930] (EE) LoadModule: Module fbdevhw does not have a fbdevhwModuleData data object.
[152348.931] (EE) Failed to load module "fbdevhw" (invalid module, 0)
[152348.931] (EE) LoadModule: Module fbdevhw does not have a fbdevhwModuleData data object.
[152348.931] (EE) Failed to load module "fbdevhw" (invalid module, 0)
[152348.932] (EE) Server terminated with error (2). Closing log file.

After x11-drivers/xf86-video-fbdev was installed.

Code:
[15-01-01 12:08]root@/home/larry#grep EE /var/log/Xorg.0.log  
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[152367.259] Initializing built-in extension MIT-SCREEN-SAVER
[152367.667] (EE) LoadModule: Module fbdevhw does not have a fbdevhwModuleData data object.
[152367.667] (EE) Failed to load module "fbdevhw" (invalid module, 0)

Third and lastly. I wanted to ask which driver I should use. I would like to use all 3 monitors but and I would like to have decent graphics but I won't be playing big games or anything. I currently have xf86-video-nv-2.1.20_6 the other wouldn't compile as you can see but I could just install the binary if it's needed.

Code:
===>>> Port directory: /usr/ports/x11/nvidia-driver

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for x11/nvidia-driver in background
===>>> Gathering dependency list for x11/nvidia-driver from ports
===>>> Launching child to install emulators/linux_base-c6

===>>> x11/nvidia-driver >> emulators/linux_base-c6 (1/1)

===>>> Port directory: /usr/ports/emulators/linux_base-c6

        ===>>> This port is marked IGNORE
        ===>>> compat.linux.osrelease: 2.6.16 is not supported, please use 2.6.18, BEWARE this is highly experimental


        ===>>> If you are sure you can build it, remove the
               IGNORE line in the Makefile and try again.

===>>> Update for emulators/linux_base-c6 failed
===>>> Aborting update
Thanks.
 
Also, with the new autoconfigure. Does that work every time you restart X or does it save it somewhere? (I only had one monitor when I installed everything initially).

And more info:
Code:
vgapci0@pci0:2:0:0: class=0x030000 card=0x26453842 chip=0x0fc110de rev=0xa1 hdr=0x00
vendor = 'NVIDIA Corporation'
device = 'GK107 [GeForce GT 640]'
class = display
subclass = VGA
Code:
[15-01-01 12:43]larry@/home/larry%cat /root/xorg.conf.new
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        Screen      2  "Screen2" RightOf "Screen1"
        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  "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 "Monitor"
        Identifier   "Monitor2"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

        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

Section "Screen"
        Identifier "Screen2"
        Device     "Card2"
        Monitor    "Monitor2"
        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
 
The -retro was for people who got all bent out of shape because X stopped showing a grid of black and white pixels like it had for the previous twenty years.

The Xorg server looks in multiple locations for the config file. Several will work. People still put it in /etc/, which of course is wrong and breaks the FreeBSD scheme of base and application separation. But it still works.

As far as configuration with multiple monitors, Nvidia might do things their own way. I configure my monitors with xrandr. In theory, that should work from .xinitrc, but back around server version 1.12, it stopped working from there, as did setting the monitor locations in xorg.conf. I asked, but have not followed up, and it really needs to be reported as a bug. Now, I just run it by hand after starting X:
Code:
#!/bin/sh
xrandr --output DVI-0 --primary --mode 1920x1200 --pos 1080x0 --output DVI-1 --mode 1920x1080 --pos 0x0 --rotate left

My main monitor is a 1920x1200 in landscape, and to the left is a 1920x1080 monitor in portrait. Again, Nvidia might do this their own way.
 
Thanks wblock@,

I haven't played with xrandr(1)... I had two monitors working a while back but that might have been with the Nvidia driver. I guess you would recommend sticking with the xf86? Also, do you have any clue what those "fbdevhw" errors are?

Thanks for the reply,

P.S. off topic but how do you highlight a user's name?
 
P.P.S.

The -retro was for people who got all bent out of shape because X stopped showing a grid of black and white pixels like it had for the previous twenty years.

Funny lol :)
 
wblock@, as far as I remember, the Nvidia driver is at least partially compatible with x11/xrandr. I know you can use xrandr to set the monitor's positions at least. I have used it for that to dynamically change monitor positions through a small script not too long ago under x11-wm/awesome.

doc1623, if you would like to use the Nvidia driver (which at least I would recommend as it does work well) you would be better off using the x11/nvidia-settings port to configure the monitors. Nvidia uses what it calls "TwinView"(from what I gather Nvidia's own implementation of Xinerama) to configure multiple monitors and despite the name, it works with up to 3 monitors using supported GeForce 600 series cards and above. Settings are saved to a hidden persistent file named .nvidia-settings-rc in your users home directory. You shouldn't really need anything at all in your xorg.conf file for the Nvidia driver to work as intended unless your possibly using some sort of exotic setup.

If you would like to go that route, I would probably first delete or rename your xorg.conf file. After that, make sure your not running X and from the console run the following commands:
  1. pkg delete xf86-video-nv
  2. echo "compat.linux.osrelease=2.6.18" >> /etc/sysctl.conf
The first command will delete the x11-drivers/xf86-video-nv port if installed as not to cause any conflicts when installing/using the x11/nvidia-driver port. The second command is needed to use Linux emulation provided by the emulators/linux_base-c6 port as per /usr/ports/UPDATING - entry 20141209. Also make sure you have
Code:
linux_load="YES"
nvidia_load="YES"
set in your /boot/loader.conf file to load the Linux kernel module at boot which is also required for Linux emulation and load the Nvidia kernel driver itself.

Next, make sure x11/nvidia-driver and x11/nvidia-settings ports are installed, reboot the computer, and then see if that works. If X starts correctly but with only one monitor, as I said, you should be able to use nvidia-settings to configure them to you liking. If not we can go from there. :) Phew...
 
For what it's worth, I think there's also an xinerama setting with the nvidia-settings command. I won't have a chance to look till Sunday, but once I set that, with a 4 monitor setup, some window managers, such as dwm automatically recognized each monitor (which dwm terms a screen in their docs) and spectrwm was easily adjusted with their "region" option in the config file. I had to do some minor tinkering, which I don't really remember, with flux and openbox, though x11-wm/openbox doesn't work that well, sometimes opening terminals of odd sizes with the top on one monitor and the bottom on another--I was never able to figure out any pattern in it.
 
Thanks everyone for their replies. I did get it working with x11/nvidia-driver and Xmonad. I've yet to try other window managers but I have several installed. It is weird though that Xorg -configure doesn't work well. It gives me four monitors and three separate devices. Regardless, it's working.

Thanks :)
 
Back
Top