The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 832β€…    Votes:  4β€…
Tags: 18.04   thinkpad   trackpoint  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1159960
Title: Thinkpad trackpoint and trackpoint keys disabled after suspend
ID: /2019/07/21/Thinkpad-trackpoint-and-trackpoint-keys-disabled-after-suspend
Created: July 21, 2019    Edited:  January 29, 2022
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


Having to unload and reload the psmouse driver when resuming from suspend is a common problem. You can automate the process with a script though:

Create a new file in the /lib/systemd/system-sleep/ directory containing:

#!/bin/bash

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    modprobe -r psmouse
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    modprobe psmouse
    ;;
esac

Make it executable:

sudo chmod a+x /lib/systemd/system-sleep/script-name

After the next reboot, the script will be active.

A script like this has worked for many people over the years. Of course your other option would be trying the previous kernel version and if it works sticking with it.

Notes when your script isn’t working:

⇧ terminal - count how many types of (file) extensions exist with their associated files in current directory Nautilus doesn't remember sorting options in Ubuntu 19.04  β‡©