From owner-freebsd-drivers@freebsd.org Sun Jun 2 09:50:10 2019 Return-Path: Delivered-To: freebsd-drivers@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 054BF15B0816; Sun, 2 Jun 2019 09:50:10 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 234BF91E8D; Sun, 2 Jun 2019 09:50:07 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id CE06A6710E; Sun, 2 Jun 2019 12:49:59 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id RLBHGK-IDdIZ; Sun, 2 Jun 2019 12:49:54 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 431D567103; Sun, 2 Jun 2019 12:49:54 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id BCC2B422122; Sun, 2 Jun 2019 12:49:48 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id ctedD_SQsWRq; Sun, 2 Jun 2019 12:49:45 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 6B41542211C; Sun, 2 Jun 2019 12:49:45 +0300 (MSK) Subject: Re: Thinkpad t480s elantech touchpad device is not recognized: unknown touchpad firmware (firmware v.0x7f3001) From: Vladimir Kondratyev Cc: freebsd-drivers@freebsd.org, FreeBSD X11 mailing list References: <5f4e1f25-8c87-5fa5-1d7f-edbde63fde6e@gmail.com> <279a4144-43d3-6921-2047-e7877bfd721d@kondratyev.su> To: Andrey Kosachenko Openpgp: preference=signencrypt Autocrypt: addr=vladimir@kondratyev.su; prefer-encrypt=mutual; keydata= mQENBFkI9Y8BCAC44UZYE8ZswFr/LHNHutuCmrbfP0j6jYl6zkW9VeM3cXVDjDsL3h9JhEFH zF9Or0muwHjspNuVdP2ot9vH8FCGAGEYS/GrzEEKxj4yoxAZxWnGUwzFiaf8fCtlrq5D9vOd /HSm6tb5YbcC/t/46hSwyPZ4i07rtsxmeozrKNx9H2gkcY0/AfmZ+UxY90/cj/F3aNk4wYLH gC95N99jaZvwPFX8wW5k++YaThXo8TNGQaxmC28cFFPdc1qICYdzYxS7kbTlGKp37lWmV9Z6 FursbfIkJZ7Rzw7NjGGijj4XjKif91ZwQNz/BfO58xrookQCibVCJ3JKcZo4NZ7rWTWlABEB AAG0LFZsYWRpbWlyIEtvbmRyYXR5ZXYgPHZsYWRpbWlyQGtvbmRyYXR5ZXYuc3U+iQFUBBMB CgA+FiEEkwnJqomIwH/siVElg2u+IHApX3UFAlkJEuQCGwMFCQWjmoAFCwkIBwMFFQoJCAsF FgMCAQACHgECF4AACgkQg2u+IHApX3Wsmwf/bSUJeS0KXHQHH/XZwaqi0CfWxifrWfC+K62O DVA5TZZfZTs8h4Pov2DBvgx/DaQIVXeZazDPZho4v5SCrSulv//gboO6iN/7ZVnSRwQfyOp+ xnXLOzjC4mv4GjYc5sILJWQbWF4UPBGrBiFjtWrYjrRwVE6o/ThEXP92uu7suS2+U+f0zBh+ NZpJdf1T6EUN/dn8QLCyASNW1uYXzQ//5kTFc3ECC0VXzTnCZ7WWzkEOMbaVOwR25K5hCrg/ e41zrGlq8xLQhnXje+ZvG5DZkWKiZ0hUrB7nA8RLOVN6I1rzqStQjYxQuQqGu0Om/Bv6Rp+t AwEaLQdYOdXEyMZRe7kBDQRZCPWPAQgAt5NVWoIBXPqs/lo3w3JxUZ2f2R1bTqdWNBHlKI1Y r6WDHSMWT9WM/vycZSG5N6a051ZGhyPS6LNoxxqokYwgLr9VMsBTS7pA8Nx8hzyjIAAYCQqX 2tluX2FzvcJUaEZDo3pt93IpHzvf924A1nvxP4n9NyfTu4GBZ+07sBJEploKugmAVIzXD1m6 zr1xeo6LF5Adz1b0WP2cU88gv66FiuZp9Cj6DTGdIta6hQqAtrBxINVd5XR99eXrZ0+YSiIi 7ywa3dDti8NXwkZkn4pGPDkCjb34PL1kdoD/yOCpp9yAdflF8T8KObjWuivnAMOYfmGGN30n nhh8Ub9n2DVw7wARAQABiQE8BBgBCgAmFiEEkwnJqomIwH/siVElg2u+IHApX3UFAlkI9Y8C GwwFCQWjmoAACgkQg2u+IHApX3XzJggAs8Hiu/YeLfmZYp/57eaK/BrtW5TeLrKd5x4knFkY dxWOJ7ZJIIr7fhUH9OZKyAMYPzJaWuxhAuDIZiH39MZFnAhx6LnycCIQMY6CP4gJ8Y2ssvf7 eNcFRqL1xvEmAELMC5HtpnLp914xlYkBoqcU2rH7X0Qza4GvafQHHVrjc+DqqKbF6YjPsEew Fp4mqvvIxi71UiWy95q0x8tC3Cbm5hUCl2i5nl0iaWNNMkuh6is+jLJZ9W5CfEPcp+W2Vekd UTm4zN0+uaR7br3Lr3GbBJPlLHrH1haK6nJmyfVzf1MbK8wqIHiH1wWmIxC96QHKCEzRDjdf IVYGqb/YykLjBw== Message-ID: Date: Sun, 2 Jun 2019 12:49:18 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <279a4144-43d3-6921-2047-e7877bfd721d@kondratyev.su> Content-Type: multipart/mixed; boundary="------------CC899A5BF3F64DC5C00BA818" Content-Language: en-US X-Rspamd-Queue-Id: 234BF91E8D X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.17 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; HAS_ATTACHMENT(0.00)[]; MX_GOOD(-0.01)[mail.kondratyev.su]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:8299, ipnet:195.170.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; MIME_UNKNOWN(0.10)[text/x-patch]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.51)[0.507,0]; TAGGED_RCPT(0.00)[]; DMARC_NA(0.00)[kondratyev.su]; AUTH_NA(1.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; NEURAL_SPAM_MEDIUM(0.41)[0.411,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.16)[0.160,0]; R_SPF_NA(0.00)[]; IP_SCORE(0.00)[country: RU(0.01)] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2019 09:50:10 -0000 This is a multi-part message in MIME format. --------------CC899A5BF3F64DC5C00BA818 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 30.05.2019 01:17, Vladimir Kondratyev wrote: > I.e. after that simple modification system started to recognize fw >>> version: >>> >>> === >>> [silent@beastie][/usr/src]dmesg | egrep psm >>> psm0: irq 12 on atkbdc0 >>> psm0: [GIANT-LOCKED] >>> psm0: model Elantech Touchpad, device ID 0 >>> === >>> >>> and all expected touchpad features (multi-tap gestures and scrolling, >>> whatsoever) started to function properly under xorg+evdev. I'm happy >>> with a touchpad now however trackpoint stopped to work. In particular >>> attempt to use trackpoint causes strange flickering of the mice >>> cursor (which lasts few fractions of the second) after which cursor >>> jumps to the left-upper corner of the screen and it's impossible to >>> move it (via trackpoint) anymore (though swiping touchpad surface >>> moves cursor as expected). Also I found in Xorg.log messages emerging >>> when a palm touches the surface of a touchpad: > Andrey, please fill bugzilla PR and send me link to it. I believe > Elantech's trackpoint support has never been tested yet. > Hi Andrey, Could you try attached patch? It is only compile-tested. --------------CC899A5BF3F64DC5C00BA818 Content-Type: text/x-patch; name="psm.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="psm.diff" commit 3260a1a8ffc4af7a70296496860940436a93e9c4 Author: Vladimir Kondratyev Date: Sun Jun 2 12:37:43 2019 +0300 psm(4): Add extra sanity checks to Elantech trackpoint support diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 5da0c3f666d4..1f253c15d156 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -4640,22 +4640,34 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, * over 9 bits with SX/SY the relative top bit and * X7..X0 and Y7..Y0 the lower bits. */ - *x = (pb->ipacket[0] & 0x20) ? - pb->ipacket[4] - 256 : pb->ipacket[4]; - *y = (pb->ipacket[0] & 0x10) ? - pb->ipacket[5] - 256 : pb->ipacket[5]; - trackpoint_button = - ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) | - ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) | - ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0); + /* Check zeros for presence and sign bits for equality */ + if (!(pb->ipacket[0] & 0xC8) && !(pb->ipacket[1] & 0x7F) && + !(pb->ipacket[2] & 0x7F) && !(pb->ipacket[3] & 0xC9) && + !(pb->ipacket[0] & 0x20) != !(pb->ipacket[1] & 0x80) && + !(pb->ipacket[0] & 0x20) != !(pb->ipacket[3] & 0x10) && + !(pb->ipacket[0] & 0x10) != !(pb->ipacket[2] & 0x80) && + !(pb->ipacket[0] & 0x10) != !(pb->ipacket[3] & 0x20)) { + + *x = (pb->ipacket[0] & 0x20) ? + pb->ipacket[4] - 256 : pb->ipacket[4]; + *y = (pb->ipacket[0] & 0x10) ? + pb->ipacket[5] - 256 : pb->ipacket[5]; + + trackpoint_button = + ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) | + ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) | + ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0); #ifdef EVDEV_SUPPORT - evdev_push_rel(sc->evdev_r, REL_X, *x); - evdev_push_rel(sc->evdev_r, REL_Y, -*y); - evdev_push_mouse_btn(sc->evdev_r, trackpoint_button); - evdev_sync(sc->evdev_r); + evdev_push_rel(sc->evdev_r, REL_X, *x); + evdev_push_rel(sc->evdev_r, REL_Y, -*y); + evdev_push_mouse_btn(sc->evdev_r, trackpoint_button); + evdev_sync(sc->evdev_r); #endif - ms->button = touchpad_button | trackpoint_button; + ms->button = touchpad_button | trackpoint_button; + } else + VLOG(3, (LOG_DEBUG, "elantech: " + "unexpected trackpoint packet skipped\n")); return (0); case ELANTECH_PKT_NOP: --------------CC899A5BF3F64DC5C00BA818-- From owner-freebsd-drivers@freebsd.org Sun Jun 2 14:12:37 2019 Return-Path: Delivered-To: freebsd-drivers@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 98D1515B6DF3; Sun, 2 Jun 2019 14:12:37 +0000 (UTC) (envelope-from andrey.kosachenko@gmail.com) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD786B0D0; Sun, 2 Jun 2019 14:12:36 +0000 (UTC) (envelope-from andrey.kosachenko@gmail.com) Received: by mail-lj1-x242.google.com with SMTP id m22so13550641ljc.3; Sun, 02 Jun 2019 07:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=9fM60iWn8DpswI1DSQEcMvM77dmpSn+N4gRGsY/L4tg=; b=M9RXFEyAc/4wzF3AyMQbBr+/Zaq1/MYJfbeOyIf8mEKGqgHnprIvGCEvwGZNWYvOYE Jht2kZxjxWNAzRVkfLVKgWS+QJGKpXCr+lUOnpCU2etcq3MPp8/G8HGewRP6KBIE8YKj kYu+HUs7+NrmnKRkhR7yHnNQA7BREmT4EssG5l+SVegjkjmRQnZiciIkTCsYXoJapJ69 6ZklbS9OymEIhqopaNMXqG4CW/+9iDz140RyX5QjEwETu/Pf0Od6jp96ftXmq+0NpmvW VXjPDQPizS40hG9gZIoYFlks8DpTOITA7gZnfeqrzMxvynF0B5cSFcWfoigxMc24g3+K PQEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=9fM60iWn8DpswI1DSQEcMvM77dmpSn+N4gRGsY/L4tg=; b=lO9Lh9EwlDoRaoNytAy0AYzLoQ1Vl/MBBcNnMnRwTv90st+/XuXXuSjJwq4gKhICNx 18sWH5s/795iN2Bm+LEK/iltyJ/mA8kyM5PZNnwoyM8hOX41hPPBK7EdAevvuVMocCfI Ii5Dys+oYa/sZr0ewpPCqYeQT+t2KBs4QT/+9TsCXMIh01gDkgBtTt+ofdYO+BDe7wi5 xVvLQbTsHyNt5mMcWyXHTFf4DQM9akRVlgdlZBp6u8lJYs6smUh7QK+X4tvrefqLAErl FVzZ4LUNA6+1aEGwJftgG/kNJxLEUj9RMAbxE9vX5O+8V5iStlgMsreOgaC4MXN/qd0X /Odg== X-Gm-Message-State: APjAAAW9jvDwDXEQ61x+Jdk1dTsiw1v8WJaV+acWh1OqcwZEaonvp/Vu g7Ciujtm3NkOK8CUbhrwmJsklEd2Nf0= X-Google-Smtp-Source: APXvYqxNTlOHOB9Y6pt1080BQy96onUei1dl71jtsZbeQeXek/lPXaPOwDKb/DC3rQnu/Z9Ot2w7mg== X-Received: by 2002:a2e:4256:: with SMTP id p83mr11188180lja.201.1559484754405; Sun, 02 Jun 2019 07:12:34 -0700 (PDT) Received: from beastie.intra ([46.149.95.227]) by smtp.gmail.com with ESMTPSA id s205sm648041lja.48.2019.06.02.07.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 07:12:33 -0700 (PDT) Subject: Re: Thinkpad t480s elantech touchpad device is not recognized: unknown touchpad firmware (firmware v.0x7f3001) To: Vladimir Kondratyev Cc: freebsd-drivers@freebsd.org, FreeBSD X11 mailing list References: <5f4e1f25-8c87-5fa5-1d7f-edbde63fde6e@gmail.com> <279a4144-43d3-6921-2047-e7877bfd721d@kondratyev.su> From: Andrey Kosachenko Message-ID: <59e3fe9f-e81a-3236-43e4-110a2730cd02@gmail.com> Date: Sun, 2 Jun 2019 17:13:11 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2AD786B0D0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=M9RXFEyA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of andreykosachenko@gmail.com designates 2a00:1450:4864:20::242 as permitted sender) smtp.mailfrom=andreykosachenko@gmail.com X-Spamd-Result: default: False [-4.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.69)[-0.686,0]; RECEIVED_SPAMHAUS_PBL(0.00)[227.95.149.46.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.34)[ip: (2.86), ipnet: 2a00:1450::/32(-2.19), asn: 15169(-2.28), country: US(-0.06)] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2019 14:12:37 -0000 Hi Vladimir, sorry for a delay (was not able to catch up on email for several days) first of all thanks for your time/efforts! Regarding the patch: 1) the kernel compiles OK, no side-effects/regressions were observed (in the course of brief manual testing of clickpad/trackpoint) 2) the behavior of trackpoint has changed. In particular it is the following: - no pointer "flickering" is observed anymore and it stands still once one just touches it (previously it used to flicker for a few fractions of seconds after one touches it and then pointer was moved exactly to the left upper screen corner and it was not possible to move it anymore by means of a trackpoint. I.e. one could manipulate pointer only via either externally connected mouse or via swiping touchpad (or it seems the proper term for it clickpad since it's bottom area "clicks" when one presses it). - pointer can be manipulated via a trackpoint. However it's behavior is quite weird. In particlular: * pointer can be moved up/down and right left; * pointer can be moved north-east (up-right) and south-west(down-left) * on attempts to move pointer either north-west (up-left) or south-east (down-right) it remains motionless. not sure if I have to blame hardware. Because a month ago when I received a device (it was supplied with Win10 system) worked as expected. Right now I can't prove that again because Win10 was erased unused OS to leave more space on disk. just in case mentioning relevant sysctl settings: === [silent@beastie][/home/silent]sysctl hw.psm hw.psm.elantech.softbutton3_x: 1709 hw.psm.elantech.softbutton2_x: 1342 hw.psm.elantech.softbuttons_y: 472 hw.psm.elantech.touchpad_off: 0 hw.psm.elantech.vscroll_div_max: 50 hw.psm.elantech.vscroll_div_min: 30 hw.psm.elantech.vscroll_min_delta: 15 hw.psm.elantech.vscroll_ver_area: 0 hw.psm.elantech.vscroll_hor_area: 0 hw.psm.elantech.taphold_timeout: 125000 hw.psm.elantech.tap_min_queue: 1 hw.psm.elantech.tap_max_delta: 25 hw.psm.elantech.div_len: 30 hw.psm.elantech.div_max_na: 10 hw.psm.elantech.div_max: 6 hw.psm.elantech.div_min: 3 hw.psm.elantech.weight_len_squared: 200 hw.psm.elantech.weight_previous_na: 20 hw.psm.elantech.weight_previous: 6 hw.psm.elantech.weight_current: 3 hw.psm.elantech.multiplicator: 10000 hw.psm.elantech.window_max: 10 hw.psm.elantech.window_min: 4 hw.psm.elantech.na_left: 0 hw.psm.elantech.na_bottom: 0 hw.psm.elantech.na_right: 0 hw.psm.elantech.na_top: 0 hw.psm.elantech.margin_left: 0 hw.psm.elantech.margin_bottom: 0 hw.psm.elantech.margin_right: 0 hw.psm.elantech.margin_top: 0 hw.psm.elantech.max_width: 7 hw.psm.elantech.max_pressure: 220 hw.psm.elantech.min_pressure: 1 hw.psm.elantech.two_finger_scroll: 1 hw.psm.elantech.max_y: 1888 hw.psm.elantech.max_x: 3052 hw.psm.elantech.directional_scrolls: 0 hw.psm.elantech_support: 1 hw.psm.trackpoint_support: 1 hw.psm.synaptics_support: 0 hw.psm.tap_timeout: 125000 hw.psm.tap_threshold: 25 hw.psm.tap_enabled: -1 === 3) this one has probably nothing to do with the clickpad driver: those errors in Xorg.log still persist when one puts the palm on a touchpad. I.e.: === [ 1561.372] (EE) event3 - ETPS/2 Elantech Touchpad: kernel bug: Touch jump detected and discarded. See https://wayland.freedesktop.org/libinput/doc/1.12.6/touchpad-jumping-cursors.html for details [ 1561.372] (EE) event3 - ETPS/2 Elantech Touchpad: kernel bug: Touch jump detected and discarded. See https://wayland.freedesktop.org/libinput/doc/1.12.6/touchpad-jumping-cursors.html for details === Vladimir Kondratyev wrote: > On 30.05.2019 01:17, Vladimir Kondratyev wrote: >> I.e. after that simple modification system started to recognize fw >>>> version: >>>> >>>> === >>>> [silent@beastie][/usr/src]dmesg | egrep psm >>>> psm0: irq 12 on atkbdc0 >>>> psm0: [GIANT-LOCKED] >>>> psm0: model Elantech Touchpad, device ID 0 >>>> === >>>> >>>> and all expected touchpad features (multi-tap gestures and scrolling, >>>> whatsoever) started to function properly under xorg+evdev. I'm happy >>>> with a touchpad now however trackpoint stopped to work. In particular >>>> attempt to use trackpoint causes strange flickering of the mice >>>> cursor (which lasts few fractions of the second) after which cursor >>>> jumps to the left-upper corner of the screen and it's impossible to >>>> move it (via trackpoint) anymore (though swiping touchpad surface >>>> moves cursor as expected). Also I found in Xorg.log messages emerging >>>> when a palm touches the surface of a touchpad: >> Andrey, please fill bugzilla PR and send me link to it. I believe >> Elantech's trackpoint support has never been tested yet. >> > Hi Andrey, > > Could you try attached patch? It is only compile-tested. > > From owner-freebsd-drivers@freebsd.org Sun Jun 2 23:41:56 2019 Return-Path: Delivered-To: freebsd-drivers@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 0A56B15C365C; Sun, 2 Jun 2019 23:41:56 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 89C7685389; Sun, 2 Jun 2019 23:41:53 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 1F033700EB; Mon, 3 Jun 2019 02:41:52 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id W-6Nx18tm8jv; Mon, 3 Jun 2019 02:41:47 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 26EF6700E3; Mon, 3 Jun 2019 02:41:47 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 589AD422120; Mon, 3 Jun 2019 02:41:41 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id vvKfs1ykv5wr; Mon, 3 Jun 2019 02:41:38 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id BACC842211C; Mon, 3 Jun 2019 02:41:38 +0300 (MSK) Subject: Re: Thinkpad t480s elantech touchpad device is not recognized: unknown touchpad firmware (firmware v.0x7f3001) To: Andrey Kosachenko Cc: freebsd-drivers@freebsd.org, FreeBSD X11 mailing list References: <5f4e1f25-8c87-5fa5-1d7f-edbde63fde6e@gmail.com> <279a4144-43d3-6921-2047-e7877bfd721d@kondratyev.su> <59e3fe9f-e81a-3236-43e4-110a2730cd02@gmail.com> From: Vladimir Kondratyev Openpgp: preference=signencrypt Autocrypt: addr=vladimir@kondratyev.su; prefer-encrypt=mutual; keydata= mQENBFkI9Y8BCAC44UZYE8ZswFr/LHNHutuCmrbfP0j6jYl6zkW9VeM3cXVDjDsL3h9JhEFH zF9Or0muwHjspNuVdP2ot9vH8FCGAGEYS/GrzEEKxj4yoxAZxWnGUwzFiaf8fCtlrq5D9vOd /HSm6tb5YbcC/t/46hSwyPZ4i07rtsxmeozrKNx9H2gkcY0/AfmZ+UxY90/cj/F3aNk4wYLH gC95N99jaZvwPFX8wW5k++YaThXo8TNGQaxmC28cFFPdc1qICYdzYxS7kbTlGKp37lWmV9Z6 FursbfIkJZ7Rzw7NjGGijj4XjKif91ZwQNz/BfO58xrookQCibVCJ3JKcZo4NZ7rWTWlABEB AAG0LFZsYWRpbWlyIEtvbmRyYXR5ZXYgPHZsYWRpbWlyQGtvbmRyYXR5ZXYuc3U+iQFUBBMB CgA+FiEEkwnJqomIwH/siVElg2u+IHApX3UFAlkJEuQCGwMFCQWjmoAFCwkIBwMFFQoJCAsF FgMCAQACHgECF4AACgkQg2u+IHApX3Wsmwf/bSUJeS0KXHQHH/XZwaqi0CfWxifrWfC+K62O DVA5TZZfZTs8h4Pov2DBvgx/DaQIVXeZazDPZho4v5SCrSulv//gboO6iN/7ZVnSRwQfyOp+ xnXLOzjC4mv4GjYc5sILJWQbWF4UPBGrBiFjtWrYjrRwVE6o/ThEXP92uu7suS2+U+f0zBh+ NZpJdf1T6EUN/dn8QLCyASNW1uYXzQ//5kTFc3ECC0VXzTnCZ7WWzkEOMbaVOwR25K5hCrg/ e41zrGlq8xLQhnXje+ZvG5DZkWKiZ0hUrB7nA8RLOVN6I1rzqStQjYxQuQqGu0Om/Bv6Rp+t AwEaLQdYOdXEyMZRe7kBDQRZCPWPAQgAt5NVWoIBXPqs/lo3w3JxUZ2f2R1bTqdWNBHlKI1Y r6WDHSMWT9WM/vycZSG5N6a051ZGhyPS6LNoxxqokYwgLr9VMsBTS7pA8Nx8hzyjIAAYCQqX 2tluX2FzvcJUaEZDo3pt93IpHzvf924A1nvxP4n9NyfTu4GBZ+07sBJEploKugmAVIzXD1m6 zr1xeo6LF5Adz1b0WP2cU88gv66FiuZp9Cj6DTGdIta6hQqAtrBxINVd5XR99eXrZ0+YSiIi 7ywa3dDti8NXwkZkn4pGPDkCjb34PL1kdoD/yOCpp9yAdflF8T8KObjWuivnAMOYfmGGN30n nhh8Ub9n2DVw7wARAQABiQE8BBgBCgAmFiEEkwnJqomIwH/siVElg2u+IHApX3UFAlkI9Y8C GwwFCQWjmoAACgkQg2u+IHApX3XzJggAs8Hiu/YeLfmZYp/57eaK/BrtW5TeLrKd5x4knFkY dxWOJ7ZJIIr7fhUH9OZKyAMYPzJaWuxhAuDIZiH39MZFnAhx6LnycCIQMY6CP4gJ8Y2ssvf7 eNcFRqL1xvEmAELMC5HtpnLp914xlYkBoqcU2rH7X0Qza4GvafQHHVrjc+DqqKbF6YjPsEew Fp4mqvvIxi71UiWy95q0x8tC3Cbm5hUCl2i5nl0iaWNNMkuh6is+jLJZ9W5CfEPcp+W2Vekd UTm4zN0+uaR7br3Lr3GbBJPlLHrH1haK6nJmyfVzf1MbK8wqIHiH1wWmIxC96QHKCEzRDjdf IVYGqb/YykLjBw== Message-ID: Date: Mon, 3 Jun 2019 02:41:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <59e3fe9f-e81a-3236-43e4-110a2730cd02@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 89C7685389 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.08 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.97)[0.967,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kondratyev.su]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.01)[0.013,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.kondratyev.su]; NEURAL_SPAM_LONG(0.11)[0.112,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8299, ipnet:195.170.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[country: RU(0.01)] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2019 23:41:56 -0000 On 02.06.2019 17:13, Andrey Kosachenko wrote: > Hi Vladimir, > 2) the behavior of trackpoint has changed. In particular it is the > following: > - no pointer "flickering" is observed anymore and it stands still once > one just touches it (previously it used to flicker for a few fractions > of seconds after one touches it and then pointer was moved exactly to > the left upper screen corner and it was not possible to move it > anymore by means of a trackpoint. I.e. one could manipulate pointer > only via either externally connected mouse or via swiping touchpad (or > it seems the proper term for it clickpad since it's bottom area > "clicks" when one presses it). > > - pointer can be manipulated via a trackpoint. However=C2=A0 it's behav= ior > is quite weird. In particlular: > =C2=A0=C2=A0 * pointer can be moved up/down and right left; > =C2=A0=C2=A0 * pointer can be moved north-east (up-right) and south-wes= t(down-left) > =C2=A0=C2=A0 * on attempts to move pointer either north-west (up-left) = or > south-east (down-right) it remains motionless. > > Nice. Please add debug.psm.loglevel=3D5 line to /boot/loader.conf, reboot, than try move pointer with trackpoint in up-left and down-right directions, and than copy psm packet log from dmesg buffer to a file and attach it to PR/238291. packet log looks like that: psmintr: 80 00 00 c0 00 00 psmintr: 80 00 00 c0 00 00 psmintr: 80 00 00 c0 00 00 psmintr: 90 dd 32 c0 05 31 synaptics: ipacket: [3333, 3377], 50, 4 synaptics: ---- Its better although not strictly necessary to have patch from my previous email applied.