This verbiage implies, if you want a desktop on both heads of a Pi(2) with a PiTFT hat, you just startx each desktop:

startx -- -layout TFT &
startx -- -layout HDMI &

Various combinations of those don't work, including pernicious variations like starting up the PiTFT desktop, then running the command to launch the HDMI desktop in a terminal.

Whichever command runs last turns off the other display.

So, how to run two screens at the same time, JUST LIKE WINDOWS does all the time?

  • 1
    I don't have a TFT, but I believe this is a peculiar limitation of the driver, or something, as various people have griped about it here if you look around. Any verbiage which claims you need to run startx twice to run two displays is either wrong, or indicative of bizzare hardware -- X on a normal desktop, etc., will run as many displays as you can connect in a single session, configured however you like. Put another way, the OS is not the problem. – goldilocks Sep 25 '15 at 1:28

Yes it is possible. I took a look at the link that is provided and that make me on track, for my concern and now i can give a little back.

First: I have createt a 99-fbturbo.conf in /etc/X11/xorg.conf.d/ And also ensured that there is not another .conf, that will interfere with / change /dev/fb0 in: /usr/share/X11/xorg.conf.d/

My /etc/X11/xorg.conf.d/99-fbturbo :

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

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

Section "Device"
  Identifier "DeviceTFT"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"

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

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

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

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

Section "Monitor"
 Identifier "MonitorHDMI"

Section "Monitor"
 Identifier "MonitorTFT"

Now we can log in to Pi2 from console / ssh and start X with the command:

startx -- -layout HDMI


startx -- -layout TFT

When using HDMI, touch on TFT-screen is still active. If no -layout is provided HDMI is choosen, as is it the first in .conf Change order to change first screen device. Try and start both of them won't do any good, in any way... But... If we install rpi-fbcp from: rpi-fbcp

then is possible to log in on RPi2 console (set as default in raspi-config, won't work via ssh) and from commandline go to directory /where/ever/you/build/rpi-fbcp.

sudo ./fbcp & startx -- -layout HDMI

Now PiTFT is a clone of HDMI.

Note: I have also removed export FRAMEBUFFER=/dev/fb1 from /home/pi/.profile. and fbcon=map:10 fbcom=font:VGA8x8 from /boot/cmdline.txt (No console at logon on TFT).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.