jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry P

Thu Jun 25, 2015 2:19 am

Hi Folks,

My son's got a Raspberry Pi B v2 (000e) and just got a SainSmart 3.2" TFT LCD for Raspberry Pi (http://www.sainsmart.com/sainsmart-3-2- ... ry-pi.html).

I'm okay with Linux, but we're both completely new to Raspberry Pi.

Is there a way to get this display working with his Raspberry Pi? If so, what are the steps?

We have tried a few howtos, but they've either been for different display devices or seem outdated. We're running Raspbian, ATM, but we're not married to it. However we can get this display working is fine.

Thanks,
Jamie

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Thu Jun 25, 2015 8:24 am

Try this
sudo modprobe fbtft_device name=sainsmart32
and /dev/fb1 should appear. There'll be lots of messages that show on a dmesg command after that.

If that works you can add a line to /etc/modules

Code: Select all

fbtft_device name=sainsmart32
https://github.com/notro/fbtft/wiki#install
https://github.com/notro/fbtft/wiki/LCD ... insmart-18
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 2:16 am

Hi Dougie,

Thanks a lot for the response. The following commands are my attempts at following your instructions (and those in the links you provided):

Code: Select all

pi@raspberrypi ~ $ dmesg > before.txt
pi@raspberrypi ~ $ sudo modprobe fbtft_device name=sainsmart32
pi@raspberrypi ~ $ dmesg > after.txt
pi@raspberrypi ~ $ diff before.txt after.txt 
221a222,236
> [  218.192596] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
> [  218.203474] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
> [  218.209346] fbtft_device:  SPI devices registered:
> [  218.209397] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
> [  218.209417] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
> [  218.209429] fbtft_device:  'fb' Platform devices registered:
> [  218.209480] fbtft_device:      bcm2708_fb id=-1 pdata? no
> [  218.209780] fbtft_device:  GPIOS used by 'sainsmart32':
> [  218.209801] fbtft_device:    (none)
> [  218.209814] fbtft_device:  'fb' Platform devices registered:
> [  218.209858] fbtft_device:      bcm2708_fb id=-1 pdata? no
> [  218.209906] fbtft_device:      fb_ssd1289 id=0 pdata? yes
> [  218.243733] fb_ssd1289: module is from the staging directory, the quality is unknown, you have been warned.
> [  218.250807] fb_ssd1289 fb_ssd1289.0: Missing info about 'dc' gpio. Aborting.
> [  218.250939] fb_ssd1289: probe of fb_ssd1289.0 failed with error -22


pi@raspberrypi ~ $ sudo rpi-update

pi@raspberrypi ~ $ dmesg > before.txt
pi@raspberrypi ~ $ sudo modprobe fbtft_device name=sainsmart32
pi@raspberrypi ~ $ dmesg > after.txt
pi@raspberrypi ~ $ diff before.txt after.txt 
236a237,249
> [  871.221525] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
> [  871.227234] fbtft_device:  SPI devices registered:
> [  871.227282] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
> [  871.227304] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
> [  871.227317] fbtft_device:  'fb' Platform devices registered:
> [  871.227366] fbtft_device:      bcm2708_fb id=-1 pdata? no
> [  871.228255] fb_ssd1289 fb_ssd1289.0: Missing info about 'dc' gpio. Aborting.
> [  871.228375] fb_ssd1289: probe of fb_ssd1289.0 failed with error -22
> [  871.228406] fbtft_device:  GPIOS used by 'sainsmart32':
> [  871.228423] fbtft_device:    (none)
> [  871.228435] fbtft_device:  'fb' Platform devices registered:
> [  871.228481] fbtft_device:      bcm2708_fb id=-1 pdata? no
> [  871.228532] fbtft_device:      fb_ssd1289 id=0 pdata? yes

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx

pi@raspberrypi ~ $ sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx
The startx commands were issued directly on the RP, but the rest were done via SSH. The startx only managed to start X on the component out (which we've got a TV connected to), but not to the little display.

Hopefully, you'll be able to see where I'm going wrong.

Thanks,
Jamie

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 9:03 am

Add it to /etc/modules and reboot.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 12:34 pm

Thanks again, Dougie,

Still no luck, though: I'm getting the same behavior as before. (X starts on the composite video out but not on the 3.2" display.)

Adding module permanently, attempting to start X on the LCD, and then halting:

Code: Select all

pi@raspberrypi ~ $ echo "fbtft__device name=sainsmart32" | sudo tee -a /etc/modules
pi@raspberrypi ~ $ sudo reboot
pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx


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 4.0.6+ #798 PREEMPT Tue Jun 23 17:48:03 BST 2015 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0x38f30e48 smsc95xx.macaddr=B8:27:EB:F3:0E:48 bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 11 February 2015  09:31:17PM
xorg-server 2:1.12.4-6+deb7u6 (Julien Cristau <jcristau@debian.org>) 
Current version of pixman: 0.33.1
	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 Jun 26 12:20:10 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
^Cxinit: connection to X server lost

waiting for X server to shut down Server terminated successfully (0). Closing log file.

xinit: unexpected signal 2
Resulting X log, FWIW:

Code: Select all

pi@raspberrypi ~ $ cat /var/log/Xorg.0.log
[  1183.511] 
X.Org X Server 1.12.4
Release Date: 2012-08-27
[  1183.514] X Protocol Version 11, Revision 0
[  1183.515] Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
[  1183.516] Current Operating System: Linux raspberrypi 4.0.6+ #798 PREEMPT Tue Jun 23 17:48:03 BST 2015 armv6l
[  1183.517] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0x38f30e48 smsc95xx.macaddr=B8:27:EB:F3:0E:48 bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[  1183.524] Build Date: 11 February 2015  09:31:17PM
[  1183.524] xorg-server 2:1.12.4-6+deb7u6 (Julien Cristau <jcristau@debian.org>) 
[  1183.525] Current version of pixman: 0.33.1
[  1183.526] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  1183.527] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1183.535] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Jun 26 12:20:10 2015
[  1183.537] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1183.540] (==) No Layout section.  Using the first Screen section.
[  1183.540] (==) No screen section available. Using defaults.
[  1183.540] (**) |-->Screen "Default Screen Section" (0)
[  1183.540] (**) |   |-->Monitor "<default monitor>"
[  1183.543] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  1183.543] (==) Automatically adding devices
[  1183.543] (==) Automatically enabling devices
[  1183.544] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[  1183.544] 	Entry deleted from font path.
[  1183.544] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1183.544] 	Entry deleted from font path.
[  1183.544] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[  1183.544] 	Entry deleted from font path.
[  1183.545] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  1183.545] 	Entry deleted from font path.
[  1183.545] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[  1183.545] 	Entry deleted from font path.
[  1183.545] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  1183.546] 	Entry deleted from font path.
[  1183.546] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[  1183.546] 	Entry deleted from font path.
[  1183.546] (==) FontPath set to:
	/usr/share/fonts/X11/Type1,
	built-ins
[  1183.546] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1183.546] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1183.547] (II) Loader magic: 0xb6fa7cf0
[  1183.547] (II) Module ABI versions:
[  1183.547] 	X.Org ANSI C Emulation: 0.4
[  1183.547] 	X.Org Video Driver: 12.1
[  1183.547] 	X.Org XInput driver : 16.0
[  1183.547] 	X.Org Server Extension : 6.0
[  1183.548] (II) LoadModule: "extmod"
[  1183.551] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[  1183.555] (II) Module extmod: vendor="X.Org Foundation"
[  1183.555] 	compiled for 1.12.4, module version = 1.0.0
[  1183.555] 	Module class: X.Org Server Extension
[  1183.555] 	ABI class: X.Org Server Extension, version 6.0
[  1183.556] (II) Loading extension SELinux
[  1183.556] (II) Loading extension MIT-SCREEN-SAVER
[  1183.556] (II) Loading extension XFree86-VidModeExtension
[  1183.556] (II) Loading extension XFree86-DGA
[  1183.556] (II) Loading extension DPMS
[  1183.556] (II) Loading extension XVideo
[  1183.557] (II) Loading extension XVideo-MotionCompensation
[  1183.557] (II) Loading extension X-Resource
[  1183.557] (II) LoadModule: "dbe"
[  1183.559] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[  1183.560] (II) Module dbe: vendor="X.Org Foundation"
[  1183.561] 	compiled for 1.12.4, module version = 1.0.0
[  1183.561] 	Module class: X.Org Server Extension
[  1183.561] 	ABI class: X.Org Server Extension, version 6.0
[  1183.561] (II) Loading extension DOUBLE-BUFFER
[  1183.561] (II) LoadModule: "glx"
[  1183.563] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1183.565] (II) Module glx: vendor="X.Org Foundation"
[  1183.565] 	compiled for 1.12.4, module version = 1.0.0
[  1183.565] 	ABI class: X.Org Server Extension, version 6.0
[  1183.566] (==) AIGLX enabled
[  1183.566] (II) Loading extension GLX
[  1183.566] (II) LoadModule: "record"
[  1183.568] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[  1183.570] (II) Module record: vendor="X.Org Foundation"
[  1183.570] 	compiled for 1.12.4, module version = 1.13.0
[  1183.570] 	Module class: X.Org Server Extension
[  1183.570] 	ABI class: X.Org Server Extension, version 6.0
[  1183.571] (II) Loading extension RECORD
[  1183.571] (II) LoadModule: "dri"
[  1183.572] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[  1183.575] (II) Module dri: vendor="X.Org Foundation"
[  1183.575] 	compiled for 1.12.4, module version = 1.0.0
[  1183.575] 	ABI class: X.Org Server Extension, version 6.0
[  1183.575] (II) Loading extension XFree86-DRI
[  1183.576] (II) LoadModule: "dri2"
[  1183.577] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[  1183.579] (II) Module dri2: vendor="X.Org Foundation"
[  1183.579] 	compiled for 1.12.4, module version = 1.2.0
[  1183.579] 	ABI class: X.Org Server Extension, version 6.0
[  1183.579] (II) Loading extension DRI2
[  1183.579] (==) Matched fbdev as autoconfigured driver 0
[  1183.580] (==) Assigned the driver to the xf86ConfigLayout
[  1183.580] (II) LoadModule: "fbdev"
[  1183.582] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  1183.583] (II) Module fbdev: vendor="X.Org Foundation"
[  1183.583] 	compiled for 1.12.1, module version = 0.4.2
[  1183.583] 	ABI class: X.Org Video Driver, version 12.0
[  1183.584] (II) FBDEV: driver for framebuffer: fbdev
[  1183.584] (--) using VT number 8

[  1183.591] (WW) Falling back to old probe method for fbdev
[  1183.592] (II) Loading sub module "fbdevhw"
[  1183.592] (II) LoadModule: "fbdevhw"
[  1183.593] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  1183.594] (II) Module fbdevhw: vendor="X.Org Foundation"
[  1183.594] 	compiled for 1.12.4, module version = 0.0.2
[  1183.595] 	ABI class: X.Org Video Driver, version 12.1
[  1183.595] (II) FBDEV(0): using default device
[  1183.595] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1183.596] (II) FBDEV(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 16/16
[  1183.596] (==) FBDEV(0): Depth 16, (==) framebuffer bpp 16
[  1183.596] (==) FBDEV(0): RGB weight 565
[  1183.597] (==) FBDEV(0): Default visual is TrueColor
[  1183.597] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[  1183.597] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 533kB)
[  1183.597] (II) FBDEV(0): checking modes against framebuffer device...
[  1183.598] (II) FBDEV(0): checking modes against monitor...
[  1183.598] (--) FBDEV(0): Virtual size is 656x416 (pitch 656)
[  1183.598] (**) FBDEV(0):  Built-in mode "current"
[  1183.598] (==) FBDEV(0): DPI set to (96, 96)
[  1183.599] (II) Loading sub module "fb"
[  1183.599] (II) LoadModule: "fb"
[  1183.600] (II) Loading /usr/lib/xorg/modules/libfb.so
[  1183.602] (II) Module fb: vendor="X.Org Foundation"
[  1183.602] 	compiled for 1.12.4, module version = 1.0.0
[  1183.602] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1183.602] (**) FBDEV(0): using shadow framebuffer
[  1183.603] (II) Loading sub module "shadow"
[  1183.603] (II) LoadModule: "shadow"
[  1183.604] (II) Loading /usr/lib/xorg/modules/libshadow.so
[  1183.606] (II) Module shadow: vendor="X.Org Foundation"
[  1183.606] 	compiled for 1.12.4, module version = 1.1.0
[  1183.606] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1183.609] (==) FBDEV(0): Backing store disabled
[  1183.611] (==) FBDEV(0): DPMS enabled
[  1183.611] (==) RandR enabled
[  1183.611] (II) Initializing built-in extension Generic Event Extension
[  1183.611] (II) Initializing built-in extension SHAPE
[  1183.612] (II) Initializing built-in extension MIT-SHM
[  1183.612] (II) Initializing built-in extension XInputExtension
[  1183.612] (II) Initializing built-in extension XTEST
[  1183.612] (II) Initializing built-in extension BIG-REQUESTS
[  1183.612] (II) Initializing built-in extension SYNC
[  1183.612] (II) Initializing built-in extension XKEYBOARD
[  1183.613] (II) Initializing built-in extension XC-MISC
[  1183.613] (II) Initializing built-in extension SECURITY
[  1183.613] (II) Initializing built-in extension XINERAMA
[  1183.613] (II) Initializing built-in extension XFIXES
[  1183.613] (II) Initializing built-in extension RENDER
[  1183.613] (II) Initializing built-in extension RANDR
[  1183.614] (II) Initializing built-in extension COMPOSITE
[  1183.614] (II) Initializing built-in extension DAMAGE
[  1183.614] (II) SELinux: Disabled on system
[  1183.713] (II) AIGLX: Screen 0 is not DRI2 capable
[  1183.714] (II) AIGLX: Screen 0 is not DRI capable
[  1183.754] (II) AIGLX: Loaded and initialized swrast
[  1183.755] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  1184.132] (II) config/udev: Adding input device Logitech USB Optical Mouse (/dev/input/event0)
[  1184.132] (**) Logitech USB Optical Mouse: Applying InputClass "evdev pointer catchall"
[  1184.133] (II) LoadModule: "evdev"
[  1184.134] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[  1184.135] (II) Module evdev: vendor="X.Org Foundation"
[  1184.135] 	compiled for 1.12.1, module version = 2.7.0
[  1184.135] 	Module class: X.Org XInput Driver
[  1184.136] 	ABI class: X.Org XInput driver, version 16.0
[  1184.136] (II) Using input driver 'evdev' for 'Logitech USB Optical Mouse'
[  1184.136] (**) Logitech USB Optical Mouse: always reports core events
[  1184.137] (**) evdev: Logitech USB Optical Mouse: Device: "/dev/input/event0"
[  1184.137] (--) evdev: Logitech USB Optical Mouse: Vendor 0x46d Product 0xc00c
[  1184.137] (--) evdev: Logitech USB Optical Mouse: Found 3 mouse buttons
[  1184.137] (--) evdev: Logitech USB Optical Mouse: Found scroll wheel(s)
[  1184.138] (--) evdev: Logitech USB Optical Mouse: Found relative axes
[  1184.138] (--) evdev: Logitech USB Optical Mouse: Found x and y relative axes
[  1184.138] (II) evdev: Logitech USB Optical Mouse: Configuring as mouse
[  1184.138] (II) evdev: Logitech USB Optical Mouse: Adding scrollwheel support
[  1184.138] (**) evdev: Logitech USB Optical Mouse: YAxisMapping: buttons 4 and 5
[  1184.139] (**) evdev: Logitech USB Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[  1184.139] (**) Option "config_info" "udev:/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:046D:C00C.0001/input/input0/event0"
[  1184.139] (II) XINPUT: Adding extended input device "Logitech USB Optical Mouse" (type: MOUSE, id 6)
[  1184.140] (II) evdev: Logitech USB Optical Mouse: initialized for relative axes.
[  1184.142] (**) Logitech USB Optical Mouse: (accel) keeping acceleration scheme 1
[  1184.142] (**) Logitech USB Optical Mouse: (accel) acceleration profile 0
[  1184.143] (**) Logitech USB Optical Mouse: (accel) acceleration factor: 2.000
[  1184.143] (**) Logitech USB Optical Mouse: (accel) acceleration threshold: 4
[  1184.146] (II) config/udev: Adding input device Logitech USB Optical Mouse (/dev/input/mouse0)
[  1184.147] (II) No input driver specified, ignoring this device.
[  1184.147] (II) This device may have been added with another device file.
[  1184.152] (II) config/udev: Adding input device SIGMACHIP USB Keyboard (/dev/input/event1)
[  1184.152] (**) SIGMACHIP USB Keyboard: Applying InputClass "evdev keyboard catchall"
[  1184.153] (II) Using input driver 'evdev' for 'SIGMACHIP USB Keyboard'
[  1184.153] (**) SIGMACHIP USB Keyboard: always reports core events
[  1184.153] (**) evdev: SIGMACHIP USB Keyboard: Device: "/dev/input/event1"
[  1184.154] (--) evdev: SIGMACHIP USB Keyboard: Vendor 0x1c4f Product 0x2
[  1184.154] (--) evdev: SIGMACHIP USB Keyboard: Found keys
[  1184.154] (II) evdev: SIGMACHIP USB Keyboard: Configuring as keyboard
[  1184.154] (**) Option "config_info" "udev:/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:1C4F:0002.0002/input/input1/event1"
[  1184.154] (II) XINPUT: Adding extended input device "SIGMACHIP USB Keyboard" (type: KEYBOARD, id 7)
[  1184.155] (**) Option "xkb_rules" "evdev"
[  1184.155] (**) Option "xkb_model" "pc101"
[  1184.155] (**) Option "xkb_layout" "us"
[  1184.455] (II) config/udev: Adding input device SIGMACHIP USB Keyboard (/dev/input/event2)
[  1184.455] (**) SIGMACHIP USB Keyboard: Applying InputClass "evdev keyboard catchall"
[  1184.455] (II) Using input driver 'evdev' for 'SIGMACHIP USB Keyboard'
[  1184.456] (**) SIGMACHIP USB Keyboard: always reports core events
[  1184.456] (**) evdev: SIGMACHIP USB Keyboard: Device: "/dev/input/event2"
[  1184.456] (--) evdev: SIGMACHIP USB Keyboard: Vendor 0x1c4f Product 0x2
[  1184.457] (--) evdev: SIGMACHIP USB Keyboard: Found 1 mouse buttons
[  1184.457] (--) evdev: SIGMACHIP USB Keyboard: Found scroll wheel(s)
[  1184.457] (--) evdev: SIGMACHIP USB Keyboard: Found relative axes
[  1184.457] (II) evdev: SIGMACHIP USB Keyboard: Forcing relative x/y axes to exist.
[  1184.457] (--) evdev: SIGMACHIP USB Keyboard: Found absolute axes
[  1184.457] (II) evdev: SIGMACHIP USB Keyboard: Forcing absolute x/y axes to exist.
[  1184.458] (--) evdev: SIGMACHIP USB Keyboard: Found keys
[  1184.458] (II) evdev: SIGMACHIP USB Keyboard: Configuring as mouse
[  1184.458] (II) evdev: SIGMACHIP USB Keyboard: Configuring as keyboard
[  1184.458] (II) evdev: SIGMACHIP USB Keyboard: Adding scrollwheel support
[  1184.458] (**) evdev: SIGMACHIP USB Keyboard: YAxisMapping: buttons 4 and 5
[  1184.459] (**) evdev: SIGMACHIP USB Keyboard: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[  1184.459] (**) Option "config_info" "udev:/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:1C4F:0002.0003/input/input2/event2"
[  1184.459] (II) XINPUT: Adding extended input device "SIGMACHIP USB Keyboard" (type: KEYBOARD, id 8)
[  1184.459] (**) Option "xkb_rules" "evdev"
[  1184.460] (**) Option "xkb_model" "pc101"
[  1184.460] (**) Option "xkb_layout" "us"
[  1184.462] (II) evdev: SIGMACHIP USB Keyboard: initialized for relative axes.
[  1184.463] (WW) evdev: SIGMACHIP USB Keyboard: ignoring absolute axes.
[  1184.464] (**) SIGMACHIP USB Keyboard: (accel) keeping acceleration scheme 1
[  1184.465] (**) SIGMACHIP USB Keyboard: (accel) acceleration profile 0
[  1184.465] (**) SIGMACHIP USB Keyboard: (accel) acceleration factor: 2.000
[  1184.465] (**) SIGMACHIP USB Keyboard: (accel) acceleration threshold: 4
[  1220.111] (II) evdev: Logitech USB Optical Mouse: Close
[  1220.112] (II) UnloadModule: "evdev"
[  1220.130] (II) evdev: SIGMACHIP USB Keyboard: Close
[  1220.131] (II) UnloadModule: "evdev"
[  1220.160] (II) evdev: SIGMACHIP USB Keyboard: Close
[  1220.160] (II) UnloadModule: "evdev"
[  1220.176] Server terminated successfully (0). Closing log file.
I hope that's enough to identify the problem.

Thanks,
Jamie

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 1:08 pm

What name did you add to /etc/modules?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 1:24 pm

I had an extra underscore, which I just fixed. Now /etc/modules is:

Code: Select all

pi@raspberrypi ~ $ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
fbtft_device name=sainsmart32
I rebooted and ran "FRAMEBUFFER=/dev/fb1 startx" but still the same behavior as before.

Thanks,
Jamie

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 4:13 pm

It looks like Sainsmart may have changed their controller chips (according to the web page you posted it's got a ILI9341).

Try

Code: Select all

options fbtft_device name=adafruit28 rotate=90
we'll worry about the touchscreen stuff later (if we can get the display running first).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 7:18 pm

According to these Debian instructions, I gather I would need to remove the "options" part, and put this in my /etc/modules file, yielding:

/etc/modules:

Code: Select all

snd-bcm2835
fbtft_device name=adafruit28 rotate=90
I'm not home, so I can't try it yet, but does that seem right?

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Fri Jun 26, 2015 11:57 pm

Latest failures:

No fbtft references in /etc/modules:

Code: Select all

pi@raspberrypi ~ $ dmesg > before.txt
pi@raspberrypi ~ $ sudo modprobe fbtft_device name=adafruit28 rotate=90
pi@raspberrypi ~ $ dmesg > after.txt
pi@raspberrypi ~ $ diff before.txt after.txt
221a222,239
> [  110.276489] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
> [  110.286134] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
> [  110.290493] fbtft_device:  SPI devices registered:
> [  110.290541] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
> [  110.290561] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
> [  110.290574] fbtft_device:  'fb' Platform devices registered:
> [  110.290617] fbtft_device:      soc:fb id=-1 pdata? no
> [  110.290693] fbtft_device: Deleting spi0.0
> [  110.295354] spi spi0.0: setting up native-CS0 as GPIO 8
> [  110.295560] fbtft_device:  GPIOS used by 'adafruit28':
> [  110.295585] fbtft_device:    'reset' = GPIO25
> [  110.295648] fbtft_device:    'dc' = GPIO24
> [  110.295665] fbtft_device:    'led' = GPIO18
> [  110.295677] fbtft_device:  SPI devices registered:
> [  110.295697] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
> [  110.295713] fbtft_device:      fb_ili9341 spi0.0 32000kHz 8 bits mode=0x00
> [  110.332893] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
> [  110.651048] graphics fb1: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz
pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx


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 4.0.6+ #798 PREEMPT Tue Jun 23 17:48:03 BST 2015 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0x38f30e48 smsc95xx.macaddr=B8:27:EB:F3:0E:48 bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 11 February 2015  09:31:17PM
xorg-server 2:1.12.4-6+deb7u6 (Julien Cristau <jcristau@debian.org>) 
Current version of pixman: 0.33.1
	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 Jun 26 23:47:58 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
^CServer terminated successfully (0). Closing log file.

xinit: unexpected signal 2
Before I started X, there was the console on the composite out and nothing on the LCD. After I started X, there was nothing on either.

Then, with the following in /etc/modules:

Code: Select all

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
fbtft_device name=adafruit28 rotate=90
After a reboot, and issuing "FRAMEBUFFER=/dev/fb1 startx", I get the same as above.

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Sat Jun 27, 2015 8:55 am

You need to contact your hardware vendor for support.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
Paul Webster
Posts: 822
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Sat Jun 27, 2015 11:00 am

To OP - did you try the raspbian image referre to from the sainssmart site rather than the latest from RPF?

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Sat Jun 27, 2015 12:59 pm

Hi Paul,

That product page has a doc and a zip. The doc suggests that the zip contains an IMAGE directory, but there's no such directory or image in it.

Dougie, I'll try my luck with Sainsmart support.

Thanks,
Jamie

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Sun Jun 28, 2015 4:10 pm

I emailed Sainsmart support yesterday. In the meantime...

I found the image in the Amazon Product Description.

However, that image yields a rainbow screen on the composite video and a blank LCD.

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Sun Jun 28, 2015 6:33 pm

If the image was created before 2nd February it won't boot on a Raspberry Pi 2B.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jamjax
Posts: 9
Joined: Thu Jun 25, 2015 1:26 am

Re: Raspberry Pi B v2 & SainSmart 3.2" TFT LCD for Raspberry

Mon Jun 29, 2015 1:50 pm

The image contained in the zip was dated August 2014, FWIW.

I returned the displays to the brick and mortar store from where I bought them--they're not worth the hassle. I'll go with a better-documented brand.

However, since I did start an email support request, I'll post their response here, so others might benefit.

Return to “Graphics, sound and multimedia”