Index

# Workaround for broken TrackPoint

2022-12-05

Sometimes, seemingly at random after clicking the dedicated left click or right click buttons, the buttons and trackpoint on my Lenovo Thinkpad T14s stops working. Instead of clicking, the three mouse buttons just makes the pointer move a bit and the trackpoint makes the pointer move in a random direction and seems to issue clicks.

When this happens, the kernel buffer is spammed with "`psmouse serio1: elantech: discarding packet`". Searching the interwebs, I found that more people seem to be experiencing similar weirdness with the elantech trackpoint driver.

Rebooting the computer works, but it's annoying. Removing and re-adding the misbehaving kernel module resolves the issue too fortunately. I put the following in `~/bin/fixmouse`:

    #!/bin/sh
    doas rmmod psmouse
    doas modprobe psmouse

So now I can run `fixmouse` whenever the driver stops working.