[Ubuntu-x-swat] [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05

2021-04-15 Thread James Hennig
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 :)

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-input-libinput in Ubuntu.
https://bugs.launchpad.net/bugs/1887190

Title:
  MSFT Touchpad not working on Lenovo Legion-5 15ARH05

To manage notifications about this bug go to:
https://bugs.launchpad.net/pop-os/+bug/1887190/+subscriptions

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05

2021-04-11 Thread James Hennig
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-amd2.patch fails to apply with error "Hunk #1 FAILED at 472". 
This is presumably because the code that the patch is trying to change is not 
present in 5.11.13-1, if I am right in my interpretation of it.
- 
0303-revert-pinctrl_amd_remove_debounce_filter_setting_in_IRQ_type_setting.patch
 - Successfully validates, applies and I was able to compile and install 
5.11.13-1 and the kernel functions on bootup.

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.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-input-libinput in Ubuntu.
https://bugs.launchpad.net/bugs/1887190

Title:
  MSFT Touchpad not working on Lenovo Legion-5 15ARH05

To manage notifications about this bug go to:
https://bugs.launchpad.net/pop-os/+bug/1887190/+subscriptions

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05

2021-04-10 Thread James Hennig
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/linux-5.9/drivers/hid/i2c-hid/ directory into the
../i2c-hid_standalone/ directory in your project (replacing all 3 source
files without the Makefile), then compile it and replace the according
module in my running system.

Just as a reference, directly dropping in
/lib/modules/5.9.16-1-MANJARO/kernel/drivers/hid/i2c-hid/i2c-hid.ko.xz
into the respective 5.11.6-1-MANJARO ../i2c-hid/ directory, then running
"mkinitcpio -P linux511" (to use the new module.. if this is how to do
it?) does not work, in case anyone was wondering. Touchpad immediately
froze on bootup.

**

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-hid-standalone/i2c-hid.ko) undefined !
../i2c-hid-standalone/Module.symvers Error 1

Also I wanted to point out in your README the instruction to append
"i2c_hid.polling_mode=1" to GRUB_CMDLINE_LINUX. Shouldn't this be
appended to GRUB_CMDLINE_LINUX_DEFAULT? I don't really know, I've just
never seen the non-_DEFAULT line used before. In either case, produces
same results.

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!

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-input-libinput in Ubuntu.
https://bugs.launchpad.net/bugs/1887190

Title:
  MSFT Touchpad not working on Lenovo Legion-5 15ARH05

To manage notifications about this bug go to:
https://bugs.launchpad.net/pop-os/+bug/1887190/+subscriptions

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05

2021-04-05 Thread James Hennig
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?

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-input-libinput in Ubuntu.
https://bugs.launchpad.net/bugs/1887190

Title:
  MSFT Touchpad not working on Lenovo Legion-5 15ARH05

To manage notifications about this bug go to:
https://bugs.launchpad.net/pop-os/+bug/1887190/+subscriptions

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-x-swat] [Bug 1887190] Re: MSFT Touchpad not working on Lenovo Legion-5 15ARH05

2021-04-05 Thread James Hennig
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_LINUX_DEFAULT options, yes even checking to set the kernel
config option others are suggesting (Manjaro removed then reinstated the
CONFIG_I2C_HID_ACPI=m option). I also tore apart kernels 5.9 and 5.10 to
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://launchpadlibrarian.net/500948605/0303-pinctrl-amd2.patch
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.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-input-libinput in Ubuntu.
https://bugs.launchpad.net/bugs/1887190

Title:
  MSFT Touchpad not working on Lenovo Legion-5 15ARH05

To manage notifications about this bug go to:
https://bugs.launchpad.net/pop-os/+bug/1887190/+subscriptions

___
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp