1

I'm using a Raspberry Pi model B (512 MB RAM) with the following touch screen and the latest image of Raspbian. The screen drivers are ok, since I can see the loading screen and the tty. If I plug in a keyboard, all is fine (textual, but fine).

The problem is that the GUI isn't loading. I have configured the automatic GUI and login through raspi-config, I think all the necessary packages have been installed (following this post), but it doesn't work. After the booting information I am stuck with a black screen with a fixed (not blinking) cursor on the top left corner. service lightdm stop brings the cursor blinking, service lightdm start gets it fixed again.

Seems to me that the X server has started correctly but I'm on the wrong virtual terminal; I have tried using chvt on all the terminals from 1 to 12 without success. Log files .xsession-error, LXDE/run.log or Xorg.0.log don't show any error (at least, none I can mark as error), but I can provide them if needed.

I've run out of option, can you help me?

Edit: dmesg|grep fbtft

[   13.116199] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   13.159355] fbtft_of_value: regwidth = 16
[   13.159375] fbtft_of_value: buswidth = 8
[   13.159390] fbtft_of_value: debug = 0
[   13.159403] fbtft_of_value: rotate = 270
[   13.159416] fbtft_of_value: fps = 30
[   13.159430] fbtft_of_value: txbuflen = 32768

dmesg|grep /dev/fb provides no result.

ls /dev/fb* shows two devices fb0 and fb1

Cynical
  • 145
  • 1
  • 1
  • 9
  • Am I right that this screen works completely via SPI, without HDMI connection or similar? – Dmitry Grigoryev Jan 26 '17 at 10:56
  • @DmitryGrigoryev yes, it is connected through the 26-GPIO, no HDMI involved. On the screen's website they provide the drivers and a bunch of scripts to configure the device (like setting the orientation). As i wrote, it works if use just the tty. – Cynical Jan 26 '17 at 10:58
  • Can you find out (via dmesg or similar) which framebuffer device represents this screen? I suppose your Xorg server is trying to start on HDMI screen instead, that's why you don't see anything. – Dmitry Grigoryev Jan 26 '17 at 10:59
  • You can also try FRAMEBUFFER=/dev/fbX startx with X in fbX equal to 0, 1, etc. Eventually you'll find the right one. – Dmitry Grigoryev Jan 26 '17 at 11:03
  • lsmod says that modules fb_ili9486 and fbtft are loaded. – Cynical Jan 26 '17 at 11:04
  • Here is the complete dmesg output – Cynical Jan 26 '17 at 11:05
  • fbtft is the driver. It should create special files inside /dev/ filesystem, and you need to find out which one it is. – Dmitry Grigoryev Jan 26 '17 at 11:06
  • Sorry, I can't read pastebin. Could your please run dmesg | grep fbtft, dmesg | grep /dev/fb and ls /dev/fb*? Hopefully, there won't be much output. Or just keep trying startx on different framebuffers. – Dmitry Grigoryev Jan 26 '17 at 11:13
  • Thanks. I suggest you try FRAMEBUFFER=/dev/fb1 startx, since this page seems to suggest it's the default. – Dmitry Grigoryev Jan 26 '17 at 11:18

1 Answers1

1

I believe the issue is due to the fact that while your driver is loaded and usable, Xorg seems to still pick the HDMI output (which you probably haven't disabled). You should tell Xorg to use the right framebuffer device, which defaults to fb1 according to this wiki page. You should be able to see this device name in dmesg output if you search for "graphics" or "fb_ili9486":

dmesg | grep graphics
graphics fb1: fb_ili9486 frame buffer, 320x480, ...

To tell Xorg which framebuffer to use, you have two options:

If you start Xorg from command line, use FRAMEBUFFER variable:

FRAMEBUFFER=/dev/fb1 startx # or startlxde, etc.

If you want Xorg to start automatically, modify its configuration files (/etc/X11/xorg.conf or files inside /etc/X11/xorg.conf.d):

Section "Device"
  Identifier "TFT"
  Option "fbdev" "/dev/fb1"
EndSection
Dmitry Grigoryev
  • 27,928
  • 6
  • 53
  • 144