# What drivers are needed for Lenovo Legion 15ARH05 touchpad?

## RayDude

I've not found any specific gentoo posts on this. The device is apparently i2c HID, which I have enabled, but it is still not working.

Apparently stock kernels from Arch, Ubuntu, etc just work.

Does anyone know what kernel options are needed for the touchpad to work?

Thanks in advance.

Update: I tried kubuntu 20.10 and no go... I'm trying Arch Next.

----------

## mega_flow

```
CONFIG_I2C_HID_ACPI 

CONFIG_HID_MULTITOUCH 
```

under drivers and HID support with 5.12 kernel

CONFIG_I2C_HID for 5.10 kernel

----------

## RayDude

 *mega_flow wrote:*   

> 
> 
> ```
> CONFIG_I2C_HID_ACPI 
> 
> ...

 

Thanks. I'm running 5.13.0 and I was missing HID_MULTITOUCH, but turning it on didn't work.

Is there something I can grep for in dmesg to figure out what is going on?

Do I need anything besides synaptics enabled in USE?

Thanks again. I've been using a mouse for over a year now and forgot one on vacation.

----------

## Princess Nell

I probably can't help, but a few ideas ...

Anything interesting from grep psmouse /var/log/dmesg ?

Does xinput identify it as synaptics? There is a big thread over on lenovo forums "Lenovo Legion 5 15ARH05 Touchpad not working in any Linux", and one poster mentioned it's ELAN, and it may or may not be i2c. In https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190, the reporter identifies it as MSFT. It's probably safe to assume that the same laptop model does NOT alway use the same touchpad.

If it is i2c and synaptics - is CONFIG_MOUSE_SYNAPTICS_I2C enabled (if it still exists in 5.13)?

----------

## RayDude

 *Princess Nell wrote:*   

> I probably can't help, but a few ideas ...
> 
> Anything interesting from grep psmouse /var/log/dmesg ?

 

Nothing in dmesg about psmouse.

 *Princess Nell wrote:*   

> Does xinput identify it as synaptics? There is a big thread over on lenovo forums "Lenovo Legion 5 15ARH05 Touchpad not working in any Linux", and one poster mentioned it's ELAN, and it may or may not be i2c. In https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190, the reporter identifies it as MSFT. It's probably safe to assume that the same laptop model does NOT alway use the same touchpad.
> 
> If it is i2c and synaptics - is CONFIG_MOUSE_SYNAPTICS_I2C enabled (if it still exists in 5.13)?

 

I enabled ELAN and microsoft as module, as well as synaptics. It still doesn't work. I'm trying to probe the i2c channels now to figure out where it actually is and hopefully what its called.

----------

## mega_flow

Can u try gentoo-kernel-bin. If that work 

build your  kernel with make localmodconfig.

----------

## RayDude

Update:

ubuntu 21.04 worked out of the box with the track pad. It uses kernel 5.11. I copied the kernel config from there and rebuilt my kernel. I had to tweak a bit of everything, wait forever for the kernel to build and install 5.4GB of modules, but at least it is working.

Now I have to figure out what options changed that made a difference...

It the magical MSFT driver, but I have no idea what it is called in the kernel config...

----------

## Princess Nell

So you could check those things under Ubuntu ...

Also /proc/bus/input/devices.

This link might be interesting. https://gist.github.com/jbuncle/7dacde983b3c33b3b816b10e2fd2308a.

Also here, https://www.reddit.com/r/linux/comments/5bxu94/how_does_linux_handle_microsoft_precision/, where a claim is made about these touchpads without backing it up with a reference, and a linked posting, https://www.reddit.com/r/linux/comments/58l6tq/does_microsofts_precision_touchpad_system_just/ that mentions RMI4.

```

# grep RMI4 .config 

CONFIG_RMI4_CORE=y

# CONFIG_RMI4_I2C is not set

CONFIG_RMI4_SMB=y

CONFIG_RMI4_F03=y

CONFIG_RMI4_F03_SERIO=y

CONFIG_RMI4_2D_SENSOR=y

CONFIG_RMI4_F11=y

CONFIG_RMI4_F12=y

CONFIG_RMI4_F30=y

CONFIG_RMI4_F34=y

CONFIG_RMI4_F3A=y

CONFIG_RMI4_F55=y

```

I only became aware of RMI4 yesterday when I looked over dmesg and there was an entry along the lines of "there is better driver supported for this synaptics touchpad if you enable MOUSE_PS2_SYNAPTICS_SMBUS and [some other option I forgot because it was already enabled]". So for good measure, I also added the RMI4 settings. dmesg is now changed to

```

[    2.670533] psmouse serio1: synaptics: Trying to set up SMBus access

[    2.673784] psmouse serio1: synaptics: SMbus companion is not ready yet

```

This is an older T-series with a synaptics touchpad.

----------

## RayDude

I found an awesome command for the linux kernel.

make localmodconfig which enables the drivers you need based on lsmod and disables the rest.

I suspect it did too much work, I'll have to see how much I need to re-enable.

It dramatically simplified the kernel.

I just looked in make menuconfig and it looks like it only left hid_multitouch and i2c_hid_acpi (and derivatives) enabled. I wonder if it's really going to work.

I'll update after I reboot.

----------

## RayDude

 *mega_flow wrote:*   

> Can u try gentoo-kernel-bin. If that work 
> 
> build your  kernel with make localmodconfig.

 

Thanks! I just found localmodconfig with a google search! I didn't think of using that new-fangled gentoo-kernel-bin! I bet that would have saved me a lot of time!!!!

----------

## RayDude

Update: It totally worked! I'll have to check qemu / kvm, vpn and a few other things to make sure their modules didn't get removed, but building the kernel and installing went from a long time to a pretty short time (sorry no metrics).

Thanks everyone! I really appreciate this community.

----------

## RayDude

VPN isn't working. I've added a few things that might be related based on the PLUTO log, but nothing has worked. I wish that software had better debug information.

But, since I know it worked with the giant config from Ubunty, I'd just go back to that and make sure I was using all the modules needed for VPN and rerun make localmodconfig to get the feature back without needing the world.

However, I thought I could use this as a learning experience and install gentoo-kernel-binary, but it won't let me add a keyword?

```
threads /usr/src # emerge =sys-kernel/gentoo-kernel-bin-5.12.19-r1 -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "=sys-kernel/gentoo-kernel-bin-5.12.19-r1" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-kernel/gentoo-kernel-bin-5.12.19-r1::gentoo (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook.

threads /usr/src # cat /etc/portage/package.accept_keywords/gentoo-kernel-bin

sys-kernel/gentoo-kernel-bin
```

I must be missing something. This is literally the first thing I learned to do in 2003 when I started using Gentoo.

Can anyone see my mistake?

----------

## Princess Nell

~amd64

----------

## RayDude

Yeah. That's what I'm doing, by putting a file in /etc/portage/package.accept_keywords/ with the package name, the amd64 is assumed.

----------

## Hu

A bare name in package.accept_keywords implies accepting ~arch for your current architecture.  The error message says "missing keyword", meaning the package is neither amd64 nor ~amd64.  As of now, the only keyword on it is ~arm64.  Therefore, accepting ~amd64 is not effective here.  You must accept the special keyword **.  Since this is a -bin package, that will satisfy Portage, but probably fail later.  Overriding a missing keyword can be useful for a source package where you know better than the maintainers what works on your architecture.  It's not useful for a binary package, where binaries only exist for some architectures, and none exists for yours.

----------

## RayDude

 *Hu wrote:*   

> A bare name in package.accept_keywords implies accepting ~arch for your current architecture.  The error message says "missing keyword", meaning the package is neither amd64 nor ~amd64.  As of now, the only keyword on it is ~arm64.  Therefore, accepting ~amd64 is not effective here.  You must accept the special keyword **.  Since this is a -bin package, that will satisfy Portage, but probably fail later.  Overriding a missing keyword can be useful for a source package where you know better than the maintainers what works on your architecture.  It's not useful for a binary package, where binaries only exist for some architectures, and none exists for yours.

 

Thanks Hu. I haven't use ** in a long time.

----------

