Re: Elantech touchpad breaks with older HP model
flat view
From: Benjamin Tissoires <hidden>
Date: 2019-09-26 21:31:27
Hi, On Thu, Sep 26, 2019 at 3:16 PM Kai-Heng Feng [off-list ref] wrote:
[+cc KT Liao]
Well, KT left emc a few weeks (months?) ago. We do have another contact who took over KT's work but I am a little bit hesitant pulling his email there as I don't know if this person wants to stay in the shadow or not.
Hi Benjamin,quoted
On Sep 26, 2019, at 18:01, Benjamin Tissoires [off-list ref] wrote: Hi Kai-Heng, On Wed, Sep 25, 2019 at 8:08 PM Kai-Heng Feng [off-list ref] wrote:quoted
[+cc Benjamin, linux-input] Hi Benjamin,quoted
On Sep 26, 2019, at 00:00, rility [off-list ref] wrote: Hi Dmitry and Feng, I'm seeming to have some problem using my ELAN touchpad with later kernel with this commit [Input: elantech - enable SMBus on new (2018+) systems](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/input/mouse?id=883a2a80f79ca5c0c105605fafabd1f3df99b34c). This ELAN touchpad fails to be detected. It's on a 2016 HP laptop model 340 G3, though I did update the BIOS this year.So using dmi_get_bios_year() as manufacturing date is inaccurate.indeed. Not something I expected. But it kind of makes sense now :/quoted
quoted
I don't really have the first knowledge of kernel development, and am wondering if you can help out.With the latest 5.4.rc0 ~ sudo dmesg | grep elan -i [ 4.127896] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x5e0f01) [ 4.142887] psmouse serio1: elantech: Synaptics capabilities query result 0x70, 0x16, 0x0a. [ 4.158366] psmouse serio1: elantech: Elan sample query result 0b, 01, a7 [ 4.191200] psmouse serio1: elantech: Trying to set up SMBus access [ 4.198630] elan_i2c 0-0015: 0-0015 supply vcc not found, using dummy regulator [ 4.202104] elan_i2c 0-0015: failed to get product ID: -6 [ 4.243786] elan_i2c 0-0015: failed to get product ID: -71 [ 4.287117] elan_i2c 0-0015: failed to get product ID: -71 [ 4.322734] elan_i2c: probe of 0-0015 failed with error -71Do you think it’s a bug we should work on, or we should simply blacklist affected touchpad?It *really* looks like the touchpad is not supposed to be used under SMBus. There is however a (non successful) patch I wrote for an other HP laptop at https://bugzilla.kernel.org/show_bug.cgi?id=204771 Rility, can you apply v2-0001-Input-elan-also-provide-the-product-ID-from-PS-2-.patch in the bug report above and report if this helps?Hopefully your patch can help.
As answered by Rility, it doesn't :(
quoted
Blacklist IMO is never going to scale, because even if BIOS updates after a couple of years are not that common, but that also means we accidentally break touchpads randomly,I don’t think whitelist can scale in this case. There are several HP laptops need to use SMBus instead of psmouse.
Either we find a generic way, either we will need a list. Having a blacklist means that we need to break existing working devices, wait for the users to report it, fix it, and wait for the distros to backport the fix (or get it in stable), while having a whitelist means we would only fix the devices that are not working, and keep those that are somehow working in PS/2 in a usable state. So yes, I would rather have a whitelist here. And given the tests results here and the fact that the laptop in https://bugzilla.kernel.org/show_bug.cgi?id=204771 is from 2017, I am really leaning towards a revert of the patch ( and a backport to 5.3 stable).
quoted
If the patch mentioned above doesn't really helps, I would rather revert the commit introducing the dmi_get_bios_year() in elantech.c, and add manually the devices that can be tested one by one.KT, can you share how Windows driver handles this situation? Is a blacklist or a whitelist in use?
I am honestly not sure this is a question Elan can answer. Given that all the touchpad manufacturers ship a .inf in the Windows driver, they *always* rely on a whitelist (because they know in advance which chip needs what). I might be wrong and I would happily be proven to be wrong. Cheers, Benjamin
Kai-Hengquoted
Cheers, Benjaminquoted
Kai-Hengquoted
While with the previous version of kernel. ~ sudo dmesg | grep elan -i [ 4.193067] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x5e0f01) [ 4.208056] psmouse serio1: elantech: Synaptics capabilities query result 0x70, 0x16, 0x0a. [ 4.223009] psmouse serio1: elantech: Elan sample query result 0b, 01, a7 [ 4.302361] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input27 ~ lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08) 00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) 00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08) 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21) 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) 00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1) 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1) 00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1) 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)Grateful, Rility