Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1426759iog; Sat, 25 Jun 2022 09:02:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sJ9Y1sjx0M7kCEnhkbj/B6giwOsyqyB7mCisAf2xRrm9ZBUkkY5NR6UxYgRpjOlFNYaJXm X-Received: by 2002:a17:907:9801:b0:723:dc27:2225 with SMTP id ji1-20020a170907980100b00723dc272225mr4574718ejc.472.1656172966772; Sat, 25 Jun 2022 09:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656172966; cv=none; d=google.com; s=arc-20160816; b=if66ayfZmQg98TsbljexSNqVvU/7+/FaTdts8o6QjPJQ0DLQrcE7i6Wo0qIxkZoBzg QEhnl9KcmFGZvLpltJPF5Yqk3MXSHjSBM6tc1cjOGBz0qbBVI/1McQ2W/zOI6qEUQyGu LacsFkDu74saoj31B+a/R+gyMkxtw5FhBFA7RQDDaTRWXblwOlCdMAKAq9pgP3bxvuDG fKTE6nCm9wIVpwMUS6hUXcGhNg38r2y2r7CRsILMx2Fxhh3TCnomRsyKyiojW+IkL9rz 7Zd9ElJCmrol8oS6I4oZitGRdmIPAHW5Vdb4hIq7ch1XKNiblwIC7CefEe1Aiaby7Fid Q1mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YJMG2xSKeKo8ovUlFDGAmK9lJxFqvsUKe5ouW/ZiPXQ=; b=iUPQXVje4hzCQxQjIX+rVcU7RckEB1VojpxJeX3h2knq9qtg5WtY19auPbIYRkL9/+ AcRHwOSP3poTvhhSiyrEKTd4nN20Za1B9FqYZXmBkF/GMK9/7s9lH6x+UL9rHYaI1OEZ jFBJ1bgt9IRlEFfH5/ycdwOAyITgwPY6YqjXU8u8VThqDphBaxjG8UueHZi+lR4/afM/ SIsfjdsYig360f69hf8VkfkDdeIh9rY7aMDGxdPhcQ//LGNyp8ygid58+PLerGtR9MXj CYCGXaCKkkJg96AwtuE8y3HnW8k7nj+SJ5X0Do6eaVhnT/CEpojl9NdQBFe4rA0wQ+ND Q2hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="B/Q7k/xT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz37-20020a1709077da500b006ff49b183e9si6959951ejc.971.2022.06.25.09.02.18; Sat, 25 Jun 2022 09:02:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="B/Q7k/xT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233082AbiFYPag (ORCPT + 99 others); Sat, 25 Jun 2022 11:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233003AbiFYPae (ORCPT ); Sat, 25 Jun 2022 11:30:34 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2EB15820; Sat, 25 Jun 2022 08:30:33 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id m184so2846396wme.1; Sat, 25 Jun 2022 08:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=YJMG2xSKeKo8ovUlFDGAmK9lJxFqvsUKe5ouW/ZiPXQ=; b=B/Q7k/xTLmPZGpnd9T3Ix0mxJZqrQuN2NZlEG30Lx3HgX+lQYSSglKik60CZdo6Njr 94Sc/afjuGNi9c6D7/rRPzDjLujW2tfKi1PpiLHUU77TPuEaaIILc5xm97CHBVgRQDNy EXJZftk4H9rFOB2SWIWz33EUOdsrQslM5ZGoXttecLpEjR9SUQQefZ8ahJ8dGkbmwIpc w0L26GE4tewY7HLZAjKK6p/mjKpl9kglC3JRa5G5tcNFFkzhytHNEDbbWFSNieUkgbxA wMDzUbIg7gW6U8Wr0uZFZHZFBPKEPURc6ykWhymDfWhBrXAfd9JB3S1wyaSC9c4qEkwz G5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=YJMG2xSKeKo8ovUlFDGAmK9lJxFqvsUKe5ouW/ZiPXQ=; b=KJhM9QWSZ/WShNa0eDp/gESLy+9U5GLJmtzIuf79O0yV/ktGK9lzMP4dj0mskpM7ST kWEP9c7YoNUS2NKoaYgWIqaFcu1Y7FoogIXMPsaG/8pEoqGDAI28lDthnvbWk4XAU165 5tBCaoP2PPMjh5ReH/cGdNCze3MoOxq4/9gnUWRmvU2g7wh8LcmrD0GvaCRD71nyYPuy G5E/Gh5m0ilM8+eGklfm8tnXhtQoWl6mypOkKYlAWMKWSp46BxMiQlXTLHz5l3GNyUYz i7IgvbvD9T0CqR8OqaHK6HiGK24c9eCN5Hjurh8Rm9cRg2vB8bkDug5hp6brJn3abDUq YlMw== X-Gm-Message-State: AJIora8RSwgMqJ70fUnyxAT5u6l4f2Ij5iCm8r3LCacpD8GZ4TNPnVIQ 2fDVpHfRGrPayupoUBjVRrY= X-Received: by 2002:a05:600c:58a:b0:39c:80ed:68be with SMTP id o10-20020a05600c058a00b0039c80ed68bemr5024339wmd.150.1656171032193; Sat, 25 Jun 2022 08:30:32 -0700 (PDT) Received: from elementary ([94.73.36.128]) by smtp.gmail.com with ESMTPSA id l14-20020a05600c4f0e00b003942a244f40sm11217734wmq.25.2022.06.25.08.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jun 2022 08:30:31 -0700 (PDT) Date: Sat, 25 Jun 2022 17:30:30 +0200 From: =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= To: Stefan Berzl Cc: Jiri Kosina , benjamin.tissoires@redhat.com, spbnick@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hid: Add support for the xp-pen deco mini7 tablet Message-ID: <20220625153030.GB4820@elementary> References: <85312611-797f-2dd2-f864-f7c13cb889f9@gmail.com> <20220623175116.GA4757@elementary> <3f37e3fa-1b7d-1dbb-327c-69a4e96bdcdc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3f37e3fa-1b7d-1dbb-327c-69a4e96bdcdc@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 12:24:09AM +0200, Stefan Berzl wrote: > On 23/06/2022 19:51, Jos? Exp?sito wrote: > > At the moment, there are only HID descriptors for the frame and the pen > > so, if your tablet is creating a touch ring device, something is not > > working as expected. > > > > Running "sudo libinput record" should display only the frame and the > > pen. Does it show something different in your case? > > > > $ sudo libinput record > > [...] > > /dev/input/event21: Hanvon Ugee Technology Co.,Ltd Deco L > > /dev/input/event22: Hanvon Ugee Technology Co.,Ltd Deco L Pad > > This is certainly true for the newer xppen devices we are working on. > However, while waiting for the xppen stuff to gain support, I bought a > tablet that's already supported, the Gaomon S620. Executing libinput > record or any other command that lists the devices, like evemu-describe, > gives: > > /dev/input/event15: GAOMON Gaomon Tablet > /dev/input/event16: GAOMON Gaomon Tablet Pad > /dev/input/event17: GAOMON Gaomon Tablet Touch Strip > /dev/input/event18: GAOMON Gaomon Tablet Dial Ah OK, I though you were talking about the XP-PEN device. I don't know why those extra event nodes are created, sorry. > >> There is however one caveat that seems to be unique to the mini7, which > >> is the ack packet that is sent when switching to the vendor defined > >> usage. It doesn't do much though, as currently it gets interpreted as a > >> pen report and since it doesn't have useful values, causes the cursor to > >> go to the top left screen position. Since the ack packet is only sent > >> once, it ought to be of little consequence. > >> > >> I would of course fix this, but I don't really know what's the preferred > >> way. One can obviously simply set up an urb to catch this, but it would > >> have to be a special corner case for the mini 7, as Jos? assures me that > >> none of his tablets display similar behavior. Is this acceptable? > > > > My tablets also send an ACK packet, but in my case it does not have any > > visible effects. Maybe it is related to the DE environment used. I > > tested it on elementary OS (Ubuntu) and Fedora 36, in both cases the > > ACK is ignored... But catching it is fine, we can include the code you > > suggest. > > Can the contents maybe differ? > > This is the ack the mini 7 gives me: > 02 b1 04 00 00 00 00 00 00 00 00 00 > > While this is a button: > 02 f0 00 00 00 00 00 00 00 00 00 00 > > And here we have pen movement: > 02 a1 59 23 ef 32 b8 0e 00 00 00 00 Yes, the contents are different. My ACK does not contain the last 2 bytes. As mentioned in my previous email, I think that because the ACK of your tablet matches the size of a pen report and starts with 02 it is handled as a pen report. Jose