eleclab-rpi/5INCH_DPI_DISPLAY

horizontal touch screen not working

Closed this issue · 15 comments

I have done a fresh install on a PI 3B+ and when i set the screen to horizontal the touch screen is reversed

to get the screen to even go horizontal i had to change display_rotate to display__lcd_rotate=1 to make the screen rotate.

[all]
#dtoverlay=vc4-fkms-v3d
gpio=0-9=a2
gpio=12-17=a2
gpio=20-25=a2
dtoverlay=dpi24
enable_dpi_lcd=1
display_default_lcd=1
extra_transpose_buffer=2
dpi_group=2
dpi_mode=87
dpi_output_format=0x78216
#dpi_timings=480 0 60 2 55 854 0 16 2 22 0 0 0 60 0 32000000 6 #for no rotate or for display_rotate=2
dpi_timings=480 0 60 2 55 856 0 16 2 22 0 0 0 60 0 32000000 6 #for display_rotate=1,3
dtoverlay=eleclab-dpi5inch
#lcd_rotate=2
#display_rotate=2 #1:90;2: 180; 3: 270 , Need to modify 40-libinput.conf

For 90 degree rotation (top to right):

display_lcd_rotate=1
#dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1


I have under 40-libinput.conf
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"

Option “CalibrationMatrix” “0 1 0 -1 0 1 0 0 1”

    MatchDevicePath "/dev/input/event*"
    Option "SwapAxes" "1"
    Option "InvertX" "true"
    Driver "libinput"

EndSection

when i remove the # and reboot the screen goes to cli prompt when I edit the file screen returns to the desktop but the touch screen is reversed.

I am using Buster on a pi3. I use the raspberry pi image installer updated. Everything followed the directions and I cannot get the touch screen to work correctly. Horizontally

PXL_20240402_130007366.jpg

Still crashing

Ok if I comment out

Option “CalibrationMatrix” “0 1 0 -1 0 1 0 0 1”

The desktop will return just so you know

Thanks for your help

I found the issue in the 40-libinput-conf
they changed the command from CalibrationMatrix to TransformationMatrix

sample:
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1”
MatchDevicePath "/dev/input/event*"
Driver "libinput"

All is working now Thanks for your help

@Harrball76 could you share again the edits you made to your files? I am on a 4b with a fresh RPi OS Bookworm install and am getting just a black screen. Hoping that your configuration might also work for me

in the /boot/config. txt at the bottom I have

[all]
[pi4]

Enable DRM VC4 V3D driver on top of the dispmanx display stack

#dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
gpio=0-9=a2
gpio=12-17=a2
gpio=20-25=a2
dtoverlay=dpi24
enable_dpi_lcd=1
display_default_lcd=1
extra_transpose_buffer=2
dpi_group=2
dpi_mode=87
dpi_output_format=0x78216
#dpi_timings=480 0 60 2 55 854 0 16 2 22 0 0 0 60 0 32000000 6 #for no rotate or for display_rotate=2
dpi_timings=480 0 60 2 55 856 0 16 2 22 0 0 0 60 0 32000000 6
#for display_rotate=1,3
dtoverlay=eleclab-dpi5inch
display_rotate=1
#1:90;2: 180; 3: 270 , Need to modify 40-libinput.conf


in the /etc/X11/xorg.conf.d/40-libinput.conf i changed the CalibrationMatrix to TransformationMatrix
this was causing the desktop not to load

Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1”
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection