Raspberry-Pi-OS-64bit icon indicating copy to clipboard operation
Raspberry-Pi-OS-64bit copied to clipboard

Composite-1 signal is enabled by default causing touchscreen to be off by half X resolution when using the official 7" 800x480 TFT

Open xranby opened this issue 4 years ago • 9 comments

The touchscreen places the pointer at aproximately x * 2 when using the the official 7" 800x480 TFT IMG_20200528_180924296

xranby avatar May 28 '20 16:05 xranby

Hi!

Not sure if it works but you can try installing xinput-calibrator with sudo apt-get install xinput-calibrator

The go to menu - preferences - Calibrate Touchscreen

I hope it helps to solve it for now. I didn't test it but someone I know said it works

AdamorfuX avatar May 29 '20 10:05 AdamorfuX

i tested xinput-calibrator but it appears that the entire screen is too large by default, thus i cant touch all calibration points IMG_20200529_125811609

xranby avatar May 29 '20 11:05 xranby

The issue: It appears that the composite signal is enabled by default it makes the screen configuration look like this: IMG_20200529_131321041

Workaround: re arrange the composite screen to stay below the DSI-1 screen workaround the issue. IMG_20200529_131329608

xranby avatar May 29 '20 11:05 xranby

Workaround: Add enable_tvout=0 to /boot/config.txt

This makes the touchscreen aligned and work as expected when only using the DSI official 7" 800x480 TFT

xranby avatar Jun 01 '20 09:06 xranby

This is the same on the 32bit kernel, so you should report this in the firmware repo instead.

Currently if no HDMI is detected the firmware will set up the composite output. With KMS this now means it has both displays and adds them. So you'd either have to disable the tvout (as above) or we'd have to change default behaviour...

This issue should be fixed once we fully move to the 'full KMS' solution and fix both the DSI driver and tvout drivers in the kernel so that you can enable / configure the interfaces in linux. For the moment though we need to default between HDMI and tvout because we don't know at that time whether a DSI display is available.

I'll leave this open, as a reminder, but it should really not be here.

ghollingworth avatar Jun 02 '20 08:06 ghollingworth

Looks (at least to me) like the problem is that the touchscreen-input is being "scaled" to cover both the DSI and composite display outputs. Does that suggest that a different "fix" would be to modify the touchscreen driver so that its input-events only cover the DSI display, not all displays? :shrug:

lurch avatar Jun 02 '20 10:06 lurch

@lurch raises a valid point, if i start the system with HDMI attached and DSI TFT then the pointer is misaligned in the same way. Thus the proposed fix to make the touchscreen driver send input events that only cover the DSI display, if that is possible, sounds like a good solution. IMG_20200602_125153646_HDR

xranby avatar Jun 02 '20 10:06 xranby

xinput is the command you're after https://www.raspberrypi.org/forums/viewtopic.php?p=1724631#p1724631

xinput --list lists all the input devices, then xinput map-to-output 10 DSI-1 where 10 is the appropriate number from that list.

6by9 avatar Oct 23 '20 13:10 6by9

Thank you @6by9 !!

The solution work for me on both 32bit and 64bit systems to lock the touchscreen to the TFT display by adding an /etc/X11/Xsession.d/99rpi-touchscreen file containing: xinput map-to-output "raspberrypi-ts" DSI-1

xranby avatar Jan 08 '21 21:01 xranby