# FreeBSD 10.0-Release RPI -- Xorg Fatal server error AddScreen/ScreenInit failed for driver 0



## el_toberto (Jan 4, 2015)

Hi everybody,

I've build x11/xorg from ports with `make -DBATCH install clean` without errors.

Then, I've build the x11-drivers/xf86-video-scfb from ports and configured the `/etc/X11/xorg.conf` manually. I used the setting from Aleksandr Rybalko from https://github.com/taguchi-ch/freebsd-ports-xorg-raspberrypi/blob/master/README.md


```
Section "Files"
EndSection

Section "Module"
   Load         "dbe"
   Disable     "dri"
   Disable     "dri2"
   Disable     "glx"
   SubSection "extmod"
     Option     "omit xfree86-dga"
   EndSubSection
EndSection

Section "ServerFlags"
   Option     "AIGLX"     "false"
   Option     "NoAccel"   "True"
   Option     "NoDRI"     "True"
   Option     "DRI"         "False"
   Option     "DRI2"       "False"
EndSection

Section "InputDevice"
   Identifier   "Keyboard1"
   Driver        "kbd"
EndSection

Section "InputDevice"
   Identifier   "Mouse1"
   Driver       "mouse"
   Option      "Protocol"   "auto"
   Option      "Device"     "/dev/sysmouse"
EndSection

Section "Monitor"
   Identifier   "Monitor"
   Mode "1024x600"
     DotClock   25.175
     HTimings   1024 1048 1148 1200
     VTimings   600 610 620 700
   EndMode
EndSection

Section "Device"
   Identifier   "Generic FB"
   Driver        "scfb"
   Option       "NoAccel“   “True"
EndSection

Section "Screen"
   Identifier   "Screen"
   Device     "Generic FB"
   Monitor     "Monitor"
   DefaultDepth   16
   SubSection "Display"
     Depth     16
     Modes     "1024x600"
   EndSubsection
EndSection

Section "ServerLayout"
   Identifier   "layout"
   Screen     0 "Screen" 0 0
   InputDevice   "Mouse1"   "CorePointer"
   InputDevice   "Keyboard1"   "CoreKeyboard"
EndSection
```

Now, if I start Xorg with `startx`, I get this:


```
root@raspberry-pi:~ # startx
xauth:  file /root/.serverauth.947 does not exist
xauth: (argv):1:  bad display name "raspberry-pi:0" in "list" command
xauth: (stdin):1:  bad display name "raspberry-pi:0" in "add" command


X.Org X Server 1.14.7
Release Date: 2014-06-05
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 10.0-RELEASE arm
Current Operating System: FreeBSD raspberry-pi 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 31 18:40:22 UTC 2014  root@grind.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm
Build Date: 03 January 2015  11:45:20AM
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: Sun Jan  4 17:12:35 2015
(==) Using config file: "/etc/X11/xorg.conf"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
scfb trace: probe start
scfb trace: probe done
scfb: PreInit 0
scfb: PreInit done
scfb: ScfbScreenInit 0
   bitsPerPixel=16, depth=16, defaultVisual=TrueColor
   mask: f800,7e0,1f, offset: 11,5,0
mmap returns: addr 0x0 len 0x0, fd 6, off 0
(EE)
Fatal server error:
(EE) AddScreen/ScreenInit failed for driver 0
(EE)
(EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: (argv):1:  bad display name "raspberry-pi:0" in "remove" command
root@raspberry-pi:~ #
```

Here's the `/var/log/Xorg.0.log` logfile:


```
[  113.655]
X.Org X Server 1.14.7
Release Date: 2014-06-05
[  113.658] X Protocol Version 11, Revision 0
[  113.660] Build Operating System: FreeBSD 10.0-RELEASE arm
[  113.662] Current Operating System: FreeBSD raspberry-pi 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 31 18:40:22 UTC 2014  root@grind.freebsd.org:/usr/obj/arm.armv6/usr/src/sys$
[  113.669] Build Date: 03 January 2015  11:45:20AM
[  113.670]
[  113.672] Current version of pixman: 0.32.6
[  113.675]  Before reporting problems, check http://wiki.x.org
  to make sure that you have the latest version.
[  113.676] Markers: (--) probed, (**) from config file, (==) default setting,
  (++) from command line, (!!) notice, (II) informational,
  (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  113.692] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan  4 17:12:35 2015
[  113.760] (==) Using config file: "/etc/X11/xorg.conf"
[  113.765] (==) ServerLayout "layout"
[  113.766] (**) |-->Screen "Screen" (0)
[  113.766] (**) |  |-->Monitor "Monitor"
[  113.776] (**) |  |-->Device "Generic FB"
[  113.776] (**) |-->Input Device "Mouse1"
[  113.777] (**) |-->Input Device "Keyboard1"
[  113.777] (**) Option "AIGLX" "false"
[  113.778] (**) Option "DRI2" "False"
[  113.779] (==) Automatically adding devices
[  113.779] (==) Automatically enabling devices
[  113.779] (==) Not automatically adding GPU devices
[  113.871] (==) FontPath set to:
  /usr/local/lib/X11/fonts/misc/,
  /usr/local/lib/X11/fonts/TTF/,
  /usr/local/lib/X11/fonts/OTF/,
  /usr/local/lib/X11/fonts/Type1/,
  /usr/local/lib/X11/fonts/100dpi/,
  /usr/local/lib/X11/fonts/75dpi/
[  113.872] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  113.872] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  113.873] (WW) Disabling Mouse1
[  113.873] (WW) Disabling Keyboard1
[  113.874] (II) Loader magic: 0x21f44c
[  113.874] (II) Module ABI versions:
[  113.874]  X.Org ANSI C Emulation: 0.4
[  113.875]  X.Org Video Driver: 14.1
[  113.875]  X.Org XInput driver : 19.1
[  113.875]  X.Org Server Extension : 7.0
[  113.905] Initializing built-in extension Generic Event Extension
[  113.907] Initializing built-in extension SHAPE
[  113.909] Initializing built-in extension MIT-SHM
[  113.910] Initializing built-in extension XInputExtension
[  113.912] Initializing built-in extension XTEST
[  113.914] Initializing built-in extension BIG-REQUESTS
[  113.916] Initializing built-in extension SYNC
[  113.917] Initializing built-in extension XKEYBOARD
[  113.919] Initializing built-in extension XC-MISC
[  113.920] Initializing built-in extension XINERAMA
[  113.922] Initializing built-in extension XFIXES
[  113.925] Initializing built-in extension RENDER
[  113.926] Initializing built-in extension RANDR
[  113.928] Initializing built-in extension COMPOSITE
[  113.929] Initializing built-in extension DAMAGE
[  113.931] Initializing built-in extension MIT-SCREEN-SAVER
[  113.934] Initializing built-in extension DOUBLE-BUFFER
[  113.935] Initializing built-in extension RECORD
[  113.937] Initializing built-in extension DPMS
[  113.938] Initializing built-in extension X-Resource
[  113.940] Initializing built-in extension XVideo
[  113.941] Initializing built-in extension XVideo-MotionCompensation
[  113.946] Initializing built-in extension XFree86-VidModeExtension
[  113.952] Initializing built-in extension XFree86-DGA
[  113.958] Initializing built-in extension XFree86-DRI
[  113.960] Initializing built-in extension DRI2
[  113.960] (WW) "dri" will not be loaded unless you've specified it to be loaded elsewhere.
[  113.960] (WW) "dri2" will not be loaded unless you've specified it to be loaded elsewhere.
[  113.961] (WW) "glx" will not be loaded unless you've specified it to be loaded elsewhere.
[  113.961] (II) "glx" will be loaded even though the default is to disable it.
[  113.961] (II) LoadModule: "dbe"
[  113.962] (II) Module "dbe" already built-in
[  113.963] (II) LoadModule: "extmod"
[  113.964] (II) Module "extmod" already built-in
[  113.964] (II) LoadModule: "scfb"
[  114.047] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[  114.054] (II) Module scfb: vendor="X.Org Foundation"
[  114.054]  compiled for 1.14.7, module version = 0.0.4
[  114.055]  ABI class: X.Org Video Driver, version 14.1
[  114.055] (II) scfb: driver for wsdisplay framebuffer: scfb
[  114.060] (--) Using syscons driver with X support (version 2.0)
[  114.061] (--) using VT number 5

[  114.076] (WW) Falling back to old probe method for scfb
[  114.077] scfb trace: probe start
[  114.078] (II) scfb(0): using default device
[  114.079] scfb trace: probe done
[  114.080] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  114.081] scfb: PreInit 0
[  114.082] (II) scfb(0): Using: depth (16),  width (1920),  height (1080)
[  114.084] (**) scfb(0): Depth 16, (--) framebuffer bpp 16
[  114.084] (==) scfb(0): RGB weight 565
[  114.084] (==) scfb(0): Default visual is TrueColor
[  114.085] (==) scfb(0): Using gamma correction (1.0, 1.0, 1.0)
[  114.085] (II) scfb(0): Vidmem: 0k
[  114.086] (==) scfb(0): DPI set to (96, 96)
[  114.086] (**) scfb(0): Using "Shadow Framebuffer"
[  114.087] (II) Loading sub module "shadow"
[  114.087] (II) LoadModule: "shadow"
[  114.094] (II) Loading /usr/local/lib/xorg/modules/libshadow.so
[  114.099] (II) Module shadow: vendor="X.Org Foundation"
[  114.099]  compiled for 1.14.7, module version = 1.1.0
[  114.099]  ABI class: X.Org ANSI C Emulation, version 0.4
[  114.100] (II) Loading sub module "fb"
[  114.100] (II) LoadModule: "fb"
[  114.105] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[  114.122] (II) Module fb: vendor="X.Org Foundation"
[  114.122]  compiled for 1.14.7, module version = 1.0.0
[  114.123]  ABI class: X.Org ANSI C Emulation, version 0.4
[  114.125] scfb: PreInit done
[  114.127] scfb: ScfbScreenInit 0
[  114.128]  bitsPerPixel=16, depth=16, defaultVisual=TrueColor
  mask: f800,7e0,1f, offset: 11,5,0
[  114.130] mmap returns: addr 0x0 len 0x0, fd 6, off 0
[  114.133] (EE) scfb(0): scfb_mmap: Invalid argument
[  114.135] (EE)
Fatal server error:
[  114.139] (EE) AddScreen/ScreenInit failed for driver 0
[  114.144] (EE)
[  114.148] (EE)
Please consult the The X.Org Foundation support
  at http://wiki.x.org
 for help.
[  114.152] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  114.157] (EE)
[  114.177] (EE) Server terminated with error (1). Closing log file.
```

I hope somebody can help.


----------



## acheron (Jan 5, 2015)

You should upgrade your RPI to current.


----------

