Restarting I2C when touchpad is not working

January 11, 2022 - Reading time: ~1 minute

After I replaced the Clickpad of my Lenovo L440 with a touchpad (see https://mastodon.xyz/@nause_marc/107111989617471186) the Touchpad would not work occasionally under Debian when returning from suspend. I created a small script called restarti2c.sh with the following content:

sudo /sbin/rmmod i2c_i801 && sudo /sbin/modprobe i2c_i801

This restarts the I2C bus kernel module, which makes the touchpad work again. I run it whenever necessary.