3

Thinkpad laptop W520 series with kernel: 4.15.0-51-generic x86_64 bits: 64

Following the latest dist-update the trackpoint and it's related keys don't work after return from suspend mode. Unloading and (re-)loading of psmouse fixes the issue but is only a workaround and somewhat annoying.

TLP is installed.

Any help highly appreciated. mgw

3 Answers 3

4

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:

  • Ensure the systemd suspend target is enabled.

  • From the same accepted answer in the link, you may need to set PATH for external commands by inserting the following command into your script. Add any additional directories your commands may be in:

    PATH=/sbin:/usr/sbin:/bin:/usr/bin
    
  • If it still isn't working, post a new question. Then drop a comment below with a link to the new question and I'll have a look.

21
  • Txs. Another funny thing is that configure-trackpoint tells me it doesn't detect anything even though the device is working after reloading of module.
    – mgw
    Jul 22, 2019 at 10:15
  • @mgw I've never used configure-trackpoint. You would be best served posting a new question about that problem. In the meantime click the grey check mark next to the answer if it solves the current question. Thanks. Jul 22, 2019 at 15:39
  • It's "only" a workaround. Let's wait for the next kernel update. Txs for the script @WinEunuuchs2Unix
    – mgw
    Jul 23, 2019 at 15:57
  • 1
    @Photon Automatically deactivating touchpad can be done by adding instructions from: askubuntu.com/questions/751413/… into script. As for #2 you should post a new question in Ask Ubuntu. Don't forget to upvote answers you find useful :) May 23, 2021 at 13:47
  • 1
    @Photon Thanks for the update. Most people don't do that. I upvoted your link because you've confirmed it works. That will help others. Aug 14, 2021 at 19:15
0

Finally, replacing the palmrest fixed everything due to the fact that this behavior stems from a hardware failure. The touchpad simply gave up after 10+ years and this also had a side effect on the trackpoint - please note that the trackpoint hasn't been replaced and I'm still typing happily on the original keyboard from 2011.

0

I'm having the same isse with a ThinkPad E14 Gen2 and this has been bugging me for years. Using "Windows" suspend mode in UEFI works - but it drains the battery much faster. The solution was to create a workaround script with a systemd unit.

Save this script to some file like /usr/local/bin/trackpoint-fix, then make it executable.

#!/bin/bash
echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
sleep 3    
echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctl

Then create a systemd unit: sudo systemctl edit --force --full trackpoint-fix.service

[Unit]
Description=Fixes trackpoint

[Service]
Type=oneshot
ExecStart=/usr/local/bin/trackpoint-fix
TimeoutSec=0
StandardOutput=syslog

[Install]
WantedBy=multi-user.target sleep.target

Lastly, enable it: sudo systemctl enable trackpoint-fix

Works like a charm for me!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .