From nobody Tue Aug 17 10:33:32 2021 X-Original-To: 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 ABB3F175D2C3 for ; Tue, 17 Aug 2021 10:35:01 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpnTx40t4z4ZW2; Tue, 17 Aug 2021 10:35:01 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from [192.168.0.30] (unknown [176.120.225.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: wulf) by smtp.freebsd.org (Postfix) with ESMTPSA id EC8B3DA2A; Tue, 17 Aug 2021 10:35:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Subject: Re: eGalax USB touchscreen issues To: Mark Kane Cc: usb@freebsd.org, hps@selasky.org References: <324d49ca-1c0e-659d-194d-ece4d5f7f5e2@FreeBSD.org> <0ae3fec48e2c351d2c006f4ba4932cd7@kane.mn> <166dd4d4-24cd-c24b-d75e-9a34fa734358@FreeBSD.org> <36983ce5-8358-5a04-2377-46067d3c3c79@FreeBSD.org> <59ba07a0ecbdac36746fe18ea5f0559f@kane.mn> <92c855bf-a73a-bae5-fcdc-c5a88008739b@FreeBSD.org> <5e8cd8d75deff98e8db3352001ce8432@kane.mn> <858ac67e-14e2-730c-4a16-ca218e2c0bee@FreeBSD.org> <168b368c-3258-6416-42c5-a722e45bf14b@FreeBSD.org> <12706f32-be2e-1cda-5d90-53b4e80b0b52@FreeBSD.org> <3bfc252a7ef55b21d5e51c251a518d78@kane.mn> <1c3ebd54-3686-ff5f-d5be-5a42ddcd5469@FreeBSD.org> From: Vladimir Kondratyev Message-ID: <2091d52f-e7e8-4304-ffcc-4863f2a7e47f@FreeBSD.org> Date: Tue, 17 Aug 2021 13:33:32 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 17.08.2021 01:02, Mark Kane wrote: > On 2021-08-14 07:44, Vladimir Kondratyev wrote: >> On 12.08.2021 06:37, Mark Kane wrote: >> This report descriptor looks good and differs from post 2014 one. It >> belongs to device which uses legacy MS stylus protocol. I attached a >> patch which implements support for it in hpen(4) driver. Also it is >> applicable to post 2014 devices as they have stylus top level collection >> too. >> >>> Touch on this screen fully works on Linux using the binary EETI driver. >>> Could there be something different about the USB controller in some of >>> these screens that is causing the corruption on FreeBSD? If there is any >>> other info to gather from either install I'm happy to. >> >> I do not khow how to debug this issue. May be hselasky can help here. >> >> I can offer a workaround. Simple tool to upload fixed pre-2014 report >> descriptor in to HID core through hidraw(4) interface. >> Just compile it and run using proper /dev/hidraw# device node path as >> parameter: >> # cc -o setrdesc setrdesc.c >> # ./setrdesc /dev/hidraw0 >> >> Don't forget to kldload hidraw.ko before. > > Thanks for the patch and workaround for pre-2014 screens. With these and > a 2012 screen we get event7 and event8 created. Events are heard from > event8 but X has an error adding the input: > > root@freebsd # dmesg | grep hidraw > hidraw0: on hidbus0 > hidraw0: no report descriptor > hidraw1: Device> on hidbus1 > root@freebsd # ./setrdesc /dev/hidraw0 > [here we get console messages about hms0/hpen0 attaching] > > hms0: on hidbus0 > hms0: 2 buttons and [XY] coordinates ID=1 > hpen0: on hidbus0 > > [ 161.110] (EE) event8 - eGalax Inc. USB TouchController Pen: > libinput bug: missing tablet capabilities: btn-stylus resolution. > Ignoring this device. You need resolution quirk in libinput quirks Try to create /usr/local/share/libinput/90-egalax.quirks file with following content: [eGalax] MatchUdevType=tablet MatchVendor=0x0EEF MatchProduct=0x0001 AttrResolutionHint=26x43 -- WBR Vladimir Kondratyev