IdeaPad 5 15are05 - elan touchpad not working on 20.04 nor on 18.04

I found the solution, big shoutout to dl3it on Ideapad 5-15ARE05: Touchscreen not working | Lenovo Forums. (Note: it says touchscreen, but that's just the name of the touchpad I guess. It works fine.)

The problem is that the kernel does something wrong with the drivers. To fix this, you will have to install a mainline kernel and configure it yourself.

First off, install dependencies by executing this on a command line:

sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf

Then, download kernel 5.6.x or 5.7.x (x can be any integer, I used 5.7.1 and it has been tested on 5.6.14 and 5.7.0-rc7) from source (via kernel.org). Once on kernel.org, click on [tarball] for the kernel you want.

Extract everything as you would do with any other .tar.gz file.

Then, move to the linux-5.6.x or linux-5.7.x directory in a command line.

Execute sudo make menuconfig and navigate to Device Drivers → Input device support → Touchscreens → Elan eKTH I2C touchscreen.

Once there, change the asterisk to an m by hitting enter and then typing the m.

After that, use the left and right arrows to change the selected option in the bottom to "save" and hit Enter. Then, you will want to save it as .config (which it should default to).

Now still being in the same directory, execute this command:

sudo make -jx && sudo make modules_install -jx && sudo make install -jx

(Change x to the amount of threads your CPU has. Leaving out this option will make this take a long time.)

This will take some time, but after it's finished, you will want to make sure your PC will boot on the new kernel. To do that, execute:

sudo update-initramfs -c -k <kernel-version>

(Change <kernel-version> to the kernel version you just installed, for example 5.7.1.)

Then, fix the grub config by executing:

sudo update-grub

And then reboot and your touchpad should work just fine!

NOTE: websites I used and didn't mention before:

  • BuildYourOwnKernel | Ubuntu Wiki
  • How to build and install the latest Linux kernel from source | freeCodeCamp

It seems not to be possible to blacklist elants_i2c driver, as it is a built-in kernel module for Ubuntu:

stefano@stefano-IdeaPad-5-15ARE05:~$ modinfo elants-i2c
name:           elants_i2c
filename:       (builtin)
license:        GPL
description:    Elan I2c Touchscreen driver
author:         Scott Liu <[email protected]>

so there is a faster way than compiling the kernel. Just create a SystemD unit like the below:

stefano@stefano-IdeaPad-5-15ARE05:~$ cat /etc/systemd/system/touchpadfix.service 
[Unit]
Description=Fix touchpad issue by binding correct driver

[Service]
ExecStart=/usr/local/bin/touchpadfix
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

and create /usr/local/bin/touchpadfix file as follows

stefano@stefano-IdeaPad-5-15ARE05:~$ cat  /usr/local/bin/touchpadfix
#!/bin/bash
modprobe i2c_hid
echo "i2c-ELAN0001:00" > /sys/bus/i2c/drivers/elants_i2c/unbind
echo "i2c-ELAN0001:00" > /sys/bus/i2c/drivers/i2c_hid/bind

and then make it executable, enable and start the unit with the following commands:

chmod +x /usr/local/bin/touchpadfix
sudo systemctl daemon-reload
sudo systemctl enable --now touchpadfix.service

and touchpad should start to work immediately!

SOURCE: https://wiki.archlinux.org/index.php/Lenovo_IdeaPad_5_15are0 which is giving us unbind-bind fix and dl3it user on this post https://bugzilla.kernel.org/show_bug.cgi?id=207759#c17


Almost 100% correct, here is the workaround.

Open Terminal

sudo mousepad /etc/default/grub

Edit as follows: GRUB_CMDLINE_LINUX="initcall_blacklist=elants_i2c_driver_init"

Save, exit mousepad or text editor of your choosing.

sudo update-grub

Add before or after 'quiet splash' does NOT MATTER.

Keep in mind this is a 'workaround' that will get the touchpad working, touchpad indicator icon will NOT work properly.