# \[FIX\] Linux touchpad HTIX 5288

**URL:** <https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365>\
**Category:** LapBook Pro\
**Created:** [May 5, 2021, 10:15am UTC](https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365 "2021-05-05T10:15:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Athenian23](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Athenian23](https://forum.chuwi.com/u/Athenian23)\
**Post date:** [May 5, 2021, 10:15am UTC](https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365/1 "2021-05-05T10:15:56Z")

</div>

Hello everyone, I have installed Linux on my machine but the touchpad wasn’t always working. After ~10 days of searching, I had an idea that finally solved the issue.

The steps above have been tested on Fedora 34, kernel 5.11.16, but I expect it to work on any other laptop that has the same touchpad HTIX 5288.

- Go to folder `/opt`
- Create a file with your favorite editor (i.e. emacs) `touchpadfix.py` :

```python
import os

while os.system('cat /proc/bus/input/devices | grep -I "Touchpad"') != 0:
    os.system("rmmod i2c-hid")
    os.system("modprobe i2c-hid")

```

- Next, on the same folder create a file `touchpadfix.sh` :

```bash
#!/usr/bin/env bash
echo "Reloading i2c-hid module (touchpad fix)"
cd /opt
python touchpadfix.py

```

- Now we have to make the script executable :  
`sudo chmod ugo+x /opt/touchpadfix.sh`

- Lastly, on the same folder create file for the service which will run the script when system boots, `touchpadfix.service` :

```auto
[Unit]
Description=HTIX5288 driver workaround
After=basic.target

[Service]
ExecStart=/opt/touchpadfix.sh

[Install]
WantedBy=multi-user.target

```

- Final step, enable the service:  
`cd /etc/systemd/system && sudo ln -s /opt/touchpadfix.service .`  
`sudo systemctl daemon-reload`  
`sudo systemctl enable touchpadfix.service`

Today I will attach the files I described above for someone who is too lazy to copy-paste them.  
The solution was inspired from the [fedora forum](https://ask.fedoraproject.org/t/laptops-trackpad-not-always-recognized/9760/3), special thanks to [linux-user.gr](https://linux-user.gr/).

---

<div class="post-metadata">

**Author:** ![dariolol](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dariolol](https://forum.chuwi.com/u/dariolol)\
**Post date:** [June 18, 2021, 3:46pm UTC](https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365/2 "2021-06-18T15:46:29Z")

</div>

Hi, this is not a fix, just a temporary solution. Also, you can make a pure bash version as follow:

```auto
#!/bin/bash
i=0
while [$i -le 10]
do
  TP=`cat /proc/bus/input/devices | grep -I "Touchpad"`
  if [-v TP] && [-z "$TP"]; then
    rmmod i2c_hid
    modprobe i2c_hid
  else
    break
  fi
  ((i++))
done

```

it would be nice if we can understand why this shitty laptop doesent work with i2c

---

<div class="post-metadata">

**Author:** ![Athenian23](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Athenian23](https://forum.chuwi.com/u/Athenian23)\
**Post date:** [June 18, 2021, 5:15pm UTC](https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365/3 "2021-06-18T17:15:09Z")

</div>

Thanks for your suggestion on the pure bash version. Your script might not always work as you cant be 100% sure that the system will recognize the touchpad in less than 10 attempts. Changing the while loop’s condition might be a more solid option.

I think that this is the easiest way to deal with the problem as it is not distribution-dependent and it can survive kernel updates, in comparison to others who applied patches on the kernel, that required to recompile it.

> it would be nice if we can understand why this shitty laptop doesent work with i2c

Unfortunately this problem exists on other models/brands too. But I have to tell you a little story about my experience with the specific model, as it is the second lapbook pro that I have bought. The first one was the 4/64 version which I had ordered from amazon de at launch, and I had no issues with the touchpad on linux. My guess is that they changed touchpad hardware some time.

P.S.: I didn’t attach the files as I did promise, because the forum doesn’t allow me to upload files other than images. Maybe I can edit this post later with a “better” pure-bash version.

---

<div class="post-metadata">

**Author:** ![Athenian23](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Athenian23](https://forum.chuwi.com/u/Athenian23)\
**Post date:** [June 19, 2021, 9:41pm UTC](https://forum.chuwi.com/t/fix-linux-touchpad-htix-5288/23365/4 "2021-06-19T21:41:27Z")

</div>

Okay, if you want to skip creating a python file (touchpadfix.py), you have to enter this code inside touchpadfix.sh :

```auto
#!/usr/bin/env bash
echo "Reloading i2c-hid module (touchpad fix)"
while ["`cat /proc/bus/input/devices | grep -I "Touchpad"`" == ""]
do
    rmmod i2c-hid
    modprobe i2c-hid
done

```

For some users, running the commands :

```auto
    rmmod i2c-hid
    modprobe i2c-hid

```

might not be possible, as the module i2c-hid-acpi is loaded. In this case simply replace these two lines with this :

```auto
    rmmod i2c-hid-acpi
    modprobe i2c-hid-acpi

```
