ponty / framebuffer-vncserver

VNC server for Linux framebuffer devices
GNU General Public License v2.0
169 stars 69 forks source link

RPi 4 - touch not working on VNC view #5

Closed thorsten-schwartz closed 4 years ago

thorsten-schwartz commented 4 years ago

Hi, I just installed your framebuffer-vncserver on a working RPi 4 system without X and selfmade JavaFX app. The 3.5'' display works locally as expected including a fully functional touchscreen. I had to calculate Xmin, Xmax,, Ymin and Ymax for the monocle interface to startup the JVM running my Javafx app. But after I found the correct values for the left/ right/ upper and lower borders of the touchscreen this works now on local side without issues. The framebuffer is /dev/fb1 and touchscreen is listed as /dev/Input/event0; therefore I took this settings as startup parameters for framebuffer-vncserver. There is no keyboard or mouse connected to the Rpi. The console output shows the right screen resolution (480x320) for the 3.5'' LCD, but X and Y for the Touchscreen are both (0 4095) - These values are not corresponding with my Xmin....Ymax values I calculated for my monocle for JVM. The remote touchscreen is not working while the framebuffer is shown in right size and orientation on my remote client (linuxmint with vinagre)

What can I do to get the Touchscreen running on my remote system to use my remote mouse to touch the RPi?

Greets Thorsten

ponty commented 4 years ago

Try with -v, this will show the mouse events and how they are converted:

injectTouchEvent (screen(473,846) -> touch(4035,4056), down=1)

evtest can show you the min max values and incoming events:

    Event code 0 (ABS_X)
      Value   4069
      Min        0
      Max     4095
    Event code 1 (ABS_Y)
      Value   4071
      Min        0
      Max     4095

event

Event: time 1579874682.627636, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1579874682.627636, type 3 (EV_ABS), code 0 (ABS_X), value 4035
Event: time 1579874682.627636, type 3 (EV_ABS), code 1 (ABS_Y), value 4056
Event: time 1579874682.627636, -------------- SYN_REPORT ------------