0

Like others, I'd like to set up my RPi (3/B+) with two independent screens: an HDMI and a 3.5" TFT hat (mine happens to be from Adafruit). I can get to the point where the HDMI monitor works fully as the "primary" monitor and the TFT shows the selected wallpaper (and maybe some desktop icons), but nothing, including xrandr, seems to see the TFT monitor and I can't find any useful way to interact with it. I've read several articles on this topic here on SE and elsewhere and the answers all boil down to "Ah. That's because that doesn't work."

My question is "Why not?".

To be more specific, I can successfully load the TFT driver. '/dev/fb1' does indeed exist and I can 'cat /dev/urandom > /dev/fb1' to get a TFT screen full of junk.

I've built an 'xorg.conf' dual screen configuration (see below) that, on boot, paints the (Temple.png) wallpaper and selected desktop icons on both the HDMI and the TFT monitors, which means to me that XWindows at least sort of sees the TFT. However, I can't interact with the TFT from the RPi desktop.

Further 'xrandr' doesn't seem to see the TFT. That is, 'xrandr --listmonitors' shows only the HDMI monitor.

Being a C# hack, I ran a simple WinForms app to show the number of screens available, and it, too, only reports one screen.

I can enable Xinerama to make a single wide screen including both the HDMI and the TFT, but that's not an ideal solution. (Also, Xinerama seems to lose its way after a while and the wallpaper starts tiling, or getting cropped, or worse).

So I'm puzzled. There is a second monitor. XWindows at least sort of knows it's there. Why can't I use it or interact with it? Does the same problem arise if I were to add a second HDMI monitor (through, say, a splitter)?

Here's some config info:

/boot/config.txt additions:

hdmi_force_hotplug=1 #allows me to run headless
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
dtoverlay=pitft35-resistive,rotate=90,speed=20000000,fps=20
#framebuffer_depth=16   #uncomment this for Xinerama

/etc/X11/xorg.conf

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

Section "Device"
    Identifier "DeviceTFT"
    Driver "fbturbo"
    Option "fbdev" "/dev/fb1"
    Option "SwapbuffersWait" "true"
EndSection


Section "Monitor"
    Identifier "MonitorHDMI"
EndSection

Section "Monitor"
    Identifier "MonitorTFT"
EndSection

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

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

Section "ServerLayout"
    Identifier "HDMI+TFT"
    Screen 0 "ScreenHDMI"
    Screen 1 "ScreenTFT"
    # Screen 1 "ScreenTFT" RightOf "ScreenHDMI" #uncomment for Xinerama
    # Option "Xinerama" "On" #uncomment for Xinerama
EndSection
0

I went down this rabbithole yesterday. I have the exact same things. The thing is: you are using two Screen sections.

xrandr will only report one screen. It will display all Monitors on one Screen, but only that.

To display other screens, try xrandr -d :<Xserver>.<screen> https://unix.stackexchange.com/a/16816/448036

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.