Code Monkey home page Code Monkey logo

Comments (4)

lbillett avatar lbillett commented on June 27, 2024 2

I had some trouble with this today (am bad in linux, but I get by). I was delighted to find my Viewsonic TD2421 worked perfectly, touch screen and all, right out of the box on Chilipie 2.1.0. What a great repo for those looking for a lean web kiosk with no BS! So awesome.

Setting display_rotate=3 in /boot/config.txt worked great for the display, but (as expected) the touch screen input was now incorrect.

DISPLAY=:0 xinput_calibrator had no effect (even after finding out I had to install it) not sure why. It would take time to run and finish, but it never asked me for any inputs or anything.

There were some xinput set-prop solutions out there that were more involved, none of which I managed to get working.

Using Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1" in my /usr/share/X11/xorg.conf/40-libinput.conf was close but the display went all whacky. The lower half of the screen stopped working (though the pointer could be seen on it), the width seemed to revert to normal wide-screen after any inputs were received from the screen or keyboard, spilling off of the viewable area of the monitor, and my Pi3 started to overheat! I tried lots of combinations of these and even found an awesome tool to help visualize the transformations, but I never made it home.

What ultimately worked for me was a combination of installing the evdev driver (whatever that is) with:
sudo apt-get install xserver-xorg-input-evdev

Then hacking up my /usr/share/X11/xorg.conf/40-libinput.conf and changing the Driver "libinput" to Driver "evdev" as done in this thread, allowing use of the SwapAxes and InvertX and InvertY options like outlined here. My resulting section looked as:

Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Option "SwapAxes" "1"
Option "InvertX" "true"
Option "InvertY" "true" (if you have display_rotate=1 I think)
Driver "evdev"
EndSection

Is probably totally backwards way of doing it, but it worked for my screen great. There's still the problem where as soon you you hit a key on a keyboard the aspect ratio changes to be wider and shorter than was was being displayed, but since we won't be using a keyboard on the thing, we can manage.

from chilipie-kiosk.

 avatar commented on June 27, 2024

If this is a cheap Chinese screen, you'll need to install the drivers for your screen and then edit boot/config.txt to add display_rotate=1 as per the instructions in first-boot.md. Check under /usr/share/X11/xorg.conf.d/ for a libinput conf file. You can add

Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

in the touchscreen catchall section. Check out the PDF manual for this screen for the general idea - https://www.waveshare.com/wiki/5inch_HDMI_LCD_(H)

from chilipie-kiosk.

jareware avatar jareware commented on June 27, 2024

Great pointers, thank you @GendoRokubungi!

@Fyb3roptik, did that help you get it sorted out?

from chilipie-kiosk.

Kristories avatar Kristories commented on June 27, 2024

Thanks @lbillett

It work for RPi3.

/boot/config.txt :

#dtoverlay=vc4-fkms-v3d
dsplay_rotate=3

/usr/share/X11/xorg.conf/40-libinput.conf :

Section "InputClass"
  Identifier "libinput touchscreen catchall"
  MatchIsTouchscreen "on"
  MatchDevicePath "/dev/input/event*"
  Option "SwapAxes" "1"
  Option "InvertX" "true"
  Driver "evdev"
EndSection

from chilipie-kiosk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.