From owner-freebsd-current@freebsd.org Thu Mar 8 21:10:53 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DE74F30A24; Thu, 8 Mar 2018 21:10:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4CAD70852; Thu, 8 Mar 2018 21:10:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 56180260B8A; Thu, 8 Mar 2018 22:10:50 +0100 (CET) Subject: Re: webcamd based touchscreen problem on Pi3 To: ticso@cicely.de, Greg , Roberto Fernandez Cueto Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, Bernd Walter References: <20180308161645.GF80981@cicely7.cicely.de> <20180308163605.GA61875@BWEPCFERNANDEZ> <20180308161645.GF80981@cicely7.cicely.de> <818e1917-0472-c0dd-a9d6-b7532faf4d4b@selasky.org> <20180308163026.z3ptrc7376smnsrt@unrelenting.technology> <20180308191131.GB86413@cicely7.cicely.de> <20180308200849.GC86413@cicely7.cicely.de> <20180308210805.GE86413@cicely7.cicely.de> From: Hans Petter Selasky Message-ID: Date: Thu, 8 Mar 2018 22:10:47 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308210805.GE86413@cicely7.cicely.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 21:10:53 -0000 On 03/08/18 22:08, Bernd Walter wrote: > On Thu, Mar 08, 2018 at 09:08:49PM +0100, Bernd Walter wrote: >> On Thu, Mar 08, 2018 at 08:11:31PM +0100, Bernd Walter wrote: >>> This is what I have right now: >>> [20]sa# cat /etc/X11/xorg.conf >>> >>> Section "InputDevice" >>> Identifier "Touchscreen" >>> Driver "evdev" >>> Option "Device" "/dev/input/event0" >>> EndSection >>> >>> Section "ServerLayout" >>> Identifier "MyLayout" >>> InputDevice "Touchscreen" >>> EndSection >>> >>> >>> Unfortunately now I face the next problem. >>> >>> [112753.535] (II) Using input driver 'evdev' for 'evdev touchscreen' >>> [112753.536] (**) evdev touchscreen: always reports core events >>> [112753.536] (**) evdev: evdev touchscreen: Device: "/dev/input/event0" >>> [112753.598] (--) evdev: evdev touchscreen: Vendor 0xeef Product 0x5 >>> [112753.598] (--) evdev: evdev touchscreen: Found absolute axes >>> [112753.598] (--) evdev: evdev touchscreen: Found absolute multitouch axes >>> [112753.598] (II) evdev: evdev touchscreen: No buttons found, faking one. >>> [112753.598] (--) evdev: evdev touchscreen: Found x and y absolute axes >>> [112753.598] (--) evdev: evdev touchscreen: Found absolute touchscreen >>> [112753.598] (II) evdev: evdev touchscreen: Configuring as touchscreen >>> [112753.598] (**) evdev: evdev touchscreen: YAxisMapping: buttons 4 and 5 >>> [112753.598] (**) evdev: evdev touchscreen: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 >>> [112753.598] (II) XINPUT: Adding extended input device "evdev touchscreen" (type: TOUCHSCREEN, id 6) >>> [112753.599] (II) evdev: evdev touchscreen: initialized for absolute axes. >>> [112753.600] (**) evdev touchscreen: (accel) keeping acceleration scheme 1 >>> [112753.600] (**) evdev touchscreen: (accel) acceleration profile 0 >>> [112753.600] (**) evdev touchscreen: (accel) acceleration factor: 2.000 >>> [112753.600] (**) evdev touchscreen: (accel) acceleration threshold: 4 >>> [112753.601] (WW) fcntl(6, F_SETOWN): Invalid argument >>> >>> [26]sa-moeller> xinput >>> Virtual core pointer id=2 [master pointer (3)] >>> Virtual core XTEST pointer id=4 [slave pointer (2)] >>> Touchscreen id=6 [slave pointer (2)] >>> sysmouse id=8 [slave pointer (2)] >>> Virtual core keyboard id=3 [master keyboard (2)] >>> Virtual core XTEST keyboard id=5 [slave keyboard (3)] >>> kbdmux id=7 [slave keyboard (3)] >>> >>> Everything looks good so far, at least in my eyes. >>> Well - wheel emulation and such sounds a bit strange, as if it is handled >>> as a touchpad and not like a touchscreen. >>> But it says type touchscreen, so I assume that's ok. >>> However, I get no touch events. >>> I've started xev fullscreen and still nothing. >>> >>> Somewhere else I've read that /dev/input/event0 should deliver something >>> if read and a touch happens, but this is not the case for me. >>> >>> Any ideas how I can debug this thing? >>> There was a reference somewhere about a commandline programm to run against >>> an evdev, but I can't find it anymore. >> >> xinput test delivers nothing on the touchscreen. >> >> Neither evtest nor evdev-dump compiles because they are both missing >> linux include files at some point. >> https://cgit.freedesktop.org/~whot/evtest/ >> [48]sa> make >> make all-am >> cc -DHAVE_CONFIG_H -I. -g -O2 -MT evtest.o -MD -MP -MF .deps/evtest.Tpo -c -o evtest.o evtest.c >> evtest.c:46:10: fatal error: 'linux/version.h' file not found >> #include >> ^~~~~~~~~~~~~~~~~ >> 1 error generated. >> *** Error code 1 >> >> Stop. >> make[1]: stopped in /home/ticso/evtest >> *** Error code 1 >> >> Stop. >> make: stopped in /home/ticso/evtest >> Exit 1 >> >> https://github.com/gonzoua/evdev-dump/tree/freebsd >> ... >> checking for unistd.h... yes >> checking linux/input.h usability... no >> checking linux/input.h presence... no >> checking for linux/input.h... no >> checking for /usr/include/linux/input.h... no >> configure: error: /usr/include/linux/input.h not found >> 4.765u 3.954s 0:08.64 100.8% 31397+2201k 0+27io 0pf+0w >> Exit 1 >> >> The touchscreen itself should be functional as it has a touch area outside >> the display, which is interpreted by the USB controller to change the >> backlight. >> The exact same display also worked fine on Raspbian. > > This is with webcamd compiled with debug support. > > [18]sa# /usr/local/sbin/webcamd -d ugen0.5 > Linux video capture interface: v2.00 > IR NEC protocol handler initialized > IR RC5(x/sz) protocol handler initialized > IR RC6 protocol handler initialized > IR JVC protocol handler initialized > IR Sony protocol handler initialized > IR SANYO protocol handler initialized > IR LIRC bridge handler initialized > IR XMP protocol handler initialized > b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully > USB Video Class driver (1.1.1) > cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1 > pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner > pvrusb2: Debug mask is 31 (0x1f) > USBVision USB Video Device Driver for Linux : 0.9.11 > Attached to ugen0.5[0] > INFO: 0003:0EEF:0005.0001: input: USB HID v1.10 Mouse [BYZHYYZHY By ZH851] on usb-/dev/usb-/dev/usb/input0 > > DBG: 0003:0EEF:0005.0001: Kicking head 1 tail 0 > Creating /dev/input/event0 > > I really think that it has some problems with the controller. > When I run webcamd against the mouse I get some kind data from the > evdev. > Well - I had to reboot after testing with the mouse, but probably > it was disabled by default for a reason. > So my assumption is that I have to look up my problem somewhere between > webcamd and the USB device. > You can try running usbdump to capture USB packets. ktrace is also your friend. dd if=/dev/input/event0 bs=1 Also check ownership of devices, that X.org can read from them. --HPS