Ubuntu – ELAN Touchpad not working on Lenovo IdeaPad with Ubuntu 16.04

16.04kernellenovotouchpad

Recently I bought a Lenovo IdeaPad (Intel i7 10th generation). I installed Ubuntu 16.04 on it, but at no point did the touchpad work for me! Also, initially I tried to install Ubuntu 18.04 and upgraded to the latest kernel, but not only the touchpad didn't work, also the graphics didn't work properly and I eventually decided to go back to 16.04.
I have not checked the touchpad on Windows, as I bought a DOS machine and put ubuntu on it instead.
The touchpad is not the only hardware on my laptop that's not working in ubuntu, but let's focus only on it for now.

From reading a little bit I found out that many new laptops have problems with their touchpads, mostly ElanTech hid ones.
It seems to me that my problem is similar to this post: ELAN Touchpad not working on Lenovo Thinkbook with Ubuntu 18.04.

Also, from the information in this post: Lenovo IdeaPad 330 touchpad not working, it seems the problem is that the id of my ELAN touchpad is not listed in the kernel, so Ubuntu doesn't recognize it at all!

About my system:
uname -srv gives:

Linux 4.15.0-74-generic #83~16.04.1-Ubuntu

xinput -list gives:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Optical Mouse                id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=8    [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]

Note that no touchpad is recognized by Ubuntu!
By running sudo acpidump | grep -C3 -i elan I was able to find my ELAN id, which is 0633, as seen here:

 27AA0: 59 53 0B DC 07 53 52 58 4F 0C 10 00 01 06 01 70  YS...SRXO......p
 27AB0: 47 4E 55 4D 0C 10 00 01 06 49 4E 54 31 70 49 4E  GNUM.....INT1pIN
 27AC0: 55 4D 0C 10 00 01 06 49 4E 54 32 A0 25 93 54 50  UM.....INT2.%.TP
 27AD0: 54 59 01 70 0D 45 4C 41 4E 30 36 33 33 00 5F 48  TY.p.ELAN0633._H
 27AE0: 49 44 70 0A 15 42 41 44 52 70 01 48 49 44 32 A4  IDp..BADRp.HID2.
 27AF0: 00 A0 27 93 54 50 54 59 0A 02 70 0D 53 59 4E 41  ..'.TPTY..p.SYNA
 27B00: 32 42 36 31 00 5F 48 49 44 70 0A 2C 42 41 44 52  2B61._HIDp.,BADR

Apparently this problem can be solved by recompiling the kernel with this id code included in the elan_i2c_core.c file, but I don't want to mess with the kernel!

Is there any other way I can solve this problem?
If not, I would appreciate some help in filing a bug report.

Best Answer

So, eventually I managed to get the touchpad working on Ubuntu 18.04, kernel version: 5.3.0-46-generic thanks to comments on this link: https://www.reddit.com/r/linuxquestions/comments/f9h0q4/touchpad_issue_lenovo_s14515iil/

Basically what needs to be done is:

  1. Open the file /etc/default/grub for editing, for example by running

    sudoedit /etc/default/grub
    
  2. Add to the line beginning GRUB_CMDLINE_LINUX_DEFAULT: "i8042.nopnp=1 pci=nocrs" so that it reads:

    GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp=1 pci=nocrs"
    

    If other parameters are there between the double quotes, it may be OK to leave them.

  3. Save the file and exit

  4. Run this command to update the GRUB configuration:

    sudo update-grub
    
  5. Reboot