From nobody Fri Dec 29 21:08:35 2023 X-Original-To: freebsd-usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T1yfK2H5bz55FCg for ; Fri, 29 Dec 2023 21:08:41 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Received: from cm0.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4T1yfH3hjTz3Y7V for ; Fri, 29 Dec 2023 21:08:39 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd-usb@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-usb@dino.sk; dmarc=none Received: from zeta.dino.sk ([84.245.95.254]) (AUTH: LOGIN milan, TLS: TLSv1.3,256bits,TLS_AES_256_GCM_SHA384) by cm0.netlabit.sk with ESMTPSA id 00000000026F5974.00000000658F3554.000015FA; Fri, 29 Dec 2023 22:08:36 +0100 Date: Fri, 29 Dec 2023 22:08:35 +0100 From: Milan Obuch To: freebsd-usb@freebsd.org Subject: Re: Touch screen driver for Acer T231H1 Message-ID: <20231229220835.62f13117@zeta.dino.sk> In-Reply-To: References: <20231108110119.7fa5d462@zeta.dino.sk> X-Mailer: Claws Mail 3.20.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) Importance: high X-Priority: 1 (Highest) List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_DN_NONE(0.00)[]; HAS_X_PRIO_ONE(0.00)[1] X-Rspamd-Queue-Id: 4T1yfH3hjTz3Y7V X-Spamd-Bar: --- On Fri, 29 Dec 2023 16:50:29 +0100 I wrote: > On Wed, 8 Nov 2023 16:48:32 +0100 I wrote: >=20 > > On Wed, 8 Nov 2023 15:47:32 +0100 > > Tomek CEDRO wrote: > >=20 > > > On Wed, Nov 8, 2023 at 11:01=E2=80=AFAM Milan Obuch wrote: > > > > years ago I bought Acer monitor with touch screen, but did not > > > > try to use it, it works for me just as an ordinary monitor. I > > > > decided to give it a try now... > > > > When plugged into USB port, I see just > > > > kernel: ugen0.6: at usbus0 > > > > line in console/dmesg output. Looking into usbconfig output in > > > > an attempt to get some info, I see > > > > # usbconfig -d ugen0.6 dump_all_desc > > > > ugen0.6: at usbus0, cfg=3D0 md=3DHOST > > > > spd=3DFULL (12Mbps) pwr=3DON (500mA) =20 > > >=20 > > > Hey there Milan :-) Some time ago I did work with Panasonic > > > Toughbook laptop touchscreen using x11-drivers/xf86-input-wacom > > > driver [1]. You may also try the multimedia/webcamd [2] or > > > sysutils/iichid [3] as the driver. Good luck :-) > > >=20 > > > [1] https://www.freshports.org/x11-drivers/xf86-input-wacom/ > > > [2] https://www.freshports.org/multimedia/webcamd/ > > > [3] https://www.freshports.org/sysutils/iichid/ > >=20 > > Do you have some notes from Toughbook? Just to compare... > >=20 > > Also, according to sample config, x11-drivers/xf86-input-wacom uses > > /dev/input/event for input, I don't know how those get created. > > (There are four of them.) > >=20 > > With webcam, I am getting > >=20 > > # webcamd -d ugen0.6 > > webcamd 4480 - - Attached to ugen0.6[0] > > webcamd 4480 - - Creating /dev/input/event6 > >=20 > > and now I see some action on touch, but it looks like some > > calibration is necessary - I have two monitor setup and position > > set is correct in one axis but offset in the other. > >=20 > > As there is USB used for connection, iichid probably is no help for > > me :) > >=20 > > So I am a bit better now, with single monitor setup, it would > > probably work as is (a bit), so some more investigation is > > necessary. > >=20 >=20 > With webcamd, on single monitor it just works, the only issue is I > need to start it automatically when connected. I think I need some > custom config file for devd, however, something weird occured here. I > tried putting following file in /etc/devd directory, and after > restarting devd, webcamd is started as expected. >=20 > # Acer > # Bell > notify 100 { > match "system" "USB"; > match "subsystem" "DEVICE"; > match "type" "ATTACH"; > match "vendor" "0x0408"; > match "product" "0x3001"; > action "/usr/local/sbin/webcamd -N > AcerA-Bell-T231HlTouchScreen"; }; >=20 > Problem is, for some reason, /dev/input/event6 file is being created, > but not recognized in X, nothing logged in Xorg.0.log. When starting > manually, the same file is recognized, logged as >=20 > [786.720] (II) config/udev: Adding input device AcerA Bell > T231HlTouchScreen (/dev/input/event6) [786.721] (**) AcerA Bell > T231HlTouchScreen: Applying InputClass "libinput touchscreen catchall" > [786.721] (II) Using input driver 'libinput' for 'AcerA Bell > T231HlTouchScreen' [786.721] (**) AcerA Bell T231HlTouchScreen: always > reports core events [786.721] (**) Option "Device" "/dev/input/event6" > [786.851] (II) event6 - AcerA Bell T231HlTouchScreen: is tagged by > udev as: Touchscreen [786.855] (II) event6 - AcerA Bell > T231HlTouchScreen: device is a touch device [786.881] (II) event6 - > AcerA Bell T231HlTouchScreen: device removed [786.893] (**) Option > "config_info" "udev:/dev/input/event6" [786.893] (II) XINPUT: Adding > extended input device "AcerA Bell T231HlTouchScreen" (type: > TOUCHSCREEN, id 12) [786.902] (**) Option "AccelerationScheme" "none" > [786.931] (**) AcerA Bell T231HlTouchScreen: (accel) selected scheme > none/0 [786.932] (**) AcerA Bell T231HlTouchScreen: (accel) > acceleration factor: 2000 [786.932] (**) AcerA Bell T231HlTouchScreen: > (accel) acceleration threshold: 4 [787.060] (II) event6 - AcerA Bell > T231HlTouchScreen: is tagged by udev as: Touchscreen [787.064] (II) > event6 - AcerA Bell T231HlTouchScreen: device is a touch device >=20 > [809.940] (II) config/udev: removing device AcerA Bell > T231HlTouchScreen [809.941] (II) event6 - AcerA Bell > T231HlTouchScreen: device removed [810.056] (II) UnloadModule: > "libinput" >=20 > (last 3 lines are from detachment). >=20 > Anybody with some hint? I need starting webcamd automatically, which > seems to work, but what makes X not recognize created input file? >=20 Some additional info: I did the same test on 13-STABLE and 14-STABLE, no difference in behavior. Also, no matter how the webcamd was invoked, manually or via devd entry, device created (/dev/input/eventX) has the same rights and ownership, crw-rw---- 1 webcamd webcamd 0x84 Dec 29 22:01 eventX (X =3D 6 or 7 depending on system under test). I am out of ideas what the difference could be there. Could there be some signalling missing when webcamd is invoked from devd? I should probably ask on X mailing list... but nevertheless, maybe someone knows :) Regards, Milan