Lenovo IdeaPad 330 touchpad not working

I just bought a IdeaPad 330 Lenovo laptop. When I installed Ubuntu, touchpad was not working. I managed to install Ubuntu successfully with the keyboard, using the tab, space and enter buttons. I was thinking that touchpad was going to work after install, but not luck.

Does any one know how to fix that? It works perfectly on Windows 10.


Solution 1:

As of early August 2018, I was able to get my cursor working (ELAN 061C)--without patching or compiling the kernel from source--by just upgrading to the 4.18-rc7 mainline build.

Instructions can be found here at TecMint.

Solution 2:

All hope is not lost! I have successfully recompiled the latest ubuntu 4.18.0 Kernel and added the ACPI id for the elan061C touchpad on the Lenovo 330-15igm that I own and now have a working touchpad.

The touchpad of the Lenovo 330 series is not detected at boot due to its ACPI id not being present in the kernel driver. Windows Identifies it as a Elan HID over i2c device, the problem with detection on the 330 is a similar issue to the lenovo 320 laptop mentioned here: Lenovo Ideapad 320 - Touchpad doesn't work

and the solution is to patch the kernel similarly to what was done here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1700657

or as reported here: https://unix.stackexchange.com/questions/427566/touchpad-on-lenovo-v330-thinkpad-v-series-is-not-recognized/434655#434655

FYI: Unlike other elan touchpads in ubuntu, I found that modifying the boot parameters with i8042 options did not make a difference for this touchpad. Don't waste your time.

Many elan touchpad ACPI device IDs are still not present in the kernel driver source for elan_i2c_core.c so there is no hope at this time to get a working touchpad without writing a dkms module (which did not work for me) or compiling a custom kernel.

Please look at your output for dmesg | grep i2c and dmesg | grep elan to see if there is even a device detected. I found that stock and HWE kernels for ubuntu 16.04 did not detect an elan device or any pointing device at all, indicating that there was something 'missing' in the i2c device detection in the 16.04 kernels.

An install of 18.04 WAS able to see an elan device:

user-Lenovo-ideapad-330-15IGM kernel: [    7.396065] i2c_hid i2c-ELAN061C:00: i2c-ELAN061C:00 supply vdd not found, using dummy regulator

but the touchpad did not work or register any input.

There are a bunch of other folks having this type of trouble, as the elan touchpad is just too new to have mainline kernel support.

If you want to get your device working:

Find your ACPI id by installing acpidump: sudo apt install acpidump and running:

sudo acpidump | grep -C3 ELAN

(the -C3 tells grep to include the 3 lines before and after as described here: https://stackoverflow.com/questions/9081/grep-a-file-but-show-several-surrounding-lines)

My result was:

  0E70: 5F 53 42 2E 47 50 4F 31 00 79 00 08 53 42 46 49  _SB.GPO1.y..SBFI
  0E80: 11 0E 0A 0B 89 06 00 15 01 3C 00 00 00 79 00 14  .........<...y..
  0E90: 46 07 5F 49 4E 49 00 A0 23 93 54 50 54 59 01 70  F._INI..#.TPTY.p
  0EA0: 0D 45 4C 41 4E 30 36 31 43 00 5F 48 49 44 70 0A  .ELAN061C._HIDp.
  0EB0: 15 42 41 44 52 70 01 48 49 44 32 A0 25 93 54 50  .BADRp.HID2.%.TP
  0EC0: 54 59 0A 02 70 0D 53 59 4E 41 32 42 34 38 00 5F  TY..p.SYNA2B48._
  0ED0: 48 49 44 70 0A 2C 42 41 44 52 70 0A 20 48 49 44  HIDp.,BADRp. HID

Note the ELAN061C on the middle line!

Check the output for dmesg | grep i2c and dmesg | grep elan to see if there is even a device detected.

Install a kernel that can detect the device, for me this was 4.17.4-041704-generic.

This ACPI device ID is still not present in the kernel driver source for elan_i2c_core.c so there is no hope at this time to get a working touchpad without writing a dkms module (which did not work for me) or compiling a custom kernel.

Use the very latest kernel source from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.17.4/

Patch the kernel with the latest patches and compile with this fairly easy follow this guide: How to apply kernel patches

In addition to installing the dependencies here: https://help.ubuntu.com/community/Kernel/Compile I also needed the build-essential kernel-package fakeroot libncurses5-dev debhelper libssl-dev libudev-dev xz-utils and bison packages

at the customize step, I edited v4.17.4/drivers/input/mouse/elan_i2c_core.c

add add the below lines to elan_i2c_core.c near the end of the file (the arrows are comments, don't add them to the file!)

     #ifdef CONFIG_ACPI static const struct acpi_device_id elan_acpi_id[] = {
    { "ELAN0000", 0 },
    { "ELAN0100", 0 },
    { "ELAN0600", 0 },
    { "ELAN0602", 0 },
    { "ELAN0605", 0 },
    { "ELAN0608", 0 },
    { "ELAN0609", 0 },
    { "ELAN060B", 0 },
    { "ELAN060C", 0 },
    { "ELAN0611", 0 },
    { "ELAN0612", 0 },
    { "ELAN0618", 0 },
    { "ELAN061C", 0 },      <-add this 
    { "ELAN061D", 0 },      <- and this for the lenovo 330 with the core i3
    { "ELAN1000", 0 },
    { } }; MODULE_DEVICE_TABLE(acpi, elan_acpi_id);
   #endif

after installing the newly generated 4.18.0-rc3-custom kernel (the patches updated the 4.17.4 source) I am happy to report that the touchpad works well with left, right clicks, and gestures in Ubuntu 18.04.

YMMV.

Special thanks to Dimitry Torokov and Donald Shanty