понеделник, 16 юли 2018 г.

Troubleshoot the touchpad

How to compile your own driver for the touchpad:
1. Download source Sabayon
2. cd
3. Check (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1653456)
$make mrproper 
$ cp /lib/modules/$(uname -r)/build/.config ./
$ cp /lib/modules/$(uname -r)/build/Module.symvers ./
$ make oldconfig

Find the "extraversion" of your distro ("-sabayon" in my case)

$cat /lib/modules/$(uname -r)/build/Makefile|head
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 15
SUBLEVEL = 0
EXTRAVERSION = -sabayon
NAME = Fearless Coyote
# *DOCUMENTATION*
 
$make EXTRAVERSION=-sabayon modules_prepare
$ make M=~/linux_elan1200_touchpad-master/
 
Next step might be unneeded because all you need is the hid-elan.ko to be able to load it as a module with modprobe.  
$xz ~/linux_elan1200_touchpad-master//hid-elan.ko 

How to unfreeze multitouh (careful with this cuz I had to restart once because I accidently unbinded the keyboard):
cd /sys/bus/hid/drivers/hid-multitouch
# ls
0018:04F3:3043.0007 bind module new_id uevent unbind
# echo "0018:04F3:3043.0007" | sudo tee /sys/bus/hid/drivers/hid-multitouch/unbind
# echo "0018 04F3 3043 0013" | sudo tee /sys/bus/hid/drivers/hid-multitouch/new_id

How to restart touch modules (it seems that hid-multitouch is not the one that freezes):
$lsmod|grep i2c
i2c_hid                24576  0
i2c_i801               32768  0
i2c_algo_bit           16384  2 igb,i915
$sudo rmmod i2c_hid
$sudo modprobe i2c_hid