Score:0

Synaptics Touchpad Disabled Upon Laptop Close

cz flag

I'm a new Kubuntu user...

Host: HP-Pavilion-17-Notebook-PC Kernel: 5.15.0-60-generic x86_64
Distro: Ubuntu 22.04.2 LTS (Jammy Jellyfish)
Desktop: KDE Plasma 5.24.7

and whenever I close my laptop lid, my Synaptics TouchPad becomes disabled, although the keyboard works fine. I can CTRL+ALT+T to get to the terminal and enable my touchpad with:

xinput -enable "SynPS/2 Synaptics TouchPad"
(To find the name or ID number of the touchpad on your system, run the command "xinput list")

To automate this, I tried placing a script in /usr/lib/systemd/system-sleep/, in a file is named "20_touchpad_enable"

#!/bin/sh

# if script was called with the parameter value "post" (meaning system has just resumed after sleep)
if [ "${1}" = "post" ]; then

    # enable the touchpad
    xinput -enable "SynPS/2 Synaptics TouchPad"

    # append to a log file in will's temp folder noting that the script has run
    echo ""post"" sleep event occurred at $(date)…" >>  /home/will/Documents/_temp/wake_from_sleep.txt
fi

Unfortunately, this does NOT work, even though I can tell from my log file that the script runs whenever I open the laptop's lid or resume from sleep.

I tried installing the Synaptics drivers (sudo apt install xserver-xorg-input-synaptics), but the behavior was the same, even though I gained much finer control over the touchpad's configuration in (GUI) System Settings > Hardware > Input Devices > Touchpad

Several forum posts suggest reloading the psmouse module, but this doesn't work for me:

sudo modprobe -r psmouse && sudo modprobe psmouse

Does anyone have suggestions on how to prevent this from happening, or if not, how to automate my fix?

Here's my xinput list:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=9    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ HP Truevision HD: HP Truevision           id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Wireless hotkeys                          id=13   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=14   [slave  keyboard (3)]

Thank you!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.