Dual Display - Touch screen and normal display

I am trying to setup a dual display system based on this project:

Everything works fine, however one of my displays is a touchscreen and is connected with USB to the pi for touch. The problem is that the touch works for both screens, but I want to set up the touch screen to work only for one display.

I have tried using xinput but I get Unable to connect to X server error message

Any ideas on how to fix it?

1 Like

Hello, I’m a little unclear on the issue, perhaps you can provide more details? You mentioned only one touch screen, but that the touch works for both screens. Do you mean that the cursor movement input on the touch screen is mirrored on the non-touch screen?

The left side (red) is showing how the system works right now.

  • Raspberry pi with two screens
  • A touch screen that is split in two, one for each screen

The right side (green) is desired situation

  • The touch screen needs to control only one display

What is the model of your touch screen? Did you add any configuration for it to be “split in two” or is that happening with the default config?

It is happening with the default config, if I connect it to my laptop it works as it should.

@valerian can you tell us more about what you mean when you say “touch screen” (connected via USB)? Is it an actual digital display (something like this), or a touchpad (something like this)?

Alan and I were chatting about this today and I couldn’t wrap my head around whether the touchscreen was displaying information or was for human input / interface.

Thank you!

First display is digital display like first link (ViewSonic), second screen is a normal display.

@valerian you show three displays in the diagram. Can you say again but using the labels you have in the diagram (i.e. Screen 1, Screen 2, and Touch screen)?

There is one touchscreen and one simple screen.
Problem is that when I use the touchscreen half of it is controlling the second screen, the other half is controlling itself.

I need for it to control only itself