Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Howto: Fix post suspend cursor freeze on ThinkPad T440s

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Howto: Fix post suspend cursor freeze on ThinkPad T440s

#1 Post by Hallvor »

The problem: The cursor would freeze after a given number of resumes from suspend, while the touch screen would still work.

The solution: Reload the touchpad module after each suspend. Well, that is a lot of work, so let's automate it. (Keep in mind that you can use the script for just about any task you want to automate after suspend. Just change the script.)

Make a systemd service (as root):

Code: Select all

# nano /etc/systemd/system/wakeup.service
Then paste the following content into it:

Code: Select all

[Unit]
Description=Run my_user_script
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target


[Service]
ExecStart=/etc/touchpadfiks.sh
#User=my_user_name
#Environment=DISPLAY=:0

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
Notice the line ExecStart=/etc/touchpadfiks.sh. This is the name and location of the shell script doing the actual command.

And now let's make the script.

Code: Select all

# nano /etc/touchpadfiks.sh
Paste the following content into it. This script will remove and reload the (touchpad) module psmouse

Code: Select all

#!/bin/sh

case $1 in
  post)
    /usr/sbin/rmmod/ psmouse && /sbin/modprobe psmouse 
  ;;
esac
Save the file with Ctrl+X, and Y to exit.

Make the script executable:

Code: Select all

# chmod +x /etc/touchpadfiks.sh
Enable the service for every boot and start it:

Code: Select all

# systemctl enable wakeup.service && systemctl start wakeup.service
That's it.

Undo the changes:

Code: Select all

# systemctl stop wakeup.service
# systemctl disable wakeup.service
# rm /etc/systemd/system/wakeup.service
# rm /usr/lib/systemd/system/wakeup.service
# systemctl daemon-reload
# systemctl reset-failed
# rm /etc/touchpadfiks.sh
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

Post Reply