From nobody Fri Dec 29 15:50:29 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 4T1qbQ0LGrz54MbN for ; Fri, 29 Dec 2023 15:50:42 +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 4T1qbN3Tkyz4QTy for ; Fri, 29 Dec 2023 15:50:40 +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 00000000026F58A2.00000000658EEAC6.00016B31; Fri, 29 Dec 2023 16:50:30 +0100 Date: Fri, 29 Dec 2023 16:50:29 +0100 From: Milan Obuch To: Tomek CEDRO Cc: freebsd-usb@freebsd.org Subject: Re: Touch screen driver for Acer T231H1 Message-ID: <20231229165029.60c1767e@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 [-2.76 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.46)[-0.457]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_DN_SOME(0.00)[]; HAS_X_PRIO_ONE(0.00)[1] X-Rspamd-Queue-Id: 4T1qbN3Tkyz4QTy X-Spamd-Bar: -- On Wed, 8 Nov 2023 16:48:32 +0100 I wrote: > 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 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. # 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"; }; 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 [786.720] (II) config/udev: Adding input device AcerA Bell T231HlTouchScree= n (/dev/input/event6) [786.721] (**) AcerA Bell T231HlTouchScreen: Applying InputClass "libinput = touchscreen catchall" [786.721] (II) Using input driver 'libinput' for 'AcerA Bell T231HlTouchScr= een' [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 de= vice [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 T231HlTouch= Screen" (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: 2= .000 [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 de= vice [809.940] (II) config/udev: removing device AcerA Bell T231HlTouchScreen [809.941] (II) event6 - AcerA Bell T231HlTouchScreen: device removed [810.056] (II) UnloadModule: "libinput" (last 3 lines are from detachment). Anybody with some hint? I need starting webcamd automatically, which seems to work, but what makes X not recognize created input file? Regards, Milan