MSFT Touchpad not working on Lenovo Legion-5 15ARH05
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Pop!_OS |
Undecided
|
Unassigned | ||
| linux (Arch Linux) |
Fix Committed
|
Undecided
|
Unassigned | |
| linux (Fedora) |
Confirmed
|
Undecided
|
Unassigned | |
| linux (Ubuntu) |
Undecided
|
Phan Thanh Long | ||
| linux (openSUSE) |
New
|
Undecided
|
Unassigned | |
| xserver-xorg-input-libinput (Ubuntu) |
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
Nicolas Rogues (nrogues) wrote : | #1 |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Kai-Heng Feng (kaihengfeng) wrote : | #3 |
Please test latest mainline kernel:
https:/
tags: | added: hwe-touchpad |
apport information
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 |
Here you go
Nicolas
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 |
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 |
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... :(
no longer affects: | linux |
information type: | Public → Public Security |
information type: | Public Security → Public |
information type: | Public → Public Security |
information type: | Public Security → Private Security |
information type: | Private Security → Public |
no longer affects: | linux |
tags: | added: patch |
Changed in linux (Arch Linux): | |
status: | Confirmed → Fix Committed |
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
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"
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 : Re: [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05 | #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
This change was made by a bot.