This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

x11vnc in rawfb mode

In our AM335x board, we compiled a x11vnc binary to support VNC feature. Since there is no x11 at default we launched the x11vnc by the following command:

x11vnc -rawfb console

We do have uinput support so x11vnc detected it and said it is using uinput to inject the keystroke and mouse. However, when we check the /proc/bus/input/devices file, the "x11vnc injector" is:

I: Bus=0003 Vendor=0000 Product=0000 Version=0004
N: Name="x11vnc injector"
P: Phys=
S: Sysfs=/devices/virtual/input/input15
U: Uniq=
H: Handlers=sysrq rfkill kbd mouse1 event3
B: PROP=0
B: EV=7
B: KEY=670000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
B: REL=3

It uses mouse1 and event3 as input handler. By cat the /dev/input/mouse1 we can get some data if we move the mouse cursor in VNC viewer. However, the foreground Qt-embedded app can't receive the mouse event. We think this is because the QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0. Since touchscreen0 is just a symbolic link to /dev/input/event1, we try to change it to point to /dev/input/event3 but there is no luck. When we move the cursor in VNC viewer, the debug window shows a warning message:

tslib: Selected device is not a touchscreen (must support ABS and KEY event types)

Is there a way to use x11vnc in rawfb mode and both onboard's touchscreen and remote VNC viewer can control my Qt-embedded app?

  • After examining the help file (http://www.karlrunge.com/x11vnc/x11vnc_opts.html) in detail, we found by specifying the following uinput parameter, x11vnc will redirect the mouse event to /dev/input/event1

    direct_abs=/dev/input/event1

    Our complete parameters for launching x11vnc is:

    ./x11vnc -rawfb console -pipeinput UINPUT:touch,direct_abs=/dev/input/event1,tslib_cal=/etc/pointercal

  • Hi,

    Even with this command, I am not able to take control on the touch.

    Example, VNC Viewer displays the exact contents as in my touch screen display. But, I am not able to operate the LCD UI from the vnc viewer.

    Can you please help me in this regard?

    Thanks,

    Kumara

  • Hi,

    Are you using Qt?

    First, the direct_abs should be set to /dev/input/event0 (touch screen) if there is no mouse plugged in. In previous post the device has mouse attached so the event forwarding to /dev/input/event1 is OK.

    Second, do you setup your tslib correctly? If you are using Qt, the tslib plugin must be loaded and the calibration must be done.

    Regards,

    wt

  • Hi,

    Thanks for your response.

    Here are my answers.

    Yes, I am using Qt.

    Regarding the command which I executed -

    root@am335x-evm:~/nfs/home/root/x11vnc# ls /dev/input/
    by-path event0 mice mouse0 touchscreen0

    So the above results shows event0. So I have used that in my command as

    ./x11vnc -rawfb console -pipeinput UINPUT:touch,direct_abs=/dev/input/event0,tslib_cal=/etc/pointercal

    I am bit confused on direct_abs. Should I need to export the path first before executing the command?
    But I have also tried as

    export direct_abs=/dev/input/event0
    ./x11vnc -rawfb console -pipeinput UINPUT:touch,direct_abs=/dev/input/event0,tslib_cal=/etc/pointercal

    Your question on tslib,
    My tslib works good. The proof is that, my device has a touch screen and that works cool.

    When I dont run my Qt application in the target, it shows command prompt. So, when I connect VNC viewer, I can see the command prompt coming up and I can even send commands from VNC viewer.
    But, the weird thing is, when I run my Qt application in the target, and VNC viewer shows up correctly. But, I cannot click any buttons.

    I don't understand what I am missing.

    Please help me out.

    Thanks a lot.
    Kumara
  • With the further test executed, here is an update -

    I was curious to run TSLIB tools to see if I can access them from VNC viewer.

    Ts tools are
    - ts_calibrae
    - ts_test
    - ts_harvest

    Out of these, ts_calibrate and ts_harvest took the mouse inputs from VNC viewer. But, ts_test did not take mouse inputs.

    Its kind of weird to me. Not sure, if I am testing correctly.

    Thanks,
    Kumara
  • Can you delete your calibration data and try running ts_test? How does the pressure (i.e. z coordinate) show up when you move the mouse? How is pmin configured in your ts.conf? Is it possible that everything is being filtered out because your pmin is greater than whatever is reported by the mouse?
  • Sorry Brad, for the pretty late reply.

    I did try the same test by deleting the calibration data and performing "ts_test". ts_test works good when it is stand alone. Meaning, running ts_test and touching the coordinates, prints the appropriate data.

    But, when I run vnc server, as shown above and perform touch operation using mouse clicks on the VNC viewer, it doesnt respond to it.

    What could be the problem?

    Thanks,
    Kumara