toffi
Posts: 4
Joined: Sat Jul 05, 2014 7:21 am
Location: Germany

Switch between SPI and HDMI monitor

Sun Jul 06, 2014 11:07 am

Hey!

I'm new to the Raspberry Pi forums. I read a lot of post here and hope that someone can help me solve my display problems.
(I'm sorry for my bad english. :) )

I saw a nice project using a Arduino monitor at the GPIO. (http://ozzmaker.com/2013/05/27/raspberr ... ol-part-2/). It is an 3.2" display from sainsmart using SPI. I designed a pcb and connected everything to my raspberry pi. I used a driver designed by valdodov http://www.valdodov.com/index.php?show=hardware&item=1. The display and the touchscreen works fine. The console interface and the xserver are visible on the monitor. I installed BasiliskII and can show a System 7.5 Emulation in the right solution on the display.
Image
Image
Image

Now i want to switch between the SPI and my HDMI display.
My first idea was to add a second device in /usr/share/X11/xorg.conf.d/99-fbdev.conf like this

Code: Select all

Section "Device"
  Identifier "hdmi"
  Driver "fbturbo"
  Option "fbdev" "/dev/fb0"
EndSection

Section "Device"
  Identifier "myfb"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"
EndSection
When i start the xserver with "FRAMEBUFFER=/dev/fb0 startx -- -dpi 60", the output is still on the SPI monitor.
I read something about multiseat sessions https://github.com/notro/fbtft-spindle/ ... -multiseat
I add the same file like in the link: /etc/X11/xorg.conf.d/50-fbtft.conf

Code: Select all

# FBTFT xorg config file
#
# startx -- -layout TFT
# startx -- -layout HDMI
#
# When not specifying the layout, the first is used: TFT
#

Section "ServerLayout"
    Identifier "TFT"
    Screen 0 "ScreenTFT"
EndSection

Section "ServerLayout"
    Identifier "HDMI"
    Screen 0 "ScreenHDMI"
EndSection

Section "Screen"
    Identifier "ScreenHDMI"
    Monitor "MonitorHDMI"
    Device "DeviceHDMI"
Endsection

Section "Screen"
    Identifier "ScreenTFT"
    Monitor "MonitorTFT"
    Device "DeviceTFT"
Endsection

Section "Monitor"
    Identifier "MonitorHDMI"
Endsection

Section "Monitor"
    Identifier "MonitorTFT"
Endsection

Section "Device"
    Identifier "DeviceHDMI"
    Driver "fbturbo"
    Option "fbdev" "/dev/fb0"
    Option "SwapbuffersWait" "true"
EndSection

Section "Device"
    Identifier "DeviceTFT"
    Option "fbdev" "/dev/fb1"
EndSection
By typing "startx -- -layout HDMI" the xserver has a fatal server error

Code: Select all

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/raspberrypi:1
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux raspberrypi 3.6.11 #41 PREEMPT Wed Mar 13 11:19:55 EET 2013 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708.boardrev=0xe bcm2708.serial=0xab021f0f smsc95xx.macaddr=B8:27:EB:02:1F:0F sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11 
Build Date: 18 December 2013  05:20:52PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>) 
Current version of pixman: 0.29.3
	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.1.log", Time: Sun Jul  6 10:50:38 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Fatal server error:
AddScreen/ScreenInit failed for driver 0


Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.1.log" for additional information.

Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Bad file descriptor
xinit: server error
In the log-file you can see an error by using fbturbo

Code: Select all

[  1731.879] _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
[  1731.880] _XSERVTransOpen: transport open failed for inet6/raspberrypi:1
[  1731.880] _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
[  1731.887] 
X.Org X Server 1.12.4
Release Date: 2012-08-27
[  1731.888] X Protocol Version 11, Revision 0
[  1731.888] Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
[  1731.888] Current Operating System: Linux raspberrypi 3.6.11 #41 PREEMPT Wed Mar 13 11:19:55 EET 2013 armv6l
[  1731.888] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708.boardrev=0xe bcm2708.serial=0xab021f0f smsc95xx.macaddr=B8:27:EB:02:1F:0F sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11 
[  1731.889] Build Date: 18 December 2013  05:20:52PM
[  1731.889] xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>) 
[  1731.891] Current version of pixman: 0.29.3
[  1731.895] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  1731.895] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1731.904] (==) Log file: "/var/log/Xorg.1.log", Time: Sun Jul  6 10:50:38 2014
[  1731.907] (==) Using config file: "/etc/X11/xorg.conf"
[  1731.909] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1731.910] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1731.914] (++) ServerLayout "HDMI"
[  1731.914] (**) |-->Screen "ScreenHDMI" (0)
[  1731.914] (**) |   |-->Monitor "MonitorHDMI"
[  1731.917] (**) |   |-->Device "DeviceHDMI"
[  1731.917] (==) Automatically adding devices
[  1731.917] (==) Automatically enabling devices
[  1731.918] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[  1731.918] 	Entry deleted from font path.
[  1731.918] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1731.918] 	Entry deleted from font path.
[  1731.918] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[  1731.918] 	Entry deleted from font path.
[  1731.919] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  1731.919] 	Entry deleted from font path.
[  1731.919] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[  1731.919] 	Entry deleted from font path.
[  1731.919] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  1731.919] 	Entry deleted from font path.
[  1731.920] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[  1731.920] 	Entry deleted from font path.
[  1731.920] (==) FontPath set to:
	/usr/share/fonts/X11/Type1,
	built-ins
[  1731.920] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1731.920] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1731.920] (II) Loader magic: 0x1aa7a8
[  1731.920] (II) Module ABI versions:
[  1731.921] 	X.Org ANSI C Emulation: 0.4
[  1731.921] 	X.Org Video Driver: 12.1
[  1731.921] 	X.Org XInput driver : 16.0
[  1731.921] 	X.Org Server Extension : 6.0
[  1731.921] (II) LoadModule: "extmod"
[  1731.924] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[  1731.928] (II) Module extmod: vendor="X.Org Foundation"
[  1731.928] 	compiled for 1.12.4, module version = 1.0.0
[  1731.928] 	Module class: X.Org Server Extension
[  1731.928] 	ABI class: X.Org Server Extension, version 6.0
[  1731.928] (II) Loading extension SELinux
[  1731.929] (II) Loading extension MIT-SCREEN-SAVER
[  1731.929] (II) Loading extension XFree86-VidModeExtension
[  1731.929] (II) Loading extension XFree86-DGA
[  1731.929] (II) Loading extension DPMS
[  1731.929] (II) Loading extension XVideo
[  1731.929] (II) Loading extension XVideo-MotionCompensation
[  1731.929] (II) Loading extension X-Resource
[  1731.930] (II) LoadModule: "dbe"
[  1731.931] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[  1731.932] (II) Module dbe: vendor="X.Org Foundation"
[  1731.932] 	compiled for 1.12.4, module version = 1.0.0
[  1731.933] 	Module class: X.Org Server Extension
[  1731.933] 	ABI class: X.Org Server Extension, version 6.0
[  1731.933] (II) Loading extension DOUBLE-BUFFER
[  1731.933] (II) LoadModule: "glx"
[  1731.935] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1731.936] (II) Module glx: vendor="X.Org Foundation"
[  1731.936] 	compiled for 1.12.4, module version = 1.0.0
[  1731.936] 	ABI class: X.Org Server Extension, version 6.0
[  1731.937] (==) AIGLX enabled
[  1731.937] (II) Loading extension GLX
[  1731.937] (II) LoadModule: "record"
[  1731.939] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[  1731.940] (II) Module record: vendor="X.Org Foundation"
[  1731.940] 	compiled for 1.12.4, module version = 1.13.0
[  1731.940] 	Module class: X.Org Server Extension
[  1731.940] 	ABI class: X.Org Server Extension, version 6.0
[  1731.941] (II) Loading extension RECORD
[  1731.941] (II) LoadModule: "dri"
[  1731.942] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[  1731.944] (II) Module dri: vendor="X.Org Foundation"
[  1731.945] 	compiled for 1.12.4, module version = 1.0.0
[  1731.945] 	ABI class: X.Org Server Extension, version 6.0
[  1731.945] (II) Loading extension XFree86-DRI
[  1731.945] (II) LoadModule: "dri2"
[  1731.947] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[  1731.948] (II) Module dri2: vendor="X.Org Foundation"
[  1731.948] 	compiled for 1.12.4, module version = 1.2.0
[  1731.948] 	ABI class: X.Org Server Extension, version 6.0
[  1731.948] (II) Loading extension DRI2
[  1731.948] (II) LoadModule: "fbturbo"
[  1731.949] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[  1731.958] (II) Module fbturbo: vendor="X.Org Foundation"
[  1731.958] 	compiled for 1.12.4, module version = 0.5.1
[  1731.958] 	Module class: X.Org Video Driver
[  1731.958] 	ABI class: X.Org Video Driver, version 12.1
[  1731.959] (II) FBTURBO: driver for framebuffer: fbturbo
[  1731.960] (--) using VT number 8

[  1731.973] (WW) Falling back to old probe method for fbturbo
[  1731.974] (II) Loading sub module "fbdevhw"
[  1731.974] (II) LoadModule: "fbdevhw"
[  1731.975] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  1731.976] (II) Module fbdevhw: vendor="X.Org Foundation"
[  1731.976] 	compiled for 1.12.4, module version = 0.0.2
[  1731.977] 	ABI class: X.Org Video Driver, version 12.1
[  1731.977] (II) FBTURBO(0): using /dev/fb0
[  1731.977] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1731.978] (II) FBTURBO(0): Creating default Display subsection in Screen section
	"ScreenHDMI" for depth/fbbpp 16/16
[  1731.978] (==) FBTURBO(0): Depth 16, (==) framebuffer bpp 16
[  1731.978] (==) FBTURBO(0): RGB weight 565
[  1731.979] (==) FBTURBO(0): Default visual is TrueColor
[  1731.979] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0)
[  1731.979] (II) FBTURBO(0): hardware: BCM2708 FB (video memory: 0kB)
[  1731.979] (**) FBTURBO(0): Option "fbdev" "/dev/fb0"
[  1731.984] (**) FBTURBO(0): Option "SwapbuffersWait" "true"
[  1731.985] (II) FBTURBO(0): processor: ARM1176
[  1731.986] (II) FBTURBO(0): checking modes against framebuffer device...
[  1731.986] (II) FBTURBO(0): checking modes against monitor...
[  1731.986] (--) FBTURBO(0): Virtual size is 720x480 (pitch 720)
[  1731.986] (**) FBTURBO(0):  Built-in mode "current"
[  1731.986] (==) FBTURBO(0): DPI set to (96, 96)
[  1731.987] (II) Loading sub module "fb"
[  1731.987] (II) LoadModule: "fb"
[  1731.988] (II) Loading /usr/lib/xorg/modules/libfb.so
[  1731.996] (II) Module fb: vendor="X.Org Foundation"
[  1731.997] 	compiled for 1.12.4, module version = 1.0.0
[  1731.997] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1731.997] (EE) FBTURBO(0): mmap fbmem: Invalid argument
[  1731.998] (EE) FBTURBO(0): mapping of video memory failed
[  1732.001] 
Fatal server error:
[  1732.003] AddScreen/ScreenInit failed for driver 0
[  1732.010] 
[  1732.016] 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[  1732.019] Please also check the log file at "/var/log/Xorg.1.log" for additional information.
[  1732.020] 
[  1732.057] Server terminated with error (1). Closing log file.
I try to compile fbturbo again (https://github.com/ssvb/xf86-video-fbturbo), but the error is still there.

Does someone has a clue how to set the xserver to HDMI again? - By the way the command line interface can still be shown on HDMI by editing /boot/cmdline.txt

- toffi

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Switch between SPI and HDMI monitor

Sun Jul 06, 2014 11:01 pm

Using fbdev for Both screens is a solution.

toffi
Posts: 4
Joined: Sat Jul 05, 2014 7:21 am
Location: Germany

Re: Switch between SPI and HDMI monitor

Mon Jul 07, 2014 6:30 am

I change the driver option in all files (etc/X11/xorg.conf.d/50-fbtft.conf usr/share/X11/xorg.conf.d/99-fbdev.conf and etc/X11/xorf.conf) to "fbdev". The error is still there and FBTURBO has been replaced by FBDEV:

Code: Select all

[   196.253] _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
[   196.253] _XSERVTransOpen: transport open failed for inet6/raspberrypi:1
[   196.254] _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
[   196.263] 
X.Org X Server 1.12.4
Release Date: 2012-08-27
[   196.267] X Protocol Version 11, Revision 0
[   196.268] Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
[   196.271] Current Operating System: Linux raspberrypi 3.6.11 #41 PREEMPT Wed Mar 13 11:19:55 EET 2013 armv6l
[   196.272] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708.boardrev=0xe bcm2708.serial=0xab021f0f smsc95xx.macaddr=B8:27:EB:02:1F:0F sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11 
[   196.275] Build Date: 18 December 2013  05:20:52PM
[   196.275] xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>) 
[   196.276] Current version of pixman: 0.29.3
[   196.277] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   196.278] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   196.285] (==) Log file: "/var/log/Xorg.1.log", Time: Mon Jul  7 06:03:36 2014
[   196.288] (==) Using config file: "/etc/X11/xorg.conf"
[   196.289] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   196.290] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   196.294] (++) ServerLayout "HDMI"
[   196.294] (**) |-->Screen "ScreenHDMI" (0)
[   196.295] (**) |   |-->Monitor "MonitorHDMI"
[   196.297] (**) |   |-->Device "DeviceHDMI"
[   196.297] (==) Automatically adding devices
[   196.297] (==) Automatically enabling devices
[   196.298] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[   196.298] 	Entry deleted from font path.
[   196.298] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   196.298] 	Entry deleted from font path.
[   196.298] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   196.298] 	Entry deleted from font path.
[   196.298] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   196.299] 	Entry deleted from font path.
[   196.299] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   196.299] 	Entry deleted from font path.
[   196.299] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   196.299] 	Entry deleted from font path.
[   196.299] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[   196.299] 	Entry deleted from font path.
[   196.300] (==) FontPath set to:
	/usr/share/fonts/X11/Type1,
	built-ins
[   196.300] (==) ModulePath set to "/usr/lib/xorg/modules"
[   196.300] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[   196.300] (II) Loader magic: 0x1aa7a8
[   196.300] (II) Module ABI versions:
[   196.300] 	X.Org ANSI C Emulation: 0.4
[   196.301] 	X.Org Video Driver: 12.1
[   196.301] 	X.Org XInput driver : 16.0
[   196.301] 	X.Org Server Extension : 6.0
[   196.301] (II) LoadModule: "extmod"
[   196.304] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[   196.308] (II) Module extmod: vendor="X.Org Foundation"
[   196.308] 	compiled for 1.12.4, module version = 1.0.0
[   196.308] 	Module class: X.Org Server Extension
[   196.308] 	ABI class: X.Org Server Extension, version 6.0
[   196.308] (II) Loading extension SELinux
[   196.308] (II) Loading extension MIT-SCREEN-SAVER
[   196.309] (II) Loading extension XFree86-VidModeExtension
[   196.309] (II) Loading extension XFree86-DGA
[   196.309] (II) Loading extension DPMS
[   196.309] (II) Loading extension XVideo
[   196.309] (II) Loading extension XVideo-MotionCompensation
[   196.309] (II) Loading extension X-Resource
[   196.310] (II) LoadModule: "dbe"
[   196.311] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[   196.312] (II) Module dbe: vendor="X.Org Foundation"
[   196.312] 	compiled for 1.12.4, module version = 1.0.0
[   196.313] 	Module class: X.Org Server Extension
[   196.313] 	ABI class: X.Org Server Extension, version 6.0
[   196.313] (II) Loading extension DOUBLE-BUFFER
[   196.313] (II) LoadModule: "glx"
[   196.315] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   196.316] (II) Module glx: vendor="X.Org Foundation"
[   196.316] 	compiled for 1.12.4, module version = 1.0.0
[   196.316] 	ABI class: X.Org Server Extension, version 6.0
[   196.317] (==) AIGLX enabled
[   196.317] (II) Loading extension GLX
[   196.317] (II) LoadModule: "record"
[   196.319] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[   196.320] (II) Module record: vendor="X.Org Foundation"
[   196.320] 	compiled for 1.12.4, module version = 1.13.0
[   196.320] 	Module class: X.Org Server Extension
[   196.320] 	ABI class: X.Org Server Extension, version 6.0
[   196.320] (II) Loading extension RECORD
[   196.321] (II) LoadModule: "dri"
[   196.322] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[   196.324] (II) Module dri: vendor="X.Org Foundation"
[   196.324] 	compiled for 1.12.4, module version = 1.0.0
[   196.324] 	ABI class: X.Org Server Extension, version 6.0
[   196.325] (II) Loading extension XFree86-DRI
[   196.325] (II) LoadModule: "dri2"
[   196.326] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[   196.327] (II) Module dri2: vendor="X.Org Foundation"
[   196.328] 	compiled for 1.12.4, module version = 1.2.0
[   196.328] 	ABI class: X.Org Server Extension, version 6.0
[   196.328] (II) Loading extension DRI2
[   196.328] (II) LoadModule: "fbdev"
[   196.329] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   196.330] (II) Module fbdev: vendor="X.Org Foundation"
[   196.330] 	compiled for 1.12.1, module version = 0.4.2
[   196.330] 	ABI class: X.Org Video Driver, version 12.0
[   196.331] (II) FBDEV: driver for framebuffer: fbdev
[   196.331] (--) using VT number 8

[   196.345] (WW) Falling back to old probe method for fbdev
[   196.346] (II) Loading sub module "fbdevhw"
[   196.346] (II) LoadModule: "fbdevhw"
[   196.347] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   196.348] (II) Module fbdevhw: vendor="X.Org Foundation"
[   196.348] 	compiled for 1.12.4, module version = 0.0.2
[   196.348] 	ABI class: X.Org Video Driver, version 12.1
[   196.349] (II) FBDEV(0): using /dev/fb0
[   196.349] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   196.350] (II) FBDEV(0): Creating default Display subsection in Screen section
	"ScreenHDMI" for depth/fbbpp 16/16
[   196.350] (==) FBDEV(0): Depth 16, (==) framebuffer bpp 16
[   196.350] (==) FBDEV(0): RGB weight 565
[   196.350] (==) FBDEV(0): Default visual is TrueColor
[   196.351] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[   196.351] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 0kB)
[   196.351] (**) FBDEV(0): Option "fbdev" "/dev/fb0"
[   196.351] (II) FBDEV(0): checking modes against framebuffer device...
[   196.352] (II) FBDEV(0): checking modes against monitor...
[   196.352] (--) FBDEV(0): Virtual size is 640x480 (pitch 640)
[   196.352] (**) FBDEV(0):  Built-in mode "current"
[   196.352] (==) FBDEV(0): DPI set to (96, 96)
[   196.352] (II) Loading sub module "fb"
[   196.353] (II) LoadModule: "fb"
[   196.354] (II) Loading /usr/lib/xorg/modules/libfb.so
[   196.355] (II) Module fb: vendor="X.Org Foundation"
[   196.356] 	compiled for 1.12.4, module version = 1.0.0
[   196.356] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   196.356] (**) FBDEV(0): using shadow framebuffer
[   196.356] (II) Loading sub module "shadow"
[   196.356] (II) LoadModule: "shadow"
[   196.357] (II) Loading /usr/lib/xorg/modules/libshadow.so
[   196.359] (II) Module shadow: vendor="X.Org Foundation"
[   196.359] 	compiled for 1.12.4, module version = 1.1.0
[   196.359] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   196.359] (EE) FBDEV(0): mmap fbmem: Invalid argument
[   196.371] (EE) FBDEV(0): mapping of video memory failed
[   196.372] 
Fatal server error:
[   196.374] AddScreen/ScreenInit failed for driver 0
[   196.380] 
[   196.386] 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   196.389] Please also check the log file at "/var/log/Xorg.1.log" for additional information.
[   196.391] 
[   196.431] Server terminated with error (1). Closing log file.
May the problem this line?

Code: Select all

[   196.351] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 0kB)
I'm not sure which hardware exactly shows up here normally. But at the end of the log file the video memory is not mapped and you cannot map 0kB.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Switch between SPI and HDMI monitor

Mon Jul 07, 2014 3:14 pm

Try : tvservice -p
Then : Crtl-Alt-F2 Crtl-Alt-F1

toffi
Posts: 4
Joined: Sat Jul 05, 2014 7:21 am
Location: Germany

Re: Switch between SPI and HDMI monitor

Mon Jul 07, 2014 6:32 pm

Thank you, mimi! You guided me to the right path.

The problem is hidden in /boot/cmdline.txt It is quite beautiful to see your Pi booting up like this on the SPI display. But this killed the HDMI output! I removed this entire

Code: Select all

fbcon=map:1
and now i can switch between SPI and HDMI using "startx -- -layout TFT" and "startx -- -layout HDMI"
By the way i changed the driver back to fbturbo - don't know if that matter.

phoenix-survive
Posts: 1
Joined: Tue Jan 13, 2015 11:35 am

Re: Switch between SPI and HDMI monitor

Tue Jan 13, 2015 12:11 pm

@toffi:
However I’ not able to write a direct message to you...
I need a System which boots on SPI-Display (portable) and can by switched to HDMI if it's connected.
Can you explain again, step by step, what you have done to a successful solution?
Thank you!!

toffi
Posts: 4
Joined: Sat Jul 05, 2014 7:21 am
Location: Germany

Re: Switch between SPI and HDMI monitor

Wed Jan 14, 2015 5:04 pm

I can post my way the next days, if you are interested. But the solution depends massivly on your hardware and driver you use. How far is the progress in your project, phoenix?

cvc1968
Posts: 1
Joined: Fri Jan 23, 2015 9:49 pm

Re: Switch between SPI and HDMI monitor

Fri Jan 23, 2015 9:55 pm

Greetings toffi,

I would like to second phoenix-survive's request for your step by step on this.

I've been looking for a way to do this successfully for days. I'm using a Tontec 3.2" touchscreen and everything works UNTIL I use their demo commands for switching between the HDMI and the touchscreen. The HDMI works fine but I cannot get the touchscreen to work again (without re-flashing my SD with their provided Raspbian image and starting over). I have begun troubleshooting this and confirmed that they're using fbturbo as the driver, just like yours. So I'm hopeful that your solution will work in my situation as well. I'm going to try and piece it all together from these postings, but if you can consolidate your solution into a step by step guide, that would be great and much appreciated.

Thanks

VirtusDeVir
Posts: 1
Joined: Thu Jun 11, 2015 4:50 pm

Re: Switch between SPI and HDMI monitor

Thu Jun 11, 2015 4:56 pm

Hello toffi,

I have a Waveshare 3.5 tft screen and would like to know how you achieved getting both HDMI and SPI to work. Do you have instructions? Your help is greatly appreciated!

IonicaBizau
Posts: 2
Joined: Fri Aug 14, 2015 4:37 am

Re: Switch between SPI and HDMI monitor

Fri Aug 14, 2015 8:19 am

Same problem here! Any step-by-step solution? I asked a similar question here: http://raspberrypi.stackexchange.com/q/34347/33613

User avatar
theLuthier
Posts: 7
Joined: Sun Dec 20, 2015 8:54 pm

Re: Switch between SPI and HDMI monitor

Thu Feb 23, 2017 6:08 pm

I also second the request to see a step-by-step guide to achieving the SPI <--> HDMI switch setup. Thanks @toffi!

User avatar
slow_bear_ro
Posts: 2
Joined: Mon Mar 05, 2018 5:29 pm

Re: Switch between SPI and HDMI monitor

Mon Mar 05, 2018 8:25 pm

Following this with great interest.

For those of you who want a quick install of common LCD I recommend you the Adafruit script (link below)

https://learn.adafruit.com/adafruit-2-2 ... spberry-pi

Has the 2.2 / 2.4 / 2.8 / 3.5 displays

I personally successfully installed the 2.2 SPI no touch screen

Unfortunately the HDMI mirroring dosen't work whit standard HDMI monitors / TV

Best regards,
Slow

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: Bing [Bot] and 18 guests