Official 7" Raspberry Pi Touch Screen FAQ

####Minor updates 2017/03/15

  • Added mention of Pi 3
  • Added mention of CM and CM3 plus link
  • Dropped note about NOOBS not working, it now does
  • Added note about brightness control
  • No. You still can’t use HDMI and the display at the same time! (Other than apps like OMXPlayer)

Either you’ve just ordered your lovely new 7" Touch Screen, or you’re thinking about it. This thread is the place to be.

We’ll be collating all the common questions, and hopefully some good answers, right here for your convenience.

You should check out our first Bilge Tank episode for an introduction to the LCD: https://www.youtube.com/watch?v=b2dYE0qic6c

TLDR

  • It’s easier to use a Model A+, B+, Pi 2 or Pi 3 with the TouchScreen (You can use an original Model A or B Pi, but you’ll lose i2c functionality)
  • You should download the latest Raspbian image from RaspberryPi.org
  • You really should use an official Pi power supply
  • Both the display driver board and the Pi need power- you can bridge them using the red and black jump wires supplied from the 5v and GND on the display driver board to the 5V and GND on the Pi ( find them here: http://pi.gadgetoid.com/pinout ) then plug the power into the display board.
  • If your touchscreen or display doesn’t work, triple check the FPC connectors - I’ve tested a lot of “not working” LCDs to find them working perfectly. In all cases the cables should be pushed in firmly and the clips secured fully- the larger FPC for the display ribbon takes quite a bit of force. I’ve posted a guide to the FPC connectors here: Raspberry Pi Official 7" Touchscreen Assembly

If you’ve got any reservations about connecting wires to your Pi’s GPIO, I recommend our split dial microB USB power cable: Dual microB USB Power Cable

Before you begin

Make sure you update your Pi first, you’ll need the latest software and the Raspbian OS in order to drive the screen. A full reinstall of Raspbian Jessie works best, you can find it here: Raspberry Pi OS – Raspberry Pi

Follow the linked Installation Guide, and make sure you go into Menu → Preferences → Raspberry Pi Configuration and expand your filesystem when you first boot up your Pi.

If you don’t want to reinstall and want to make sure you’re using the latest stable firmware, make sure you have a network connection and type this into Terminal:

sudo apt-get update
sudo apt-get install --reinstall libraspberrypi0 libraspberrypi-{bin,dev,doc} raspberrypi-bootloader
sudo reboot

This should get you back on track with stable Raspbian releases and will undo any rpi-update you might have run.

Tech Specs

There’s no better place to learn everything you might need to know about the screen than the Raspberry Pi blog post which you can find here: The Eagerly Awaited Raspberry Pi Display - Raspberry Pi

The skinny is that it’s a:

  • 800x480 pixel display at 60fps, which despite sounding quite small, is actually pretty decent
  • 10 point capacitive touch ( like most modern tablets ) however only one touch is detected in X at the moment
  • Metal back with 4 mounting holes. Note: they aren’t VESA, and we’ll look into mount kit options soon!
  • About 155 x 86mm viewable size
  • Non square pixels - about 0.19 x 0.175mm - you may notice this distorting graphics
  • Consumes between 455mA and 470mA
  • Backlight on/off control + brightness control in driver board >= v1.1

Touchscreen

###It keeps not working at boot, or getting stuck while using it

There’s a bug in the touchscreen that’s been fixed in the latest release of Raspbian.

To install it and override any pre-release versions you have installed; do this:

sudo apt-get update
sudo apt-get install --reinstall libraspberrypi0 libraspberrypi-{bin,dev,doc} raspberrypi-bootloader
sudo reboot

###How is it connected?

The touchscreen works over the DSI connector, so no extra connections are needed. It’s connected to the driver board via the smaller ribbon cable- don’t forget it!

###How does it work?

It’s capacitive touch- it senses your finger, but not pointy objects like a resitive screen. It works with stylii (styluses?) like the ones you might use with your iPad

Debugging

If your touch screen doesn’t respond:

  • make sure you’re running the latest OS, a fresh install usually helps
  • make sure the smaller ribbon is seated firmly
  • make sure you have a good power supply and use the GPIO wires or a split cable to power your Pi

SCREEN

###Some windows in X are cut off at the side/bottom of the screen?

This is unfortunately a side-effect of many developers assuming a minimum screen resolution of 1024x768 pixels. You can usually reveal hidden buttons and fields by;

  • right clicking on the edge or top of the window,
  • picking “move”
  • using the up arrow key to nudge the window up off the top of the screen

If you don’t have a mouse, see the right click fix below.

###Can I use HDMI output alongside my LCD?

Yes and no. As explained in the official Pi blog on the subject, only applications which know how to output over HDMI can be used. An example is given for OMXPlayer: The Eagerly Awaited Raspberry Pi Display - Raspberry Pi

Currently you can’t run a dual display X desktop, and we don’t know when or if this will be possible. If you know how to make it happen, you can chime in on this thread: Official Touch Screen and Xorg - Raspberry Pi Forums

###Can I turn it off/on from Raspbian?

You can turn on/off the backlight, see below:

###Can I control the backlight?

With the latest software you can turn the backlight on and off with the following commands:

On:

echo 0 > /sys/class/backlight/rpi_backlight/bl_power

Off:

echo 1 > /sys/class/backlight/rpi_backlight/bl_power

###Help, my screen is upside-down!

Note: An update has been pushed to Raspbian to flip the screen ( rotate it by 180 degrees ) for a better desktop viewing angle. This makes it upside-down in our stand and the official Pi stand, so you’ll need to change a setting to flip it back.

To do this, open /boot/config.txt in your favourite editor and add the line:

lcd_rotate=2

This will rotate both the LCD and the touch coordinates back to the right rotation for our display stand.

Don’t use the documented display_rotate, it performs a performance expensive rotation of the screen and does not rotate the touch input.

Getting it working with an older Raspberry Pi Model “A” or “B”

With the software updated it’s actually reasonably straight-forward to get the touchscreen working with a Model A or B Raspberry Pi. First you must make two additional connections between your Pi’s GPIO and the touchscreen: these are the SDA ( GPIO 2 (I2C Data) at Raspberry Pi GPIO Pinout ) and SCL ( GPIO 3 (I2C Clock) at Raspberry Pi GPIO Pinout ) lines ( which you can connect using the supplied green and yellow wires ).

Finally, you need to enable the LCD which is normally ignored on the main i2c bus:

ignore_lcd=0

Note: This will give your i2c over to the Pi for running the LCD/Touchscreen and you wont be able to use any other i2c devices or add-on boards which require i2c.

The Stand

If you’re using one of our stands you’ll need to rotate the display.

We’ve decided to keep the current design and orientation because it’s the best out of the two and the 10 degree difference in viewing angle is very slight. ( I use these screens every day ).

If you absolutely need an extra 10 degrees of vertical viewing you can fit a Pibow Coupe to the back of the LCD screen and remove the legs. This lets it rest slightly further back while still remaining stable enough for everyday use. It also fits pretty neatly into a bag, too.

Debugging

If you get a white screen, it probably means the screen’s ribbon cable isn’t seated properly. Make sure it’s pushed firmly into place and that the connector is closed properly.

If you get a black screen, it likely means your DSI cable ( the one between the Pi and the driver board ) isn’t seated correctly or is… backwards ( I’m not even sure this is a real thing! ). We’ve had some success reversing the cable in this case- switching which end plugs into which part.

Be extremely careful when re-seating any ribbon cables, the retaining clips can be fragile. If you have a pre-assembled screen then the main ribbon cable is probably fine.

If your screens looks weird and fades out the picture like an old CRT TV when you turn off your Pi- don’t worry, this is perfectly normal!

Power & Power Options

###How much power does it use?

The screen on its own pulls between 450 and 470mA.

Combined with a Pi 2 with an Ethernet connection and running stress -c 100 to load the CPU brings it up to 925mA.

Basically, we recommend using an official Pi 2A power supply, you’ll need it!

###What’s the best way to power the Pi from the screen?

Right now it seems to be the little GPIO cable connected to 5v and GND.

We’re currently looking into better power options, since you can’t use a HAT while it’s in place.

I’ve tried a number of USB cables from the USB port on the LCD driver board to the power input of my Pi and have invariably seen the little rainbow square indicating undervoltage in the top right hand corner of the LCD. (Note: This has seen been updated to a lightning bolt indicating the same)

I have put together a prototype split cable, and we’re looking into sourcing microUSB cable splitters to use in conjunction with the official Pi power supply as the most reliable solution.

Enable Right-click ( Wheezy Only )

Chris_c on the official Pi forums has discovered how to enable right-click with a simple configuration change. This allows you to press and hold on the touchscreen to trigger a right click.

https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=121602

Section "InputClass"
   Identifier "calibration"
   Driver "evdev"
   MatchProduct "FT5406 memory based driver"

   Option "EmulateThirdButton" "1"
   Option "EmulateThirdButtonTimeout" "750"
   Option "EmulateThirdButtonMoveThreshold" "30"
EndSection

Virtual ( On-Screen ) Keyboard

There seem to be a couple of options for this. So far I’ve seen:

Florence

Suggested on the Pi forums by Hove is Florence: How to use on-screen virtual keyboard on Linux. Install with:

sudo apt-get install florence

Matchbox

Suggested by Alex ( the almighty @raspitv ), and scattered on various blogs, is Matchbox, which you can install like so:

sudo apt-get install matchbox-keyboard

And then find in Accessories > Keyboard.

Find some screenshots ( of it on a smaller LCD ) here: Virtual Keyboard for the Raspberry P

Reverse Mount

As Clive demonstrates below, you can make a much more compact setup by flipping your Pi and mounting it with the ports facing towards the back of the LCD.

This does not currently work with our Display Frame, there’s not enough clearance for the USB ports.

A standard GPIO ribbon cable will not fit between the two metal risers, so it’s impossible to route a Black HAT Hack3r or Cobbler out from the display in this position, but there might be cables out there that fit.

If you’re going for a permanent setup, then you can just solder the power cables to the underside of the GPIO.


Image pinched from Clive Beale: Don't try this at home: how not to hack the Raspberry Pi display - Raspberry Pi

Other Stuff

I want to run my touchscreen at 90 degrees

( And have the touchscreen actually work! )

Gasp! Okay, I can see why you’d want to do this! I couldn’t put it better than the great step-by-step forum post here: Rotate display 90º? - Raspberry Pi Forums

I want to make my own case/Mount it in something

You can find a technical drawing with dimensions of the display and mount hole locations here: https://github.com/raspberrypi/documentation/tree/master/hardware/display

Make sure you mount your screen by screwing, gently, into the mounting holes either side of the metal frame, or for the driver board. Don’t attempt to mount the screen by the glass front. The tape bonding the glass to the rest of the screen isn’t designed to carry the weight of the screen, your Pi and whatever else might be connected.

The touchscreen doesn’t work with Kivy!

Use this guide: GitHub - mrichardson23/rpi-kivy-screen: Using Raspberry Pi's Official Touch Display with Kivy and GPIO

OS Support

Pi Support

  • Model A+, B+, Pi 2 and Pi 3 are supported
  • Old Model B and A currently don’t work, but will be supported eventually with a software update
  • The Compute Module IO board (for CM and CM3) includes a connector for the screen, see: Raspberry Pi Documentation - Compute Module hardware
1 Like

Does this solution involve plugging power cables into both the display and Raspberry Pi boards? If so would you be able to incorporate a switch into the split cable to make turning both on/off easier please?

If the split cable turns out to be the best solution then we’ll probably go with an off-the-shelf product which wont have a power switch.

It would be a nice value-added extra, though, and I’m wondering if a PCB solution can add enough utility for it to be worth making.

If you’re looking to control the power of the LCD/Pi separately, then I’m not sure that’s possible- definitely something I’ll have to check though!

I don’t think the Pi would recover from a loss of communication with the display controller, but I haven’t tested this properly yet and information on the display is still pretty hard to come by.

LCD power control is supposed to be coming-soon at least.

There will be software support for turning off the display (and it’s backlight) coming in the future. I’ve heard rumours of two weeks or so!

From the Raspberry Pi forums (emphasis mine):

[quote=“gsh”]
The code to initialise the display is not hot pluggable, so you can’t just pull the power from the display it just won’t come back!

The PWM controls and the power on/off controls are hidden away in a little Atmel which has to be controlled from the GPU side (it has to be this way because we share that I2C bus with the camera). Currently there is an ‘in-memory’ communication scheme between the GPU and the ARM for the touchscreen but I’ve not yet implemented the controls for the PWM and power

I’ve just spent a couple of days fixing/working around a bug in the I2C drivers on the GPU so this should be next on my list. Although I’m not sure what the right solution is for the software interface for these (I’m assuming just implementing the pwm driver is enough)

Gordon[/quote]

The perils of being an early adopter.
Any further news on this as I would quite like to run mine in what we now know is the right way up - to make use of the better viewing angle.

I suspect any solution would be around mid October at the earliest- between Maker Faire NY and Maker Faire Berlin we’re a bit tied up at the moment.

Does it make sense to use a Coupé or Pibow case along with the Display Frame?

And if so, why can’t I buy a Coupé in Jade to match the frame? ;-)

Yes the case works pretty well alongside the frame- you can use the mounting holes in the bottom layer ( which line up with those on the Pi 2 ) to mount it, and then build the rest of the PiBow up around it.

As for Jade; it was a special exception for the display frame but normally we keep colours to an absolute minimum to keep us from being buried in stock and having to buy in too many materials. There are no plans for Jade, but we’re suckers for limited editions and special occasions… and there’s a St Patrick’s day coming up next year :D

OSMC latest october release works great with the touchscreen !!

1 Like

Hi,

I build my own Weather Station / Alarm Clock. I put some blackout foil on the display but it’s still to bright at night. Is there any progress on a PWM driver for the backlit or a way to solder a resistor?

Many thanks

Your weather station looks ace. Awesome work!

From what I understand of the latest comments on the forums it may not be possible to control the backlight brightness at all. I’m not sure how true this is, however, but it’s discussed in this thread: https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120968&start=50

I’ll see if I can get a more definite answer.

It will, however, be possible to switch it off/on.

Thank you for the link. Is there any shematic drawing of the display PCB on the internet. It’s may possible to use a GPIO from Raspberry with a cheap transistor and pythonPWM to coltrol the backlit. http://sourceforge.net/p/raspberry-gpio-python/wiki/PWM

Many thanks

Mine goes well for about few minutes, then mouse does odd things like moves around and activates things. Then it goes dead for few minutes and gets working again. Updated everything as per instructions, no change. Running last Raspbian Jessie with php apache and mysql in the background. Ideas?

Thnx Marek

where do we have to do /boot/config.txt ?

You’ll need to start Terminal, which you can find in the Pi menu under Accessories.

Once here, type “sudo nano /boot/config.txt”

That’s the location of the file we want to edit!

You should see its text content pop up. Use the keyboard keys to navigate around and type whatever changes you need, then press CTRL+X, then Y to confirm and finally Enter to save and exit.

thank you! My screen is now the right way up.

any progress on adaptation of the case for screen reversal?

For the time being we’ve decided to leave it as it is because it makes the ports ( including the connections for power ), which would otherwise be pointing straight down onto the desk, accessible.

While the slight difference in viewing angle really isn’t enough to warrant a complete redesign you can quite easily remove the legs and enclose the Pi on the back in a PiBow coupe. This lets the screen sit back about 10 more degrees and makes the two extra USB ports ( which we’d normally assume just contained a permanently installed WiFi dongle ) easier to access.

one-liner to rotate screen for the lazy among us:

echo "lcd_rotate=2" | sudo tee -a /boot/config.txt

(may not work on Wheezy, which seems sensitive to where the line is inserted in /boot/config.txt)