-1

First of all I recorded a video on the phenomenon, this might be more descriptive than my words: video of the problem

I have a project in which I have to use two displays: one that is the 7 inch touchscreen shipped with the Raspberry (link), and another one connected via HDMI.

The first display is used as a touch control-panel, the second one is used only for displaying some information.

The problem is the following: When using only the touchscreen, everything is fine, the pointer clicks exactly where my finger is. But when I attach and configure the secondary monitor, the virtual "canvas" grows to more than twice the size, and my touches on the touchscreen become highly shifted to the right.

So the touch area now wants to cover the entire virtual canvas, offsetting the pointer from the physical touch, and making it nearly impossible to precisely hit any button on the screen.

I would be glad to receive any help!

  • Do you know if that official touchscreen is certified to work with the Pi 4? The specs I have seen for it say it works with Pi 3B+ and A+. – Mike Poole Nov 6 at 7:31
  • 1
    @MikePoole I don't know about specs, but in my experience, it does work very well with the Pi 4. – just_a_random_programmer Nov 8 at 23:30
-1

I'm hereby answering my own question.

A pi-hero on reddit led me to the solution for my problem: link to original answer on reddit

The answer lies in this document: ELI Touch Screen Calibration in Linux

First of all, we need to check the name of the display with the following command:

xrandr

For me, it was DSI-1.

Then we need to do the same for our touch input:

xinput

For me, it was 10.

Then to put it all together, we map the input to the output:

xinput map-to-output <device_id> <output_device>

So in my case, this meant xinput map-to-output 10 DSI-1. This command has to be executed each time the device boots. On this matter, see the following post: Execute script on start-up

Hope this finds many people who need it!

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.