MSFT Touchpad not working on Lenovo Legion-5 15ARH05
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pop!_OS |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Arch Linux) |
Fix Committed
|
Undecided
|
Unassigned | ||
linux (Fedora) |
Confirmed
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
linux (openSUSE) |
New
|
Undecided
|
Unassigned | ||
xserver-xorg-input-libinput (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Update (based on #296)
=============
The latest kernel tree (https:/
Before the release of v5.11, you are suggested to use #189 to save your touchpad. Note that for distributions like Ubuntu and Fedora, the pinctrl-amd driver is built into the initramfs. So you have to rebuild the initramfs after replacing the old module with new one.
On Fedora, run `sudo dracut --force`; On ubuntu, run `sudo update-initramfs -u`.
The complete solution is three patches,
- 47a0001436352c9
- 06abe8291bc3183
- 8dcb7a15a585b6d
The first two patches has reached the stable tree. If the last one is also backported to LTS kernel, you won't need to install kernel 5.11. But I don't know when this will happen.
Original bug report
===================
Hello
The MSFT touchpad of this Lenovo Legion-5 15ARH05 laptop is not reacting at all (pointer and click never move when touchpad is touched). This has been reported by other users in various websites, with various linux systems including other Ubuntu systems, but I saw no launchpad bug so I post one. Example of websites covering the issue :
- https:/
- https:/
xinput indentifies it as MSFT0001:00 04F3:3140
Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ MSFT0001:00 04F3:3140 Touchpad id=17 [slave pointer (2)]
⎜ ↳ MSFT0001:00 04F3:3140 Mouse id=16 [slave pointer (2)]
⎜ ↳ ITE Tech. Inc. ITE Device(8910) Consumer Control id=12 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Ideapad extra buttons id=15 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Integrated Camera: Integrated C id=10 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Consumer Control id=19 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Wireless Radio Control id=13 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Keyboard id=14 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=18 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
Thanks a lot for your time. It does not help, but I can confirm what was reported on askubuntu by another user : the touchpad does work on Windows.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.4.0-40-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
/dev/snd/
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Fri Jul 10 20:14:25 2020
InstallationDate: Installed on 2020-07-02 (8 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: LENOVO 82B5
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=fr_FR.UTF-8
SHELL=/bin/bash
ProcFB: 0 EFI VGA
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.187.1
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/12/2020
dmi.bios.vendor: LENOVO
dmi.bios.version: EUCN19WW
dmi.board.
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40709 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: Legion 5 15ARH05
dmi.product.name: 82B5
dmi.product.sku: LENOVO_
dmi.product.
dmi.sys.vendor: LENOVO
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-07-02 (12 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Package: linux (not installed)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=fr_FR.UTF-8
SHELL=/bin/bash
Tags: focal
Uname: Linux 5.8.0-050800rc5
UnreportableReason: The running kernel is not an Ubuntu kernel
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
CVE References
Nicolas Rogues (nrogues) wrote : | #1 |
- AlsaInfo.txt Edit (34.8 KiB, text/plain; charset="utf-8")
- CRDA.txt Edit (2.8 KiB, text/plain; charset="utf-8")
- CurrentDmesg.txt Edit (173.2 KiB, text/plain; charset="utf-8")
- Dependencies.txt Edit (2.4 KiB, text/plain; charset="utf-8")
- IwConfig.txt Edit (504 bytes, text/plain; charset="utf-8")
- Lspci.txt Edit (17.8 KiB, text/plain; charset="utf-8")
- Lspci-vt.txt Edit (2.3 KiB, text/plain; charset="utf-8")
- Lsusb.txt Edit (640 bytes, text/plain; charset="utf-8")
- Lsusb-t.txt Edit (803 bytes, text/plain; charset="utf-8")
- Lsusb-v.txt Edit (49.2 KiB, text/plain; charset="utf-8")
- ProcCpuinfo.txt Edit (23.4 KiB, text/plain; charset="utf-8")
- ProcCpuinfoMinimal.txt Edit (1.5 KiB, text/plain; charset="utf-8")
- ProcInterrupts.txt Edit (19.2 KiB, text/plain; charset="utf-8")
- ProcModules.txt Edit (6.1 KiB, text/plain; charset="utf-8")
- PulseList.txt Edit (32.4 KiB, text/plain; charset="utf-8")
- RfKill.txt Edit (249 bytes, text/plain; charset="utf-8")
- UdevDb.txt Edit (230.5 KiB, text/plain; charset="utf-8")
- WifiSyslog.txt Edit (462.9 KiB, text/plain; charset="utf-8")
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed | #2 |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Kai-Heng Feng (kaihengfeng) wrote : | #3 |
Please test latest mainline kernel:
https:/
tags: | added: hwe-touchpad |
Nicolas Rogues (nrogues) wrote : ProcCpuinfoMinimal.txt | #4 |
tags: | added: apport-collected |
description: | updated |
Nicolas Rogues (nrogues) wrote : | #5 |
Hello
Kernel 5.8-rc5 from https:/
I tried to use below command to reattach all apport files, but it only attached one file, let me know if you need more files (and provide the appropriate command line !)
apport-collect 1887190
Thanks
Nicolas
Helmut Stult (helmut-stult) wrote : | #6 |
The link provides all the necessary information:
Helmut Stult (helmut-stult) wrote : | #7 |
Controlling the screen brightness with Fn + F5 / F6 also does not work
Stefano Galassi (iltoga) wrote : | #8 |
my lenovo legion 5 15ARH05 has same issues:
touchpad shows up under input devices as 'MSFT0001:00 04F3:3140 Touchpad' but doesn't work on linux (on windows it does work perfectly)
screen brightness control doesn't work too
You-Sheng Yang (vicamo) wrote : | #9 |
@Helmut, from your Xorg.log and dmesg, MSFT0001 has beend detected and enabled in kernel, but somehow it failed to be enabled in xorg:
[ 74.771] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Mouse (/dev/input/
[ 74.771] (**) MSFT0001:00 04F3:3140 Mouse: Applying InputClass "evdev pointer catchall"
[ 74.771] (**) MSFT0001:00 04F3:3140 Mouse: Applying InputClass "libinput pointer catchall"
[ 74.771] (II) Using input driver 'libinput' for 'MSFT0001:00 04F3:3140 Mouse'
[ 74.771] (**) MSFT0001:00 04F3:3140 Mouse: always reports core events
[ 74.771] (**) Option "Device" "/dev/input/
[ 74.771] (**) Option "_source" "server/udev"
[ 74.772] (II) event16 - MSFT0001:00 04F3:3140 Mouse: is tagged by udev as: Mouse Pointingstick
[ 74.772] (II) event16 - MSFT0001:00 04F3:3140 Mouse: device is a pointer
[ 74.772] (II) event16 - MSFT0001:00 04F3:3140 Mouse: device removed
[ 74.836] (**) Option "config_info" "udev:/
[ 74.836] (II) XINPUT: Adding extended input device "MSFT0001:00 04F3:3140 Mouse" (type: MOUSE, id 16)
[ 74.836] (**) Option "AccelerationSc
[ 74.836] (**) MSFT0001:00 04F3:3140 Mouse: (accel) selected scheme none/0
[ 74.836] (**) MSFT0001:00 04F3:3140 Mouse: (accel) acceleration factor: 2.000
[ 74.836] (**) MSFT0001:00 04F3:3140 Mouse: (accel) acceleration threshold: 4
[ 74.837] (II) event16 - MSFT0001:00 04F3:3140 Mouse: is tagged by udev as: Mouse Pointingstick
[ 74.837] (II) event16 - MSFT0001:00 04F3:3140 Mouse: device is a pointer
[ 74.838] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Mouse (/dev/input/mouse0)
[ 74.838] (II) No input driver specified, ignoring this device.
[ 74.838] (II) This device may have been added with another device file.
[ 74.839] (II) config/udev: Adding input device MSFT0001:00 04F3:3140 Touchpad (/dev/input/
[ 74.839] (**) MSFT0001:00 04F3:3140 Touchpad: Applying InputClass "evdev touchpad catchall"
[ 74.839] (**) MSFT0001:00 04F3:3140 Touchpad: Applying InputClass "libinput touchpad catchall"
[ 74.839] (II) Using input driver 'libinput' for 'MSFT0001:00 04F3:3140 Touchpad'
[ 74.839] (**) MSFT0001:00 04F3:3140 Touchpad: always reports core events
[ 74.839] (**) Option "Device" "/dev/input/
[ 74.839] (**) Option "_source" "server/udev"
[ 74.839] (II) event17 - MSFT0001:00 04F3:3140 Touchpad: is tagged by udev as: Touchpad
[ 74.840] (II) event17 - MSFT0001:00 04F3:3140 Touchpad: device is a touchpad
[ 74.840] (II) event17 - MSFT0001:00 04F3:3140 Touchpad: device removed
[ 74.916] (**) Option "config_info" "udev:/
[ 74.917] (II) XINPUT: Adding extended input device "MSFT0001:00 04F3:3140 Touchpad" (type: TOUCHPAD, id 17)
[ 74.917] (**) Option "AccelerationSc
[ 74.917] (**) MSFT0001:00 04F3:3140 Touchpad: (accel) selected scheme none/0
[ 74.917] (**) MSFT0001:00 04F3:3140 Touchpad: (accel) acceleration factor: 2.000
[ 74.917] (**) MSF...
You-Sheng Yang (vicamo) wrote : | #10 |
Please file screen brightness control as another bug (and maybe comment the url for that new bug) and let's focus on touchpad here.
Kai-Heng Feng (kaihengfeng) wrote : | #11 |
Please test this kernel:
https:/
Changed in linux (Ubuntu): | |
status: | Confirmed → Incomplete |
Nicolas Rogues (nrogues) wrote : | #12 |
Hello,
The kernel 5.4.0-42-generic from https:/
Thanks
Nicolas
Kai-Heng Feng (kaihengfeng) wrote : | #13 |
Can you please attach dmesg? Thanks!
Nicolas Rogues (nrogues) wrote : | #14 |
Kai-Heng Feng (kaihengfeng) wrote : | #15 |
Please run `watch -n0 cat /proc/interrupts`, put finger on the touchpad and see "AMDI0010:03", "pinctrl_amd" or "MSFT0001:00" increase the interrupt count rapidly.
Nicolas Rogues (nrogues) wrote : | #16 |
- Capture d’écran de 2020-07-15 13-39-38.png Edit (240.6 KiB, image/png)
AMDI0010:03 and pinctrl_amd are present but the count does not move when I move finger or click on the touchpad.
Please note I tried to remove my USB Mouse which is responsible for the high counts on one of xhci_hcd. For this mouse it's moving rapidly.
Two screen captures enclosed.
Nicolas Rogues (nrogues) wrote : | #17 |
Justin Arendt (arendtubuntuone) wrote : | #18 |
This bug also affects my laptop touchpad
Lenvo Legion 5-ARH05 5.7.1 Kernel
https:/
Kai-Heng Feng (kaihengfeng) wrote : | #19 |
Can you guys please test this commit:
https:/
Stefano Galassi (iltoga) wrote : | #20 |
I manually patched that file on 5.7.8-AMD kernel, but touchpad is still dead..
https:/
thank you
Kai-Heng Feng (kaihengfeng) wrote : | #21 |
Please raise the issue to the following email address:
Jarkko Nikula <email address hidden> (maintainer:
Andy Shevchenko <email address hidden> (reviewer:SYNOPSYS DESIGNWARE I2C DRIVER)
Mika Westerberg <email address hidden> (reviewer:SYNOPSYS DESIGNWARE I2C DRIVER)
Philipp Zabel <email address hidden> (maintainer:RESET CONTROLLER FRAMEWORK)
<email address hidden> (open list:SYNOPSYS DESIGNWARE I2C DRIVER)
<email address hidden> (open list)
Kai-Heng Feng (kaihengfeng) wrote : | #22 |
Possible dupe of lp: #1884981, with different error though.
Nicolas Rogues (nrogues) wrote : | #23 |
done today
got an error from vger.kernel.org (policy analysis reported: your address is not liked source for email) but not from other recipients, so if any of the other affected users has an approved email address with this server, I will be glad to provide the initial email for forwarding
Launchpad Janitor (janitor) wrote : | #24 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in xserver-xorg-input-libinput (Ubuntu): | |
status: | New → Confirmed |
Didi Kohen (kohen-d) wrote : | #25 |
I think I have the same issue on my Idea Pad 5, before I got i2c controller timed out errors, but after a firmware upgrade, I don't see any errors, I'll try to revert my firmware settings to see if I can restore the previous state (where after windows is started, touchpad workd on the next boot)
I'll try the kernels given here afterwards (since it did work before)
Didi Kohen (kohen-d) wrote : | #26 |
OK, this is really strange, after tons of reboots to Ubuntu and Win 10, it started working again after I disabled the legacy boot option.
Still would like a solution to the timeouts other than rebooting twice, though.
I'm a developer, so if there are multiple code changes that need to be tested, I could make them and compile to check, but right now I don't know where to start. (I'm used to working on storage, not HID)
Nicolas Rogues (nrogues) wrote : | #27 |
Hello Didi,
The issue we face could be different : on the Lenovo Legion-5 15ARH05 (which is the object of this bug report) there is no working trick to boot on Windows then Ubuntu : it just never worked under Linux on the two BIOS tested (factory I think EUCN16WW and June update EUCN19WW), in UEFI mode, no matters if Windows was used before reboot and grub to Ubuntu (I have a dual-boot setup).
As a remark, the touchpad does work in the UEFI BIOS, before any OS is loaded.
Ben T (derrotmax) wrote : | #28 |
Touchpad MSFT0001:00 04F3:3140 is dead on 5.8 rc5 as well.
Helmut Stult (helmut-stult) wrote : | #29 |
I have found the cause so far that the touchpad MSFT0001: 00 04F3: 3140 is recognized, but no suitable driver is found.
With the touchpad ELAN0001: 00 04F3: 3140 it seems to work with a few tricks.
ELAN is also available in the kernel config, but MSFT is not.
I just don't understand why there are two different names (ELAN and MFST) under the same hardware ID - what did Lenovo do?
Nicolas Rogues (nrogues) wrote : | #30 |
It's a good question.
In my understanding, the Legion R7000 is the name for China of the Legion-5 15ARH05. In the Lenovo forum, the Lenovo employee has no access to the equipment and indicates it's a kernel issue, suggesting it used to work prior to 5.4 kernel. That looks strange.
https:/
Also in this thread a member of the Lenovo forum points out to a blog, unfortunately in Chinese, of a guy who may have found a workaround. I tried to google translate it but was not sure of the result to try anything :
Helmut Stult (helmut-stult) wrote : | #31 |
I am a Manjaro developer and we have kernels 4.4 / 4.9 / 4.14 / 4.19 / 5.4 / 5.7 / 5.8
The touchpad doesn't work with one of the kernels.
Screen brightness only works with AMD- or nouveau-Driver, not with the proprietary driver, like 440.100
The brightness display works, but nothing changes.
.
Ben T (derrotmax) wrote : | #32 |
Nicolas -- I've seen the R7000 Chinese post (https:/
Nicolas Rogues (nrogues) wrote : | #33 |
Thanks Helmut and Ben. These are very precise information and better than any post elsewhere.
I got no reply from the email contacts provided by Kai-Heng yet...
Anyone with a Lenovo connection ?
Helmut Stult (helmut-stult) wrote : | #34 |
Just repeat again - the fix works where an incorrect driver is detected.
However, no driver is found at all for the LEGION 5 and the touchpad is therefore not activated.
Helmut Stult (helmut-stult) wrote : | #35 |
These are my latest LOG files
Helmut Stult (helmut-stult) wrote : | #36 |
As long as no solution is found, here is another solution.
https:/
Since it is only a script, this should work in every distribution ;-)
Helmut Stult (helmut-stult) wrote : | #37 |
With kernel 5.8-rc7
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Arch Linux): | |
status: | New → Confirmed |
Changed in linux (Fedora): | |
status: | New → Confirmed |
Stefano Galassi (iltoga) wrote : | #38 |
is there anyone workin on this yet?
daleli (daleli) wrote : | #39 |
is there anyone workin on this yet?
Stefano Galassi (iltoga) wrote : | #40 |
it seems not yet... :(
Coiby Xu (coiby) wrote : | #41 |
I am now working on this issue.
I can confirm the solution provided by https:/
- blacklist hid_multitouch
- Add the vendor id and product id of this touchpad device to hid_device_id in drivers/
I've posted the patch to https:/
But this is not an perfect solution. I'm now working on a solution that doesn't need to blacklist hid_multitouch. I've figured out how hid-core.c let the hid_multitouch driver handle this device.
Stefano Galassi (iltoga) wrote : | #42 |
Thank you Coiby Xu! appreciate your support :)
unfortunately, even with your patch I could not make it to activate my touchpad.
I've created a kernel patch from yours, recompiled the kernel.
I tried both blacklisting hid_multitouch and removing hid_multitouch support in kernel config. all without any luck..
I am using a custom kernel patched for amd cpu/gpu (linux-amd), on arch linux.
Look forward to see your progresses anyway.
keep up with the good work!
Coiby Xu (coiby) wrote : | #43 |
Thank you for testing the patch!
I'm sory I forgot the fact Lenovo ships different kinds of touchpads for the same laptop model and neglected this bug report is for MSFT0001:00 04F3:3140. Yours must also this touchpad device whose vendor is Elan (04F3).
I assume it should be also handled by hid_rmi. I've posted the change to https:/
diff --git a/drivers/
index 59a7ae712319.
--- a/drivers/
+++ b/drivers/
@@ -759,6 +759,7 @@ static const struct hid_device_id rmi_id[] = {
{ HID_USB_
{ HID_USB_
{ HID_I2C_
+ { HID_I2C_
{ HID_USB_
{ HID_DEVICE(
Stefano Galassi (iltoga) wrote : | #44 |
I am sorry mate.. touchpad still not working
I've checked and the patch has been applied correctly.
this is the output from lspci that shows hid_rmi is loaded, which is a step ahead compared to yesterday ;)
```
lsmod | grep hid
hid_magicmouse 20480 0
hidp 32768 1
bluetooth 737280 38 btrtl,hidp,
hid_rmi 24576 0
rmi_core 94208 1 hid_rmi
i2c_hid 32768 0
hid_generic 16384 0
usbhid 65536 0
hid 147456 6 i2c_hid,
usbcore 335872 5 xhci_hcd,
```
Stefano Galassi (iltoga) wrote : | #45 |
other info that might be useful are:
xinput list-props 20
````
Device 'MSFT0001:00 04F3:3140':
Device Enabled (177): 1
Coordinate Transformation Matrix (179): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (339): 0
libinput Natural Scrolling Enabled Default (340): 0
libinput Scroll Methods Available (341): 0, 0, 1
libinput Scroll Method Enabled (342): 0, 0, 1
libinput Scroll Method Enabled Default (343): 0, 0, 1
libinput Button Scrolling Button (358): 3
libinput Button Scrolling Button Default (359): 3
libinput Button Scrolling Button Lock Enabled (360): 0
libinput Button Scrolling Button Lock Enabled Default (361): 0
libinput Accel Speed (349): -1.000000
libinput Accel Speed Default (350): 0.000000
libinput Accel Profiles Available (362): 1, 1
libinput Accel Profile Enabled (363): 1, 0
libinput Accel Profile Enabled Default (364): 1, 0
libinput Calibration Matrix (365): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (366): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Left Handed Enabled (351): 0
libinput Left Handed Enabled Default (352): 0
libinput Send Events Modes Available (353): 1, 0
libinput Send Events Mode Enabled (354): 0, 0
libinput Send Events Mode Enabled Default (355): 0, 0
Device Node (297): "/dev/input/
Device Product ID (296): 1267, 12608
libinput Drag Lock Buttons (356): <no items>
libinput Horizontal Scroll Enabled (357): 1
````
and the output of: cat /dev/input/event15 is empty when I try to use the touchpad, meaning that it's not sending events to that device..
Coiby Xu (coiby) wrote : | #46 |
Sorry I made another mistake. hid_rmi is specifically for the Synaptics RMI4 touchpads. We use let hid_elan handle this device. The vendor&product id should be added to elan_devices in drivers/
diff --git a/drivers/
index 45c4f888b7c4.
--- a/drivers/
+++ b/drivers/
@@ -525,6 +525,7 @@ static const struct hid_device_id elan_devices[] = {
{ HID_USB_
{ HID_I2C_
+ { HID_I2C_
{ }
}
Stefano Galassi (iltoga) wrote : | #47 |
no luck man..
now I've got a hid_elan module loaded, but touchpad is still dead:
````
hid_magicmouse 20480 0
hidp 32768 1
bluetooth 737280 38 btrtl,hidp,
hid_elan 16384 0
led_class 20480 4 input_leds,
i2c_hid 32768 0
hid_generic 16384 0
usbhid 65536 0
hid 147456 6 i2c_hid,
usbcore 335872 5 xhci_hcd,
````
and output of xinput:
````
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ AKKO AKKO 3084BT Wireless Radio Control id=12 [slave pointer (2)]
⎜ ↳ AKKO AKKO 3084BT Consumer Control id=13 [slave pointer (2)]
⎜ ↳ iTrobPad id=15 [slave pointer (2)]
⎜ ↳ ITE Tech. Inc. ITE Device(8910) Consumer Control id=17 [slave pointer (2)]
⎜ ↳ MSFT0001:00 04F3:3140 id=20 [slave pointer (2)]
⎜ ↳ Elan Touchpad id=21 [slave pointer (2)]
````
both pointer devices with id 20 and 21 don't receive any event on their respective /dev/input/event*
Coiby Xu (coiby) wrote : | #50 |
Although Elan Touchpad is listed in the output of xinput, "0" in "hid_elan 16384 0" shows hid_elan is not being used. Is there an entry named "*:04F3:3140.*" under /sys/bus/
> plus I found that this device is already defined in hid-elan.c
I couldn't find the string 0x3140. Do you mean the device is defined in another way?
Yesterday, I used evtest to monitor the Synaptics touchpad and was surprised to find when hid_multitouch is taking over the device, multiple fingers (up to 4) touching could be detected,
```
$ sudo evtest
/dev/input/event14: MSFT0001:00 06CB:7F28 Mouse
/dev/input/event15: MSFT0001:00 06CB:7F28 Touchpad
Select the device event number [0-21]: 15
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x6cb product 0x7f28 version 0x100
Input device name: "MSFT0001:00 06CB:7F28 Touchpad"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 325 (BTN_TOOL_FINGER)
Event code 328 (BTN_TOOL_QUINTTAP)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_
Event code 334 (BTN_TOOL_
Event code 335 (BTN_TOOL_QUADTAP)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 1224
Resolution 12
Event code 1 (ABS_Y)
Value 0
Min 0
Max 804
Resolution 12
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 4
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 1224
Resolution 12
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 804
Resolution 12
Event code 55 (ABS_MT_TOOL_TYPE)
Value 0
Min 0
Max 2
Event code 57 (ABS_MT_
Value 0
Min 0
Max 65535
Event type 4 (EV_MSC)
Event code 5 (MSC_TIMESTAMP)
Properties:
Property type 0 (INPUT_
Property type 2 (INPUT_
Testing ... (interrupt to exit)
Event: time 1597225994.180980, type 3 (EV_ABS), code 57 (ABS_MT_
Event: time 1597225994.180980, type 3 (EV_ABS), code 53 (ABS_MT_
Event: time 1597225994.180980, type 3 (EV_ABS), code 54 (ABS_MT_
Event: time 1597225994.180980, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1597225994.180980, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 1
Event: time 1597225994.180980, type 3 (EV_ABS), code 0 (ABS_X), value 765
Event: time 1597225994.180980, type 3 (EV_ABS), code 1 (ABS_Y), value 220
Event: time 1597225994.180980, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 1597225994.180980, -------------- SYN_REPORT ------------
```
The only issue is the pointer won't move when I my fingers move on the touchpad. Compared with a working touchpad, the only difference is the lack of ABS_PRESSURE events. If I use hid-rmi, these ABS_PRESSURE events would be generated. It seems ABS_PRESSURE events are needed to make the pointer move. If I could let hid_multitouch collect ABS_PRESSURE events...
Stefano Galassi (iltoga) wrote : | #51 |
sudo evtest
````
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: AT Translated Set 2 keyboard
/dev/input/event1: AKKO AKKO 3084BT
/dev/input/event2: AKKO AKKO 3084BT Keyboard
/dev/input/event3: AKKO AKKO 3084BT Wireless Radio Control
/dev/input/event4: AKKO AKKO 3084BT Consumer Control
/dev/input/event5: AKKO AKKO 3084BT
/dev/input/event6: Integrated Camera: Integrated C
/dev/input/event7: Logitech M350
/dev/input/event8: ITE Tech. Inc. ITE Device(8910) Keyboard
/dev/input/event9: ITE Tech. Inc. ITE Device(8910) Consumer Control
/dev/input/event10: ITE Tech. Inc. ITE Device(8910) Wireless Radio Control
/dev/input/event11: Lid Switch
/dev/input/event12: Power Button
/dev/input/event13: Power Button
/dev/input/event14: Video Bus
/dev/input/event15: Video Bus
/dev/input/event16: PC Speaker
/dev/input/event17: Elan Touchpad
/dev/input/event18: MSFT0001:00 04F3:3140
/dev/input/event19: Ideapad extra buttons
/dev/input/event20: HDA NVidia HDMI/DP,pcm=3
/dev/input/event21: HDA NVidia HDMI/DP,pcm=7
/dev/input/event22: HDA NVidia HDMI/DP,pcm=8
/dev/input/event23: HDA NVidia HDMI/DP,pcm=9
/dev/input/event24: HDA NVidia HDMI/DP,pcm=10
/dev/input/event25: HDA Digital PCBeep
/dev/input/event26: HD-Audio Generic Mic
/dev/input/event27: HD-Audio Generic Headphone
Select the device event number [0-27]: 17
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x4f3 product 0x3140 version 0x100
Input device name: "Elan Touchpad"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 325 (BTN_TOOL_FINGER)
Event code 328 (BTN_TOOL_QUINTTAP)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_
Event code 334 (BTN_TOOL_
Event code 335 (BTN_TOOL_QUADTAP)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 3209
Resolution 31
Event code 1 (ABS_Y)
Value 0
Min 0
Max 2097
Resolution 31
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 255
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 4
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 3209
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 2097
Event code 57 (ABS_MT_
Value 0
Min 0
Max 65535
Event code 58 (ABS_MT_PRESSURE)
Value 0
Min 0
Max 255
Properties:
Property type 0 (INPUT_
Property type 2 (INPUT_
Testing ... (interrupt to exit)
````
sudo evtest (I choose 18)
````
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x4f3 product 0x3140 version 0x100
Input device name: "MSFT0001:00 04F3:3140"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 256 (BTN_0)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 330 (BTN_TOUCH)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Event code 1 (REL_Y)
Event code 6 (REL_HW...
Stefano Galassi (iltoga) wrote : | #52 |
about my previous post..
> I couldn't find the string 0x3140. Do you mean the device is defined in another way?
I am really sorry (it might have been late at night :) ) that line it was actually added by the kernel patch I prepared (I am building the whole kernel using makepkg and patching is done automatically)..
one more thing I found is, when I remove and insert again i2c_hid module (with rmmod and modprobe), I get this messages from system journal
journalctl -f
````
Aug 13 16:36:48 hypervisor kernel: i2c_hid i2c-MSFT0001:00: supply vdd not found, using dummy regulator
Aug 13 16:36:48 hypervisor kernel: i2c_hid i2c-MSFT0001:00: supply vddl not found, using dummy regulator
Aug 13 16:36:48 hypervisor kernel: input: Elan Touchpad as /devices/
Aug 13 16:36:48 hypervisor kernel: input: MSFT0001:00 04F3:3140 as /devices/
Aug 13 16:36:48 hypervisor kernel: elan 0018:04F3:
Aug 13 16:36:48 hypervisor sudo[4748]: pam_unix(
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:48 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Aug 13 16:36:49 hypervisor /usr/lib/
Helmut Stult (helmut-stult) wrote : | #53 |
The vendor ID is MSFT0001:00 04F3:3140 - therefore the patch cannot work
no longer affects: | linux |
Stefano Galassi (iltoga) wrote : | #55 |
what does it means "no longer affects: linux"?
in mine and many others cases it does still affect linux and no valid solutions to this issue have been found to date
Marton Danko (golddragon007) wrote : | #56 |
I've added wrong distro and when I'm removed it from the list it created that comment automatically. This interface not too intuitive for me. Sorry.
Stefano Galassi (iltoga) wrote : | #57 |
hehe no worries.. I was thinking someone was trying to prematurely close the issue ;)
daleli (daleli) wrote : | #58 |
This bug affects me a lot. I visit this page everyday to see whether if someone fix it. :(
information type: | Public → Public Security |
Olcay Ozturkmen (o-ozturkmen) wrote : | #59 |
Does this bug affects amd version only? according to arch wiki touchpad works on Intel(5i and 5pi) version https:/
daleli (daleli) wrote : | #60 |
Not sure that intel version(5i and 5pi) has the same touchpad. Legion5 amd has two touchpad: MSFT0001:00 06CB:7F28, and MSFT0001:00 04F3:3140. IdeaPad 5 15 touchpad is ELAN0001:00 04F3:3140, this page may be helpful: https:/
information type: | Public Security → Public |
Coiby Xu (coiby) wrote : | #61 |
Hi Stefano,
> sudo evtest
>
> ````
> /dev/input/event17: Elan Touchpad
> /dev/input/event18: MSFT0001:00 04F3:3140
> Select the device event number [0-27]: 17
> Input driver version is 1.0.1
> Input device ID: bus 0x18 vendor 0x4f3 product 0x3140 version 0x100
> Input device name: "Elan Touchpad"
> Supported events:
> Event type 0 (EV_SYN)
> Event type 1 (EV_KEY)
> Event code 272 (BTN_LEFT)
> Event code 325 (BTN_TOOL_FINGER)
> Event code 328 (BTN_TOOL_QUINTTAP)
> Event code 330 (BTN_TOUCH)
> Event code 333 (BTN_TOOL_
> Event code 334 (BTN_TOOL_
> Event code 335 (BTN_TOOL_QUADTAP)
> Event type 3 (EV_ABS)
> Event code 0 (ABS_X)
> Value 0
> Min 0
> Max 3209
> Resolution 31
> Event code 1 (ABS_Y)
> Value 0
> Min 0
> Max 2097
> Resolution 31
> Event code 24 (ABS_PRESSURE)
> Value 0
> Min 0
> Max 255
> Event code 47 (ABS_MT_SLOT)
> Value 0
> Min 0
> Max 4
> Event code 53 (ABS_MT_POSITION_X)
> Value 0
> Min 0
> Max 3209
> Event code 54 (ABS_MT_POSITION_Y)
> Value 0
> Min 0
> Max 2097
> Event code 57 (ABS_MT_
> Value 0
> Min 0
> Max 65535
> Event code 58 (ABS_MT_PRESSURE)
> Value 0
> Min 0
> Max 255
> Properties:
> Property type 0 (INPUT_
> Property type 2 (INPUT_
> Testing ... (interrupt to exit)
>
> ````
Thank you for providing this! So "*_PRESSURE" events are also supported. When you move your fingers or touch the touchpad, are there any event as follows reported?
> Event: time 1597225994.180980, type 3 (EV_ABS), code 57 (ABS_MT_
> Event: time 1597225994.180980, type 3 (EV_ABS), code 53 (ABS_MT_
> Event: time 1597225994.180980, type 3 (EV_ABS), code 54 (ABS_MT_
> Event: time 1597225994.180980, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Stefano Galassi (iltoga) wrote : | #62 |
hey Coybi,
unfortunately using the 'elan touchpad patch' didn't work because probably MSFT0001:00 04F3:3140 is not an elan device.
with and without patch, no events are ever recorded by pressing or swiping the surface of the TouchPad
Coiby Xu (coiby) wrote : | #63 |
The code 04F3 indeed represents the vendor ELAN. It seems I need to dig into the lower level driver (one that talk to the touchd firmware directly) to find out more info.
Btw, I Googled "Linux ELAN touchpad" and found another solution [kernel - ELAN Touchpad not working on Lenovo Thinkbook with Ubuntu 18.04 - Ask Ubuntu](https:/
Helmut Stult (helmut-stult) wrote : | #64 |
"unfortunately using the 'elan touchpad patch' didn't work because probably MSFT0001:00 04F3:3140 is not an elan device."
Thats not really correct. The touchpad is from Elan (see Vendor-ID 04F3) and there are the following two versions:
ELAN0001:00 04F3:3140
MSFT0001:00 04F3:3140
The MSFT (where MS is probably the abbreviation for MicroSoft) seems to have a different firmware that meets Microsoft's requirements and there is no driver for it under Linux yet.
Perhaps the following article found on "https:/
I quickly translated it with Google.
________________
Microsoft: Precision touchpad becomes mandatory for Windows 10 notebooks
During the WinHEC conference in Taiwan, Microsoft announced that the precision touchpad will be mandatory in a later Windows update from the Windows hardware compatibility program.
This means that manufacturers who do not install such touchpads will not receive certification for Windows. Manufacturers can still install Windows, but this certificate is simply missing. It's a step in the right direction, especially since Windows machines have long been known for their weak input devices. A lot has changed in the last few years, especially due to Microsoft's commitment. In Windows 10, for example, standard gestures were defined, which are mostly supported by the manufacturers.
Precision touchpad ≠ good touchpad
However, the fact that Microsoft will require a precision touchpad in the future does not mean that it has to be a good touchpad. “Precision touchpad” is basically just the term Microsoft uses to summarize those touchpads that communicate via the driver integrated in Windows. In other words: The touchpad options integrated in the settings can already be used for the touchpad from Redstone 2. Devices that use a proprietary Synaptics driver, for example, cannot be controlled with it.
It doesn't matter whether the touchpad comes from Microsoft, Apple, Synaptics or a cheap Chinese village. As long as the manufacturer controls its touchpad via the Windows driver, it is a “precision touchpad” for Microsoft. The Trekstor SurfBook W1 uses the Windows driver and is therefore a “precision touchpad”, but the HP Specter x360 is a proprietary panel for the settings. The latter undoubtedly has the better quality unit, the only difference is that the precision touchpad can be configured in the Windows settings and the HP touchpad can only be configured using software specially written for it.
a step in the right direction
The fact that touchpads are to be configured exclusively via the Windows settings in the future is an important step. Users can find their way around it better and the use of a touchpad under Windows is also simplified.
Stefano Galassi (iltoga) wrote : | #65 |
thank you for the explanation Helmut!
so, as far as I can understand we can only wait until someone implements a proper linux driver for this (Elan) device, is that correct?
Francesco Grieco (fgrieco) wrote : | #66 |
I think this issue is covering different devices.
I have a Lenovo Ideapad 14ARE05 with the following touchpad:
MSFT0004:00 06CB:CD98
(synaptic? similar to the Legion, I suppose)
And I have the same problem of others, the touchpad sometime works, sometime not.
Helmut Stult (helmut-stult) wrote : | #67 |
Right, it affects all MSFT touchpads.
At the moment there is nothing for MSFT - we will have to be very patient and hope, that someone can find a driver for it.
Nicolas Rogues (nrogues) wrote : | #68 |
Thanks Helmut and Francesco
I have a (bold ?) question.
As previously reported, it works (at least, moves and clicks as expected, not talking gestures here) in the UEFI BIOS prior to the loading of any operating system.
Does this mean there is a kind of working driver in code of the UEFI BIOS ? If yes, any hope to get it from Lenovo or other vendors ?
wangjun (biggerchina) wrote : | #69 |
my computer is Lenovo Legion R7000 ,with the MSFT0001:00 04F3:3140 touchpad.
and i had tested the kernel 5.9.0 rc2 on fedora 32 with no lucky,
wangjun (biggerchina) wrote : | #70 |
Lenovo release new version BIOS for Legion R7000 or Legion 5-15ARH05.
2020/8/20
BIOS Version: EUCN22WW,
EC Version: EUEC22WW
EUCN22WW:
BIOS Notification:
1. Fixed
1) Fix panel brightness almost not changed when change from the level 0 to level 1.
2. Add
1) None.
3. Modified
1) Follow PM requirement to disable GPU OC feature;
2) Hide the "keyboard backlight" option in Lenovo Vantage for RGB keyboard SKU.
EC Notification:
1. Fixed
1) None.
2. Add
1) None.
3. Modified
1) None.
But the touchpad still doesn't work。
information type: | Public → Public Security |
information type: | Public Security → Private Security |
information type: | Private Security → Public |
wangjun (biggerchina) wrote : | #71 |
@Coiby Xu (coiby) ,i had tested by patch the kernel source in the file :include/
but it doesn't work。
and sudo acpidump | grep -C3 ELAN result as follows:
ra@bogon Downloads]$ sudo acpidump | grep -C3 ELAN
[sudo] password for ra:
E310: A2 1F 01 70 99 69 00 5F 54 5F 31 A0 0C 93 5F 54 ...p.i._T_1..._T
E320: 5F 31 01 A4 11 03 01 03 A1 06 A4 11 03 01 00 A5 _1..............
E330: A1 0F A0 09 93 5F 54 5F 30 01 A4 00 A1 03 A4 00 ....._T_0.......
E340: A5 A1 06 A4 11 03 01 00 5B 82 40 13 45 4C 41 4E ........[.@.ELAN
E350: 08 5F 48 49 44 0C 41 D0 0C 50 08 5F 43 49 44 0D ._HID.A..P._CID.
E360: 50 4E 50 30 43 35 30 00 08 5F 55 49 44 01 14 47 PNP0C50.._UID..G
E370: 05 5F 43 52 53 00 08 52 42 55 46 11 45 04 0A 41 ._CRS..RBUF.E..A
--
E580: A2 1F 01 70 99 69 00 5F 54 5F 31 A0 0C 93 5F 54 ...p.i._T_1..._T
E590: 5F 31 01 A4 11 03 01 03 A1 06 A4 11 03 01 00 A5 _1..............
E5A0: A1 0F A0 09 93 5F 54 5F 30 01 A4 00 A1 03 A4 00 ....._T_0.......
E5B0: A5 A1 06 A4 11 03 01 00 5B 82 40 13 45 4C 41 4E ........[.@.ELAN
E5C0: 08 5F 48 49 44 0C 41 D0 0C 50 08 5F 43 49 44 0D ._HID.A..P._CID.
E5D0: 50 4E 50 30 43 35 30 00 08 5F 55 49 44 01 14 47 PNP0C50.._UID..G
E5E0: 05 5F 43 52 53 00 08 52 42 55 46 11 45 04 0A 41 ._CRS..RBUF.E..A
--
EFB0: 49 44 0D 50 4E 50 30 43 35 30 00 08 5F 53 55 42 ID.PNP0C50.._SUB
EFC0: 0D 58 58 58 58 30 30 30 30 00 14 46 05 5F 49 4E .XXXX0000..F._IN
EFD0: 49 00 A0 25 93 54 50 54 59 01 70 0D 4D 53 46 54 I..%.TPTY.p.MSFT
EFE0: 30 30 30 31 00 5F 48 49 44 70 0D 45 4C 41 4E 30 0001._HIDp.ELAN0
EFF0: 30 30 31 00 5F 53 55 42 A0 26 93 54 50 54 59 0A 001._SUB.&.TPTY.
F000: 02 70 0D 4D 53 46 54 30 30 30 31 00 5F 48 49 44 .p.MSFT0001._HID
F010: 70 0D 53 59 4E 41 30 30 30 31 00 5F 53 55 42 A4 p.SYNA0001._SUB.
[ra@bogon Downloads]$
wangjun (biggerchina) wrote : | #72 |
on kernel 5.8.5 fedora 32,touchpad does not work too.
no longer affects: | linux |
Olcay Ozturkmen (o-ozturkmen) wrote : | #73 |
It does affect linux kernel.
Coiby Xu (coiby) wrote : | #74 |
Hi Helmut,
Thank you for sharing the article on MSFT (I'm been long wondering what does MSFT mean).
> Right, it affects all MSFT touchpads.
>
> At the moment there is nothing for MSFT - we will have to be very patient and hope, that someone can find a driver for it.
I think The Microsoft Precision Touchpad has been implemented in drivers/
$ git log --grep="Precision Touchpad"
commit 9152c7d77d87e2b
Author: Dmitry Torokhov <email address hidden>
Date: Fri Jul 13 16:13:52 2018 +0200
HID: multitouch: report MT_TOOL_PALM for non-confident touches
According to Microsoft specification [1] for Precision Touchpads (and
Touchscreens) the devices use "confidence" reports to signal accidental
touches, or contacts that are "too large to be a finger". Instead of
simply marking contact inactive in this case (which causes issues if
contact was originally proper and we lost confidence in it later, as
this results in accidental clicks, drags, etc), let's report such
contacts as MT_TOOL_PALM and let userspace decide what to do.
And https:/
So maybe there are some issues in drivers/
Since both touchpads works on Windows and "Precision touchpad becomes mandatory for Windows 10 notebooks", we can fix both touchpads by fixing hid-mulittouch. Can someone show me the content of /sys/kernel/
$ cat /sys/kernel/
05 01 09 02 a1 01 85 02 09 01 a1 00 05 09 19 01 29 02 15 00 25 01 75 01 95 02 81 02 95 06 81 01 05 01 09 30 09 31 15 81 25 7f 75 08 95 02 81 06 c0 c0 05 0d 09 05 a1 01 85 03 05 0d 09 22 a1 02 15 00 25 01 09 47 0
9 42 95 02 75 01 81 02 95 01 75 03 25 05 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 c8 04 75 10 55 0e 65 11 09 30 35 00 46 fc 03 95 01 81 02 46 9d 02 26 24 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09 47
09 42 95 02 75 01 81 02 95 01 75 03 25 05 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 c8 04 75 10 55 0e 65 11 09 30 35 00 46 fc 03 95 01 81 02 46 9d 02 26 24 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09
47 09 42 95 02 75 01 81 02 95 01 75 03 25 05 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 c8 04 75 10 55 0e 65 11 09 30 35 00 46 fc 03 95 01 81 02 46 9d 02 26 24 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 0
9 47 09 42 95 02 75 01 81 02 95 01 75 03 25 05 09 51 81 02 75 01 95 03 81 03 05...
Stefano Galassi (iltoga) wrote : | #75 |
- 0018:04F3:3140.0001/rdesc Edit (33.6 KiB, text/plain)
Hi again Coiby,
I attach to this the output of 'cat /sys/kernel/
Coiby Xu (coiby) wrote : | #76 |
Hi wangjun (biggerchina),
Thank you for testing the linux/input/
Btw, when hid-multitouch is handling your touchpad device, what's the result of `sudo hid-recorder` (this tool is contained in hid-tools)?
$ sudo hid-recorder
Available devices:
/dev/hidraw0: MSFT0001:00 06CB:7F28
/dev/hidraw1: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-1]: 0
# MSFT0001:00 06CB:7F28
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x02, // Report ID (2) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x01, // Input (Cnst,Arr,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x15, 0x81, // Logical Minimum (-127) 38
# 0x25, 0x7f, // Logical Maximum (127) 40
# 0x75, 0x08, // Report Size (8) 42
# 0x95, 0x02, // Report Count (2) 44
# 0x81, 0x06, // Input (Data,Var,Rel) 46
# 0xc0, // End Collection 48
# 0xc0, // End Collection 49
# 0x05, 0x0d, // Usage Page (Digitizers) 50
# 0x09, 0x05, // Usage (Touch Pad) 52
# 0xa1, 0x01, // Collection (Application) 54
# 0x85, 0x03, // Report ID (3) 56
# 0x05, 0x0d, // Usage Page (Digitizers) 58
# 0x09, 0x22, // Usage (Finger) 60
# 0xa1, 0x02, // Collection (Logical) 62
# 0x15, 0x00, // Logical Minimum (0) 64
# 0x25, 0x01, // Log...
wangjun (biggerchina) wrote : | #77 |
@Coiby Xu (coiby)
there is not any text like "invalid report id data" in dmesg output.
and on fedora 32 kernel 5.8.5
=======
[ra@bogon ~]$ dmesg | grep MSFT
[ 0.004946] ACPI: SSDT 0x00000000CDFF4000 007216 (v02 LENOVO CB-01 00000001 MSFT 04000000)
[ 1.534909] i2c_hid i2c-MSFT0001:00: supply vdd not found, using dummy regulator
[ 1.534921] i2c_hid i2c-MSFT0001:00: supply vddl not found, using dummy regulator
[ 1.679063] input: MSFT0001:00 04F3:3140 Mouse as /devices/
[ 1.679354] input: MSFT0001:00 04F3:3140 Touchpad as /devices/
[ 1.679516] hid-generic 0018:04F3:
[ 1.744137] input: MSFT0001:00 04F3:3140 Mouse as /devices/
[ 1.744252] input: MSFT0001:00 04F3:3140 Touchpad as /devices/
[ 1.744326] hid-multitouch 0018:04F3:
[ra@bogon ~]$
=======
and
=======
[ra@bogon ~]$ sudo hid-recorder
Available devices:
/dev/hidraw0: MSFT0001:00 04F3:3140
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 0
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, ...
wangjun (biggerchina) wrote : | #78 |
and after line
I: 18 04f3 3140
no more output , event i touch the touchpad.
Stefano Galassi (iltoga) wrote : | #79 |
hey guys there is a new thread on official lenovo forum about this.
let's make them hear our voice!
Coiby Xu (coiby) wrote : | #80 |
Hi Stefano Galassi (iltoga) and wangjun (biggerchina)
Thank you for providing the info!
So this ELAN touchpad's HID reporter descriptors could be read and parsed but it couldn't be started at all since no HID reports are received.
Now the only way I can think of to tackle this issue is to install Windows Driver Kit to capture&analyze
HID reports to see what reports are sent/received from/by the Windows driver while playing with the touchpad under Windows? But my laptop comes with the Synnaptics touchpad, I couldn't do this on my own computer. Is it possible for you to do it for me? Here's the how-to https:/
Coiby Xu (coiby) wrote : | #81 |
And for those who have the Synaptics touchpad, I've found a way to make the touchpad almost work. You can apply the following patch which will make kernel use hid-rmi handle the device without blacklisting hid-mulitouch,
diff --git a/drivers/
index a8e3b2796be8.
--- a/drivers/
+++ b/drivers/
@@ -1102,6 +1102,7 @@
#define I2C_VENDOR_
#define I2C_PRODUCT_
+#define I2C_PRODUCT_
#define USB_VENDOR_
#define USB_DEVICE_
diff --git a/drivers/
index a65aef6a322f.
--- a/drivers/
+++ b/drivers/
@@ -568,6 +568,7 @@ static const struct hid_device_id hid_have_
{ HID_USB_
{ HID_USB_
{ HID_USB_
+ { HID_I2C_
#endif
#if IS_ENABLED(
{ HID_USB_
diff --git a/drivers/
index 7f41213d5ae3.
--- a/drivers/
+++ b/drivers/
@@ -759,6 +759,7 @@ static const struct hid_device_id rmi_id[] = {
{ HID_USB_
{ HID_USB_
+ { HID_I2C_
{ HID_DEVICE(
{ }
};
One left issue is the single clicking is not sensitive enough. I need to let my finger linger on the touchpad for a while (like 0.5s). I'll send the patches upstream after fixing this issue.
wangjun (biggerchina) wrote : | #82 |
@Coiby Xu (coiby) ,
on my windows 10 ,
it report error!
=======
Microsoft Windows [Version 10.0.19042.450]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\WINDOWS\
Error:
Data Collector already exists.
C:\WINDOWS\
The command completed successfully.
C:\WINDOWS\
Error:
The filename, directory name, or volume label syntax is incorrect.
C:\WINDOWS\
Error:
Data Collector Set is not running.
C:\WINDOWS\
The command completed successfully.
C:\WINDOWS\
Error:
The filename, directory name, or volume label syntax is incorrect.
C:\WINDOWS\
The command completed successfully.
C:\WINDOWS\
Error:
The filename, directory name, or volume label syntax is incorrect.
C:\WINDOWS\
The command completed successfully.
C:\WINDOWS\
Error:
The filename, directory name, or volume label syntax is incorrect.
C:\WINDOWS\
The command completed successfully.
C:\WINDOWS\
Error:
The filename, directory name, or volume label syntax is incorrect.
C:\WINDOWS\
Error:
Data Collector Set is not running.
C:\WINDOWS\
Gerald Bachner (geri1403) wrote : | #83 |
- HID_WPP.etl Edit (1.2 MiB, application/octet-stream)
Hi,
attached the etl tracefile. I could not get the pdb files from the Microsoft symbol server to view it in TraceView. I hope this helps.
Gerald Bachner (geri1403) wrote : | #84 |
Here the outfile from TraceView
Gerald Bachner (geri1403) wrote : | #85 |
stillnurs (stillnurs) wrote : | #86 |
Hey palls, it's Lenovo Legion Y540, and I just signed up here to suggest a solution for touchpad that helped for me. Since I have the similar touchpad types as here in the topic MSFT0001:01 04F3:309E .
I was wandering same as many of you for several days since installing Linux, (it's Manjaro btw, but anyways just try if you can, who knows, maybe it will work for you too)
So the solution for touchpad to get it working:
1/ sudo pacman -Rsn xf86-input-
2/ sudo pacman -Syu xf86-input-libinput
(create a new file if you don't have existing)
3/ /etc/X11/
Section "InputClass"
Identifier "MyTouchpad"
Driver "libinput"
Option "Tapping" "on"
EndSection
stillnurs (stillnurs) wrote : | #87 |
update:
for the 3-step, you can edit xx-libinput.conf file if you have existing.
You will find a line which states the similar to these:
Section "InputClass"
Identifier "MyTouchpad"
Driver "libinput"
Option "Tapping" "on" #just add this OPTION line
EndSection
wangjun (biggerchina) wrote : | #88 |
new kernel on fedora test result:
5.8.7 not work
5.9-rc4 not work
PD (pd1986) wrote : | #89 |
@Stillnurs
Your advice doesn't work for me. Kernel 5.8.6
Actually, there is no event triggered by touchpad seen via "libinput debug-events"
Helmut Stult (helmut-stult) wrote : | #90 |
@Stillnurs
Please do not confuse apples with oranges!
We're talking about the Lenovo Legion-5 15ARH05 with the MSFT0001: 00 04F3: 3140 touchpad.
It may be nice that it works with the MSFT0001: 01 04F3: 309E on your Legion Y540, but that is a different hardware and therefore not helpful.
PD (pd1986) wrote : | #91 |
Referring to another case #207759 (https:/
I am curious why ideapad 15 has the same Touchpad ID and someone could solve the issue by blacklist elan-i2c but Legion 15ARH05 cannot, especially I didn't complied elan-i2c or elants-i2c. Legion 15ARH05 doesn't have touchscreen. Very strange
dmesg | grep -i 04f3
[ 2.095379] input: MSFT0001:00 04F3:3140 Mouse as /devices/
[ 2.095450] input: MSFT0001:00 04F3:3140 Touchpad as /devices/
[ 2.095506] hid-generic 0018:04F3:
[ 2.589937] input: MSFT0001:00 04F3:3140 Mouse as /devices/
[ 2.590052] input: MSFT0001:00 04F3:3140 Touchpad as /devices/
[ 2.590112] hid-multitouch 0018:04F3:
wangjun (biggerchina) wrote : | #92 |
diff is amd and intel.
PD (pd1986) wrote : | #93 |
@wangjun user "dl3it" in that bug has AMD too and he seemed to solve it by recompile the kernel with elan_i2c as module.
wangjun (biggerchina) wrote : | #94 |
new kernel on fedora test result:
5.8.8 not work
Shatadru Banerjee (satadru-bag) wrote : | #95 |
So what is the solution? I am new to this. Has anyone successfully managed to solve the bug?
wangjun (biggerchina) wrote : | #96 |
no solution to MSFT0001:00 04F3:3140
Franck VAISSIERE (royalcheese) wrote : | #97 |
Tested on last manjaro k5.8, and currently on debian sid unstable (k5.8.0-1)and same issue with touchpad.
Same results as above...
Lenovo Gaming 3 15ARH05
Dimitar Kotsev (dimitar-kotsev) wrote : | #98 |
On my machine the touchpad is recognized and even the click events are registered but moving produces clicking instead of moving the cursor.
Legion 5 15ARH05, kernel Linux 5.8.6-1-MANJARO,
dmesg | grep MSFT
[ 162.390501] i2c_hid i2c-MSFT0001:00: supply vdd not found, using dummy regulator
[ 162.390521] i2c_hid i2c-MSFT0001:00: supply vddl not found, using dummy regulator
[ 162.670737] input: MSFT0001:00 06CB:7F28 Mouse as /devices/
[ 162.670910] input: MSFT0001:00 06CB:7F28 Touchpad as /devices/
[ 162.671186] hid-generic 0018:06CB:
[ 162.813553] input: MSFT0001:00 06CB:7F28 Mouse as /devices/
[ 162.813965] input: MSFT0001:00 06CB:7F28 Touchpad as /devices/
[ 162.814182] hid-multitouch 0018:06CB:
cat /proc/bus/
I: Bus=0018 Vendor=06cb Product=7f28 Version=0100
N: Name="MSFT0001:00 06CB:7F28 Mouse"
P: Phys=i2c-
S: Sysfs=/
U: Uniq=
H: Handlers=event12 mouse1
B: PROP=0
B: EV=17
B: KEY=30000 0 0 0 0
B: REL=3
B: MSC=10
I: Bus=0018 Vendor=06cb Product=7f28 Version=0100
N: Name="MSFT0001:00 06CB:7F28 Touchpad"
P: Phys=i2c-
S: Sysfs=/
U: Uniq=
H: Handlers=event13 mouse2
B: PROP=5
B: EV=1b
B: KEY=e520 10000 0 0 0 0
B: ABS=2e0800000000003
B: MSC=20
When `blacklist hid_multitouch` the coursor is moving with absolute coordinates and hangs which makes it unusable.
wangjun (biggerchina) wrote : | #99 |
new kernel on fedora test result:
5.8.9 not work
5.9-rc5 not work
lightning (lightning1141) wrote : | #100 |
Legion 15 82GR, known as Legion R7000P2020H 82GR in China has the same issue.
Device id is MSFT0001:00 04F3:3186 Touchpad.
See full hardware info at https:/
Ivan Gašparović (poofpoo) wrote : | #101 |
Legion 5 laptop with AMD - best I could do is add "blacklist hid_multitouch" to /etc/modprobe.
[ 0.004610] ACPI: SSDT 0x00000000CDFF4000 007216 (v02 LENOVO CB-01 00000001 MSFT 04000000)
[ 2.467514] i2c_hid i2c-MSFT0001:00: supply vdd not found, using dummy regulator
[ 2.467526] i2c_hid i2c-MSFT0001:00: supply vddl not found, using dummy regulator
[ 2.632628] input: MSFT0001:00 06CB:7F28 Mouse as /devices/
[ 2.632754] input: MSFT0001:00 06CB:7F28 Touchpad as /devices/
[ 2.632894] hid-generic 0018:06CB:
I: Bus=0018 Vendor=06cb Product=7f28 Version=0100
N: Name="MSFT0001:00 06CB:7F28 Mouse"
P: Phys=i2c-
S: Sysfs=/
U: Uniq=
H: Handlers=mouse0 event6
B: PROP=0
B: EV=17
B: KEY=30000 0 0 0 0
B: REL=3
B: MSC=10
I: Bus=0018 Vendor=06cb Product=7f28 Version=0100
N: Name="MSFT0001:00 06CB:7F28 Touchpad"
P: Phys=i2c-
S: Sysfs=/
U: Uniq=
H: Handlers=mouse1 event7
B: PROP=0
B: EV=1b
B: KEY=400 1 0 0 0 0
B: ABS=10000000003
B: MSC=10
Mike Boruta (maridius) wrote : | #102 |
Hello, I have exactly the same issue as the creator of this bug. I have a Lenovo Legion 5 15ARH05H, model number 82B1000AUS (https:/
How can I help add support for this device in linux? @Coiby Xu (coiby), were the files provided by Gerald Bachner (geri1403) in comment #83 sufficient? Is there anything I can provide to help?
Bibi (powerstreamy) wrote : | #104 |
Hello, facing the same issue (obviously).
I appear to have the MSFT0001:00 04F3:3186, ordered in France, so this model does not seems to be limited to china (R7000 variant).
Blacklisting done nothing. I have seen the chinese blog but I'm a little lost with this, is it supposed to work with my model ?
I'm available if anyone need something to try or any info regarding this model.
Von (straeker) wrote : | #105 |
I have the same MSFT0001:00 04F3:3186 touchpad, however, the touchpad will show as Elantech Touch Pad under windows and it is listed under the firmware section:
Elantech Touch Pad Firmware 1.0.0.2
Device type: Firmware
Manufacturer: Elantech Ltd.
Locatioon: on Microsft UEFI-Compliant System
https:/
And I found it's driver on windows is actually raw data called "SA469D-
I think to try to understand why do this type of touchpads work on windows may help understanding why do them do not work on most Linux distributions.
There are also some docs about Precision Touchpad on MS' site:
https:/
https:/
PD (pd1986) wrote : | #106 |
I did some search in internet. At this moment, it seems that most of the Touchpad having this issue are MSFT 04F3:xxxx.
wangjun (biggerchina) wrote : | #107 |
lenovo release new bios
EUCN26WW
Solomon Thatcher (superwafflekitty) wrote : | #108 |
Would it be possible to replace the track-pad with a different one from a supported manufacturer?
Coiby Xu (coiby) wrote : | #109 |
- polling_pin_state_touchpad.patch Edit (3.3 KiB, text/plain)
Hi,
I've found out that there is something wrong with the GPIO interrupt controller under Linux. For the details, you can check https:/
I've tested the patch for the Synaptics touchpad (MSFT0001:00 06CB:7F28). I guess it will also work for the Elan touchpad (MSFT0001:00 04F3:3140) based on the ACPI DSDT. If not, could you share the following info with me,
1) dsdt.dsl
Use the following commands to get dsdt.dsl (you need to install acpica which provides iasl)
a) sudo acpidump > acpidata.out
b) acpixtract -sSSDT acpidata.out
c) acpixtract -sDSDT acpidata.out
d) iasl -da dsdt.dat ssdt*.dat
2) dmesg dump when booting kernel with the following command line parameters
i2c-designware-
Thank you!
Ubuntu Foundations Team Bug Bot (crichton) wrote : | #110 |
The attachment "polling_
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
tags: | added: patch |
wangjun (biggerchina) wrote : | #111 |
@Coiby Xu (coiby)
my machine is MSFT0001:00 04F3:3140;
i tested the patch on fedora 32 kernel 5.8.11 .
the touchpad worked.
but the original patch not compile :
thread_hid undeclared
then i add one line:
static struct task_struct *thread_hid = NULL;
many thanks to your hard work!
i am in in expectation of your final version patch.
wangjun (biggerchina) wrote : | #112 |
sorry for my poor english!
非常感谢!
Gerald Bachner (geri1403) wrote : | #113 |
Hi,
tested patch + workaround from wangjun (added "static struct task_struct *thread_hid = NULL;") on Manjaro 5.9rc6:
Touchpad MSFT0001:00 04F3:3140 works perfect.
Thanks!
Paulinski (mail-izy) wrote : | #114 |
Hey guys,
I also would like to apply this patch on my machine. Unfortunately I didn't understand where to add the extra line in the code an how to apply the patch...
Helmut Stult (helmut-stult) wrote : | #115 |
@Coiby Xu (coiby)
You are the best !!!
First of all, thank you very much for the patch - it works perfectly.
All I had to do was add the fix from @wangjun (biggerchina).
Here is the link to the working patch:
https:/
The kernel 5.8.12-2 of Manjaro Linux 5.8.12-2 already contains it.
I will also include it in the 5.9-rc7.
Helmut (schinfo) - Manjaro Team
Changed in linux (Arch Linux): | |
status: | Confirmed → Fix Committed |
Demyan Yarmoshik (niquepolice) wrote : | #116 |
Amazing news! Applied the patch to 5.6-rc6, works great. Thanks a lot, Coiby Xu!
alex (agolks) wrote : | #117 |
have managed to compile the i2c_hid.ko module in ubuntu 20.04, too, works! thanks!
alex (agolks) wrote : | #118 |
... but:
have to modprobe -r and modprobe i2c_hid again, to get the touchpad working.
any ideas?
Bulat (ilov3) wrote : | #119 |
Hey guys! Very excited and waited so much to the moment when this bug will be fixed.
Any chances that the patch will be included into ubuntu mainline kernel build? (something go wrong when I attempting to boot from the patched kernel: in the very start says "Loading initial ramdisk" and hangs forever, tried to google the issue, but no luck at this moment, plz contact me if you know(or have ideas) the solution)
Thanks!
Stefano Galassi (iltoga) wrote : | #120 |
@Coiby YOU ARE THE MAN!
works like a charm on kernel 5.8.12-AMD!
thank you so much for your efforts. you should get paid by Lenovo for this ;)
Dimitar Kotsev (dimitar-kotsev) wrote : | #121 |
@Coiby Xu, @wangjun, Helmut (schinfo) thank you for saving the day.
I've `git cloned` 5.8.12-3 Manjaro kernel from GitLab and using this post I installed it on my system. -> https:/
Everything works like a charm now.
Thank you all once again.
Azizkhan (injkgz) wrote : | #122 |
Can anyone provide an instruction for newbees?
I made a clean install of Ubuntu 20.04 LTS, how to apply patch and make touchpad work?
Mike Boruta (maridius) wrote : | #123 |
Wow, thanks a lot Coiby Xu! I applied the patch and the touchpad 04F3:3186 works as expected on the 5.7.19 ubuntu mainline kernel. Please let me know if you need help developing/testing the final fix to pinctrl_
@Azizkhan (injkgz), @Bulat (ilov3), @Paulinski (mail-izy): Please see the following guides on how to install patches and build kernel modules:
https:/
https:/
https:/
Wish you luck!
Mike Boruta (maridius) wrote : | #124 |
@alex (agolks)
Just run 'sudo update-initramfs -u'; see https:/
alex (agolks) wrote : | #125 |
thanks @Mike Boruta (maridius)!
wondered why it worked after re-install of nvidia driver, so thats the explanation now ;)
what about any issues with the touchpad?
not sure if something else produces my issues, but during longer usage there random stutterings, the mouse is not moved for some seconds.
Mike Boruta (maridius) wrote : | #126 |
I have not (yet) experienced the issue you are describing, or any issues for that matter. Maybe you can remove and re-insert i2c_hid when this happens? Hopefully a fix of the GPIO driver is not too far off and will resolve the stability issues you are experiencing.
Azizkhan (injkgz) wrote : | #127 |
Kernel 5.8.13 doesn't build with this patch
PD (pd1986) wrote : | #128 |
@Coiby Xu (coiby)
Great. Touchpad works. Thank you so much
PD (pd1986) wrote : | #129 |
Maybe expert could update in kernel git
https:/
wangjun (biggerchina) wrote : | #130 |
found a patch related to amd and gpio:
gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION
The original commit appears to have the logic reversed in
amd_fch_
"direction" in the sys tree.
Coiby Xu (coiby) wrote : | #131 |
Thank you for testing this patch! I'm glad it also works for both 04F3:3140 and 04F3:3186. I was completely new to things like I2C, HID before investigating this touchpad issue. So thank you for your patience with me.
Note this patch is meant to be a temporary specifically for this laptop. It will break other machines' touchpads if they have different interrupt configuration.
But I think it's worthwhile to add a polling mode to the drivers/
Coiby Xu (coiby) wrote : | #132 |
Today I find something interesting about the GPIO controller. I wonder if the same thing would happen to the ELAN touchpads.
For those who have the ELAN touchpad, could you show me the result of the following experiment with a kernel not having the polling_
```bash
# install hid-tools
# If it's not provided by your distribution's package manager, you can install it by pip
# sudo pip install hid-tools
# run hid-recorder and choose the device having name "MSFT*"
$ sudo hid-recorder
Available devices:
/dev/hidraw0: MSFT0001:00 06CB:7F28
# now open another terminal window
# switch to root user
sudo su
# go to gpio's sysfs
cd /sys/class/gpio/
# export the pin used by the touchpad
echo 386 > export
# now you will see a folder named gpio396 created
# change the pin as an output
echo out > gpio396/direction
# write 1 to the pin
echo 1 > gpio386/value
```
Now move your finger on the touchpad. See if your cursor moves now and if there is any output from hid-recorder.
Helmut Stult (helmut-stult) wrote : | #133 |
Forget everything up to now - it is a kernel bug that has been known since January of this year and for which there has been a fix since then.
I can't say why it hasn't been included in the kernel so far.
Here is the patch:
It's been included in Manjaro Linux kernel >= 5.8.13-4 (5.9 with the next update)
https:/
The bug was, that at /drivers/
It must be correct "return ret ? GPIO_LINE_
A small swap that unfortunately has a big impact on the owners of a Lenovo Legion.
Coiby Xu (coiby) wrote : | #134 |
For Legion-5 15ARH05, the GPIO chip is managed by drivers/
Helmut Stult (helmut-stult) wrote : | #135 |
Right - unfortunately that was a mistake on my part - please ignore # 133
wangjun (biggerchina) wrote : | #136 |
@coiby xu,
with my elan touchpad ,
[ra@localhost ~]$ sudo pip install hid-tools
[sudo] password for ra:
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting hid-tools
Using cached hid-tools-
Collecting parse
Downloading parse-1.18.0.tar.gz (30 kB)
Collecting pyudev
Using cached pyudev-
Requirement already satisfied: six in /usr/lib/
Using legacy 'setup.py install' for hid-tools, since package 'wheel' is not installed.
Using legacy 'setup.py install' for parse, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pyudev, since package 'wheel' is not installed.
Installing collected packages: parse, pyudev, hid-tools
Running setup.py install for parse ... done
Running setup.py install for pyudev ... done
Running setup.py install for hid-tools ... done
Successfully installed hid-tools-0.2 parse-1.18.0 pyudev-0.22.0
[ra@localhost ~]$ sudo hid-recorder
Available devices:
/dev/hidraw0: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: MSFT0001:00 04F3:3140
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 3
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, // Logical Minimum (-127) 40
# 0x25, 0x7f, // Logical Maximum (127) 42
# 0x75, 0x08, // Report Size (8) 44
# 0x95, 0x03, // Report Count (3) 4...
wangjun (biggerchina) wrote : | #137 |
sorry, default fedora kernel with the option CONFIG_GPIO_SYSFS is not set.
i will set it and build new kernel to test the above script.
wangjun (biggerchina) wrote : | #138 |
@coiby xu,
terminal window 1:
-----------------
[ra@localhost ~]$ uname -r
5.8.13-
[ra@localhost ~]$ sudo hid-recorder
[sudo] password for ra:
Available devices:
/dev/hidraw0: MSFT0001:00 04F3:3140
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 0
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, // Logical Minimum (-127) 40
# 0x25, 0x7f, // Logical Maximum (127) 42
# 0x75, 0x08, // Report Size (8) 44
# 0x95, 0x03, // Report Count (3) 46
# 0x81, 0x06, // Input (Data,Var,Rel) 48
# 0x05, 0x0c, // Usage Page (Consumer Devices) 50
# 0x0a, 0x38, 0x02, // Usage (AC Pan) 52
# 0x95, 0x01, // Report Count (1) 55
# 0x81, 0x06, // Input (Data,Var,Rel) 57
# 0x75, 0x08, // Report Size (8) 59
# 0x95, 0x03, // Report Count (3) 61
# 0x81, 0x03, // Input (Cnst,Var,Abs) 63
# 0xc0, // End Collection 65
# 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 66
# 0x85, 0x0d, // Report ID (13) 69
# 0x09, 0xc5, // Usage (Vendor Usage 0xc5) 71
# 0x15, 0...
Coiby Xu (coiby) wrote : | #139 |
Hi wangjun,
Thank you for testing the script. Sorry I notice there's some problems with the instructions in # 132. And those instructions can't be executed as a single shell script.
If you go to /sys/class/gpio, do you see a folder named gpio386?
- If yes, cd to gpio386. "echo out > direction". Then "echo 0 > value". Then you check the output from hid-recorder.
- If no, please checck another re-written version of # 132 as follows.
Coiby Xu (coiby) wrote : | #140 |
(For those who read # 132, please ignore it and this is re-written version.)
For the Synaptics touchpad, the following experiment would make the touchpad work. Could you share the result with the ELAN touchpad?
1. Install hid-tools and start hid-recorder as the root user
```bash
# install hid-tools
# If it's not provided by your distribution's package manager, you can install it by pip
# sudo pip install hid-tools
# run hid-recorder and choose the device having name "MSFT*"
$ sudo hid-recorder
Available devices:
/dev/hidraw0: MSFT0001:00 06CB:7F28
```
2. Run the following sh script as a root
```bash
# now open another terminal window
# go to gpio's sysfs
cd /sys/class/gpio/
# export the pin used by the touchpad
echo 386 > export
# now you will see a folder named gpio386 created
cd gpio386
# change the pin as an output
echo out > direction
# write 0 to the pin
echo 0 > value
```
Now move your finger on the touchpad. See if your cursor moves now and if there is any output from hid-recorder.
And then don't touch the touchpad. See if there is any output from hid-recorder.
wangjun (biggerchina) wrote : | #141 |
after i run the line in the terminal windows 2:
echo out > direction
terminal window 1 has output
and the cursor start move.
no need to run the line
echo 0 > value
wangjun (biggerchina) wrote : | #142 |
and the full terminal window 1 output :
[ra@localhost ~]$ sudo hid-recorder
[sudo] password for ra:
Available devices:
/dev/hidraw0: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: MSFT0001:00 04F3:3140
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 3
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, // Logical Minimum (-127) 40
# 0x25, 0x7f, // Logical Maximum (127) 42
# 0x75, 0x08, // Report Size (8) 44
# 0x95, 0x03, // Report Count (3) 46
# 0x81, 0x06, // Input (Data,Var,Rel) 48
# 0x05, 0x0c, // Usage Page (Consumer Devices) 50
# 0x0a, 0x38, 0x02, // Usage (AC Pan) 52
# 0x95, 0x01, // Report Count (1) 55
# 0x81, 0x06, // Input (Data,Var,Rel) 57
# 0x75, 0x08, // Report Size (8) 59
# 0x95, 0x03, // Report Count (3) 61
# 0x81, 0x03, // Input (Cnst,Var,Abs) 63
# 0xc0, // End Collection 65
# 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 66
# 0x85, 0x0d, // Report ID (13) 69
# 0x09, 0xc5, // Usage (Vendor Usage 0xc5) 71
# 0x15, 0x00, // Logical Minimum (0) ...
wangjun (biggerchina) wrote : | #143 |
i reboot ,and test it again.
only run this script:
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/gpio/
[root@localhost gpio]# echo 386 > export
[root@localhost gpio]# cd gpio386
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]#
```
then cursor start move ,and two figure scroll is ok too.
Coiby Xu (coiby) wrote : | #144 |
@@wangjun Good to know that! What's the result of "echo value"? And what's the output of hdi-recorder with and without fingers on the touchpad?
wangjun (biggerchina) wrote : | #145 |
@coiby xu ,many thanks to you
you find another way to solve the problem.
wangjun (biggerchina) wrote : | #146 |
@Coiby Xu (coiby)
#144
i now test it.
wangjun (biggerchina) wrote : | #147 |
no touch test:
i run :sudo hid-recorder
```
[ra@localhost ~]$ sudo hid-recorder
[sudo] password for ra:
Available devices:
/dev/hidraw0: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: MSFT0001:00 04F3:3140
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 3
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, // Logical Minimum (-127) 40
# 0x25, 0x7f, // Logical Maximum (127) 42
# 0x75, 0x08, // Report Size (8) 44
# 0x95, 0x03, // Report Count (3) 46
# 0x81, 0x06, // Input (Data,Var,Rel) 48
# 0x05, 0x0c, // Usage Page (Consumer Devices) 50
# 0x0a, 0x38, 0x02, // Usage (AC Pan) 52
# 0x95, 0x01, // Report Count (1) 55
# 0x81, 0x06, // Input (Data,Var,Rel) 57
# 0x75, 0x08, // Report Size (8) 59
# 0x95, 0x03, // Report Count (3) 61
# 0x81, 0x03, // Input (Cnst,Var,Abs) 63
# 0xc0, // End Collection 65
# 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 66
# 0x85, 0x0d, // Report ID (13) 69
# 0x09, 0xc5, // Usage (Vendor Usage 0xc5) 71
# 0x15, 0x00, // Logical Minimum (0) ...
wangjun (biggerchina) wrote : | #148 |
touch test:
follow the no touch test,
i touch the touchpad:
then the output are:
```
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2249 | Y: 1233 | Scan Time: 59692 | Contact Count: 1 | Button: 0 | # | #
E: 000215.550028 12 04 03 c9 08 d1 04 2c e9 01 80 19 43
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2249 | Y: 1233 | Scan Time: 59782 | Contact Count: 1 | Button: 0 | # | #
E: 000215.558929 12 04 03 c9 08 d1 04 86 e9 01 80 19 43
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2249 | Y: 1233 | Scan Time: 59872 | Contact Count: 1 | Button: 0 | # | #
E: 000215.567472 12 04 03 c9 08 d1 04 e0 e9 01 80 19 43
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2249 | Y: 1232 | Scan Time: 59992 | Contact Count: 1 | Button: 0 | # | #
E: 000215.578906 12 04 03 c9 08 d0 04 58 ea 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2246 | Y: 1226 | Scan Time: 60112 | Contact Count: 1 | Button: 0 | # | #
E: 000215.590708 12 04 03 c6 08 ca 04 d0 ea 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60222 | Contact Count: 1 | Button: 0 | # | #
E: 000215.601795 12 04 03 c3 08 c3 04 3e eb 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60332 | Contact Count: 1 | Button: 0 | # | #
E: 000215.611951 12 04 03 c3 08 c3 04 ac eb 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60442 | Contact Count: 1 | Button: 0 | # | #
E: 000215.622699 12 04 03 c3 08 c3 04 1a ec 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60512 | Contact Count: 1 | Button: 0 | # | #
E: 000215.629600 12 04 03 c3 08 c3 04 60 ec 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60582 | Contact Count: 1 | Button: 0 | # | #
E: 000215.636408 12 04 03 c3 08 c3 04 a6 ec 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2243 | Y: 1219 | Scan Time: 60672 | Contact Count: 1 | Button: 0 | # | #
E: 000215.646507 12 04 03 c3 08 c3 04 00 ed 01 80 19 34
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2228 | Y: 1171 | Scan Time: 60752 | Contact Count: 1 | Button: 0 | # | #
E: 000215.653875 12 04 03 b4 08 93 04 50 ed 01 80 1c 44
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2227 | Y: 1165 | Scan Time: 60832 | Contact Count: 1 | Button: 0 | # | #
E: 000215.661588 12 04 03 b3 08 8d 04 a0 ed 01 80 1c 44
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2227 | Y: 1165 | Scan Time: 60922 | Contact Count: 1 | Button: 0 | # | #
E: 000215.669600 12 04 03 b3 08 8d 04 fa ed 01 80 1c 44
# ReportID: 4 / Confidence: 1 | Tip Switch: 1 | # | Contact Id: 0 | X: 2224 | Y: 1152 | Scan Time: 61002 | Contact Count: 1 | Button: 0 | # | #
E: ...
wangjun (biggerchina) wrote : | #149 |
and the dmesg has some output related:
```
[ 138.233653] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
wangjun (biggerchina) wrote : | #150 |
so may be there is some bug with the :direction,
because ,i run echo out > direction,then it start to work.
and may be just like #130 or #133 ,but in drivers related to this touchpad .
wangjun (biggerchina) wrote : | #151 |
i have already added some pr_err to the kernel source ,
then the dmesg say : the touchpad work 1 time,during the system boot.
the dmesg output like :
```
[ 1.766437] in handle_fasteoi_irq for irq:7,starting...
[ 1.766440] in handle_irq_event start for :7
[ 1.766440] in __handle_
[ 1.766441] in __handle_
[ 1.766442] in amd_gpio_
[ 1.766500] in amd_gpio_
[ 1.766502] in amd_gpio_
[ 1.766504] in amd_gpio_
[ 1.766510] in amd_gpio_
[ 1.766512] in amd_gpio_
[ 1.766514] in amd_gpio_
[ 1.766515] in __handle_
[ 1.766516] in __handle_
[ 1.766516] in handle_irq_event end for :7
[ 1.766517] cond_unmask_eoi_irq irq:7
[ 1.766519] in handle_fasteoi_irq for irq:7, end
[ 1.841153] input: MSFT0001:00 04F3:3140 Mouse as /devices/
[ 1.841250] input: MSFT0001:00 04F3:3140 Touchpad as /devices/
[ 1.841312] hid-generic 0018:04F3:
```
and
today ,i run the script:
```
[root@localhost ra]# cd /sys/class/gpio/
[root@localhost gpio]# echo 386 > export
[root@localhost gpio]# cd gpio386
```
then
```
[root@localhost gpio386]# cat direction
in
```
so, there is some bug code set the direction to in ,or missing code to set the direction to out ?
wangjun (biggerchina) wrote : | #152 |
according to the above analysis, error is happen with the direction is : in
i found the function to set the direction of gpio pin to in: amd_gpio_
and add some pr_err and dump_stack() to the function ,
then dmesg out put like :
[ 1.545190] amd_gpio_set_config gpio_chip-
[ 1.545191] amd_gpio_
=======
[ 1.545194] CPU: 12 PID: 264 Comm: kworker/12:4 Not tainted 5.8.13-
[ 1.545194] Hardware name: LENOVO 82B6/LNVNB161216, BIOS EUCN26WW 08/19/2020
[ 1.545197] Workqueue: events deferred_
[ 1.545198] Call Trace:
[ 1.545203] dump_stack+
[ 1.545205] amd_gpio_
[ 1.545206] gpiod_direction
[ 1.545208] acpi_dev_
[ 1.545209] ? i2c_acpi_
[ 1.545210] i2c_acpi_
[ 1.545212] i2c_device_
[ 1.545213] really_
[ 1.545214] driver_
[ 1.545215] ? driver_
[ 1.545216] bus_for_
[ 1.545217] __device_
[ 1.545218] bus_probe_
[ 1.545219] deferred_
[ 1.545220] process_
[ 1.545221] worker_
[ 1.545222] ? process_
[ 1.545223] kthread+0x11b/0x140
[ 1.545224] ? __kthread_
[ 1.545226] ret_from_
=======
then i found the functions
acpi_dev_
in in file : drivers/
and it's comment say:
```
/**
* acpi_dev_
* @adev: pointer to a ACPI device to get IRQ from
* @index: index of GpioInt resource (starting from %0)
*
* If the device has one or more GpioInt resources, this function can be
* used to translate from the GPIO offset in the resource to the Linux IRQ
* number.
*
* The function is idempotent, though each time it runs it will configure GPIO
* pin direction according to the flags in GpioInt resource.
*
* Return: Linux IRQ number (> %0) on success, negative errno on failure.
*/
int acpi_dev_
{
```
each time it runs it will configure GPIO pin direction according to the flags in GpioInt resource.
in it's body ,by call function gpiod_configure
it call the function gpiod_direction
so the direction become to :input or in
the problem may be in two places:
1. lenovo 's default value in bios or dsdt is : input or in,or missing . but on windows ,it's ok,so ,may be not here.
2. in linux kernel,the default value of the type for gpio pin 's direction ,is :input or in
wangjun (biggerchina) wrote : | #153 |
struct acpi_gpio_info {
struct acpi_device *adev;
enum gpiod_flags flags;
bool gpioint;
int pin_config;
int polarity;
int triggering;
unsigned int quirks;
};
enum gpiod_flags {
GPIOD_ASIS = 0,
GPIOD_IN = GPIOD_FLAGS_
GPIOD_OUT_LOW = GPIOD_FLAGS_
GPIOD_OUT_HIGH = GPIOD_FLAGS_
GPIOD_
GPIOD_
GPIOD_
};
#define GPIOD_FLAGS_
#define GPIOD_FLAGS_
#define GPIOD_FLAGS_
#define GPIOD_FLAGS_
#define GPIOD_FLAGS_
at end of the body of function gpiod_configure
/* Process flags */
if (dflags & GPIOD_FLAGS_
ret = gpiod_direction
!!(dflags & GPIOD_FLAGS_
else
ret = gpiod_direction
return ret;
}
if miss config,
the default value is 0, it will be GPIOD_ASIS,
then in gpiod_configure
it will call gpiod_direction
are all the above right ?
Coiby Xu (coiby) wrote : | #154 |
@wangjun
Thank you for sharing the results and investigating this touchpad issue!
One thing confuses me is for the ELAN touchpad, no single interrupt fires when you put finger on the touchpad while for the Synaptics touchpad, you still see interrupts firing but with a very rate of ~7Hz. Judging from the ACPI DSDT tables, different variants of this laptop model share the same GPIO chip. So this difference is unexpected. Understanding the difference may help us why the GPIO interrupt controller is malfunctioning.
Based on your results, I guess the ELAN touchpad somehow de-asserts its interrupt line connected to the GPIO pin. Could you further do the following experiment?
The following C program is to let GPIO controller quickly generate some interrupts then disable the firing of interrupts by toggling pin#130's direction with an time interval (ms). For the Synaptics touchpad, There is no interrupt firing unless internal > 120ms. So somehow the GPIO controller can only generate interrupt when its pin holding the signal for enough time. My hypothesis is the GPIO is not setup properly so it stays in a idle state or it's clock frequency is too small (so I don't think the touchpad issue is caused by mis-configuration of the direction of the pin). I want to see if the result from the ELAN touchpad would also support this hypothesis.
1. Find out the reliable way to trigger an interrupt which is crucial for this experiment.
You told me there will be interrupt firing by simply setting the pin's direction to "out". You can check it's reliable by following the steps
a. Don't put your finger on the touchpad
b. Open a terminal window and run `sudo dmesg -W`
c. In another terminal, "cd /sys/class/
e. "echo out > direction" and see if the following dmesg output will keeping popping out in the previous terminal window
```
[ 138.233653] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
d. Then "echo in > direction", now the dmesg output in step 3 should stop popping out.
f. Repeat step e-d for around 5 times
If you are certain now, use the following C Program,
```c
#include <stdio.h>
#include <stdint.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
void write_to_
{
int fd;
fd = open("/
write(fd, d, size);
close(fd);
}
void toggle_pin130(int interval_ms)
{
struct timespec ts, ts1;
write_
clock_
usleep(
write_
clock_
printf("Interval: %.1f (real), %d (set)\n", (ts1.tv_
}
int main(int argc, char **argv)
{
struct timespec ts;
int interval_ms = atoi(argv[1]);
toggle_
}
```
For me, it seems it's reliable to toggle the value to trigger a interrupt. You can follow similar steps to test it,
a. Don't put your finger on the touchpad
b. Open a terminal window and run `sudo dmesg -W`
c. In another terminal, "cd /sys/class/gp...
wangjun (biggerchina) wrote : | #155 |
@Coiby Xu (coiby)
wait a moment ,i rebuild a clean kernel ,then i test it .
wangjun (biggerchina) wrote : | #156 |
test the script:
```
a. Don't put your finger on the touchpad
b. Open a terminal window and run `sudo dmesg -W`
c. In another terminal, "cd /sys/class/
e. "echo out > direction" and see if the following dmesg output will keeping popping out in the previous terminal window
```
[ 138.233653] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
d. Then "echo in > direction", now the dmesg output in step 3 should stop popping out.
f. Repeat step e-d for around 5 times
```
window 1:
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/gpio/
[root@localhost gpio]# echo 386 > export
[root@localhost gpio]# ls
export gpio386 gpiochip256 unexport
[root@localhost gpio]# cd /sys/class/
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo in > direction
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo in > direction
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo in > direction
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo in > direction
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo in > direction
[root@localhost gpio386]#
```
window 2:
```
[ra@localhost ~]$ sudo dmesg -W
[ 191.989163] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
it's only out one line on first it run echo out > direction.
during test ,no figure touch the touchpad.
wangjun (biggerchina) wrote : | #157 |
and after the test,i rerun : echo in > direction
my touchpad can work.
wangjun (biggerchina) wrote : | #158 |
sorry for #157, `in` should be `out`
and after the test,i rerun : echo out > direction
my touchpad can work.
wangjun (biggerchina) wrote : | #159 |
first c program, has error,
window 1
```
[ra@localhost 1]$ sudo ./test
[sudo] password for ra:
Segmentation fault
[ra@localhost 1]$
```
windows 2
```
[ra@localhost ~]$ sudo dmesg -W
[sudo] password for ra:
[ 545.297119] test[3424]: segfault at 0 ip 00007f679289151c sp 00007ffc4ea14900 error 4 in libc-2.
[ 545.297127] Code: 41 54 45 31 e4 55 53 48 83 ec 28 48 89 74 24 08 85 c9 0f 85 ce 02 00 00 83 ff 01 0f 84 8d 01 00 00 83 ff 24 0f 87 84 01 00 00 <49> 0f be 55 00 49 8b 48 68 4c 89 eb 48 89 d0 f6 44 51 01 20 74 19
```
wangjun (biggerchina) wrote : | #160 |
test for script 2:
```
a. Don't put your finger on the touchpad
b. Open a terminal window and run `sudo dmesg -W`
c. In another terminal, "cd /sys/class/
e. "echo 1 > value" and see if the following dmesg output will keeping popping up in the previous terminal window
```
[ 138.233653] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
d. Then "echo 0 > value", now the dmesg output in step 3 should stop popping up
f. Repeat step e-d for around 5 times
```
test env is :
the direction is default : in,
not changed
and then run the script.
windows 1:
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/
[root@localhost gpio386]# echo 1 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 0 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 1 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 0 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 1 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 0 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 1 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 0 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 1 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]# echo 0 > value
bash: echo: write error: Operation not permitted
[root@localhost gpio386]#
```
windows 2:
```
[ra@localhost ~]$ sudo dmesg -W
[sudo] password for ra:
```
windows 2 has no output.
wangjun (biggerchina) wrote : | #161 |
test for script 2 ,with changed direction to out before test:
```
a. Don't put your finger on the touchpad
b. Open a terminal window and run `sudo dmesg -W`
c. In another terminal, "cd /sys/class/
e. "echo 1 > value" and see if the following dmesg output will keeping popping up in the previous terminal window
```
[ 138.233653] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
d. Then "echo 0 > value", now the dmesg output in step 3 should stop popping up
f. Repeat step e-d for around 5 times
```
test env is :
the direction change to :out
and then run the script.
windows 1:
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/gpio
[root@localhost gpio]# echo 386 >export
[root@localhost gpio]# cd gpio386/
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# echo 1 > value
[root@localhost gpio386]# echo 0 > value
[root@localhost gpio386]# echo 1 > value
[root@localhost gpio386]# echo 0 > value
[root@localhost gpio386]# echo 1 > value
[root@localhost gpio386]# echo 0 > value
[root@localhost gpio386]# echo 1 > value
[root@localhost gpio386]# echo 0 > value
[root@localhost gpio386]# echo 1 > value
[root@localhost gpio386]# echo 0 > value
[root@localhost gpio386]#
```
windows 2:
```
[ra@localhost ~]$ sudo dmesg -W
[sudo] password for ra:
[ 144.238931] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
the output :i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
is out after i run echo out > direction.
wangjun (biggerchina) wrote : | #162 |
test the second c program:
i reboot,
it's means the derection is :in
windows 1:
```
[ra@localhost 2]$ su
Password:
[root@localhost 2]# ls
fire_touchpad_
[root@localhost 2]# ./fire_
Status:: Operation not permitted
Status:: Operation not permitted
Interval: 100514.3 (real), 100 (set)
[root@localhost 2]# ./fire_
Status:: Operation not permitted
Status:: Operation not permitted
Interval: 200497.8 (real), 200 (set)
[root@localhost 2]# ./fire_
Status:: Operation not permitted
Status:: Operation not permitted
Interval: 300504.7 (real), 300 (set)
[root@localhost 2]#
```
and window 1:
```
[ra@localhost ~]$ sudo dmesg -W
[sudo] password for ra:
```
window 1 no output.
wangjun (biggerchina) wrote : | #163 |
sorry , two mistakes in # 162
and window 1: ==> and window 2:
window 1 no output. ==> window 2 no output.
wangjun (biggerchina) wrote : | #164 |
test the second c program with derection changed to :out
window 1:
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/gpio/
[root@localhost gpio]# ls
export gpiochip256 unexport
[root@localhost gpio]# echo 386 > export
[root@localhost gpio]# ls
export gpio386 gpiochip256 unexport
[root@localhost gpio]# cd gpio386/
[root@localhost gpio386]# ls
active_low device direction edge power subsystem uevent value
[root@localhost gpio386]# echo out > direction
[root@localhost gpio386]# cd /src
[root@localhost src]# cd 2
[root@localhost 2]# ls
fire_touchpad_
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -898783.6 (real), 100 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 200220.4 (real), 200 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -698794.8 (real), 300 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 400186.2 (real), 400 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 500237.5 (real), 500 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 600167.4 (real), 600 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -298777.3 (real), 700 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -198787.9 (real), 800 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -98820.3 (real), 900 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 1178.9 (real), 1000 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -897780.3 (real), 1100 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 201147.0 (real), 1200 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -697760.0 (real), 1300 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 401213.1 (real), 1400 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 501211.2 (real), 1500 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -397783.9 (real), 1600 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -297852.3 (real), 1700 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: -797757.7 (real), 1200 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 2219.5 (real), 2000 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 3149.3 (real), 3000 (set)
[root@localhost 2]# ./fire_
Status:: Success
Status:: Success
Interval: 5186.0 (real), 5000 (set)
[root@localhost 2]#
```
window 2:
```
[ra@localhost...
wangjun (biggerchina) wrote : | #165 |
sorry for #159,
the first c program ,i missed the parameter when i run it.
now test it again.
reboot
then
```
[ra@localhost ~]$ su
Password:
[root@localhost ra]# cd /sys/class/gpio
[root@localhost gpio]# ls
export gpiochip256 unexport
[root@localhost gpio]# echo 386 > export
[root@localhost gpio]# ls
export gpio386 gpiochip256 unexport
[root@localhost gpio]# cd gpio386/
[root@localhost gpio386]# ls
active_low device direction edge power subsystem uevent value
[root@localhost gpio386]#
```
the window 1:
```
[root@localhost gpio386]# cd /src
[root@localhost src]# cd 1
[root@localhost 1]# ls
main.c test
[root@localhost 1]# ./test 100
Status:: Success
Status:: Success
Interval: 100507.7 (real), 100 (set)
[root@localhost 1]# ./test 200
Status:: Success
Status:: Success
Interval: -798786.2 (real), 200 (set)
[root@localhost 1]# ./test 300
Status:: Success
Status:: Success
Interval: -698798.6 (real), 300 (set)
[root@localhost 1]# ./test 400
Status:: Success
Status:: Success
Interval: -598783.9 (real), 400 (set)
[root@localhost 1]# ./test 500
Status:: Success
Status:: Success
Interval: -498759.5 (real), 500 (set)
[root@localhost 1]# ./test 600
Status:: Success
Status:: Success
Interval: 600225.3 (real), 600 (set)
[root@localhost 1]# ./test 700
Status:: Success
Status:: Success
Interval: 700192.4 (real), 700 (set)
[root@localhost 1]# ./test 800
Status:: Success
Status:: Success
Interval: -198836.5 (real), 800 (set)
[root@localhost 1]# ./test 900
Status:: Success
Status:: Success
Interval: -98799.5 (real), 900 (set)
[root@localhost 1]# ./test 1000
Status:: Success
Status:: Success
Interval: 1167.8 (real), 1000 (set)
[root@localhost 1]# ./test 1100
Status:: Success
Status:: Success
Interval: 101167.2 (real), 1100 (set)
[root@localhost 1]# ./test 1200
Status:: Success
Status:: Success
Interval: -797821.1 (real), 1200 (set)
[root@localhost 1]# ./test 1300
Status:: Success
Status:: Success
Interval: 301202.4 (real), 1300 (set)
[root@localhost 1]# ./test 1400
Status:: Success
Status:: Success
Interval: 401208.4 (real), 1400 (set)
[root@localhost 1]# ./test 1500
Status:: Success
Status:: Success
Interval: -497844.3 (real), 1500 (set)
[root@localhost 1]# ./test 1600
Status:: Success
Status:: Success
Interval: -397751.6 (real), 1600 (set)
[root@localhost 1]# ./test 1700
Status:: Success
Status:: Success
Interval: 701201.9 (real), 1700 (set)
[root@localhost 1]# ./test 1800
Status:: Success
Status:: Success
Interval: -197768.8 (real), 1800 (set)
[root@localhost 1]# ./test 1900
Status:: Success
Status:: Success
Interval: -97834.9 (real), 1900 (set)
[root@localhost 1]#
```
window 2:
```
[ra@localhost ~]$ sudo dmesg -W
[sudo] password for ra:
[ 416.150765] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
```
the output only once.
that 's all.
wangjun (biggerchina) wrote : | #166 |
one mistake in #165,
```but there's no data``` is some copy/past err.
it's not the output.
Coiby Xu (coiby) wrote : | #167 |
@wangjun Thank you for doing this experiment!
1. When the touchpad works by setting pin's direction=out, you could see lots of "no data" message ("IRQ triggered but there's no data") keeping popping up after moving your finger away from the touchpad, am I correct?
2. When pin's direction=out, does only one new "no data" message or multiple ones appear on the screen when you toggle the pin value?
wangjun (biggerchina) wrote : | #168 |
Coiby Xu (coiby)
>1. When the touchpad works by setting pin's direction=out, you could see lots of "no data" message ("IRQ triggered but there's no data") keeping popping up after moving your finger away from the touchpad, am I correct?
no, wrong. when run : echo out > direction,
dmesg say :
[ 133.854926] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
only one time,
then my touchpad can work.
no keeping popping up after moving your finger away from the touchpad.
it's only one line .
>2. When pin's direction=out, does only one new "no data" message or multiple ones appear on the screen when you toggle the pin value?
when run : echo out > direction,
dmesg show one time no data msg.no more,
then change pin value,to 0 or to 1,
no msg output.
but ,when value = 1, touchpad not work,
when value =0,touchpad can work.
Coiby Xu (coiby) wrote : | #169 |
>>1. When the touchpad works by setting pin's direction=out, you could see lots of "no data" message ("IRQ triggered but there's no data") keeping popping up after moving your finger away from the touchpad, am I correct?
> no, wrong. when run : echo out > direction,
> dmesg say :
> [ 133.854926] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
> only one time,
> then my touchpad can work.
> no keeping popping up after moving your finger away from the touchpad.
This is something quite unexpected. When the finger is away from the toucpad, is there any output from `sudo hid-recorder`? For my laptop, the same HId report will be repeatedly received by hid-recorder because amd_gpio_
wangjun (biggerchina) wrote : | #170 |
window 1 run :
```
[ra@localhost ~]$ sudo hid-recorder
[sudo] password for ra:
Available devices:
/dev/hidraw0: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw1: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/hidraw3: MSFT0001:00 04F3:3140
/dev/hidraw4: ITE Tech. Inc. ITE Device(8910)
Select the device event number [0-4]: 3
# MSFT0001:00 04F3:3140
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x02, // Usage (Mouse) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x09, 0x01, // Usage (Pointer) 8
# 0xa1, 0x00, // Collection (Physical) 10
# 0x05, 0x09, // Usage Page (Button) 12
# 0x19, 0x01, // Usage Minimum (1) 14
# 0x29, 0x02, // Usage Maximum (2) 16
# 0x15, 0x00, // Logical Minimum (0) 18
# 0x25, 0x01, // Logical Maximum (1) 20
# 0x75, 0x01, // Report Size (1) 22
# 0x95, 0x02, // Report Count (2) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x95, 0x06, // Report Count (6) 28
# 0x81, 0x03, // Input (Cnst,Var,Abs) 30
# 0x05, 0x01, // Usage Page (Generic Desktop) 32
# 0x09, 0x30, // Usage (X) 34
# 0x09, 0x31, // Usage (Y) 36
# 0x09, 0x38, // Usage (Wheel) 38
# 0x15, 0x81, // Logical Minimum (-127) 40
# 0x25, 0x7f, // Logical Maximum (127) 42
# 0x75, 0x08, // Report Size (8) 44
# 0x95, 0x03, // Report Count (3) 46
# 0x81, 0x06, // Input (Data,Var,Rel) 48
# 0x05, 0x0c, // Usage Page (Consumer Devices) 50
# 0x0a, 0x38, 0x02, // Usage (AC Pan) 52
# 0x95, 0x01, // Report Count (1) 55
# 0x81, 0x06, // Input (Data,Var,Rel) 57
# 0x75, 0x08, // Report Size (8) 59
# 0x95, 0x03, // Report Count (3) 61
# 0x81, 0x03, // Input (Cnst,Var,Abs) 63
# 0xc0, // End Collection 65
# 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 66
# 0x85, 0x0d, // Report ID (13) 69
# 0x09, 0xc5, // Usage (Vendor Usage 0xc5) 71
# 0x15, 0x00, // Logical Minimum (0) 73
# 0x26, 0xff...
Coiby Xu (coiby) wrote : | #171 |
Hi all,
Can you test the follow patch works for your touchpad? Disabling glitch filter seems to eliminate the root cause.
$ git diff
diff --git a/drivers/
index 9a760f5cd7ed.
--- a/drivers/
+++ b/drivers/
@@ -463,7 +463,7 @@ static int amd_gpio_
- pin_reg |= DB_TYPE_
+ /** pin_reg |= DB_TYPE_
bre
wangjun (biggerchina) wrote : | #172 |
@Coiby Xu (coiby)
you are the best!
many thanks to you!!!
#171 work for 04f3:3140 elan touchpad!
env:
fedora 33 kernel 5.8.13
lenovo legion R7000 (another name :Lenovo Legion-5 15ARH05)
pointer move ok,
two finger scroll ok!
Azizkhan (injkgz) wrote : | #173 |
@wangjun
How did you compiled old patch with kernel 5.8.13?
wangjun (biggerchina) wrote : | #174 |
@Azizkhan (injkgz)
read patch file ,find the right line,then manual patch ,do not use tool.
PD (pd1986) wrote : | #175 |
@Azizkhan
check the patch file and your kernel file if the content for each line is consistent. If it is, you could copy patch file to kernel folder and run command "patch -p1 < patchfile"
@wangjun (biggerchina), @Coiby Xu (coiby)
Could you please summarize what you tested and did for patch? I am completely lost. :D
Helmut Stult (helmut-stult) wrote : | #176 |
@Coiby Xu (coiby)
#171 works for under Manjaro Linux and Kernel 5.8.13 too.
Piotr Tomaszewski (nfm886) wrote : | #177 |
Hey @Helmut Stult (helmut-stult)
I compiled kernel from there: https:/
but unfortunately touchpad does not works.
Linux Lenovo 5.8.13-4-MANJARO #1 SMP PREEMPT Tue Oct 6 19:05:24 CEST 2020 x86_64 GNU/Linux
↳ MSFT0001:00 04F3:3140 Touchpad id=17 [slave pointer (2)]
is something what i should do more to make it works?
Azizkhan (injkgz) wrote : | #178 |
Can anyone provide debian packages for compiled kernel 5.8.13 with patch?
Helmut Stult (helmut-stult) wrote : | #179 |
- Patch for Manjaro Kernel 5.8.13 Edit (582 bytes, text/plain)
@Piotr Tomaszewski (nfm886)
The patch is not included in the kernel, as other touchpads will no longer work.
You can use the attached patch and build your own kernel. It works with ELAN-Touchpad MSFT0001:00 04F3:3140
Helmut Stult (helmut-stult) wrote : | #180 |
Piotr Tomaszewski (nfm886) wrote : | #181 |
Won't build since there is no 0303-pinctrl-
Helmut Stult (helmut-stult) wrote : | #182 |
See #179 ;-)
Benjamin Rogoll (jewlez) wrote : | #183 |
Hey Guys, didnt read everything, just for me the simplest version to fix stuff on Manjaro is to download the 5.8.13-1 Kernel from the Manjaro gitlab and install xf86-input-
Azizkhan (injkgz) wrote : | #184 |
Is it able to build Ubuntu 5.8.13 kernel?
I mean from kernel.org
Piotr Tomaszewski (nfm886) wrote : | #185 |
@Helmut Stult (helmut-stult), oh right. Did not see that post. Now everything works like a charm. Even touchpad gestures works :) Thanks guys, you are awesome!
Helmut Stult (helmut-stult) wrote : | #186 |
- pinctrl-intel.c Edit (41.7 KiB, text/x-csrc)
@Coiby Xu (coiby)
Apparently there was a similar problem with the 4.19 kernel, but with the Intel CPU, which was then solved with the following patch.
https:/
Now the two lines are included (for example) in kernel 5.8 in /drivers/
/* Clear interrupt status first to avoid unexpected interrupt */
writel(
Maybe this information will help you.
Azizkhan (injkgz) wrote : | #187 |
After trying building kernel 5.8.14 with patches getting error:
LD [M] drivers/
GEN .version
CHK include/
LD vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.
GEN modules.builtin
BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_
make[3]: *** [Makefile:1135: vmlinux] Error 1
make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/
make: *** [Makefile:1491: deb-pkg] Error 2
MeMoS (athov) wrote : | #188 |
Managed to make the touchpad work but gestures are not working.
Got the PKGBUILD for 5.8.14 from the gitlab page and added the patch tried xf86-input-
Coiby Xu (coiby) wrote : | #189 |
- to build a stand-alone module Edit (28.9 KiB, application/zip)
@injkgz
And also for those who have difficult building the custom kernel which is not necessary, you can build a single pinctrl-amd.ko.
1. After you download the attached file which contains fixed pinctrl-amd.c and other heades for building, run make to build this module,
$ make
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory '~/kernel/
CC [M] ~/kernel/
AR ~/kernel/
MODPOST ~/kernel/
CC [M] ~/kernel/
LD [M] ~/kernel/
make[1]: Leaving directory '/home/
2 Copy pinctrl-amd.ko to override the current one whose path can be found by modinfo
$ modinfo pinctrl-amd
filename: /lib/modules/
$ cp pinctrl-amd.ko /lib/modules/
3. reboot the system and now you are expected to see a working touchpad
;
Coiby Xu (coiby) wrote : | #190 |
@wangjun (biggerchina)
Thank you for sharing the result in #170.
I'm surprised to know that with pin's direction set to "out", no new "no data" message shows when putting the touchpad aside.
Can you share the interrupt counter for me when you don't use the touchpad? For my laptop, the number of interrupts will keep increasing rapidly after setting the pin's direction to "out". Can you confirm it for your laptop?
$ cat /proc/interrupts |grep pinctrl
5: 7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 IR-IO-APIC 7-fasteoi
# increasing from 3 to 11839
$ cat /proc/interrupts |grep pinctrl
5: 7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11839 IR-IO-APIC 7-fasteoi
Coiby Xu (coiby) wrote : | #191 |
@PD (pd1986)
> @wangjun (biggerchina), @Coiby Xu (coiby)
> Could you please summarize what you tested and did for patch? I am completely lost. :D
Basically, I want wangjun to find out the minimum time for manually triggering a interrupt for the ELAN touchpad. You may be also check https:/
Coiby Xu (coiby) wrote : | #192 |
@Helmut Stult (helmut-stult)
> @Coiby Xu (coiby)
> Apparently there was a similar problem with the 4.19 kernel, but with the Intel CPU, which was then solved with the following patch.
> https:/
> Now the two lines are included (for example) in kernel 5.8 in /drivers/
> /* Clear interrupt status first to avoid unexpected interrupt */
Thank you for sharing this info! I think we've found the root cause and the fix is to disable glitch filter. What needs to be done is to find a way to do it without affecting existing touchpads. For the details, you can check the disccussion in this thread https:/
wangjun (biggerchina) wrote : | #193 |
@Coiby Xu (coiby)
test to your #190;
test env:
1.no use the disable glitch filter patch.
2.enabled gpio sysfs
the result:
1.before run : echo out > direction
```
[ra@localhost ~]$ cat /proc/interrupts |grep pinctrl
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 IR-IO-APIC 7-fasteoi pinctrl_amd
```
2.after run : echo out > direction
```
[ra@localhost ~]$ cat /proc/interrupts |grep pinctrl
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3495 IR-IO-APIC 7-fasteoi pinctrl_amd
[ra@localhost ~]$ cat /proc/interrupts |grep pinctrl
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6406 IR-IO-APIC 7-fasteoi pinctrl_amd
[ra@localhost ~]$ cat /proc/interrupts |grep pinctrl
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7948 IR-IO-APIC 7-fasteoi pinctrl_amd
[ra@localhost ~]$ cat /proc/interrupts |grep pinctrl
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9317 IR-IO-APIC 7-fasteoi pinctrl_amd
[ra@localhost ~]$
```
the interrupts count is increasing fastly ,same with your laptop.
dmesg say only one time :
[ 1032.737176] i2c_hid i2c-MSFT0001:00: i2c_hid_get_input: IRQ triggered but there's no data
Coiby Xu (coiby) wrote : | #194 |
@wangjun (biggerchina)
Thank you for sharing the result! Then we can be completely sure glitch filter is the sole root cause.
PD (pd1986) wrote : | #195 |
I am not misunderstanding, does it mean that only patch for pinctrl-amd.c without changing i2c-hid-core.c should solve the problem?
PD (pd1986) wrote : | #196 |
If I am not misunderstanding...
Piotr Tomaszewski (nfm886) wrote : | #197 |
Hey Coiby Xu (coiby),
That's does not works. Manjaro Linux 5.8.11-1-MANJARO x86_64 20.1.1 Mikah
and make ending up with error 2
translated error is
make [1]: *** No objects found and no makefile found. Stop.
Coiby Xu (coiby) wrote : | #198 |
@PD (pd1986)
> If I am not misunderstanding, does it mean that only patch for pinctrl-amd.c without changing i2c-hid-core.c should solve the problem?
Yes, you are right! Only commenting out one line of code in pinctrl-amd.c would be sufficient for fixing this laptop model. But for now we are not sure how will it affect other touchpads, so only use it for this laptop.
Coiby Xu (coiby) wrote : | #199 |
@Piotr Tomaszewski (nfm886)
> Hey Coiby Xu (coiby),
> That's does not works. Manjaro Linux 5.8.11-1-MANJARO x86_64 20.1.1 Mikah
> and make ending up with error 2
> translated error is
> make [1]: *** No objects found and no makefile found. Stop
You should run make in the folder where you see "Makefile". After unzipping the downloaded archive in #189, you should run make after going into the child folder, i.e., "cd standone_
Piotr Tomaszewski (nfm886) wrote : | #200 |
@Coiby Xu (coiby),Thanks for reply. I'm actually trying to make it from the directory standone_
~/Pobrane/
drwxr-xr-x - piotr 9 paź 0:30 .
drwxr-xr-x - piotr 9 paź 22:26 ..
.rw-r--r-- 220 piotr 9 paź 0:19 .built-in.a.cmd
.rw-r--r-- 292 piotr 9 paź 0:21 .Module.symvers.cmd
.rw-r--r-- 249 piotr 9 paź 0:21 .modules.order.cmd
.rw-r--r-- 358 piotr 9 paź 0:21 .pinctrl-amd.ko.cmd
.rw-r--r-- 234 piotr 9 paź 0:21 .pinctrl-
.rw-r--r-- 30k piotr 9 paź 0:21 .pinctrl-
.rw-r--r-- 46k piotr 9 paź 0:21 .pinctrl-amd.o.cmd
.rw-r--r-- 8,1k piotr 9 paź 0:20 core.h
.rw-r--r-- 115 piotr 9 paź 0:19 Makefile
.rw-r--r-- 0 piotr 9 paź 0:21 Module.symvers
.rw-r--r-- 69 piotr 9 paź 0:21 modules.order
.rw-r--r-- 26k piotr 9 paź 0:29 pinctrl-amd.c
.rw-r--r-- 6,7k piotr 9 paź 0:21 pinctrl-amd.h
.rw-r--r-- 1,9k piotr 9 paź 0:21 pinctrl-amd.mod.c
.rw-r--r-- 1,7k piotr 9 paź 0:20 pinctrl-utils.h
~/Pobrane/
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Wejście do katalogu '/usr/lib/
make[1]: *** Nie podano obiektów i nie znaleziono makefile. Stop.
make[1]: Opuszczenie katalogu '/usr/lib/
make: *** [Makefile:8: kbuild] Błąd 2
~/Pobrane/
Sorry for non-english output. I have no idea what is wrong.
Piotr Tomaszewski (nfm886) wrote : | #201 |
@Coiby Xu (coiby), Got it working! Installing linux58-headers solved problem. Thanks a lot for your hard work!
PD (pd1986) wrote : | #202 |
@Coiby Xu (coiby)
Thanks a log for your contribution
I tried to use the way of "echo out > gpio386/direction" to fix the problem without patching the kernel, but I found Touchpad click sensitivity is less than patching the kernel.
Piotr Tomaszewski (nfm886) wrote : | #203 |
Hey @Coiby Xu (coiby),
Last question from me :)
How can I use #189 with PopOS? After "make" when I run "modinfo" I got output like that:
name: pinctrl_amd
filename: (builtin)
description: AMD GPIO pinctrl driver
author: Ken Xue <email address hidden>, Jeff Wu <email address hidden>
license: GPL v2
file: drivers/
How can I find file to copy?
Coiby Xu (coiby) wrote : Re: [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05 | #204 |
On Sat, Oct 10, 2020 at 11:38:27AM -0000, PD wrote:
>@Coiby Xu (coiby)
>Thanks a log for your contribution
>
It's my pleasure!
>I tried to use the way of "echo out > gpio386/direction" to fix the
>problem without patching the kernel, but I found Touchpad click
>sensitivity is less than patching the kernel.
You shouldn't use "echo out > gpio386/direction" to fix the touchpad. It
will make the GPIO chip keep firing interrupts even you don't use the
touchpad as you can seen from the result by wangjun in #193.
Coiby Xu (coiby) wrote : Re: [Bug 1887190] #203 15ARH05 | #205 |
On Sat, Oct 10, 2020 at 12:45:58PM -0000, Piotr Tomaszewski wrote:
>Hey @Coiby Xu (coiby),
>Last question from me :)
>How can I use #189 with PopOS? After "make" when I run "modinfo" I got output like that:
>
>name: pinctrl_amd
>filename: (builtin)
>description: AMD GPIO pinctrl driver
>author: Ken Xue <email address hidden>, Jeff Wu <email address hidden>
>license: GPL v2
>file: drivers/
>
>How can I find file to copy?
>
For PopOS, pinctrl-amd is built into the kernel. So you have to re-build
the whole kernel with patched pinctrl-amd.
Paulinski (mail-izy) wrote : | #206 |
Is there any chance that his patch will be part of the official kernel build soon?
Coiby Xu (coiby) wrote : Re: [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05 | #207 |
On Sun, Oct 11, 2020 at 07:07:37PM -0000, Paulinski wrote:
>Is there any chance that his patch will be part of the official kernel
>build soon?
I have yet to submit the patch of fixing the root cause. But I've
submitted a patch of adding polling mode to the i2c-hid module to
https:/
After the patch reaches end users like you, you can add
i2c-hid.
touchpad work.
Azizkhan (injkgz) wrote : | #208 |
> i2c-hid.
touchpad work.
you mean that I can just flash 5.9 kernel and then add to grub this line:
GRUB_CMDLINE_
jbuncle (jbuncle) wrote : | #209 |
I had the same issue (with both Ubuntu 20.04 and 20.10). It does seem to be resolved after installing a 5.9 Kernel with the above patch applied (from @coiby https:/
I have scripted the process I used (download, patch, compile and install the kernel) for anyone else that's eager to get a working Touchpad on a Ubuntu 20 installation on Lenovo Legion 5 (Obviously there may be unwanted side effects of doing this). This will probably require Secure Boot to be disabled in the BIOS.
See GitHub Gist here: https:/
Command for convenience: `bash <(curl https:/
Note the need for updating GRUB_CMDLINE_
(First time I've built the Linux Kernel myself or even commented on here!)
Thanks to @Coiby Xu (coiby)
Azizkhan (injkgz) wrote : | #210 |
@jbuncle (jbuncle)
Yo man, in your script you don't do configs, so after installation user gets all drivers that's included in kernel modules (~6Gb).
Coiby Xu (coiby) wrote : | #211 |
- i2c-hid_standalone.zip Edit (14.0 KiB, application/zip)
For those who want to try the polling mode i2c-hid, here are the instructions to build a single i2c-hid module without building a whole kernel or downloading the whole kernel source code,
1. After you download the attached file which contains patched i2c-hid-core.c and other headers for building, run make to build this module,
$ make
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory '/usr/lib/
AR /home/coiby/
CC [M] /home/coiby/
CC [M] /home/coiby/
LD [M] /home/coiby/
MODPOST /home/coiby/
CC [M] /home/coiby/
LD [M] /home/coiby/
make[1]: Leaving directory '/usr/lib/
2. Copy i2c-hid.ko to override the current one whose path can be found by modinfo
$ modinfo i2c-hid.ko
filename: /lib/modules/
$ cp i2c-hid.ko /lib/modules/
3. run depmod
$ sudo depmod
4. reboot the system and play with your touchpad
Coiby Xu (coiby) wrote : | #212 |
Additional notes to #211:
Actually rebooting your machine is not necessary for simply testing the module. You can remove the old kernel first,
$ sudo rmmod i2c-hid
and then insert the new module with the parameter "polling_mode=1"
$ sudo insmod i2c-hid.ko polling_mode=1
For have persistent effect, you need to add i2c-hid.
touchpad work after installing this new i2c-hid module following the instructions in #211.
Coiby Xu (coiby) wrote : | #213 |
On Tue, Oct 13, 2020 at 05:27:44AM -0000, Azizkhan wrote:
>> i2c-hid.
>touchpad work.
>you mean that I can just flash 5.9 kernel and then add to grub this line:
>GRUB_CMDLINE_
This patch hasn't been included in Linux 5.9. And I'm not sure when this patch will be accepted by the subsystem maintainer and eventually reach your distribution. But you can following the instructions in #211 and #212 to try this solution.
Kai-Heng Feng (kaihengfeng) wrote : | #214 |
Coiby, can you please work on a DMI based workaround in gpiolib-acpi.c? It'll have higher chance to get merged.
Coiby Xu (coiby) wrote : | #215 |
On Tue, Oct 13, 2020 at 01:44:31PM -0000, jbuncle wrote:
>I had the same issue (with both Ubuntu 20.04 and 20.10). It does seem to
>be resolved after installing a 5.9 Kernel with the above patch applied
>(from @coiby https:/
Glad it works for you. You may want to reply to that email with the
following content to make the patch accepted by the maintainer faster,
Tested-by: Your_name <email address hidden>
The receiver should be <email address hidden>.
And put the following addresses in the CC filed,
Jiri Kosina <email address hidden>
Benjamin Tissoires <email address hidden>
<email address hidden>
You should also put set the reply-to header to <email address hidden> in your client client so the message will show in the same thread. And make sure use the plain text format.
If you don't want go through these hassles, you may send your name to me by email so I'll do it on behalf of you.
>
>I have scripted the process I used (download, patch, compile and install
>the kernel) for anyone else that's eager to get a working Touchpad on a
>Ubuntu 20 installation on Lenovo Legion 5 (Obviously there may be
>unwanted side effects of doing this). This will probably require Secure
>Boot to be disabled in the BIOS.
>
>See GitHub Gist here: https:/
>Command for convenience: `bash <(curl https:/
>
>Note the need for updating GRUB_CMDLINE_
>hid.polling_mode=1
>
>(First time I've built the Linux Kernel myself or even commented on
>here!)
Congratulations!
>Thanks to @Coiby Xu (coiby)
You are welcome!
Coiby Xu (coiby) wrote : | #216 |
On Thu, Oct 15, 2020 at 05:37:46AM -0000, Kai-Heng Feng wrote:
>Coiby, can you please work on a DMI based workaround in gpiolib-acpi.c?
>It'll have higher chance to get merged.
>
Thank you for the suggestion! Linus Walleij also suggested introducing
a new quirk [1]. Although my main effort is on patching pinctrl-amd.c
without affecting other touchpad together with Hans de Goede [1], I
have spent some time on understanding gpiolib-acpi.c. For now my
conclusion is there is no way to bypass pinctrl-amd by introducing
a new quirk.
[1] https:/
[2] https:/
Coiby Xu (coiby) wrote : | #217 |
- i2c-hid_standalone.zip Edit (23.6 KiB, application/zip)
Fix on #211
Another header file hid-ids.h is required to build i2c-hid module. Attached is the updated zip file.
Helmut Stult (helmut-stult) wrote : | #218 |
@Coiby Xu (coiby)
We have received feedback in our forum that the touchpad no longer works after a resuming from suspend.
I've attached the link - maybe you can take a look at it.
https:/
Lu Do (tchio.ludo) wrote : | #219 |
Just try this morning the #210, it's working well on ubuntu 20.04 !
Thanks @Coiby Xu (coiby)
I also confirmed the suspend will break the touchpad
Coiby Xu (coiby) wrote : | #220 |
On Thu, Oct 15, 2020 at 04:11:49PM -0000, Helmut Stult wrote:
>@Coiby Xu (coiby)
>
>We have received feedback in our forum that the touchpad no longer works
>after a resuming from suspend.
>
>I've attached the link - maybe you can take a look at it.
>
>https:/
>resuming-
Thanks for the reporting! I've sent a new version to you.
Coiby Xu (coiby) wrote : | #221 |
On Thu, Oct 15, 2020 at 04:27:05PM -0000, Lu Do wrote:
>Just try this morning the #210, it's working well on ubuntu 20.04 !
>Thanks @Coiby Xu (coiby)
>
>I also confirmed the suspend will break the touchpad
Thank you for testing it! I've sent a new patch to
https:/
But you may not need it since the old patch will only
break the touchpad with the polling mode disabled.
Ivan Zakharyaschev (imz) wrote : | #222 |
I had problems (the touchpad not working and the suspend not working) with ELAN0001:00 04F3:3140 under linux-image-
Ivan Zakharyaschev (imz) wrote : | #223 |
They also mentioned the suspend problem at https:/
Coiby Xu (coiby) wrote : | #224 |
On Sat, Oct 17, 2020 at 03:23:05PM -0000, Ivan Zakharyaschev wrote:
>I had problems (the touchpad not working and the suspend not working)
>with ELAN0001:00 04F3:3140 under linux-image-
>Ubuntu, but they are gone if I manually unbind the device from
>elants_i2c driver and bind it to i2c_hid --
>https:/
>
Thank you for sharing the info! Do you use the same laptop model?
If that's the case, it would surprise me because the root cause
for this laptop model has been found.
Benjamin Rogoll (jewlez) wrote : | #225 |
Hey there guy, can anyone tell me what im doing wrong with the patch provided in #217. The tutorial in #211 doesnt work for me.
p_$$/tmp.o; mkdir -p /home/benjamin/
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `make -f ./scripts/
make: *** [Makefile:1752: /home/benjamin/
make: Leaving directory '/usr/lib/
help much appreciated
Coiby Xu (coiby) wrote : | #226 |
On Tue, Oct 20, 2020 at 09:28:54AM -0000, Benjamin Rogoll wrote:
>Hey there guy, can anyone tell me what im doing wrong with the patch
>provided in #217. The tutorial in #211 doesnt work for me.
>
>p_$$/tmp.o; mkdir -p /home/benjamin/
>/bin/sh: -c: line 0: syntax error near unexpected token `('
>/bin/sh: -c: line 0: `make -f ./scripts/
>make: *** [Makefile:1752: /home/benjamin/
>make: Leaving directory '/usr/lib/
>
>help much appreciated
>
Can you run "make V=1" to have more verbose output?
Btw, I would suggest you to try #189 instead because polling could
consume a little more power than interrupting.
Francesco Guarneri (ffrisk) wrote : | #227 |
Hi! Managed to reproduce the steps described in #211 (using the updated archive provided in #217) and #212. The touchpad seems to be working after running
$ sudo rmmod i2c-hid
$ sudo insmod full-path/
I need to provide the full path to the i2c-hid.ko module, otherwise the system returns "could not load module "i2c-hid.ko: No such file or directory"; not sure if this is already an issue.
However, I am not sure how to add the boot parameter to GRUB. I followed this (https:/
i2c-hid.
full-path/
full-path/
but neither seems to be working. Am i doing something wrong? Using Ubuntu 20.04.1 with kernel 5.8.16. Also, total noob and first time writing here, so hopefully not causing issues.
Von (straeker) wrote : | #228 |
Hi Francesco
I have the same laptop with Ubuntu installed and I am using #211 patch too. It works for me after running:
$ sudo rmmod i2c_hid
$ sudo insmod /path/to/i2c-hid.ko polling_mode=1
$ sudo cp /path/to/i2c-hid.ko /lib/modules/
$ sudo depmod
then append i2c_hid.
use a text editor to open /etc/default/grub as root, then change the line
GRUB_
GRUB_
,finally save the changes
then run:
$ sudo update-grub2
$ sudo update-initramfs -u
reboot the laptop and everything shall be fine
Francesco Guarneri (ffrisk) wrote : | #229 |
> sudo update-initramfs -u
This is what I was missing. Thank you so much!
PEDRO PORTO BUARQUE DE GUSMAO (pedropgusmao) wrote : | #230 |
Hi,
Can I do this with Secure Boot on?
Christian (chris-svn) wrote : | #231 |
@Coiby Xu (coiby)
Thank you very much for the patch in #189. It works like a charm.
@Piotr Tomaszewski (nfm886)
Thanks for posting your solution in #201. I was in the exact same situation and without it, I would probably still be wondering why it didnt work for me.
Piotr Tomaszewski (nfm886) wrote : | #232 |
@Christian (chris-svn),
Glad to help :)
@Coiby Xu (coiby),
Hey Sir, is there easy way to apply this patch on Ubuntu/PopOS distro without build whole kernel?
eea (eakb) wrote : | #233 |
Thank you @Coiby Xu (coiby) and Von (straeker) and everyone else for your work. The standalone patch #217 is working perfectly on a fresh Ubuntu 20.10, installed with secure boot (5.8.0-25-generic). No suspend problems.
@PEDRO PORTO BUARQUE DE GUSMAO (pedropgusmao), Piotr Tomaszewski (nfm886): To make the module work under secure boot, the module needs to be signed first before inserting. Just skip the signing if you don't use secure boot but don't want to rebuild the whole kernel:
- Download the standalone module from #217
- Install "build-essential" package (if it is missing) which is needed to build the module:
$ sudo apt install build-essential
- "make" the module as in #211
- Sign the module before inserting:
$ kmodsign sha512 \
/var/
/var/
i2c-hid.ko
- Insert and copy the module and update grub and initramfs as in #228
Von (straeker) wrote : | #234 |
The standalone patch #217 is working for MSFT0001:00 04F3:3140 but isn't working perfectly for MSFT0001:00 06CB:7F28. The MSFT0001:00 06CB:7F28 touchpad frequently locks into scroll mode when using multitouch gestures.
Coiby Xu (coiby) wrote : | #235 |
On Tue, Oct 27, 2020 at 07:53:05PM -0000, Von wrote:
>The standalone patch #217 is working for MSFT0001:00 04F3:3140 but isn't
>working perfectly for MSFT0001:00 06CB:7F28. The MSFT0001:00 06CB:7F28
>touchpad frequently locks into scroll mode when using multitouch
>gestures.
Thank you for reporting this problem. The latest version [1] allows
you to adjust the polling interval. Will decreasing
polling_
$ echo 1000 > /sys/module/
# you may change polling_
$ echo 2 > /sys/module/
boudicca (shazh) wrote : | #236 |
@Coilby Xu, all good on fresh Ubuntu 20.10 5.8-26 Generic and Manjaro gnome 20.2-Pre4 Testing.
For Polling method steps
1. Download file from Message #217 file
2. Extract to folder, enter folder and subfolder.
3. run make (needs apt-get make gcc linux-headers #211 instuctions
4. follow #228 for ubuntu, copy replace existing ko file, rmmod insmod then depmod, change Grub2 for Ubuntu
5. reboot Job done. if want test to see,before 4. Follow #212
Thanks Coilby Xu and others.... Simples!
boudicca (shazh) wrote : | #237 |
edit: #236 was for 3140 touchpad
Von (straeker) wrote : | #238 |
@Coiby Xu (coiby)
> Will decreasing
polling_
> $echo 1000 > /sys/module/
Yes, I installed the latest version from Github, and decreasing polling_
Coiby Xu (coiby) wrote : [PATCH 4/4] pinctrl: amd: remove debounce filter setting in irq type setting | #239 |
Debounce filter setting should be independent from irq type setting
because according to the ACPI specs, there are separate arguments for
specifying debounce timeout and irq type in GpioIo and GpioInt.
This will fix broken touchpads for Lenovo Legion-5 AMD gaming laptops
including 15ARH05 (R7000) and R7000P whose BIOS set the debounce timeout
to 124.8ms which led to kernel receiving only ~7 HID reports per second.
Cc: Hans de Goede <email address hidden>
Cc: Andy Shevchenko <email address hidden>
Cc: <email address hidden>
BugLink: https:/
Message-Id: <email address hidden>
Signed-off-by: Coiby Xu <email address hidden>
---
drivers/
1 file changed, 7 deletions(-)
diff --git a/drivers/
index 524d55546b61.
--- a/drivers/
+++ b/drivers/
@@ -468,7 +468,6 @@ static int amd_gpio_
pin_reg &= ~BIT(LEVEL_
pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF);
pin_reg |= ACTIVE_HIGH << ACTIVE_LEVEL_OFF;
- pin_reg |= DB_TYPE_
irq_
break;
@@ -476,7 +475,6 @@ static int amd_gpio_
pin_reg &= ~BIT(LEVEL_
pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF);
pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF;
- pin_reg |= DB_TYPE_
irq_
break;
@@ -484,7 +482,6 @@ static int amd_gpio_
pin_reg &= ~BIT(LEVEL_
pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF);
pin_reg |= BOTH_EADGE << ACTIVE_LEVEL_OFF;
- pin_reg |= DB_TYPE_
irq_
break;
@@ -492,8 +489,6 @@ static int amd_gpio_
pin_reg |= LEVEL_TRIGGER << LEVEL_TRIG_OFF;
pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF);
pin_reg |= ACTIVE_HIGH << ACTIVE_LEVEL_OFF;
- pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF);
- pin_reg |= DB_TYPE_
irq_
break;
@@ -501,8 +496,6 @@ static int amd_gpio_
pin_reg |= LEVEL_TRIGGER << LEVEL_TRIG_OFF;
pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF);
pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF;
- pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF);
- pin_reg |= DB_TYPE_
irq_
break;
--
2.28.0
Andy Shevchenko (andy.shevchenko) wrote : | #240 |
On Wed, Nov 4, 2020 at 6:05 PM Coiby Xu <email address hidden> wrote:
>
> Debounce filter setting should be independent from irq type setting
> because according to the ACPI specs, there are separate arguments for
> specifying debounce timeout and irq type in GpioIo and GpioInt.
>
> This will fix broken touchpads for Lenovo Legion-5 AMD gaming laptops
> including 15ARH05 (R7000) and R7000P whose BIOS set the debounce timeout
> to 124.8ms which led to kernel receiving only ~7 HID reports per second.
to the kernel
> Cc: Hans de Goede <email address hidden>
> Cc: Andy Shevchenko <email address hidden>
> Cc: <email address hidden>
> BugLink: https:/
> Message-Id: <email address hidden>
Link: https:/
--
With Best Regards,
Andy Shevchenko
Coiby Xu (coiby) wrote : | #241 |
On Wed, Nov 04, 2020 at 10:42:38PM +0200, Andy Shevchenko wrote:
>On Wed, Nov 4, 2020 at 6:05 PM Coiby Xu <email address hidden> wrote:
>>
>> Debounce filter setting should be independent from irq type setting
>> because according to the ACPI specs, there are separate arguments for
>> specifying debounce timeout and irq type in GpioIo and GpioInt.
>>
>> This will fix broken touchpads for Lenovo Legion-5 AMD gaming laptops
>> including 15ARH05 (R7000) and R7000P whose BIOS set the debounce timeout
>> to 124.8ms which led to kernel receiving only ~7 HID reports per second.
>
>to the kernel
Thank you for correcting my grammar mistakes!
>
>> Cc: Hans de Goede <email address hidden>
>> Cc: Andy Shevchenko <email address hidden>
>> Cc: <email address hidden>
>> BugLink: https:/
>
>> Message-Id: <email address hidden>
>
>Link: https:/
>
>--
>With Best Regards,
>Andy Shevchenko
--
Best regards,
Coiby
Mike Boruta (maridius) wrote : | #242 |
Hello again, I manually applied both the patches present in #239 and in #171 to kernel 5.4.0-52 without success (touch pad still does not work), however I applied the patch listed on #109 with success. My device is a MSFT0001:00 04F3:3186, unlike the 3140 most users have. Have any other users with a 3186 experienced success with the pinctrl-amd patches?
I'm very happy with the polling patch so far, but I would like to have the core issue fixed if possible.
Coiby Xu (coiby) wrote : Re: [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05 | #243 |
On Wed, Nov 04, 2020 at 12:12:24PM -0000, Von wrote:
>@Coiby Xu (coiby)
>
>> Will decreasing
>polling_
>> $echo 1000 > /sys/module/
>
>Yes, I installed the latest version from Github, and decreasing
>polling_
I notice that if I use xf86-input-
this problem. So another solution is to use xf86-input-
Coiby Xu (coiby) wrote : | #244 |
On Sun, Nov 08, 2020 at 03:03:03AM -0000, Mike Boruta wrote:
>Hello again, I manually applied both the patches present in #239 and in
>#171 to kernel 5.4.0-52 without success (touch pad still does not work),
>however I applied the patch listed on #109 with success. My device is a
>MSFT0001:00 04F3:3186, unlike the 3140 most users have. Have any other
>users with a 3186 experienced success with the pinctrl-amd patches?
>
>I'm very happy with the polling patch so far, but I would like to have
>the core issue fixed if possible.
Hi Mike! Can you paste the output of "sudo cat /sys/kernel/
also attach your ACPI DSDT table which can be obtained by following the
instructions in #109?
Mike Boruta (maridius) wrote : | #245 |
- gpio-config-and-dsdt.tar.xz Edit (23.5 KiB, application/x-tar)
Definitely! The attached output was compiled from 5.4.0-52 with the patch listed in 171.
Baq Domalaq (baq) wrote : | #246 |
Hi everyone! I have the same problem with my touchpad on Lenovo Ideapad Gaming 3 15ARH05 under Pop!_OS.
My touchpad device number is slightly different:
MSFT0001:00 06CB:CE2D
I've applied a patch in comment #179 (I assumed that's the most fitting solution for me) and it works now! Thank you people for trying to fix this.
Anyway the comments now are very long and confusing. And I'm not sure if I used the best solution. So if anyone can point to something better, let me know.
Also let me know how to help with pushing this to official kernel. I've posted an issue to Pop OS Github repo. I'll also add a comment about my workarounds there.
Have a nice day!
Azizkhan (injkgz) wrote : | #247 |
Hi all!
@Coiby Xu (coiby)
When your patch will be applied to mainline kernel? When we can just update our kernels and do nothing to fix touchpad?
Coiby Xu (coiby) wrote : | #248 |
On Sun, Nov 08, 2020 at 01:14:48PM -0000, Mike Boruta wrote:
>Definitely! The attached output was compiled from 5.4.0-52 with the
>patch listed in 171.
#171 should fix your touchpad. According to your shared gpio-config,
that patch didn't take effect. So I guess you are still using the old
pinctrl-amd module.
Coiby Xu (coiby) wrote : | #249 |
On Sun, Nov 08, 2020 at 04:33:43PM -0000, Baq Domalaq wrote:
>Hi everyone! I have the same problem with my touchpad on Lenovo Ideapad
>Gaming 3 15ARH05 under Pop!_OS.
>
>My touchpad device number is slightly different:
>MSFT0001:00 06CB:CE2D
>
>I've applied a patch in comment #179 (I assumed that's the most fitting
>solution for me) and it works now! Thank you people for trying to fix
>this.
>
>Anyway the comments now are very long and confusing. And I'm not sure if
>I used the best solution. So if anyone can point to something better,
>let me know.
>
The touchpads on Legion-5 could be saved by either polling (#179)
or interrupt (#171). I've submitted both patches upstream for these
two methods. After getting reviewed by the kernel developer community,
I will keep improving them until these patches get accepted by the
maintainer. I would suggest you try #171 before the patches getting
merged into the mainline kernel. If it doesn't work, you can send me
your ACPI DSDT table.
>Also let me know how to help with pushing this to official kernel. I've
>posted an issue to Pop OS Github repo. I'll also add a comment about my
>workarounds there.
>
You can send me your email address. I'll Cc you when submitting the
patch(es). Then you can test the received patch and reply to the email
with a Tested-by tag if the patch(es) works,
Tested-by: Your_name <email address hidden>
>Have a nice day!
>
Coiby Xu (coiby) wrote : | #250 |
On Sun, Nov 08, 2020 at 07:38:15PM -0000, Azizkhan wrote:
>Hi all!
>@Coiby Xu (coiby)
>When your patch will be applied to mainline kernel? When we can just update our kernels and do nothing to fix touchpad?
I'm not sure when these patch(es) will be accepted and merged. It's up
to the maintainers to accept the patch(es). If there is any update, I'll
post the notification here.
Coiby Xu (coiby) wrote : | #251 |
The patch in #239 depends on this patch [1] which requires to build the whole kernel. For now, I would suggest adopting #189 to fix the touchpad for daily use. But if anyone want to test the patch so we can push it into the mainline kernel early, you can send me your email address and I'll Cc you when submitting next version.
https:/
Pop Michael (the-legion) wrote : | #252 |
Hi! I tried the #189 fix but i just can't make it to work, it gives me some errors. Can anyone makes a noob's guide? :)
Pop Michael (the-legion) wrote : | #253 |
i am back. i am using ubuntu 20.10 with 5.8.0-26-generic kernel. i tried a lot of patches but nothig worked. i keep getting errors. i tried almost everything from #189 except #209.If anyone who fixed his touchpad can make a tutorial or something i would trully appreciate. i hope that the patch will be include in the kernel at some ponit, utill then i will stick to the mouse.
Baq Domalaq (baq) wrote : | #254 |
Hi @Pop Michael (the-legion),
I think your distro is similar to mine (Pop!_OS 20.10) so I'll try to describe what I did. I was struggling with this for some time too, cause it was the first time I've applied a patch and re-built a kernel.
First, check if pinctrl-amd is included in kernel or not:
# modinfo pinctrl-amd
if it says `filename: (builtin)` then continue. Otherwise standalone solution #189 is for you, which is easier cause you don't have to rebuild the kernel.
Download the patch from #179.
Go into root mode:
# sudo -i
Get the kernel source:
# apt-get source linux-image-$(uname -r)
Go into the source:
# cd linux-5.8.0/
Apply the patch:
# patch -p1 < /path/to/
Build the kernel:
# debian/rules binary-headers binary-generic binary-perarch
This will take some time.
Now install newly build kernel:
# dpkg -i linux-image-
Your files might have different versions. But it should be 3 files: linux-image-*.deb, linux-headers-*.deb and linux-headers-
I'm not sure if it should be 3 files, maybe 2 is sufficient, but it didn't hurt my system.
Finally reboot. And touchpad should work.
I hope this helps.
Baq Domalaq (baq) wrote : | #255 |
Hi @Coiby Xu (coiby),
thanks for your reply #249. I've sent you my email in DM.
Also I think solutions #171 and #179 are the same. Just last one is in a file.
Maxim (pavlenkoms) wrote : | #256 |
Hi @Coiby Xu (coiby)
I tried #189 and #211 (different combinations) on mate-ubuntu 20.04 with custom kernels 5.8 and 5.9
I tried to install Manjaro with kernel 5.8.18, and after that I rebuilt custom kernel again with all patches
But result is only one: touchpad still doesn't work. Is there any way to debug or figure out what exactly went wrong?
And here is an interresting detail. Touchpad devices disappearing in xinput output from time to time, and could not work even in uefi menu.
Pop Michael (the-legion) wrote : | #257 |
@Baq Domalaq thank you for your help, but i couldn't make it to work. At filename it is (builtin) so i tried your method, but i can't download the file from #179 bcuz there's no file , just a page with some code lines that are also on #171. Anyway , when i typed "apt-get source linux-image-$(uname -r)" in root mode it says "You must put some 'deb-src' URIs in your sources.list" which i don't understand what it means. Fixing this touchpad issue on linux seems to be beyond my knowledge. :) Thanks anyway
Baq Domalaq (baq) wrote : | #258 |
Hey @Pop Michael (the-legion),
You know I can just put the *.deb files in dropbox so you can just run the last command. DM me your email and I'll send a link.
Linuxes are different for every user so no wonder your results were different. Also I could've done more than I wrote above cause I was trying different commands before that.
Mike Boruta (maridius) wrote : | #259 |
@Coiby Xu (coiby)
It seems that the patch in 171 does not work (i.e. touchpad is still dead) on kernels older than 5.8. I tried 5.4.75, 5.7.19, and 5.8.18. I don't really want to look into this further since I'm fine with the newer kernel, but wanted to give you and any other users a heads up in case they find themselves in a similar situation. The kernels I was testing were taken straight from Ubuntu's mainline kernel page, and had only the following changes: CONFIG_PINCTRL_AMD was made into a module, specified line in pinctrl-amd.c was commented out.
Thanks again for all of your help in making the linux experience with this class of laptop much more enjoyable!
E (mantsje) wrote : | #260 |
Mentioned in #15 there is a question about whether using the trackpad increases the amount of interrupts. For me it does do so! Placing my finger on the trackpad does generate mouse events, but it only rapidly generates click events non-stop. It cannot be used to move the pointer but just spams clicks. Would anybody know of a solution?
Baq Domalaq (baq) wrote : | #261 |
Hi @E (mantsje),
Just try one of the patches mentioned here (e.g. #179). My touchpad also was making click events when moving fingers on it.
Pedro Ribeiro (pedrib) wrote : | #262 |
@Coiby Xu (coiby)
I build the next branch of linux-gpio (which contains the patch you mentioned in #251), and the trackpad works just fine without the hid polling on the kernel command line.
You can contact me if you'd like further testing, my email is pedrib_
Pedro Ribeiro (pedrib) wrote : | #263 |
To be specific, this is the branch I built:
https:/
The kernel I built had 0f2c7af45d7eef8
I have a Legion 5 15ARH05H (slightly different than 15ARH05).
Vitaly Guj (vitalyguj) wrote : | #264 |
On Ubuntu 20.4 LTS kernel 5.9.8 method #254 worked fine.
Requires build dwarves 1.17 and download kernel from mainline
Azizkhan (injkgz) wrote : | #265 |
@pedrib,
am I right new kernel 5.9.10 includes fixes for our touchpad? Branch you gave as i see already included in 5.9.10...
Coiby Xu (coiby) wrote : | #266 |
Hi @Maxim (pavlenkoms),
Is your laptop also a Lenovo Legion-5 model?
On Thu, Nov 12, 2020 at 09:02:54AM -0000, Maxim wrote:
>Hi @Coiby Xu (coiby)
>I tried #189 and #211 (different combinations) on mate-ubuntu 20.04 with custom kernels 5.8 and 5.9
>I tried to install Manjaro with kernel 5.8.18, and after that I rebuilt custom kernel again with all patches
>But result is only one: touchpad still doesn't work. Is there any way to debug or figure out what exactly went wrong?
>
>And here is an interresting detail. Touchpad devices disappearing in
>xinput output from time to time, and could not work even in uefi menu.
Do you mean the touchpad works sometimes after the booting the system
but would fail when booting system next time?
>
Coiby Xu (coiby) wrote : | #267 |
@Mike Boruta (maridius)
On Sun, Nov 15, 2020 at 08:34:03PM -0000, Mike Boruta wrote:
>@Coiby Xu (coiby)
>
>It seems that the patch in 171 does not work (i.e. touchpad is still
>dead) on kernels older than 5.8. I tried 5.4.75, 5.7.19, and 5.8.18. I
>don't really want to look into this further since I'm fine with the
>newer kernel, but wanted to give you and any other users a heads up in
>case they find themselves in a similar situation. The kernels I was
>testing were taken straight from Ubuntu's mainline kernel page, and had
>only the following changes: CONFIG_PINCTRL_AMD was made into a module,
>specified line in pinctrl-amd.c was commented out.
>
So the patch in 171 works on kernels >=5.8 but doesn't work for older
version like 5.7.19?
>Thanks again for all of your help in making the linux experience with
>this class of laptop much more enjoyable!
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https:/
>
>Title:
> MSFT Touchpad not working on Lenovo Legion-5 15ARH05
>
>Status in Pop!_OS:
> New
>Status in linux package in Ubuntu:
> Confirmed
>Status in xserver-
> Confirmed
>Status in linux package in Arch Linux:
> Fix Committed
>Status in linux package in Fedora:
> Confirmed
>Status in linux package in openSUSE:
> New
>
>Bug description:
> Hello
>
> The MSFT touchpad of this Lenovo Legion-5 15ARH05 laptop is not reacting at all (pointer and click never move when touchpad is touched). This has been reported by other users in various websites, with various linux systems including other Ubuntu systems, but I saw no launchpad bug so I post one. Example of websites covering the issue :
> - https:/
> - https:/
>
> xinput indentifies it as MSFT0001:00 04F3:3140
>
> Virtual core pointer id=2 [master pointer (3)]
> ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
> ⎜ ↳ MSFT0001:00 04F3:3140 Touchpad id=17 [slave pointer (2)]
> ⎜ ↳ MSFT0001:00 04F3:3140 Mouse id=16 [slave pointer (2)]
> ⎜ ↳ ITE Tech. Inc. ITE Device(8910) Consumer Control id=12 [slave pointer (2)]
> ⎜ ↳ Logitech USB Optical Mouse id=11 [slave pointer (2)]
> ⎣ Virtual core keyboard id=3 [master keyboard (2)]
> ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
> ↳ Ideapad extra buttons id=15 [slave keyboard (3)]
> ↳ Power Button id=6 [slave keyboard (3)]
> ↳ Integrated Camera: Integrated C id=10 [slave keyboard (3)]
> ↳ Video Bus id=7 [slave keyboard (3)]
> ↳ ITE Tech. Inc. ITE Device(8910) Consumer Control id=19 [slave keyboard (3)]
> ↳ Power Button id=9 [slave keyboard (3)]
> ↳ ITE Tech. Inc. ITE Device(8910) Wireless Radio Control id=13 [slave keyboard (3)]
> ↳ ITE Tech. Inc. ITE Device(8910) Keyboard i...
Coiby Xu (coiby) wrote : | #268 |
@Pedro Ribeiro (pedrib)
On Sun, Nov 22, 2020 at 07:48:27AM -0000, Pedro Ribeiro wrote:
>@Coiby Xu (coiby)
>
>I build the next branch of linux-gpio (which contains the patch you mentioned in #251), and the trackpad works just fine without the hid polling on the kernel command line.
>You can contact me if you'd like further testing, my email is pedrib_
Thank you for testing the patch! I'll put you in the Cc list next time.
Pedro Ribeiro (pedrib) wrote : | #269 |
@Azizkhan (injkgz)
I don't think it is, I believe the for-next branch in linux-gpio will only be integrated in 5.11, but @Coiby Xu (coiby) should be able to confirm that.
Mike Boruta (maridius) wrote : | #270 |
@Coiby Xu (coiby)
Yes, that summarizes my findings nicely.
Carlos Morales (carlosmorales777) wrote : | #271 |
Hello,
I would like to report patches #217 and #189 both fix the touchpad MSFT0001:00 06CB:7F28 in a Lenovo Legion 5P-15ARH05H. Based on my preference for interrupts over polling, I will keep #189
Testing was done on Manjaro with kernel 5.9.8-2
Thanks for all the effort in this fix!
Pedro Ribeiro (pedrib) wrote : | #272 |
Don't want to hijack this thread, but has anyone here with a Legion 5 (AMD version) has gotten the backlight working in Discrete graphics mode (only the nvidia GPU enabled)?
Coiby Xu (coiby) wrote : | #273 |
@Azizkhan (injkgz)
On Mon, Nov 23, 2020 at 04:39:29PM -0000, Pedro Ribeiro wrote:
>@Azizkhan (injkgz)
>
>I don't think it is, I believe the for-next branch in linux-gpio will
>only be integrated in 5.11, but @Coiby Xu (coiby) should be able to
>confirm that.
>
It may also be backported to stable trees like 4.19, 5.4.
Coiby Xu (coiby) wrote : | #274 |
@Mike Boruta
On Tue, Nov 24, 2020 at 02:37:34AM -0000, Mike Boruta wrote:
>@Coiby Xu (coiby)
>
>Yes, that summarizes my findings nicely.
That's a bit strange. It should work for at least 5.7 as well. If you
have time, you can show me the result of
"sudo cat /sys/kernel/
applying the patch in #171.
Coiby Xu (coiby) wrote : | #275 |
@Pedro Ribeiro
On Wed, Nov 25, 2020 at 10:23:25AM -0000, Pedro Ribeiro wrote:
>Don't want to hijack this thread, but has anyone here with a Legion 5
>(AMD version) has gotten the backlight working in Discrete graphics mode
>(only the nvidia GPU enabled)?
Have you tried installing the proprietary NVIDIA graphics card driver?
Paulinski (mail-izy) wrote : | #276 |
@Pedro Ribeiro
Same problem. Couldn't manage it to make it work
Pedro Ribeiro (pedrib) wrote : | #277 |
Again my apologies to everyone for hijacking this thread, But since people are asking, and I was able to solve the backlight problem after days of pain, here are the instructions. Two caveats though:
- you need to have the laptop in "Discrete" mode in the BIOS (in my experience, Hybrid mode gives little battery life advantage, even in Windows)
- the instructions below are for Debian, but the only different thing to have in mind is the /experimental release in the apt install command, which should be adapted to the Ubuntu release you want to install the drivers from
1. make sure that you remove all nvidia stuff:
apt --purge remove nvidia*
(this includes any nvidia configuration files in /etc/X11/
2. install the proprietary nvidia driver version you want (replace experimental with the target release)
sudo apt install libegl-
3. create a file /etc/X11/
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "RegistryDwords" "EnableBrightne
EndSection
4. reboot and backlight control should be working!
Pedro Ribeiro (pedrib) wrote : | #278 |
More details about the backlight control can be found in https:/
If you have any questions please create a topic in the nvidia forums or open a new bug!
/thread hijack off
Mike Boruta (maridius) wrote : | #279 |
@Coiby Xu (coiby)
Hello Coiby, had some time today so I compiled 5.7.19 from ubuntu mainline (https:/
$ sudo cat /sys/kernel/
pin130 Level trigger| Active low| interrupt is enabled| interrupt is unmasked| disable wakeup in S0i3 state| disable wakeup in S3 state|
disable wakeup in S4/S5 state| input is high| pull-up is disabled| Pull-down is disabled| output is disabled| 0x51bc8
Please let me know if I can be of further help!
harry (harrylee342) wrote : | #280 |
Hi all.
Please excuse my novice approach guys but I hope that I am making some kind of contribution!
I to have a Lenovo Legion 5 and I am running Opensuse Tumbleweed with Kernel 5.9.11-1 with Gnome 3.38.
With some help from the Opensuse forum I have the following error;
input: MSFT0001:00 04F3:3186 Touchpad as /devices/
This as you may gather stops my trackpad from working and they have suggested I visit here and ask for
any help!
All the best - Harry
Ethan Reker (abaga129) wrote : | #281 |
After several painstaking hours I finally got it working on Manjaro, so I wanted to share my experience for anyone else that is new to patching the kernel like me. This is my first time ever doing so.
I tried and tried to make this work on Ubuntu Budgie 20.10 following the guide by @Baq Domalaq (baq) but I just couldnt get the ubuntu kernel to build. Manjaro on the other hand was fairly painless.
This only works for Manjaro
1. Clone the kernel repo for linux 5.8
# git clone https:/
2. open the repo
# cd ./linux58
3. Download the patch from #179
# wget https:/
4. Edit the PKGBUILD file and add '0303-pinctrl-
5. Update the checksums
# updpkgsums
6. Build the package. This will take some time. You may be prompted for something about PREMPT. Choose CONFIG_
# makepkg -s
7. Once it's done, you can install the package.
# makepkg -i
In my case, this broke the nvidia driver so I ended up uninstalling the nonfree driver and using the free driver instead. This can be done with the following commands.
8. Remove nonfree driver. Could also be video-nvidia-455xx
# sudo mhwd -r pci video-nvidia-440xx
9. Install the free driver
# sudo mhwd -i pci video-linux
Also installing the free driver fixed the display brightness issue. Everything seems to be working for me now!
In case anyone runs into any issues, this is the guide I followed to build the kernel. https:/
Coiby Xu (coiby) wrote : | #282 |
Hi Mike,
On Sun, Nov 29, 2020 at 08:07:43PM -0000, Mike Boruta wrote:
>@Coiby Xu (coiby)
>
>Hello Coiby, had some time today so I compiled 5.7.19 from ubuntu
>mainline (https:/
>pinctrl_amd configured as a module, applied the patch in #171, and ran
>the command you provided:
>
>$ sudo cat /sys/kernel/
>pin130 Level trigger| Active low| interrupt is enabled| interrupt is unmasked| disable wakeup in S0i3 state| disable wakeup in S3 state|
> disable wakeup in S4/S5 state| input is high| pull-up is disabled| Pull-down is disabled| output is disabled| 0x51bc8
>
Obviously, the patch in #171 didn't take into effect because 0x51bc8 means
debounce filter is enabled and the debounce timeout is set to 124.8ms.
So my best guess is
/lib/modules/`uname -r`/kernel/
hasn't been replaced by the patched one.
>Please let me know if I can be of further help!
Reinis (reinisi) wrote : | #283 |
Many thanks to @coiby for providing the #189 fix - works great on the latest Manjaro 5.9.11-3 with the MSFT0001:00 04F3:3140 touchpad on Lenovo Legion 5 15ARH. Just had to install linux59-headers beforehand.
Let me know if there is any way I can help with this issue.
Mike Boruta (maridius) wrote : | #284 |
Hello Coiby,
Hmm, as far as I can tell the proper module is being used since I executed the same steps for both the 5.7.19 and 5.8 kernels. I also confirmed this by running `modinfo pinctrl_amd` and verifying that it is no longer signed. I understand what you are saying regarding 0x51bc8, maybe a different code path is being executed? Perhaps it would be best for someone to independently confirm this before digging in further; I have run through these steps a few times so I don't think I made a silly mistake but anything is possible.
Coiby Xu (coiby) wrote : | #285 |
Hi Mike,
On Sat, Dec 05, 2020 at 09:09:35PM -0000, Mike Boruta wrote:
>Hello Coiby,
>
>Hmm, as far as I can tell the proper module is being used since I
>executed the same steps for both the 5.7.19 and 5.8 kernels. I also
>confirmed this by running `modinfo pinctrl_amd` and verifying that it is
>no longer signed. I understand what you are saying regarding 0x51bc8,
>maybe a different code path is being executed? Perhaps it would be best
>for someone to independently confirm this before digging in further; I
>have run through these steps a few times so I don't think I made a silly
>mistake but anything is possible.
Could you insert some pr_alert code to verify the updated module has been loaded?
pr_alert(
You can also use the repo https:/
And after the system getting rebooted, paste the result of `journalctl -k|grep amd_gpio` here?
Logan (frank5151) wrote : | #286 |
I can confirm Mike's result. However, I'm on Fedora 33 and kernel 5.8.15.
[root@lappy-
[root@lappy-
[root@lappy-
filename: /lib/modules/
description: AMD GPIO pinctrl driver
author: Ken Xue <email address hidden>, Jeff Wu <email address hidden>
license: GPL v2
alias: acpi*:AMDI0030:*
alias: acpi*:AMD0030:*
depends:
retpoline: Y
name: pinctrl_amd
vermagic: 5.8.15-
[root@lappy-
5.8.15-
The pinctrl module I'm using is from the github repo
Logan (frank5151) wrote : | #287 |
The output Coiby requested
[root@lappy-
Dec 05 15:55:13 lappy-the-laptop kernel: amd_uncore: AMD NB counters detected
Dec 05 15:55:13 lappy-the-laptop kernel: amd_uncore: AMD LLC counters detected
Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=500e8, pin=130 (before set_type)
Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=50388, pin=130 (LEVEL_LOW)
Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=503c8, pin=130 (before set_type)
Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=50388, pin=130 (LEVEL_LOW)
Mike Boruta (maridius) wrote : | #288 |
Hello Coiby,
I built and installed the module as per the instructions in the branch you linked me to and `journalctl -k|grep amd_gpio` showed nothing. No new printouts in the kernel log. So I recompiled the module again with the pr_alert() statement you printed above and still nothing.
So, I recompiled the kernel from source once again but this time I made the source code changes before compiling the entire kernel (instead of then recompiling the kernel module and overwriting the current one). And this worked! Touchpad works just fine and I see the printouts as expected (0x50388 instead of 0x51bc8).
My understanding was that simply copying the module over to the old one in `/lib/modules/
So once again thank you Coiby for your fix and for helping me to get to the bottom of this!
Helmut Stult (helmut-stult) wrote : | #289 |
@Coiby Xu (coiby)
Patch #179 no longer works with kernel 5.10.1, because pinctrl-amd.c has already been patched with the current kernel version and GLITCH has been changed.
My touchpad MSFT0001: 00 04F3: 3140 still worked up to 5.10-rc7 with #179.
This is th new code for GLITCH:
-------
raw_spin_
pin_reg = readl(gpio_
if (debounce) {
pin_reg |= DB_TYPE_
pin_reg &= ~DB_TMR_OUT_MASK;
-------
Do you have any idea what needs to be changed to make it work again?
Helmut Stult (helmut-stult) wrote : | #290 |
/** pin_reg |= DB_TYPE_
Helmut Stult (helmut-stult) wrote : | #291 |
Giovanni Lena (unixlike) wrote : | #292 |
@Helmut Stult (helmut-stult) I got it working both on Manjaro and Gentoo with kernel 5.10.1 downloaded from kernel.org with #189. On Gentoo I had to use Manjaro's running .config obtained with make localmodconfig while in chroot from manjaro.
Coiby Xu (coiby) wrote : | #293 |
Hi Mike,
On Sun, Dec 06, 2020 at 09:12:23PM -0000, Mike Boruta wrote:
>Hello Coiby,
>
>I built and installed the module as per the instructions in the branch
>you linked me to and `journalctl -k|grep amd_gpio` showed nothing. No
>new printouts in the kernel log. So I recompiled the module again with
>the pr_alert() statement you printed above and still nothing.
>
>So, I recompiled the kernel from source once again but this time I made
>the source code changes before compiling the entire kernel (instead of
>then recompiling the kernel module and overwriting the current one). And
>this worked! Touchpad works just fine and I see the printouts as
>expected (0x50388 instead of 0x51bc8).
>
>My understanding was that simply copying the module over to the old one
>in `/lib/modules/
>would suffice, but that does not seem to be the case, at least with this
>ubuntu-flavored kernel version. I am interested to know why, but I will
>probably look that up on my own. The important thing is that there
>shouldnt be any doubt regarding whether or not the fix works on 5.7 as
>well.
>
Since you could still access /sys/kernel/
module must have been loaded. The path of the old module could be
/lib/modules/
So when both old pinctrl-amd.ko.xz and new pinctrl-amd.ko exist, the old
module is loaded by the kernel.
>So once again thank you Coiby for your fix and for helping me to get to
>the bottom of this!
>
Coiby Xu (coiby) wrote : | #294 |
Hi Logan,
On Sun, Dec 6, 2020 at 12:05 PM Logan <email address hidden> wrote:
> The output Coiby requested
> [root@lappy-
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_uncore: AMD NB counters detected
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_uncore: AMD LLC counters detected
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=500e8, pin=130 (before set_type)
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=50388, pin=130 (LEVEL_LOW)
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=503c8, pin=130 (before set_type)
> Dec 05 15:55:13 lappy-the-laptop kernel: amd_gpio reg_val=50388, pin=130 (LEVEL_LOW)
50388 means the glitch filter has been disabled. So the patch has took
info effect. You touchpad should work now.
Coiby Xu (coiby) wrote : | #295 |
Hi @Helmut Stult (helmut-stult)
On Wed, Dec 16, 2020 at 6:32 PM Helmut Stult <email address hidden>
wrote:
> The problem is your last patch
>
>
> https:/
> /pinctrl-
> <https:/
>
There is nothing wrong with this patch. As written in the commit
message, this patch depends on commit 06abe8291bc3183
("pinctrl: amd: fix incorrect way to disable debounce filter") and
commit 8dcb7a15a585 ("gpiolib: acpi: Take into account debounce settings")
to fix the touchpad. And the latter one hasn't been adopted by Linux
kernel v5.10.
Coiby Xu (coiby) wrote : | #296 |
Hi all,
The latest kernel tree (https:/
The complete solution is three patches,
- 47a0001436352c9
- 06abe8291bc3183
- 8dcb7a15a585b6d
The first two patches has reached the stable tree. If the last one is also backported to LTS kernel, you won't need to install kernel 5.11. But I don't know when this will happen.
Thanks to all who have participated in the process of bug hunting, especially to @wangjun (biggerchina), @Mike Boruta (maridius), @Helmut Stult (helmut-stult) and @Baq Domalaq (baq). I spent about one month of my internship at the Linux Foundation on this bug. So I should also thanks to the Linux Foundation for funding this work.
Mike Boruta (maridius) wrote : | #297 |
Wow, this is great news! Thank you again for your hard work, and to all who helped out :).
Baq Domalaq (baq) wrote : | #298 |
@Coiby Xu (coiby) thanks a lot for your work! You really saved a lot of laptops on linux.
Kai-Heng Feng (kaihengfeng) wrote : | #299 |
8dcb7a15a585b6d
Logan (frank5151) wrote : | #300 |
I can confirm my touchpad is working now on 5.9.15 using the patch from #189 and using 5.10.1 without any extra on Fedora 33
Nicolas Rogues (nrogues) wrote : | #301 |
Thanks a lot @Coiby Xu (coiby), amazing work. Let's hope the third patch will be backported and 20.04.x LTS will work our the box after this.
Azizkhan (injkgz) wrote : | #302 |
I have installed 5.10.0 kernel which contains fix, but touchpad isn't working.
Robin Windey (r0wi) wrote : | #303 |
I'm on Ubuntu 20.04 with kernel 5.10.1 (https:/
Piotr Tomaszewski (nfm886) wrote : | #304 |
@Robin Windey (r0wi), Hey, did you did something more like adding kernel parameters or something, or just upgrade kernel is enough?
Robin Windey (r0wi) wrote : | #305 |
@Piotr Tomaszewski (nfm886) i just installed headers (all), image (generic) and modules (generic) from https:/
Piotr Tomaszewski (nfm886) wrote : | #306 |
@Robin Windey (r0wi), I will try it. Thanks for the info
Azizkhan (injkgz) wrote : | #307 |
Robin Windey (r0wi), I tried to do this via ur instructions and via Mainline utility, but my touchpad isn't working...
albertoiNET (albertoinet) wrote : | #308 |
On Ubuntu 20.10 I installed with kernel 5.10.1 with your instructions @Robin Windey (r0wi) and neither works touchpad
Piotr Tomaszewski (nfm886) wrote : | #309 |
@Robin Windey (r0wi), unfortunately it does not works with my touchpad. Tried kernel you linked on PopOS 20.10 and Ubuntu 20.04.1. Both results are same, touchpad not works. What is yours touchpad?
Robin Windey (r0wi) wrote : | #310 |
Could you try to boot in recovery mode and then resume the normal boot process? I think i have the MSFT0001:00 06CB:7F28 touchpad installed but i'll check these days.
wangjun (biggerchina) wrote : | #311 |
on fedora 33,with kernel 5.10.2 , i use this patch ,then touchpad work!
diff -Narup a/drivers/
--- a/drivers/
+++ b/drivers/
@@ -205,6 +205,68 @@ static void acpi_gpiochip_
acpi_
}
+static enum gpiod_flags
+acpi_gpio_
+{
+ /* GpioInt() implies input configuration */
+ if (agpio-
+ return GPIOD_IN;
+
+ switch (agpio-
+ case ACPI_IO_
+ return GPIOD_IN;
+ case ACPI_IO_
+ /*
+ * ACPI GPIO resources don't contain an initial value for the
+ * GPIO. Therefore we deduce that value from the pull field
+ * and the polarity instead. If the pin is pulled up we assume
+ * default to be high, if it is pulled down we assume default
+ * to be low, otherwise we leave pin untouched. For active low
+ * polarity values will be switched. See also
+ * Documentation/
+ */
+ switch (agpio->pin_config) {
+ case ACPI_PIN_
+ return polarity == GPIO_ACTIVE_LOW ? GPIOD_OUT_LOW : GPIOD_OUT_HIGH;
+ case ACPI_PIN_
+ return polarity == GPIO_ACTIVE_LOW ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ /*
+ * Assume that the BIOS has configured the direction and pull
+ * accordingly.
+ */
+ return GPIOD_ASIS;
+}
+
+static struct gpio_desc *acpi_request_
+ struct acpi_resource_gpio *agpio,
+ unsigned int index,
+ const char *label)
+{
+ int polarity = GPIO_ACTIVE_HIGH;
+ enum gpiod_flags flags = acpi_gpio_
+ unsigned int pin = agpio->
+ struct gpio_desc *desc;
+ int ret;
+
+ desc = gpiochip_
+ if (IS_ERR(desc))
+ return desc;
+
+ ret = gpio_set_
+ if (ret)
+ gpiochip_
+
+ return ret ? ERR_PTR(ret) : desc;
+}
+
static bool acpi_gpio_
{
const char *controller, *pin_str;
@@ -290,8 +352,8 @@ static acpi_status acpi_gpiochip_
if (!handler)
return AE_OK;
- desc = gpiochip_
- GPIO_ACTIVE_HIGH, GPIOD_IN);
+ desc = acpi_request_
+
if (IS_ERR(desc)) {
dev_
"Failed to request GPIO for pin 0x%04X, err %ld\n",
@@ -526,39 +588,6 @@ static bool acpi_get_
return false;
}
-static enum gpiod_flags
-acpi_gpio_
-{
- switch (agpio-
- case ACPI_IO_
- return GPIOD_IN;
- case ACPI_IO_
- /*
- * ACPI GPIO resources don't contain an initial value for the
- * GPIO. Therefore we deduce that value from the pull field
- * instead. If the pin is pulled up...
wangjun (biggerchina) wrote : | #312 |
all the changes are extract from the master branch of https:/
Robin Windey (r0wi) wrote : | #313 |
@Piotr Tomaszewski (nfm886) can confirm my touchpad is the MSFT0001:00 06CB:7F28. I booted kernel 5.10.1 into recovery and then resumed regular boot and my touchpad works.
Piotr Tomaszewski (nfm886) wrote : | #314 |
@Robin Windey (r0wi), I booted intro recovery mode to the root prompt then systemctl reboot. Nothing changed. Touhchpad still does not works.
My touchpad is: MSFT0001:00 04F3:3140
Robin Windey (r0wi) wrote : | #315 |
@Piotr Tomaszewski (nfm886) according to #109 it seems like you have the "Elan" touchpad (mine is the "Synaptic" one) so it might behave a little different?
Piotr Tomaszewski (nfm886) wrote : | #316 |
@Robin Windey (r0wi), maybe. I hope kernel 5.11 will make Elan's touchpad to work.
Helmut Stult (helmut-stult) wrote : | #317 |
@Piotr Tomaszewski
If you use Manjaro Linux, this link should help you ;-)
https:/
Otherwise look here (are the two patches and the PKGBUILD)
https:/
Helmut (schinfo)
manjaro - ENJOY THE SIMPLICITY
Piotr Tomaszewski (nfm886) wrote : | #318 |
Thanks @Helmut Stult (helmut-stult), kernel from first link works as it should :)
koen (kmaris) wrote : | #319 |
Installed ubuntu 20.10 on ARH05, the gpio workaround makes the mouse work.
Left click and right click button works
koen (kmaris) wrote : | #320 |
Ubuntu 20.10 with kernel :
Linux legion5 5.9.16-
Touchpad works without any work around
Daniel Campos (Avanzosc) (dani-ds) wrote : | #321 |
Someone knows when the patch will be merged in the main repo?
I am using Kubuntu 20.04 LTS with 5.4.0-58-generic kernel and the touchpad is not working and I don't want to start changing the kernel "manually"
Stéphane Roussel (stephane-roussel) wrote : | #322 |
Touchpad works on 20.10 and kernel 5.10.2 only after doing that on each start :
cd /sys/class/gpio/
echo 386 > export
gpio]# cd gpio386
echo out > direction
uname -a : Linux Legion 5.10.2-
boudicca (shazh) wrote : | #323 |
#322 confirmed works as sudo or root
cd /sys/class/gpio/
echo 386 > export
cd gpio386
echo out > direction
boudicca (shazh) wrote : | #324 |
ignore sudo in #323 echo 386 > export only as root
description: | updated |
koen (kmaris) wrote : | #325 |
Touchpad works without workaround on
Ubuntu 20.04 with Kernel 5.9.16
Same goes for ubuntu 20.10.
Easiest way is to use the workaround, install mainline(
Reboot and relax
Robin Windey (r0wi) wrote : | #326 |
Had access to another Ideapad with touchpad MSFT0001:00 04F3:3140 installed. Kernel 5.10.2-
Coiby Xu (coiby) wrote : | #327 |
Hi Kai-Heng Feng,
On Sun, Dec 20, 2020 at 07:30:12AM -0000, Kai-Heng Feng wrote:
>8dcb7a15a585b6
>account debounce settings") is part of a series with 18 patches, so it's
>safer to only bakcport it for 5.10 kernels.
Although it's part of a patch set, it's rather an independent patch
because it's filling a missing implementation of the ACPI specs. I guess
Windows have already implemented it and that's why the touchpad works
for Windows.
Coiby Xu (coiby) wrote : | #328 |
Hi Robin Windey (r0wi) and Stéphane Roussel (stephane-roussel),
On Fri, Dec 25, 2020 at 08:52:35PM -0000, Robin Windey wrote:
>Had access to another Ideapad with touchpad MSFT0001:00 04F3:3140
>installed. Kernel 5.10.2-
>of the box but in combination with #322 it worked so i can confirm, too.
We shouldn't use #322 because it's equivalent of keeping polling the
touchpad.
koen (kmaris) wrote : | #329 |
@robin Windey
I had no luck with kernel 5.10.2, try 5.9.16
wangjun (biggerchina) wrote : | #330 |
@koen (kmaris) , with kernel 5.10.2 ,you can try #311
wangjun (biggerchina) wrote : | #331 |
and #311 also work with kernel 5.10.3
Changed in linux (Ubuntu): | |
assignee: | nobody → Phan Thanh Long (phanlong2811) |
Robin Windey (r0wi) wrote : | #332 |
@wangjun (biggerchina) i can confirm that #311 is working without any workarounds when applied on 5.10.3 with touchpad MSFT0001:00 04F3:3140 and Ubuntu 20.04, thanks!
If anyone on a Debian based system is interested: i've uploaded the patched version as .deb-packages here https:/
@Coiby Xu (coiby) Phan Thanh Long (phanlong2811) any chance to get #311 backported to 5.10?
Ethan Reker (abaga129) wrote : | #333 |
I can also confirm #322 works on manjaro after installing Linux 5.10.rc5.d1122 through the "Manjaro Settings Manager". Thanks!
wangjun (biggerchina) wrote : | #334 |
because this submit (https:/
#311 do not work with kernel 5.10.4.
wangjun (biggerchina) wrote : | #335 |
with kernel 5.10.4 , this patch work on fedora 33.
diff -Narup a/drivers/
--- a/drivers/
+++ b/drivers/
@@ -205,6 +205,68 @@ static void acpi_gpiochip_
acpi_
}
+static enum gpiod_flags
+acpi_gpio_
+{
+ /* GpioInt() implies input configuration */
+ if (agpio-
+ return GPIOD_IN;
+
+ switch (agpio-
+ case ACPI_IO_
+ return GPIOD_IN;
+ case ACPI_IO_
+ /*
+ * ACPI GPIO resources don't contain an initial value for the
+ * GPIO. Therefore we deduce that value from the pull field
+ * and the polarity instead. If the pin is pulled up we assume
+ * default to be high, if it is pulled down we assume default
+ * to be low, otherwise we leave pin untouched. For active low
+ * polarity values will be switched. See also
+ * Documentation/
+ */
+ switch (agpio->pin_config) {
+ case ACPI_PIN_
+ return polarity == GPIO_ACTIVE_LOW ? GPIOD_OUT_LOW : GPIOD_OUT_HIGH;
+ case ACPI_PIN_
+ return polarity == GPIO_ACTIVE_LOW ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ /*
+ * Assume that the BIOS has configured the direction and pull
+ * accordingly.
+ */
+ return GPIOD_ASIS;
+}
+
+static struct gpio_desc *acpi_request_
+ struct acpi_resource_gpio *agpio,
+ unsigned int index,
+ const char *label)
+{
+ int polarity = GPIO_ACTIVE_HIGH;
+ enum gpiod_flags flags = acpi_gpio_
+ unsigned int pin = agpio->
+ struct gpio_desc *desc;
+ int ret;
+
+ desc = gpiochip_
+ if (IS_ERR(desc))
+ return desc;
+
+ ret = gpio_set_
+ if (ret)
+ gpiochip_
+
+ return ret ? ERR_PTR(ret) : desc;
+}
+
static bool acpi_gpio_
{
const char *controller, *pin_str;
@@ -290,8 +352,8 @@ static acpi_status acpi_gpiochip_
if (!handler)
return AE_OK;
- desc = gpiochip_
- GPIO_ACTIVE_HIGH, GPIOD_IN);
+ desc = acpi_request_
+
if (IS_ERR(desc)) {
dev_
"Failed to request GPIO for pin 0x%04X, err %ld\n",
@@ -526,39 +588,6 @@ static bool acpi_get_
return false;
}
-static enum gpiod_flags
-acpi_gpio_
-{
- switch (agpio-
- case ACPI_IO_
- return GPIOD_IN;
- case ACPI_IO_
- /*
- * ACPI GPIO resources don't contain an initial value for the
- * GPIO. Therefore we deduce that value from the pull field
- * instead. If the pin is pulled up we assume default to ...
王紫晸 (liliadamth) wrote : | #336 |
As a rookie, I just want to know how to use it. I just came into contact with Linux and installed ubuntu20.04.1 (20.04.1 with core 5.10.3) on my r7000. Thanks.
Robin Windey (r0wi) wrote : | #337 |
If you like you can dowload the patched 5.10.3 kernel from the link i posted in #332. Just download the two files and install them via dpkg -i *.deb
Gerald Bachner (geri1403) wrote : | #338 |
Tested kernel 5.11.rc1 on Manjaro. Touchpad MSFT0001:00 04F3:3140 works out of the box.
Thanks!
王紫晸 (liliadamth) wrote : | #339 |
@Robin Windey (r0wi)
Thank you very much, it does work. I tried it just now. However, it only works under Nvidia mode (with brightness problems). If I use AMD Graphics mode, it brings a black screen.
Piotr Tomaszewski (nfm886) wrote : | #340 |
Ubuntu with kernel 5.11-rc2 from mainline - touchpad MSFT0001:00 04F3:3140 Touchpad - works out of the box. There is only problem with nvidia drivers...
Coiby Xu (coiby) wrote : | #341 |
Hi Mike Boruta (maridius),
> On Sun, Nov 29, 2020 at 08:07:43PM -0000, Mike Boruta wrote:
> >@Coiby Xu (coiby)
> >
> >Hello Coiby, had some time today so I compiled 5.7.19 from ubuntu
> >mainline (https:/
> >pinctrl_amd configured as a module, applied the patch in #171, and ran
> >the command you provided:
> >
> >$ sudo cat /sys/kernel/
> >pin130 Level trigger| Active low| interrupt is enabled| interrupt is unmasked| disable wakeup in S0i3 state| disable wakeup in S3 state|
> > disable wakeup in S4/S5 state| input is high| pull-up is disabled| Pull-down is disabled| output is disabled| 0x51bc8
> >
> Obviously, the patch in #171 didn't take into effect because 0x51bc8 means
> debounce filter is enabled and the debounce timeout is set to 124.8ms.
> So my best guess is
> /lib/modules/`uname -r`/kernel/
> hasn't been replaced by the patched one.
I had the same issue when using Fedora and find out it's caused by the pinctrl-amd driver being stored into the initramfs. Maybe the same thing happened to ubuntu. You can try re-building the initramfs by running `sudo update-initramfs -u' after replacing the old module with the new one.
description: | updated |
Eamon O Callaghan (eamonoc) wrote : | #342 |
Thank you everyone for fixing this, I've been following this thread for the last few weeks and today is the first time I've managed to get it working.
For any noobs like me that are on Ubuntu this is the guide that I followed to upgrade to kernel 5.11 and everything works perfectly for me, both the touchpad and the brightness controls.
Upgrade kernel
Change current directory to /tmp
cd /tmp
Download the latest mainline kernel from 5.11.x branch by copying and pasting this:
wget -c https:/
wget -c https:/
wget -c https:/
wget -c https:/
Install new kernel
sudo dpkg -i *.deb
Reboot the system
sudo shutdown -r now
Update packages list
sudo apt-get update
Upgrade packages
sudo apt-get upgrade
Reboot the system if needed
sudo shutdown -r now
Check the OS distro
lsb_release -a
Check kernel version
uname -r
That's it, now you should be running on the Linux Kernel 5.11rc2
Guide taken from this wonderful page:
https:/
Thanks to everyone for their hard work, sorry for posting this noob guide here but it took me weeks to figure out an easy way to do it (patching was beyond my abilities).
Mike Boruta (maridius) wrote : | #343 |
Hello Coiby Xu (coiby), thanks a lot for this information! Will definitely try this should I encounter a similar error again; and its just generally good knowledge. Completely forgot about the initramfs.
Von (straeker) wrote : | #344 |
MSFT0001:00 06CB:7F28 Touchpad works with kernel but it's very difficult to do a middle click using the default hid-i2c driver. middle click and right click works better with i2c-hid_standalone.
Von (straeker) wrote : | #345 |
*kernel above 5.9
Joe Zhou (joezhouchenye) wrote : | #346 |
Lenovo R7000P Laptop. Sadly, still not a good solution. The touch pad now works with kernel 5.11.0, but it has problem with Nvidia GPU and the brightness control is not working. I can have Nvidia GPU working and manually do some fixes to enable brightness control with 5.8.0, though touch pad is not working.
Adam Felson (adam-ubuntu) wrote : | #347 |
Before I grab'n'build 5.11, I'd like to know if my issue is similar.
I have a lenovo ideapad 730s.
The touchpad works fine for pointing, single, double and triple clicks.
I have tried both the synaptics and libinput drivers. It's been a while since I was comparing them; IIRC, I'm currently running the synaptics driver as libinput didn't have scrolling/coasting working.
My problem is that palm detection and pressure sensitivity do not work. This makes the laptop pretty much unusable as it is almost impossible to do any text entry without the insertion point jumping to wherever the pointer was left.
Might the 5.11 kernel fix it?
Adam Felson (adam-ubuntu) wrote : | #348 |
with lenovo ideapad 730s, wrist and pressure detection still don't work under 5.11.
with libinput, scroll coasting doesn't work.
I am current back to using synaptics. using synclient to turn PalmDetect on has no effect.
Coiby Xu (coiby) wrote : | #349 |
On Thu, Jan 21, 2021 at 01:05:48PM -0000, Joe Zhou wrote:
>Lenovo R7000P Laptop. Sadly, still not a good solution. The touch pad
>now works with kernel 5.11.0, but it has problem with Nvidia GPU and the
>brightness control is not working. I can have Nvidia GPU working and
>manually do some fixes to enable brightness control with 5.8.0, though
>touch pad is not working.
Newer kernels must have caused regression about brightness control.
You can follow the bug description and #189 to fix the touchpad with 5.8.0,
then you can have both Nvidia GPU and touchpad working.
Coiby Xu (coiby) wrote : | #350 |
On Mon, Jan 25, 2021 at 07:03:55PM -0000, Adam Felson wrote:
>Before I grab'n'build 5.11, I'd like to know if my issue is similar.
>I have a lenovo ideapad 730s.
>The touchpad works fine for pointing, single, double and triple clicks.
>I have tried both the synaptics and libinput drivers. It's been a while since I was comparing them; IIRC, I'm currently running the synaptics driver as libinput didn't have scrolling/coasting working.
>
>My problem is that palm detection and pressure sensitivity do not work.
>This makes the laptop pretty much unusable as it is almost impossible to
>do any text entry without the insertion point jumping to wherever the
>pointer was left.
>
>Might the 5.11 kernel fix it?
Your issue sounds different to this one. But you needn't to build the
kernel to see if the solution here works for you. You can try #189. If
it works for you, then 5.11 could also fix your issue. You may also want
to give https:/
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : | #351 |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/
tags: | added: verification-needed-xenial |
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : | #352 |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/
tags: | added: verification-needed-bionic |
tags: | added: verification-needed-groovy |
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : | #353 |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/
Nicolas Rogues (nrogues) wrote : | #354 |
Following the bot's message, I do not see a new kernel in -proposed ? (with 5.8.0-41-generic rightg now). Is this a bot bug, or is there a newer 5.8 kernel with all patches applied ?
Regarding brightness control, as mentioned early in the thread by Helmut, we also had the issue on this model. No version from 5.4 to 5.8 allowed it to work in discrete GPU mode.
Now things have a little changed since yesterday's update of NVIDIA runtimepm (bug 1895855) solving PRIME support issue, now I can boot in hybrid mode and enjoy brightness control when using the iGPU
https:/
Chelsea Sidrane (chelc) wrote : | #355 |
- error log from trying to install kernel 5.11.0 rc2 Edit (117.7 KiB, text/plain)
Thanks all for this thread!
I have the legion 5 with a MSFT0001:00 04F3:3186 Touchpad
graphics: 0NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
I got this error message when trying to do what Eamon (342) said (upgrade the kernel), as I too am new to kernel patching:
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.11.0-
It said to consult this log:
/var/lib/
which is attached.
It seems like maybe this isn't compatible with my nvidia graphics card (1660) for some reason?
Has anyone else has this problem?
So instead I tried to solve my touchpad issues by upgrading to 5.9.16 like Koen said in 325, but my it did not fix things :/
If there are no other "quick fixes" I supposed I will embark on the journey of applying #189. But just wondering -- will #189 work with the kernel I just installed: 5.9.16 or would I have to install 5.9.0-rc7-MANJARO+ ?
Chelsea Sidrane (chelc) wrote : | #356 |
Oh, I understand Nicolas' message now: maybe there is a patched 5.8 kernel I can just install?
tags: |
added: verification-failed-groovy removed: verification-needed-groovy |
Marton Danko (golddragon007) wrote : | #357 |
Marton Danko (golddragon007) wrote : | #358 |
Tested on kernel 5.11.0-rc6.
Coiby Xu (coiby) wrote : | #359 |
HI Nicolas,
On Fri, Jan 29, 2021 at 12:07:30PM -0000, Nicolas Rogues wrote:
>Following the bot's message, I do not see a new kernel in -proposed ?
>(with 5.8.0-41-generic rightg now). Is this a bot bug, or is there a
>newer 5.8 kernel with all patches applied ?
>
>Regarding brightness control, as mentioned early in the thread by
>Helmut, we also had the issue on this model. No version from 5.4 to 5.8
>allowed it to work in discrete GPU mode.
>
>Now things have a little changed since yesterday's update of NVIDIA runtimepm (bug 1895855) solving PRIME support issue, now I can boot in hybrid mode and enjoy brightness control when using the iGPU
>https:/
>
In hybrid mode, does external monitor work for you?
Paras (savnani5) wrote : | #360 |
Hey everyone, I am also facing this issue, but i am unable to make the touchpad work using the patch in #217 with #211's procedure. I can see some people were able to solve the issue without the patch using Ubuntu 20.04 and kernel 5.10/5.11. I work with ROS and as there is no official support for ROS on Ubuntu 20.04, can anyone please confirm if I can solve this on Ubuntu 18.04 by updating the kernel to 5.10/5.11 version(currently i have 5.4.0-65-generic). Thank You.
Baq Domalaq (baq) wrote : | #361 |
Hi Coiby Xu,
your two pinctrl patches arrived at Pop OS kernel 5.8. But I had to revert them cause without 3rd patch (gpio) they don't help with touchpad. And 3rd patch gives an error during kernel build, so it can't be applied.
Just FYI.
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : | #362 |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/
tags: | added: verification-needed-focal |
Armin Avdić (ru-fo) wrote : | #363 |
Hi, I want to test kernel in proposed but have no clue what to install, now I'm on
armin@armin-
5.8.0-41-generic
and when I list available kernels in proposed dont know what to try from this
apt list linux-*image-* | grep proposed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
linux-image-
Armin Avdić (ru-fo) wrote : | #364 |
Is this linux-image-
I'm new to this stuf so everything raises 100 question marks above my head.
thx
Marton Danko (golddragon007) wrote : | #365 |
From the command line, I don't know how to do it, I use usually the Mainline Kernel updater's one fork like https:/
You can check the name of the kernels i.e. here: https:/
groovy - 20.10
bionic - 18.04
focal - 20.04
xenial - 16.04
then you install the latest RC version from it, make sure it starts with the same numbers.
After a restart, the newest version will run.
To see RC you need to go to the Settings and enable prerelease or proposed versions or uncheck Hide unstable RC versions, I don't know the exact name of it.
Check #357 when you testing, probably you will face with the same issue, that the right physical click doesn't work as it should be (and some gestures). If that's that case then the test failed, if it works everything properly, then success.
How to run the older kernel, that's I don't know, you need to check with google.
Also, if you can't search for an issue in google, I suggest to not even try to test it, because RC releases can screw up anything and you may be stuck with a buggy machine that you need to reinstall. Do it on your own risk.
I also suggest doing a snapshot with timeshift from your system before you start the process, in case of problem you will be able to restore hopefully to that point your system. (pls google it how to do it)
Marton Danko (golddragon007) wrote : | #366 |
Note, you have only grub if you have legacy installation, if you installed with UEFI, you have something else and you need to look for that a guide!
Armin Avdić (ru-fo) wrote : | #367 |
I think it's not what I want to do, mainline and proposed kernels are not the same thing (I think).
I would like to install fix to the same kernel version that I'm runing or anything else to avoid problems with nvidia driver on mainline kernel releses. I already reinstalled everything 3 times tampering with this bug and would love not to do it again because I've setup a lot of stuf and dont want to do it again. For now I'm using i2c_standalone workaround but it's not running flawlessly (frequently stucks in scrolling mode or taps stops working...) so I want to test proposed solution.
Armin Avdić (ru-fo) wrote : | #368 |
I'm on dual-boot uefi and it's booting with grub?
Changed in linux (Ubuntu): | |
assignee: | Phan Thanh Long (phanlong2811) → nobody |
Nicolas Rogues (nrogues) wrote : | #369 |
Hi Coiby
To answer your question in message #359
> In hybrid mode, does external monitor work for you?
The answer is yes, it works. I tested the hotplug of an HDMI external monitor, it was detected by Ubuntu 20.04 and worked by default as an extended desktop (both internal & external display used, not cloned).
albertoiNET (albertoinet) wrote : | #370 |
Tested 5.11.0-
tags: |
added: verification-done-focal removed: verification-needed-focal |
Marton Danko (golddragon007) wrote : | #371 |
@albertoiNet on that version, if you press the right bottom corner of the touchpad does it do a primary or a secondary click? (it should do a secondary bringing up the context menu). Also, did you tried 3/4 finger gestures by any app? Because that also didn't work for me on another version.
albertoiNET (albertoinet) wrote : | #372 |
@Maton Danko pressing down on right is a secondary click. About multitouch I don't know any multigestures touch app. I'll try to find any app.
alex (agolks) wrote : | #374 |
i'm on focal with 5.4.0-66-generic, it seems touch is in kernel now, but not work very good.
have installed the gnome-tweaks and enabled mouse emulation "finger".
sometimes two clicks for right mouse action work, sometimes not.
very few times the 3 finger middle mouse action work, even.
haven't identified when and how to reproduce.
too old kernel?
alex (agolks) wrote : | #375 |
have update to 5.8.18-
this seems to work ok, will let you know if still issues with behaviour.
roselove (roselove) wrote : | #376 |
Hi, I think I personally tried everything from bbs.archlinux.org, forum.manjaro.org, reddit, https:/
I tried Coiby solution this very day (2021-02-14).
Nothing ever worked since I updated to 9.7 kernel (coiby solution was nice before that ^^)
Here is my lenovo model : https:/
Here is my touchpad model :
```
Input device ID: bus 0x18 vendor 0x6cb product 0x7f28 version 0x100
Input device name: "MSFT0001:00 06CB:7F28 Touchpad"
```
evtest gives that btw :
```
Testing ... (interrupt to exit)
expected 24 bytes, got -1
evtest: error reading: No such device
```
Now I'm running on `Kernel: 5.10.15-1-MANJARO`, I never managed to make touchpad OR brightness work \o/, I guess I'll need to reinstall everything someday but if anyone have any clue I guess I'll take it :D
boudicca (shazh) wrote : | #377 |
Touchpad MSFT0001:00 04F3:3140 fixed https:/
Thanks all
Marton Danko (golddragon007) wrote : | #378 |
I've checked the 5.11.0-rc7 and the touchpad still doesn't work properly, on the left and right bottom side the same primary action is being taken instead of secondary on the right and primary on the left!
Coiby Xu (coiby) wrote : | #379 |
Hi resolve,
On Sun, Feb 14, 2021 at 04:09:09PM -0000, roselove wrote:
>Hi, I think I personally tried everything from bbs.archlinux.org,
>forum.manjaro.org, reddit, https:/
>bugzilla, bugs.launchpad.net, etc...
>
>I tried Coiby solution this very day (2021-02-14).
>
>Nothing ever worked since I updated to 9.7 kernel (coiby solution was
>nice before that ^^)
>
>Here is my lenovo model :
>https:/
>
>Here is my touchpad model :
>```
>Input device ID: bus 0x18 vendor 0x6cb product 0x7f28 version 0x100
>Input device name: "MSFT0001:00 06CB:7F28 Touchpad"
>```
>
>evtest gives that btw :
>```
>Testing ... (interrupt to exit)
>expected 24 bytes, got -1
>
>evtest: error reading: No such device
>```
>
Did the above error happens when using https:/
Have you tried what's suggested in the bug description?
>Now I'm running on `Kernel: 5.10.15-1-MANJARO`, I never managed to make
>touchpad OR brightness work \o/, I guess I'll need to reinstall
>everything someday but if anyone have any clue I guess I'll take it :D
>
As for the brightness issue, https:/
works for me.
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https:/
>
>Title:
> MSFT Touchpad not working on Lenovo Legion-5 15ARH05
>
>Status in Pop!_OS:
> New
>Status in linux package in Ubuntu:
> Confirmed
>Status in xserver-
> Confirmed
>Status in linux package in Arch Linux:
> Fix Committed
>Status in linux package in Fedora:
> Confirmed
>Status in linux package in openSUSE:
> New
>
>Bug description:
> Update (based on #296)
> =============
>
> The latest kernel tree
> (https:/
> has the complete solution to fix this bug. So we can expect kernel
> v5.11 to fix this issue without any additional work.
>
> Before the release of v5.11, you are suggested to use #189 to save your touchpad. Note that for distributions like Ubuntu and Fedora, the pinctrl-amd driver is built into the initramfs. So you have to rebuild the initramfs after replacing the old module with new one.
> On Fedora, run `sudo dracut --force`; On ubuntu, run `sudo update-initramfs -u`.
>
> The complete solution is three patches,
> - 47a0001436352c9
> - 06abe8291bc3183
> - 8dcb7a15a585b6d
>
> The first two patches has reached the stable tree. If the last one is
> also backported to LTS kernel, you won't need to install kernel 5.11.
> But I don't know when this will happen.
>
> Original bug report
> ===================
>
> Hello
>
> The MSFT touchpad of this Lenovo Legion-5 15ARH05 laptop is not reacting at all (pointer and click never move when touchpad is touched). This has been reported by other users in va...
Coiby Xu (coiby) wrote : | #380 |
Hi Maton,
On Mon, Feb 15, 2021 at 08:46:57AM -0000, Maton Danko wrote:
>I've checked the 5.11.0-rc7 and the touchpad still doesn't work
>properly, on the left and right bottom side the same primary action is
>being taken instead of secondary on the right and primary on the left!
>
5.11.0-rc7 is expected to fix your touchpad. Could you paste the output of
"sudo cat /sys/kernel/
"sudo evest" when you lick the left bottom and right bottom button?
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https:/
>
>Title:
> MSFT Touchpad not working on Lenovo Legion-5 15ARH05
>
>Status in Pop!_OS:
> New
>Status in linux package in Ubuntu:
> Confirmed
>Status in xserver-
> Confirmed
>Status in linux package in Arch Linux:
> Fix Committed
>Status in linux package in Fedora:
> Confirmed
>Status in linux package in openSUSE:
> New
>
>Bug description:
> Update (based on #296)
> =============
>
> The latest kernel tree
> (https:/
> has the complete solution to fix this bug. So we can expect kernel
> v5.11 to fix this issue without any additional work.
>
> Before the release of v5.11, you are suggested to use #189 to save your touchpad. Note that for distributions like Ubuntu and Fedora, the pinctrl-amd driver is built into the initramfs. So you have to rebuild the initramfs after replacing the old module with new one.
> On Fedora, run `sudo dracut --force`; On ubuntu, run `sudo update-initramfs -u`.
>
> The complete solution is three patches,
> - 47a0001436352c9
> - 06abe8291bc3183
> - 8dcb7a15a585b6d
>
> The first two patches has reached the stable tree. If the last one is
> also backported to LTS kernel, you won't need to install kernel 5.11.
> But I don't know when this will happen.
>
> Original bug report
> ===================
>
> Hello
>
> The MSFT touchpad of this Lenovo Legion-5 15ARH05 laptop is not reacting at all (pointer and click never move when touchpad is touched). This has been reported by other users in various websites, with various linux systems including other Ubuntu systems, but I saw no launchpad bug so I post one. Example of websites covering the issue :
> - https:/
> - https:/
>
> xinput indentifies it as MSFT0001:00 04F3:3140
>
> Virtual core pointer id=2 [master pointer (3)]
> ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
> ⎜ ↳ MSFT0001:00 04F3:3140 Touchpad id=17 [slave pointer (2)]
> ⎜ ↳ MSFT0001:00 04F3:3140 Mouse id=16 [slave pointer (2)]
> ⎜ ↳ ITE Tech. Inc. ITE Device(8910) Consumer Con...
Marton Danko (golddragon007) wrote : | #381 |
Hi Coiby,
Here are they:
$ sudo cat /sys/kernel/
pin130 Level trigger| Active low| interrupt is enabled| interrupt is unmasked| disable wakeup in S0i3 state| disable wakeup in S3 state|
disable wakeup in S4/S5 state| input is high| pull-up is disabled| Pull-down is disabled| output is disabled| debouncing filter disabled| 0x51b00
I did a left, right and middle click. Between them 2-3 sec delay.
Launchpad Janitor (janitor) wrote : | #382 |
This bug was fixed in the package linux - 5.4.0-66.74
---------------
linux (5.4.0-66.74) focal; urgency=medium
* focal/linux: 5.4.0-66.74 -proposed tracker (LP: #1913152)
* Add support for selective build of special drivers (LP: #1912789)
- [Packaging] Add support for ODM drivers
- [Packaging] Turn on ODM support for amd64
* Packaging resync (LP: #1786013)
- update dkms package versions
- update dkms package versions
* Introduce the new NVIDIA 460-server series and update the 460 series
(LP: #1913200)
- [Config] dkms-versions -- drop NVIDIA 435 455 and 440-server
- [Config] dkms-versions -- add the 460-server nvidia driver
* Enable mute and micmute LED on HP EliteBook 850 G7 (LP: #1910102)
- ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7
* SYNA30B4:00 06CB:CE09 Mouse on HP EliteBook 850 G7 not working at all
(LP: #1908992)
- HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device
* HD Audio Device PCI ID for the Intel Cometlake-R platform (LP: #1912427)
- SAUCE: ALSA: hda: Add Cometlake-R PCI ID
* switch to an autogenerated nvidia series based core via dkms-versions
(LP: #1912803)
- [Packaging] nvidia -- use dkms-versions to define versions built
- [Packaging] update-version-dkms -- maintain flags fields
- [Config] dkms-versions -- add transitional/skip information for nvidia
packages
* udpgro.sh in net from ubuntu_
result (LP: #1908499)
- selftests: fix the return value for UDP GRO test
* qede: Kubernetes Internal DNS Failure due to QL41xxx NIC not supporting IPIP
tx csum offload (LP: #1909062)
- qede: fix offload for IPIP tunnel packets
* Use DCPD to control HP DreamColor panel (LP: #1911001)
- SAUCE: drm/dp: Another HP DreamColor panel brigntness fix
* kvm: Windows 2k19 with Hyper-v role gets stuck on pending hypervisor
requests on cascadelake based kvm hosts (LP: #1911848)
- KVM: x86: Set KVM_REQ_EVENT if run is canceled with req_immediate_exit set
* Ubuntu 20.10 four needed fixes to 'Add driver for Mellanox Connect-IB
adapters' (LP: #1905574)
- net/mlx5: Fix a race when moving command interface to polling mode
* Fix right sounds and mute/micmute LEDs for HP ZBook Fury 15/17 G7 Mobile
Workstation (LP: #1910561)
- ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines
* Ubuntu 20.04 - multicast counter is not increased in ip -s (LP: #1901842)
- net/mlx5e: Fix multicast counter not up-to-date in "ip -s"
* eeh-basic.sh in powerpc from ubuntu_
P9 (LP: #1882503)
- selftests/
* DMI entry syntax fix for Pegatron / ByteSpeed C15B (LP: #1910639)
- Input: i8042 - unbreak Pegatron C15B
* CVE-2020-29372
- mm: check that mm is still valid in madvise()
* update ENA driver, incl. new ethtool stats (LP: #1910291)
- net: ena: Change WARN_ON expression in ena_del_
- net: ena: ethtool: convert stat_offset to 64 bit resolution
- net: ena: eth...
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
Marton Danko (golddragon007) wrote : | #383 |
Hi Coiby,
Did you find anything about why it still doesn't work properly on my machine?
Piotr Tomaszewski (nfm886) wrote : | #384 |
"This bug was fixed in the package linux - 5.4.0-66.74"
Wait, current kernel in Ubuntu 20.04.2 is 5.8 so can I expect to have it working on Ubuntu 20.04.2 without any hassle or I have to switch kernel?
Joe Zhou (joezhouchenye) wrote : | #385 |
Works fine after installing hwe kernel using apt.(5.8.0.44 Ubuntu 20.04 Lenovo R7000P)
Coiby Xu (coiby) wrote : | #386 |
Hi Marton,
On Tue, Feb 23, 2021 at 05:00:30PM -0000, Marton Danko wrote:
>Hi Coiby,
>
>Did you find anything about why it still doesn't work properly on my
>machine?
>
Your GPIO pin register value for the touchpad is 0x51b00 which means the
root cause has been fixed. I've less certain about the evest result but
I don't find something suspicious when comparing it with my laptop. Can
you create another user and check if the problem still occurs after
logging in?
Marton Danko (golddragon007) wrote : | #387 |
I've done it and it's still registered primary action for that user too, it did not change anything.
Azizkhan (injkgz) wrote : | #388 |
Tried - 5.4.0-66.74, 5.8.0.44 and 5.11 kernels, nothing worked for me, but i2c-hid and another one patches fixes problem. What can i do?
Shatadru Banerjee (satadru-bag) wrote : | #390 |
Can anyone please give a summary of the solution? What works what does not? I am using 5.11 on ubuntu 20.04. The touchpad works (not great though) but I cannot use nvidia gpu, hence stuck with the iGPU. The brightness control does not work perfectly. Is it possible to able to use touchpad and the nvidia GPU at the same time? Am I missing something here?
Thanks in advance.
Baq Domalaq (baq) wrote : | #391 |
Hi Shatadru Banerjee (satadru-bag)
I think you should stick to patches and an official kernel of your distro for now.
I use Pop OS 20.10 with kernel 5.8.*. I used to apply the patch in comment #171 and rebuild the kernel to fix my touchpad.
Now two of the 3 new patches which Coiby Xu mentions in this bug description are landed to latest kernel updates of my distro. But without the third patch the touchpad doesn't work correctly. And the patch #171 doesn't work now like before. So I have to revert patches 47a0001436352c9
I think my NVidia works ok.
I'm going to do that until the third patch arrives to my distro. Or a new version of distro will be released (and hopefully everything will work out of the box). Which is in June I think.
Coiby Xu (coiby) wrote : | #392 |
On Wed, Feb 24, 2021 at 04:20:15PM -0000, Marton Danko wrote:
>I've done it and it's still registered primary action for that user too,
>it did not change anything.
I still think there's something wrong in the user space. I found a
similar bug report [1]. What's the output of "sudo libinput
debug-events" when you click the button at the right corner?
$ sudo libinput debug-events
-event7 DEVICE_ADDED MSFT0001:00 06CB:7F28 Mouse seat0 default group8 cap:p left scroll-nat scroll-button
-event8 DEVICE_ADDED MSFT0001:00 06CB:7F28 Touchpad seat0 default group8 cap:pg size 102x67mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonare
-event8 POINTER_BUTTON +5.491s BTN_RIGHT (273) pressed, seat count: 1
event8 POINTER_BUTTON +5.612s BTN_RIGHT (273) released, seat count: 0
event8 POINTER_BUTTON +7.796s BTN_LEFT (272) pressed, seat count: 1
event8 POINTER_BUTTON +7.953s BTN_LEFT (272) released, seat count: 0
Shatadru Banerjee (satadru-bag) wrote : | #393 |
Still confused. Anyway, I want to report that with kernel 5.11 I cannot connect to external display using HDMI. Does this problem appear because of using mainline kernel?
Marton Danko (golddragon007) wrote : | #394 |
Hi Coiby,
Thanks, it seems that correctly telling which hardware button do I press.
Right:
-event18 POINTER_BUTTON +0.174s BTN_RIGHT (273) pressed, seat count: 1
event18 POINTER_BUTTON +0.318s BTN_RIGHT (273) released, seat count: 0
Middle:
event18 POINTER_BUTTON +3.086s BTN_MIDDLE (274) pressed, seat count: 1
event18 POINTER_BUTTON +3.362s BTN_MIDDLE (274) released, seat count: 0
Left:
event18 POINTER_BUTTON +5.132s BTN_LEFT (272) pressed, seat count: 1
event18 POINTER_BUTTON +5.271s BTN_LEFT (272) released, seat count: 0
And in the mentioned bug report the following resolution works:
"Apparently it's a change they did in GNOME 3.28 and can be fixed by switching to Area mouse click emulation in GNOME Tweaks."
Thanks for your help, and now I need to go to the corner to cry again, why such a stupid default configuration is shipped with the system...
Mohamed Abba (kaderabba) wrote : | #395 |
Hi Baq Domalaq (baq),
how do you revert the patches and apply #170?
Baq Domalaq (baq) wrote : | #396 |
Hi Mohamed,
please DM me about that.
Coiby Xu (coiby) wrote : | #397 |
On Fri, Feb 26, 2021 at 02:28:24PM -0000, Marton Danko wrote:
>Hi Coiby,
>
>Thanks, it seems that correctly telling which hardware button do I press.
>Right:
>-event18 POINTER_BUTTON +0.174s BTN_RIGHT (273) pressed, seat count: 1
> event18 POINTER_BUTTON +0.318s BTN_RIGHT (273) released, seat count: 0
>Middle:
> event18 POINTER_BUTTON +3.086s BTN_MIDDLE (274) pressed, seat count: 1
> event18 POINTER_BUTTON +3.362s BTN_MIDDLE (274) released, seat count: 0
>Left:
> event18 POINTER_BUTTON +5.132s BTN_LEFT (272) pressed, seat count: 1
> event18 POINTER_BUTTON +5.271s BTN_LEFT (272) released, seat count: 0
>
>And in the mentioned bug report the following resolution works:
>"Apparently it's a change they did in GNOME 3.28 and can be fixed by switching to Area mouse click emulation in GNOME Tweaks."
>
Good to know that:)
>Thanks for your help, and now I need to go to the corner to cry again,
>why such a stupid default configuration is shipped with the system...
>
You are welcome!
Piotr Tomaszewski (nfm886) wrote : | #398 |
Tested Ubuntu 20.04.2/20.10 with all updates. Touchpad not working... How to make it works?
Helmut Stult (helmut-stult) wrote : | #399 |
@Coiby Xu (coiby)
My touchpad MSFT0001:00 04F3:3140 works fine with Kernel 5.11, but stops working with the new 5.12-rc1
So far I haven't found the cause.
Helmut Stult (helmut-stult) wrote : | #400 |
Helmut Stult (helmut-stult) wrote : | #401 |
This is the working kernel 5.11
Helmut Stult (helmut-stult) wrote : | #402 |
Works again - have to set CONFIG_
Helmut Stult (helmut-stult) wrote : | #403 |
Piotr Henryk Dabrowski (phd) wrote : | #404 |
Does this touchpad (and iGPU <-> nVidia switching) work fine in Ubuntu 20.10?
Coiby Xu (coiby) wrote : | #405 |
On Tue, Mar 02, 2021 at 01:40:54AM -0000, Helmut Stult wrote:
>Works again - have to set CONFIG_
Well done!
Shatadru Banerjee (satadru-bag) wrote : | #406 |
I want to politely point out that this thread is not helping anymore; it has become mere chit-chat. Things were confusing to begin with and unfortunately it is becoming more confusing. What is the fix? Does is work with a particular kernel? The use of mainline kernel 5.11 should solve all the problems? Is this nvidia gpu issue related to the solution to the trackpad? Why can't the external monitor work, even with the AMD iGPU? Most importantly, what one should do to have a working touchpad, working nvida gpu and working external monitor? Please reply only if you know what are you going to write.
pravin poudel (poudprav) wrote : | #407 |
Touchpad issue and brightness is different. Touchpad is working with kernel 5.11.
A solution for brightness issue is here: https:/
but I don't think it is in the kernel yet.
Shatadru Banerjee (satadru-bag) wrote : | #408 |
I did not mention brightness issue. With 5.11.3 the brightness does not work flawlessly however there are more serious problems. 1. External monitor not detected via HDMI, 2. still the wifi is not stable, 3. cannot switch to nvidia.
Baq Domalaq (baq) wrote : | #409 |
Pop OS 20.10 has updated to kernel 5.11 and touchpad now works out of the box without patching.
This is a great day for my laptop!
Shatadru Banerjee (satadru-bag) wrote : | #410 |
This thread has gone from stupid to completely pointless.
James Hennig (kissykitty) wrote : | #411 |
Since this is the main thread on the Internet about this issue, I suppose it is appropriate to post here even though I am using Manjaro.
- This issue is non-present on a Thinkpad 3 14ADA05 with touchpad MSFT0001:00 06CB:CE2D on kernel 5.9.16-1 which uses i2c_hid. It is not elantech or designware (doesn't load the associated specific i2c drivers). Installing an entirely new keyboard panel with a new touchpad, essentially rebuilding the entire laptop does not address this issue. It is the same model touchpad for this specific laptop model even if you order a new one (unless I got bad luck of the draw).
- The issue becomes present on kernel 5.10.23-1 (and previous versions of 5.10) up to 5.12rc3. Have not tried compiling 5.12rc5, but no reason to believe it would work.
The touchpad will fail to be recognized and work on bootup between 1-30 reboots. I have tried many things such as different kernels and GRUB_CMDLINE_
I don't really know how to compare the entire torn-apart kernels 5.9 and 5.10 to try and find what change(s) could possibly cause this bug. Hopefully someone else knows how to?
Might be able to get somewhere if so...
Other mods might be replacing the touchpad with a model not designed for the laptop, but I don't know where to start with that either.
James Hennig (kissykitty) wrote : | #412 |
I don't know what I was comparing before, but I was wrong. The pinctrl-amd.c drivers are different between the two kernels. Apologies. I wonder if just dropping in the 5.9 pinctrl-amd.c driver (+possibly other related needed ones?) into 5.10 (or later) would work?
Changed in pop-os: | |
status: | New → Fix Released |
Coiby Xu (coiby) wrote : | #413 |
On Sat, Mar 06, 2021 at 03:24:35PM -0000, Shatadru Banerjee wrote:
>I want to politely point out that this thread is not helping anymore; it
>has become mere chit-chat. Things were confusing to begin with and
>unfortunately it is becoming more confusing. What is the fix? Does is
>work with a particular kernel? The use of mainline kernel 5.11 should
>solve all the problems? Is this nvidia gpu issue related to the solution
>to the trackpad? Why can't the external monitor work, even with the AMD
>iGPU? Most importantly, what one should do to have a working touchpad,
>working nvida gpu and working external monitor? Please reply only if you
>know what are you going to write.
On Sat, Mar 13, 2021 at 03:17:55AM -0000, Shatadru Banerjee wrote:
>I did not mention brightness issue. With 5.11.3 the brightness does not
>work flawlessly however there are more serious problems. 1. External
>monitor not detected via HDMI, 2. still the wifi is not stable, 3.
>cannot switch to nvidia.
On Thu, Apr 01, 2021 at 03:06:02AM -0000, Shatadru Banerjee wrote:
>This thread has gone from stupid to completely pointless.
Sorry to know this thread didn't help you. This thread only deals with
the touchpad issue and it's too long to follow. But I've summarized
what's needed in the beginning of the bug report. As far as I know, the
fix for the touchpad doesn't affect nvidia issue. In fact, I don't
experience any of the issues you mentioned including external monitor
not detected and brightness issue on Manjara with kernel=5.11.6-1
after installing optimus manager [1]. [1] is "a port to Archlinux of the
nvidia-prime solution created by Canonical for Ubuntu" so I assume the
issues of external monitor and brightness don't bother Ubuntu users
either.
Coiby Xu (coiby) wrote : | #414 |
On Mon, Apr 05, 2021 at 03:22:24PM -0000, James Hennig wrote:
>Since this is the main thread on the Internet about this issue, I
>suppose it is appropriate to post here even though I am using Manjaro.
>
>- This issue is non-present on a Thinkpad 3 14ADA05 with touchpad
>MSFT0001:00 06CB:CE2D on kernel 5.9.16-1 which uses i2c_hid. It is not
>elantech or designware (doesn't load the associated specific i2c
>drivers). Installing an entirely new keyboard panel with a new touchpad,
>essentially rebuilding the entire laptop does not address this issue. It
>is the same model touchpad for this specific laptop model even if you
>order a new one (unless I got bad luck of the draw).
If kernel 5.9.16-1 with i2c_hid driver worked for you, I'd suggest you
stick with the i2c_hid that comes with kernel 5.9.16-1 and build a
stand-alone driver for newer kernel and replace newer i2c_hid driver.
>
>- The issue becomes present on kernel 5.10.23-1 (and previous versions
>of 5.10) up to 5.12rc3. Have not tried compiling 5.12rc5, but no reason
>to believe it would work.
>
>The touchpad will fail to be recognized and work on bootup between 1-30
>reboots. I have tried many things such as different kernels and
>GRUB_CMDLINE_
>config option others are suggesting (Manjaro removed then reinstated the
>CONFIG_
>look at the pinctrl-amd.c driver and found that there was no difference
>between the two on these kernels, so it is something other than what
>https:/
>addresses since it works on the former kernel but not the latter. Also,
>the patch fails to apply on 5.12rc5.
>
>I don't really know how to compare the entire torn-apart kernels 5.9 and
>5.10 to try and find what change(s) could possibly cause this bug.
>Hopefully someone else knows how to?
>
>Might be able to get somewhere if so...
>
>Other mods might be replacing the touchpad with a model not designed for
>the laptop, but I don't know where to start with that either.
>
James Hennig (kissykitty) wrote : | #415 |
Hey there @Coiby Xu thank you,
I think I understand what you mean, basically use your Github for this, standalone_i2c_hid, but copy the i2c drivers from the cloned Manjaro kernel 5.9.16-1 ../src/
Just as a reference, directly dropping in /lib/modules/
*******
I was able to compile the Manjaro 5.9.16-1 source files into a module (on 5.11.6-1 using linux511-headers) using your provided Makefile and followed the instructions to copy the compiled module into the 5.11.6-1-MANJARO ../i2c-hid/ directory. Also added the GRUB options and ran "sudo update-grub". It functioned, but did not fix the issue. Froze after 2 reboots.
I also tried compiling the Github project as it is, using the provided source files (on 5.11.6-1 using linux511-headers) and it spit out:
ERROR: modpost "irq_to_desc" (in ../i2c-
../i2c-
Also I wanted to point out in your README the instruction to append "i2c_hid.
Thanks for all your help, it was worth a shot. Maybe your code needs to be updated for recent kernels?
I am still trying to play with the idea of focusing on the pinctrl-amd.c driver, but really need some help with what to do with that driver. I am not sure the culprit is the i2c_hid driver, but rather this driver. Maybe I'm wrong, but it certainly is the next place to look...
Fun things to try!
James Hennig (kissykitty) wrote : | #416 |
Well, I spent the past few hours pouring over the entirety of this thread and I didn't try the patches to pinctrl-amd.c provided by @Helmut Stult in post #317. These were downloaded and placed in the same source directory as the other patches for Manjaro kernel 5.11.13-1 and lines were added to the PKGBUILD file for the patches.
- 0303-pinctrl-
- 0303-revert-
However, this too did not resolve the issue. The touchpad failed on bootup in the expected 1-30 reboot range (Got to 9 reboots), just as if no patch were applied. I am out of ideas and need some help from an expert, @Coiby Xu. There is nothing else for me to try and I'm not a programmer so I don't know how to create a solution from scratch.
Thanks for any help moving forward.
James Hennig (kissykitty) wrote : | #417 |
The solution has been found and should have been rather obvious in the first place... Just try a different distribution.
I decided to try out Linux Mint 20.1 and have been testing it for the past ~6 hours, completely stock (except for all updates installed), no kernel modifications or GRUB options and it works every time on bootup with the touchpad. I am rather surprised that such a relatively old kernel (5.4) works with this new-ish laptop. Perhaps this was why I was so falsely focused on having newer kernels available in a distribution in the first place.
I even tried 40 consecutive reboots whilst messing with the touchpad as the machine was booting and it still worked every time. Let it be known that the fix for the Lenovo IdeaPad 3 14ADA05 is to simply install Linux Mint. I have to imagine that other Ubuntu-based installs also work with this particular laptop, especially since it says "Fix Released" under Ubuntu and Ubuntu-related distributions.
As far as Manjaro goes, also let it be known that something was introduced after Kernel 5.9.16-1 which breaks the ability for the touchpad to reliably work with this laptop. My best educated guess is that something is loaded too early or too late during bootup which gets jumbled up at random. No idea what that could possibly be, but I hope that Manjaro devs might take note. I know that at least @Helmut Stult might still be looking in this thread.
I consider this fixed for my laptop :)
This change was made by a bot.