Introduction
Upgrading your Lenovo ThinkPad T480 with a glass touchpad from the Lenovo X1 Extreme (Gen 1 or Gen 2) can significantly improve the user experience. However, many users encounter issues on Ubuntu where the touchpad becomes laggy and unresponsive. A temporary fix using:
sudo rmmod psmouse && sudo modprobe psmouse
restores smooth operation, but the issue reappears after a reboot or waking from sleep. In this article, we’ll walk you through a permanent fix to ensure a seamless touchpad experience.
Understanding the Issue
The T480 and X1 Extreme use different touchpad drivers and configurations. When swapping the trackpad, the kernel may not properly initialize it, leading to laggy or delayed cursor movements. Reloading the psmouse
module manually fixes this but does not persist across reboots or sleep/wake cycles.
Step-by-Step Fix
1. Making the Fix Permanent on Reboot
To reload psmouse
automatically after each reboot, create a systemd service:
Create the Service File
sudo nano /etc/systemd/system/fix-trackpad.service
Add the Following Content
[Unit]
Description=Reload psmouse module for trackpad fix
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c "sleep 2 && /sbin/rmmod psmouse && /sbin/modprobe psmouse"
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
Enable the Service
sudo systemctl daemon-reload
sudo systemctl enable fix-trackpad.service
Reboot your system, and your touchpad should now work properly.
2. Fixing the Issue After Sleep/Wake
Since the lag returns after waking from sleep, we need to reload psmouse
after resume.
Create a Sleep Hook Script
sudo nano /lib/systemd/system-sleep/fix-trackpad
Add This Content
#!/bin/bash
case $1 in
post)
/sbin/rmmod psmouse
/sbin/modprobe psmouse
;;
esac
Make It Executable
sudo chmod +x /lib/systemd/system-sleep/fix-trackpad
Now, after resuming from sleep, the touchpad should work properly.
Conclusion
Replacing the stock touchpad on the Lenovo ThinkPad T480 with an X1 Extreme Gen 1/Gen 2 glass touchpad is a great upgrade. However, it introduces compatibility issues with Ubuntu, causing laggy behavior. The solutions above ensure that your touchpad works flawlessly across reboots and sleep/wake cycles, giving you the best user experience possible.