-->
  • Recent Articles

    Lenovo Ideapad 330 touchpad not working, How to Build the Kernel to solve this issue

    It must be annoying that you bought the new Lenovo Ideapad 330 with ubuntu and you find out that the touchpad is not working.

    However the problem is not the hardware,  it is the device driver. The driver for "ELAN061E" is not build into the mainline linux Kernel Yet. As of writing this article the Kernel available is 4.20. I did the testing on the kernel 4.19.2. 

    To check the latest linux kernel available please check in the Linux kernel archives.


    kernel.org

    To make sure your touchpad model please run this command.

    Now that we are confirmed that the touchpad model is "ELAN061E", we'll proceed to build customize kernel to support the touchpad Model. Lets checkout whats needed to build the customized kernel.


    Build the Kernel:


    1. Before we begin to build the kernel, we'll go ahead install few required package.

    You need to Login as root or sudo to root to do the following task.
    apt-get update && apt-get upgrade
    apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc

    Create a new folder and download the Latest Kernel from the Linux kernel archives. Extract the tarball.
    mkdir /customkernel
    cd /customkernel/
    tar xf linux-4.19.2.tar.xz cd linux-4.19.2/
    Now install bison and flex
    apt-get install bison
    apt-get install flex

    Now go ahead to Configure the Modules. Here Remember to check the Mice under Driver setting if it is not already checked. Then save and exit.


    make menuconfig

    After you save and exit from the Menuconfig, its time to Edit the config file for elan.


     cd drivers/input/mouse/
     vi elan_i2c_core.c 


    Add your Elantech model "ELAN061E" in the bottom of that list acpi_device_id and save the file.
    Now its time to compile the kernel.


    Compile the Kernel:



    make -j 6 && sudo make modules_install -j 6 && sudo make install -j 6

    It'll take around 30mins  to finish this task. Once this is finished we'll update initramfs and update our grub.
     update-initramfs -c -k 4.19.2
    update-grub

    Once this is  done, You need to boot your machine with your compiled Kernel. 

    If you are wondering how to boot with your customized kernel please use following article on  GRUB Customizer to do that easily. Once the machine comes up with the custom kernel, your touchpad should be working. To check the machine has rebooted with your custom kernel or not, please run following command.

    root@manas-Lenovo-ideapad-330-15ARR:/# uname -r
    4.19.2
    root@manas-Lenovo-ideapad-330-15ARR:/#



    Conclusion:


    To 
    summarize this , we need to do the following.

    1. Download the kernel source.
    2. Edit the driver to include your driver model.
    3. Build the kernel.
    4. Boot with customize kernel.

    That' s it. Please do not forgot to share.



    No comments