LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 10-09-2019, 05:35 AM   #1
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian/ubuntu
Posts: 339

Rep: Reputation: 42
Question Reconnecting Trackpad on wake up from sleep


Dear all,

I have laptop that is mostly great with Ubuntu but sometimes when it wakes from sleep the mouse buttons above the trackpad don't work.

Its a Lenovo Thinkpad X1 Carbon (6th gen with the high res screen).

To get it to work again I run the following little script.

Code:
#!/bin/bash
echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctl
I tried putting this in a pam utils script, below, but it doesn't work. Anyone know where I might have gone wrong?

I put it here /usr/lib/pm-utils/sleep.d/95-trackpad

Code:
#!/bin/bash
#reconnects trackpad after sleep

. "${PM_FUNCTIONS}"

case "$1" in
    resume|thaw)
        echo -n "none" | sudo tee /sys/bus/serio/devices/serio1/drvctl
        echo -n "reconnect" | sudo tee /sys/bus/serio/devices/serio1/drvctl
    *) exit $NA
       ;;
esac

exit 0
 
Old 10-10-2019, 11:37 AM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,331

Rep: Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510
You are missing ;; on resume|thaw)
 
Old 10-10-2019, 03:17 PM   #3
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian/ubuntu
Posts: 339

Original Poster
Rep: Reputation: 42
Oooo, I am indeed. I hope that is it.
 
Old 10-10-2019, 03:52 PM   #4
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian/ubuntu
Posts: 339

Original Poster
Rep: Reputation: 42
So, figured it out. I was missing the ;; but also it was in the wrong place.

My script needed to be in /lib/systemd/system-sleep/ and the script is below with a quick thing to check it is running which can be removed.

Code:
#!/bin/bash
#reconnects trackpad after sleep

case "$1" in
    post)
        echo -n "none" | tee /sys/bus/serio/devices/serio1/drvctl
        echo -n "reconnect" | tee /sys/bus/serio/devices/serio1/drvctl
        echo "ran2" >> /var/log/track.log
        ;;
esac
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Toshiba Wireless Keyboard with built in "trackpad" - Trackpad not working. plowers Linux - Newbie 1 11-02-2010 11:12 PM
Can I wake up a server in "standby" or "memory" mode using wake-on-lan? songweijia Linux - Server 2 03-03-2010 06:51 PM
wake on lan magic packet does not wake. albean Linux - Networking 1 06-30-2007 03:57 PM
Screen does not wake up after going to sleep at promp PSIPHON Linux - General 1 08-09-2005 08:30 PM
monitor in supsend/sleep mode... can't "wake" it up schbond Linux - Hardware 2 09-15-2003 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration