tchi59
Posts: 1
Joined: Fri Mar 05, 2021 2:37 pm

Need help for my official Pi4 touchscreen calibration

Fri Mar 05, 2021 2:40 pm

Hi

I've just bought a touchscreen for pi4

https://www.raspberrypi.org/products/ra ... h-display/

It is working but when i clicked on my touchscreen with my finger, the click is not on the right place on the screen
that is to say that i have to shift my touchclick to be sure to be on the right icon

Can you help me to calibrate my screen on raspbian ?
thanks

User avatar
Mia1011
Posts: 22
Joined: Sun Apr 11, 2021 9:38 am

Re: Need help for my official Pi4 touchscreen calibration

Sun Apr 18, 2021 11:13 am

Hey

I have attached a video link for your reference.

[url] https://www.youtube.com/watch?v=snv419fYfkI

frallen
Posts: 7
Joined: Wed Aug 21, 2019 2:06 pm

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 5:47 am

I have the same problem with the official touchscreen. The pointer is lined up with where you touch the screen on the left side of the screen but gets progressively out of place across the screen and on the right hand side it is about 1cm to the right of the point you touch.

I cannot understand the video, how do I run the calibration routine?

Thanks

Frank

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11052
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 10:51 am

Do you have an HDMI monitor connected? too X defaults to spreading an input device over the extended desktop.

Code: Select all

xinput --map-to-output "raspberrypi-ts" DSI-1
should tell X that it maps only to the touchscreen output, not the whole desktop.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

frallen
Posts: 7
Joined: Wed Aug 21, 2019 2:06 pm

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 3:25 pm

Thanks for coming back. I have tried that but it did not fix it.

I do not have the HDMI screen connected although this RPi has been used to drive a HDMI monitor in the past. But the error is only 5-10% not a full screen width.

I think it needs calibrating, but whilst the video I think shows how to use the calibration routine to measure the error that the screen has, it does not seem to say how to run the calibration routine itself, nor what to do with the results.

Frank

frallen
Posts: 7
Joined: Wed Aug 21, 2019 2:06 pm

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 8:05 pm

OK so thanks to 6by9's helpful post I have made some progress with this.

In the Preferences>Screen configuration utility I have two screens visible, one HDMI and one DSI. The HDMI one shows resolution 848x480 and the box on the display is slightly bigger than the DSI box. They are both showing on top of each other. The grey area which I guess is the touch screen mapping is the size of the larger box ie the HDMI one, and so too big for the LDC (DSI) display to map to. So, the touch screen cannot line up exactly with the LCD screen.

Note I do not have an HDMI screen connected.

I tried 6by9's suggestion above but could not get it to work.

However, I have found a work-around. If I reduce the HDMI screen resolution to 640x480 then it is smaller than the DSI screen and can sit underneath it. The touch screen area is now the same as the DSI screen, and the difference between the on-screen pointer and the touch point disappears.

I think this will be Ok until I connect an HDMI screen.

A better solution would be to not have the "ghost" HDMI screen if there is no real HDMI screen connected, or to stop the system from spreading the touch screen over both displays, but I have tried to achieve this but so far failed. However the above fix will do for now.

Thanks for your help 6by9!

Frank

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11052
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 8:25 pm

A standard Raspberry Pi OS using vc4-fkms-v3d shouldn't add an HDMI monitor unless it is connected (although I will try to remember to check it on Monday).
Have you added anything odd to config.txt? hdmi_force_hotplug or similar?

You can use "xrandr --output HDMI-1 --off" should turn off that display, at which point the xinput command should only see the one display and get the mapping correct.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

frallen
Posts: 7
Joined: Wed Aug 21, 2019 2:06 pm

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 9:13 pm

hdmi_force_hotplug is in the config file under NOOBS Auto-generated Settings and it was on. I don't think I set it, I had the problem with the display as soon as it was fitted and I did not even know about the config file then.

I have commented it out now and the "ghost" HDMI display has disappeared. So I guess it will now auto detect an HDMI screen and only re-appear if one is connected?

That looks like the solution. Many thanks. It all works fine now.

Frank

frallen
Posts: 7
Joined: Wed Aug 21, 2019 2:06 pm

Re: Need help for my official Pi4 touchscreen calibration

Sat Apr 24, 2021 9:20 pm

H'mmm,

I have another Pi4 set up as a desktop so I just checked that and that line isn't there in the /boot/config file, so now I'm confused.

Frank

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11052
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Need help for my official Pi4 touchscreen calibration

Mon Apr 26, 2021 5:35 pm

NOOBS is a pain in the neck these days - the advantage of having the recovery bit is minimal, which is why it has been dropped from the main downloads page, and I thought resellers had dropped it too (a quick search suggests otherwise).

I've just confirmed that a standard Raspberry Pi OS install has only registered the DSI with X, and the touchscreen responds normally with it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Official Foundation Display”