How to debug not working touchscreen under linux

cdn.

conclusion,… nice all in one pc Sony Vaio VPCL12M1E with broken touch while shipped.

If you ever had trouble with those New Window Touch Screens under Linux a good resource is at https://launchpad.net/nwfermi

Lucas M. (maquowicz) said on 2016-09-30: #22

Hi Guys.
My pacient is Sony Vaio VPCL12M1E, tried to make it play on a clean Ubuntu 16.04 without any luck :(
Went through everything what was available over the web in this matter.

It didn't worked with any kernel (4.4.0-31-generic or 4.4.0-38-generic).

My procedure was almost same as described above with some slight mods.

1. Recompiled kernel module as described above, with dependencies: libz1:i386, libncurses5:i386, libbz2-1.0:i386, xf86-input-nextwindow
2. FIxed unknown keys in /etc/udev/rules.d/40-nw-fermi.rules by replacing SYSFS with ATTRS

dmesg | grep 'fermi\|hid'
[ 11.706482] hidraw: raw HID events driver (C) Jiri Kosina
[ 11.717117] usbcore: registered new interface driver usbhid
[ 11.717120] usbhid: USB HID core driver
[ 11.831776] hid-generic 0003:093A:2510.0003: input,hidraw0: USB HID v1.11 Mouse [PIXART USB OPTICAL MOUSE] on usb-0000:00:1d.2-1/input0
[ 12.232768] hid-generic 0003:1926:0065.0004: hiddev0,hidraw1: USB HID v1.11 Device [NextWindow Touchscreen] on usb-0000:00:1a.2-2/input1
[ 19.851326] nw_fermi: module verification failed: signature and/or required key missing - tainting kernel
[ 19.851758] nwfermi 5-2:1.0: NextWindow Fermi device now attached to nwfermi-1
[ 19.851789] usbcore: registered new interface driver nwfermi
[ 19.920248] sony 0003:054C:0374.0001: input,hiddev0,hidraw2: USB HID v1.11 Keyboard [Sony RF Receiver] on usb-0000:00:1a.0-1/input0
[ 19.920732] sony 0003:054C:0374.0002: input,hiddev0,hidraw3: USB HID v1.11 Mouse [Sony RF Receiver] on usb-0000:00:1a.0-1/input1

cat /var/log/syslog | grep fermi
Sep 30 21:13:11 sdtill nwfermi_daemon[405]: Starting process...
Sep 30 21:13:11 sdtill kernel: [ 19.851326] nw_fermi: module verification failed: signature and/or required key missing - tainting kernel
Sep 30 21:13:11 sdtill kernel: [ 19.851758] nwfermi 5-2:1.0: NextWindow Fermi device now attached to nwfermi-1
Sep 30 21:13:11 sdtill kernel: [ 19.851789] usbcore: registered new interface driver nwfermi

Daemon isn't working after reboot ps aux | grep fermi
root 1485 0.0 0.0 21296 1028 pts/8 S+ 21:18 0:00 grep --color=auto fermi

But when i ask him to, it does:
/usr/sbin/nwfermi_daemon /instanceId 1
StartThreads
Starting tl thread
Starting bulk thread

Udev calling it before registering the driver ? Not sure how to debug this...
I know this may be not the best way of checking if things work or not, but daemons CPU% was rising once screen was touched.
Unfortunately my interaction with the Next Widow Touch Screen was terminated at that.

Some further outputs :

ll /dev | grep fermi
lrwxrwxrwx 1 root root 8 Sep 30 21:13 nw-fermi -> nwfermi1
crw------- 1 root root 180, 1 Sep 30 21:13 nwfermi1
lrwxrwxrwx 1 root root 7 Sep 30 21:13 nw-fermi-device -> hidraw1

Seem some udev rules worked...

xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Sony Vaio Jogdial id=8 [slave pointer (2)]
⎜ ↳ Sony RF Receiver id=11 [slave pointer (2)]
⎜ ↳ Sony RF Receiver id=12 [slave pointer (2)]
⎜ ↳ PIXART USB OPTICAL MOUSE id=14 [slave pointer (2)]
⎜ ↳ Nextwindow Fermi Touchscreen id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sony Vaio Keys id=7 [slave keyboard (3)]
↳ Video Bus id=9 [slave keyboard (3)]
↳ Power Button id=10 [slave keyboard (3)]
↳ UVC Camera (05ca:18b5) id=13 [slave keyboard (3)]

cat /var/log/Xorg.0.log
[ 35.341] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/event6)
[ 35.341] (**) Nextwindow Fermi Touchscreen: Applying InputClass "evdev pointer catchall"
[ 35.341] (**) Nextwindow Fermi Touchscreen: Applying InputClass "nw fermi"
[ 35.341] (II) LoadModule: "nextwindow"
[ 35.341] (II) Loading /usr/lib/xorg/modules/input/nextwindow_drv.so
[ 35.341] (II) Module nextwindow: vendor="X.Org Foundation"
[ 35.341] compiled for 1.18.3, module version = 0.3.4
[ 35.341] Module class: X.Org XInput Driver
[ 35.341] ABI class: X.Org XInput driver, version 22.1
[ 35.341] (II) Using input driver 'nextwindow' for 'Nextwindow Fermi Touchscreen'
[ 35.341] (**) Nextwindow Fermi Touchscreen: always reports core events
[ 35.342] (**) Nextwindow Fermi Touchscreen: always reports core events
[ 35.342] (**) Option "Device" "/dev/input/event6"
[ 35.342] (II) Nextwindow Fermi Touchscreen: Using device /dev/input/event6.
[ 35.342] (**) Option "UseTouchHelp" "1"
[ 35.342] (II) Nextwindow Fermi Touchscreen: Using touch help.
[ 35.342] (**) Option "DragThreshold" "10"
[ 35.342] (**) Option "RightClickTimeout" "1200"
[ 35.342] (**) Option "DoubleClickTimeout" "500"
[ 35.364] (**) Option "config_info" "udev:/sys/devices/virtual/input/input7/event6"
[ 35.364] (II) XINPUT: Adding extended input device "Nextwindow Fermi Touchscreen" (type: UNKNOWN, id 15)
[ 35.364] (**) Nextwindow Fermi Touchscreen: (accel) keeping acceleration scheme 1
[ 35.364] (**) Nextwindow Fermi Touchscreen: (accel) acceleration profile 0
[ 35.364] (**) Nextwindow Fermi Touchscreen: (accel) acceleration factor: 2.000
[ 35.364] (**) Nextwindow Fermi Touchscreen: (accel) acceleration threshold: 4
[ 35.364] (II) Nextwindow Fermi Touchscreen: On.
[ 35.364] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/js0)
[ 35.364] (II) No input driver specified, ignoring this device.
[ 35.364] (II) This device may have been added with another device file.
[ 35.364] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/mouse2)
[ 35.364] (II) No input driver specified, ignoring this device.
[ 35.364] (II) This device may have been added with another device file.

Xorg also didn't complained about the driver, but...

Catting the /dev/input/event6 is always empty.
Also nothing in /dev/hidraw1
But on the other hand /dev/nwfermi1 sings loud with loads of binary data.

Tried many different solutions and none of them made nwfermi driver to send input events.
I'm pretty fresh linux user and have very little experience with hardware and X.org server.
Can anybody please spread some light on this one ?

Thank You!

Lucas