Sometimes suspend-resume breaks the use of the trackpad on XPS 15. I made a quick shell script to fix it again:

sudo rmmod psmouse
sudo modprobe psmouse
synclient TapButton3=2
synclient FingerHigh=40
synclient FingerLow=35
synclient HorizTwoFingerScroll=0

While it makes the touchpad work again, it doesn't do the synclient adjustments to make the middle button a three-finger-click, and adjust the tapping presssure so it doesn't move when tapping. (I have these 4 in a command in "startup applications", with ; separating them, and that does work)

Why does synclient not work from shell script, but running those commands immediately after, does work?


Is the script running from within an X server? If not you need to set the DISPLAY variable

Is the hardware still initialising? You could try adding a sleep after the modprobe to make sure it is fully working before the rest of the commands run. (This probably isn't the case as the kernel should fully initialise the device before handing it back to usersspace)

Is the modprobe command working? Try adding --first-time so that it reports if it's already loaded, also try replacing rmmod with modprobe -r (for your use rmmod should work but modprobe -r is the recommended tool)

Sorry these are mostly questions but I don't have enough kudos to add a comment

  • Modprobe is working, or else the touchpad wouldn't work again. I'm running the script by Ctrl+Alt+T, running ./fixtouchpad.sh. – NoBugs Jan 4 '14 at 17:42
  • modprobe will fail silently if the module is already loaded, rmmod should through an error when removing though. – RiotingPacifist Jan 4 '14 at 17:49

You might want to run your script every time you "plug in your touchpad" - which includes resuming from suspend. To do that you should point to your script from the org.gnome.settings-daemon.peripherals.input-devices.hotplug-command configuration key. You could do that through dconf-editor for example, or by running the following command (once) from the shell (replace the text within the double quotes with the right path):

dconf write /org/gnome/settings-daemon/peripherals/input-devices/hotplug-command "/absolute/path/to/your/script"
  • Thanks for the info but I think the original problem here is nonexistent in 14.04 – NoBugs Mar 29 '15 at 2:00
  • @NoBugs: well, I've had the same problem (at least with the synclient settings) on 14.10. – Tom Mar 29 '15 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.