WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help with dual video output.  (Read 2334 times)

Offline david77

  • Newbie
  • *
  • Posts: 1
Help with dual video output.
« on: May 06, 2019, 03:40:16 AM »
Hello everyone,

Let me begin by saying I am only asking here because the help I need is fairly specific to raspberry pi and the lcd case/screen I am using, or at least that is what I have been lead to believe lol. so I got a new pi 3 B+ the otherday and I got a case with an lcd touchscreen on it. I was able to get it all hooked up and even got the screen working and set up. The only issue is after I set it up the hdmi output signal I guess cannot be read by my monitor now, which makes sense, I just dont know the exact way to fix it, and the only info I have found that is close to a solution usually begins with installing a different OS, or that persons copy of an OS etc, and if possible I want to keep things as they are and just enable the hdmi output to work at the same time as the small lcd TFT screen. I am hoping I can just type some stuff in the command console or something.

Thank you!

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: Help with dual video output.
« Reply #1 on: May 06, 2019, 09:21:01 AM »
I've had three screens working on a PI (HDMI, GPIO, USB). You'll need to add some files if you want the touch screen working on one and the mouse for the other. Also important, each screen will have its own X server and fb device, so check dmesg or /var/log/messages to see which screen is which.

You should edit ~/.xsession to support the additional screens:

Code: [Select]
/usr/local/bin/Xorg :0 -nolisten tcp -config hdmi.conf &
/usr/local/bin/Xorg :1 -nolisten tcp -nocursor -config gpio.conf &
/usr/local/bin/Xorg :2 -nolisten tcp -nocursor -config usb.conf &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
export DISPLAY=:0
"$DESKTOP" 2>>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
hsetroot -solid "#CEEEFE" -center /opt/backgrounds/My-logo-trans.png
[ $(which wbar.sh) ] && wbar.sh
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -print | while read F; do . "$F"; done
export DISPLAY=:1
hsetroot -solid "#FFFFFF" -center /opt/backgrounds/My-logo-320x240.png

Keep track of which DISPLAY is set when issuing commands. FLWM will only work on one display (presumably the HDMI) and will not allow itself to have more than one instance running, so your app will need to need to handle the graphics on the others.

hdmi.conf:

Code: [Select]
Section "ServerLayout"
        Identifier      "HDMI"
        Screen  0       "HDMIdisp"
EndSection

Section "Monitor"
        Identifier      "HDMI"
EndSection

Section "Device"
        Identifier      "HDMIFB"
        Driver          "fbdev"
        Option          "fbdev" "/dev/fb0"
EndSection

Section "Screen"
        Identifier      "HDMIdisp"
        Device          "HDMIFB"
        Monitor         "HDMI"
EndSection

Section "DRI"
        Group   0
        Mode    0666
EndSection

Section "InputClass"
        Identifier "USB Mouse"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "USB Keyboard"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "TS"
        MatchIsTouchscreen "true"
        Option "Ignore" "yes"
EndSection

Section "InputClass"
        Identifier "TP"
        MatchIsTouchpad "true"
        Option "Ignore" "yes"
EndSection

Section "InputClass"
        Identifier "TB"
        MatchIsTablet "true"
        Option "Ignore" "yes"
EndSection

gpio.conf:

Code: [Select]
Section "ServerLayout"
        Identifier      "GPIO"
        Screen  1       "AdafruitDisp"
EndSection

Section "Device"
         Identifier     "AdafruitDispFB"
         Driver         "fbdev"
         Option         "fbdev"   "/dev/fb1"
EndSection

Section "Monitor"
        Identifier      "GPIO"
EndSection

Section "Screen"
        Identifier "AdafruitDisp"
        Device "AdafruitDispFB"
        Monitor "GPIO"
        DefaultDepth 16
        SubSection "Display"
                Depth   16
        EndSubSection
EndSection

Section "InputClass"
        Identifier "GPIO TS"
        MatchProduct "stmpe-ts"
        Option "Calibration" "3800 200 200 3800"
        Option "SwapAxes" "1"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "KB"
        MatchIsKeyboard "true"
        Option "Ignore" "yes"
EndSection

Section "InputClass"
        Identifier "Mouse"
        MatchIsPointer "true"
        Option "Ignore" "yes"
EndSection

usb.conf:

Code: [Select]
Section "ServerLayout"
        Identifier      "USB"
        Screen  2       "RPUSBDisp"
EndSection

Section "Device"
         Identifier     "RPUSBDispFB"
         Driver         "fbdev"
         Option         "fbdev"   "/dev/fb2"
EndSection

Section "Monitor"
        Identifier      "USB"
EndSection

Section "Screen"
        Identifier "RPUSBDisp"
        Device "RPUSBDispFB"
        Monitor "USB"
        DefaultDepth 16
        SubSection "Display"
                Depth 16
        EndSubSection
EndSection

Section "InputClass"
        Identifier "USB TS"
        MatchIsTouchscreen "on"
        MatchProduct "RoboPeakUSBDisplayTS"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "KB"
        MatchIsKeyboard "true"
        Option "Ignore" "yes"
EndSection
                             
Section "InputClass"
        Identifier "Mouse"
        MatchIsPointer "true"
        Option "Ignore" "yes"
EndSection

I don't have a display that connects to the display connector on the PI board, so I haven't had the chance to try quad head yet.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Help with dual video output.
« Reply #2 on: December 06, 2019, 12:33:19 PM »
Ha, OP was a spambot, and the post was copied from elsewhere. Usually they don't act this slow and long-term. Not deleting the post since andyj's reply contains useful info.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Help with dual video output.
« Reply #3 on: December 06, 2019, 12:43:51 PM »
Hi curaga
I just removed one copied from reddit by repeat offender adam77 this morning. I wonder if they are related.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Help with dual video output.
« Reply #4 on: December 07, 2019, 03:37:42 AM »
Yes, adam77 was banned by the same ban, looks like they shared an ip or email.
The only barriers that can stop you are the ones you create yourself.