Touchpad not working after suspending laptop












10














This seems like a common problem, but after trying all of the fixes I've found on forums, I'm still at a loss.



Specs:




  • computer: Asus k501LX-EB71

  • OS: Ubuntu 14.04.3

  • kernel: 3.19.0-26-generic

  • touchpad: Elantech touchpad

  • driver: xserver-xorg-input-synaptics-lts-trusty (OR)
    xserver-xorg-input-synaptics-lts-vivid (not sure which one is in use)


What I've tried:
I can run sudo modprobe -r psmouse to "turn off" the touchpad, and then sudo modprobe psmouse to turn it back on. This works fine. However when I suspend, I can't "revive" the touch pad, even if I enter these commands.



Any thoughts?



UPDATE:



I don't observe this problem if I hibernate instead of suspend. I'm not sure what to make of that clue...



CURRENT WORKAROUND:



Since hibernate seems to not cause a problem and I have an appropriate amount of swap memory, I just hibernate as the default action for things like closing the lid. Here are the steps I followed to enable hibernate. I also modified other default power settings to go to hibernate using the dconf Editor under org>gnome>settings-daemon>plugins>power










share|improve this question
























  • You may find this useful: ubuntuforums.org/showthread.php?t=2189117
    – Elder Geek
    Sep 8 '15 at 23:19










  • hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
    – Ross Allen
    Sep 8 '15 at 23:53












  • I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
    – Elder Geek
    Sep 9 '15 at 15:37
















10














This seems like a common problem, but after trying all of the fixes I've found on forums, I'm still at a loss.



Specs:




  • computer: Asus k501LX-EB71

  • OS: Ubuntu 14.04.3

  • kernel: 3.19.0-26-generic

  • touchpad: Elantech touchpad

  • driver: xserver-xorg-input-synaptics-lts-trusty (OR)
    xserver-xorg-input-synaptics-lts-vivid (not sure which one is in use)


What I've tried:
I can run sudo modprobe -r psmouse to "turn off" the touchpad, and then sudo modprobe psmouse to turn it back on. This works fine. However when I suspend, I can't "revive" the touch pad, even if I enter these commands.



Any thoughts?



UPDATE:



I don't observe this problem if I hibernate instead of suspend. I'm not sure what to make of that clue...



CURRENT WORKAROUND:



Since hibernate seems to not cause a problem and I have an appropriate amount of swap memory, I just hibernate as the default action for things like closing the lid. Here are the steps I followed to enable hibernate. I also modified other default power settings to go to hibernate using the dconf Editor under org>gnome>settings-daemon>plugins>power










share|improve this question
























  • You may find this useful: ubuntuforums.org/showthread.php?t=2189117
    – Elder Geek
    Sep 8 '15 at 23:19










  • hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
    – Ross Allen
    Sep 8 '15 at 23:53












  • I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
    – Elder Geek
    Sep 9 '15 at 15:37














10












10








10


8





This seems like a common problem, but after trying all of the fixes I've found on forums, I'm still at a loss.



Specs:




  • computer: Asus k501LX-EB71

  • OS: Ubuntu 14.04.3

  • kernel: 3.19.0-26-generic

  • touchpad: Elantech touchpad

  • driver: xserver-xorg-input-synaptics-lts-trusty (OR)
    xserver-xorg-input-synaptics-lts-vivid (not sure which one is in use)


What I've tried:
I can run sudo modprobe -r psmouse to "turn off" the touchpad, and then sudo modprobe psmouse to turn it back on. This works fine. However when I suspend, I can't "revive" the touch pad, even if I enter these commands.



Any thoughts?



UPDATE:



I don't observe this problem if I hibernate instead of suspend. I'm not sure what to make of that clue...



CURRENT WORKAROUND:



Since hibernate seems to not cause a problem and I have an appropriate amount of swap memory, I just hibernate as the default action for things like closing the lid. Here are the steps I followed to enable hibernate. I also modified other default power settings to go to hibernate using the dconf Editor under org>gnome>settings-daemon>plugins>power










share|improve this question















This seems like a common problem, but after trying all of the fixes I've found on forums, I'm still at a loss.



Specs:




  • computer: Asus k501LX-EB71

  • OS: Ubuntu 14.04.3

  • kernel: 3.19.0-26-generic

  • touchpad: Elantech touchpad

  • driver: xserver-xorg-input-synaptics-lts-trusty (OR)
    xserver-xorg-input-synaptics-lts-vivid (not sure which one is in use)


What I've tried:
I can run sudo modprobe -r psmouse to "turn off" the touchpad, and then sudo modprobe psmouse to turn it back on. This works fine. However when I suspend, I can't "revive" the touch pad, even if I enter these commands.



Any thoughts?



UPDATE:



I don't observe this problem if I hibernate instead of suspend. I'm not sure what to make of that clue...



CURRENT WORKAROUND:



Since hibernate seems to not cause a problem and I have an appropriate amount of swap memory, I just hibernate as the default action for things like closing the lid. Here are the steps I followed to enable hibernate. I also modified other default power settings to go to hibernate using the dconf Editor under org>gnome>settings-daemon>plugins>power







touchpad suspend asus synaptics






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 9 '15 at 1:08







Ross Allen

















asked Sep 8 '15 at 23:01









Ross AllenRoss Allen

616169




616169












  • You may find this useful: ubuntuforums.org/showthread.php?t=2189117
    – Elder Geek
    Sep 8 '15 at 23:19










  • hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
    – Ross Allen
    Sep 8 '15 at 23:53












  • I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
    – Elder Geek
    Sep 9 '15 at 15:37


















  • You may find this useful: ubuntuforums.org/showthread.php?t=2189117
    – Elder Geek
    Sep 8 '15 at 23:19










  • hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
    – Ross Allen
    Sep 8 '15 at 23:53












  • I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
    – Elder Geek
    Sep 9 '15 at 15:37
















You may find this useful: ubuntuforums.org/showthread.php?t=2189117
– Elder Geek
Sep 8 '15 at 23:19




You may find this useful: ubuntuforums.org/showthread.php?t=2189117
– Elder Geek
Sep 8 '15 at 23:19












hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
– Ross Allen
Sep 8 '15 at 23:53






hmmm... thanks for the quick response but I've followed all the steps in that thread with no luck. For whatever reason, I can't revive the touchpad with sudo modprobe psmouse after suspending. Simply, nothing seems to happen. I can't find anything out of place in log files
– Ross Allen
Sep 8 '15 at 23:53














I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
– Elder Geek
Sep 9 '15 at 15:37




I would consider your workaround an answer. You should write it up as such as it's likely to help others and embedding the answer in your question might make it more difficult to find.
– Elder Geek
Sep 9 '15 at 15:37










7 Answers
7






active

oldest

votes


















8














It was recommended that I post my workaround as an answer:



I found that hibernate (sudo pm-hibernate) did not experience the same problems with touchpad restarting, therefore I just set all relevant power options to hibernate instead of suspend. This requires a little bit of effort since hibernate is disabled by default. Here's what needs to happen




  • Make sure that you have adequate swap space (swap memory > RAM). I have an adequate swap partition on my SSD but you can add swap memory without re-partioning your drive.


  • Follow the steps here to enable hibernate


  • Set additional power options to evoke hibernate instead of suspend. I did this using the dconf Editor (sudo apt-get install dconf-editor). To change relevant settings, open dconf Editor and navigate to: org > gnome > settings-daemon > plugins > power







share|improve this answer























  • Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
    – crobar
    Jul 3 '17 at 20:54






  • 1




    Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
    – pst007x
    Oct 8 '17 at 2:28



















5














This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?



If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:



#!/bin/sh

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


It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.



The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....






share|improve this answer























  • I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
    – cgogolin
    Mar 29 '18 at 16:08



















3














I deal with two simple approaches with this issue. The first, which not always works (as you mentioned) just restarts the mouse module after the suspend action.




sudo rmmod psmouse ; sudo modprobe psmouse




Here is a nice discussion on how to do this "automatically":
how to execute a command after resume from suspend?



An alternative approach is to kill the module before suspend, avoiding to lock of the module after the resume (which apparently is what generates the issue, as WinEunuuchs2Unix underlined).



To do that I use a simple command line to suspend the laptop instead of just closing the lid "manually". Of course this is not fancy at all, but works and it is a straigh forward solution. No time to hack involved.




sudo rmmod psmouse ; sudo pm-suspend




And then, after resuming the laptop, you should re-enable the module by typing:




sudo modprobe psmouse




You can always hack the default pm-suspend script, but I won't recommend it. It is simple and safer to generate these ad-hoc small command sequences.



Last, an easy, fast way to quickly do the "killing/suspend" and the "re-enable" of the mouse module is to associate those steps with keyboard shortcuts: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?).



Hope it works, it does for me, although is really uncomfortable to deal with this in such way. I have this issue in both, HP and Asus Laptops.






share|improve this answer























  • This works for me where nothign else did- thanks!
    – daboross
    Oct 8 '18 at 18:16










  • Cheers! Glad it was helpful! ;D
    – Rho
    Oct 27 '18 at 11:33



















1














Patching the kernel will solve this problem. You can find




  1. the patch on the Linux kernel mailing list and


  2. patching instructions at “How to patch the kernel with a specific commit”.



My K501LB now works as it should.






share|improve this answer































    0














    I have several Asus laptops, I have had to disable the touchpad on all of them. They cause locking issues, and other problems.






    share|improve this answer





















    • Not what I was hoping to hear but I appreciate the response
      – Ross Allen
      Sep 9 '15 at 0:12










    • its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
      – ChangosMuertos
      Sep 9 '15 at 0:20



















    0














    Drivers that don't respond well to suspension are pretty common regardless of the OS. I'm glad you found a workaround via hibernation.



    Since suspend doesn't fully power off and hibernation does, that would appear to indicate that the driver doesn't respond well to the "1/2 life" of suspension, but is perfectly capable of coming up during a power-on cycle which is what hibernation provides upon waking.



    source: http://manpages.ubuntu.com/manpages/trusty/man8/pm-action.8.html






    share|improve this answer





















    • You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
      – WinEunuuchs2Unix
      Sep 20 '16 at 22:17








    • 1




      @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
      – Elder Geek
      Sep 21 '16 at 18:23










    • sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
      – WinEunuuchs2Unix
      Sep 21 '16 at 19:38












    • I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
      – WinEunuuchs2Unix
      Sep 25 '16 at 23:37



















    0














    This worked for me:




    1. Boot into BIOS, on system boot-up hold F2 or ESC


    2. Change the Touchpad setting in your BIOS from ADVANCED to BASIC (makes no difference with regards to functionality)



    Now the touchpad should still work when resumed from suspend.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f671910%2ftouchpad-not-working-after-suspending-laptop%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      7 Answers
      7






      active

      oldest

      votes








      7 Answers
      7






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      8














      It was recommended that I post my workaround as an answer:



      I found that hibernate (sudo pm-hibernate) did not experience the same problems with touchpad restarting, therefore I just set all relevant power options to hibernate instead of suspend. This requires a little bit of effort since hibernate is disabled by default. Here's what needs to happen




      • Make sure that you have adequate swap space (swap memory > RAM). I have an adequate swap partition on my SSD but you can add swap memory without re-partioning your drive.


      • Follow the steps here to enable hibernate


      • Set additional power options to evoke hibernate instead of suspend. I did this using the dconf Editor (sudo apt-get install dconf-editor). To change relevant settings, open dconf Editor and navigate to: org > gnome > settings-daemon > plugins > power







      share|improve this answer























      • Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
        – crobar
        Jul 3 '17 at 20:54






      • 1




        Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
        – pst007x
        Oct 8 '17 at 2:28
















      8














      It was recommended that I post my workaround as an answer:



      I found that hibernate (sudo pm-hibernate) did not experience the same problems with touchpad restarting, therefore I just set all relevant power options to hibernate instead of suspend. This requires a little bit of effort since hibernate is disabled by default. Here's what needs to happen




      • Make sure that you have adequate swap space (swap memory > RAM). I have an adequate swap partition on my SSD but you can add swap memory without re-partioning your drive.


      • Follow the steps here to enable hibernate


      • Set additional power options to evoke hibernate instead of suspend. I did this using the dconf Editor (sudo apt-get install dconf-editor). To change relevant settings, open dconf Editor and navigate to: org > gnome > settings-daemon > plugins > power







      share|improve this answer























      • Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
        – crobar
        Jul 3 '17 at 20:54






      • 1




        Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
        – pst007x
        Oct 8 '17 at 2:28














      8












      8








      8






      It was recommended that I post my workaround as an answer:



      I found that hibernate (sudo pm-hibernate) did not experience the same problems with touchpad restarting, therefore I just set all relevant power options to hibernate instead of suspend. This requires a little bit of effort since hibernate is disabled by default. Here's what needs to happen




      • Make sure that you have adequate swap space (swap memory > RAM). I have an adequate swap partition on my SSD but you can add swap memory without re-partioning your drive.


      • Follow the steps here to enable hibernate


      • Set additional power options to evoke hibernate instead of suspend. I did this using the dconf Editor (sudo apt-get install dconf-editor). To change relevant settings, open dconf Editor and navigate to: org > gnome > settings-daemon > plugins > power







      share|improve this answer














      It was recommended that I post my workaround as an answer:



      I found that hibernate (sudo pm-hibernate) did not experience the same problems with touchpad restarting, therefore I just set all relevant power options to hibernate instead of suspend. This requires a little bit of effort since hibernate is disabled by default. Here's what needs to happen




      • Make sure that you have adequate swap space (swap memory > RAM). I have an adequate swap partition on my SSD but you can add swap memory without re-partioning your drive.


      • Follow the steps here to enable hibernate


      • Set additional power options to evoke hibernate instead of suspend. I did this using the dconf Editor (sudo apt-get install dconf-editor). To change relevant settings, open dconf Editor and navigate to: org > gnome > settings-daemon > plugins > power








      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Apr 13 '17 at 12:24









      Community

      1




      1










      answered Sep 9 '15 at 18:49









      Ross AllenRoss Allen

      616169




      616169












      • Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
        – crobar
        Jul 3 '17 at 20:54






      • 1




        Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
        – pst007x
        Oct 8 '17 at 2:28


















      • Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
        – crobar
        Jul 3 '17 at 20:54






      • 1




        Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
        – pst007x
        Oct 8 '17 at 2:28
















      Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
      – crobar
      Jul 3 '17 at 20:54




      Beware, hibernate is disabled by default because there is a good chance of hard drive corruption. I've had to reinstall my OS twice after a failed hibernate. Disabled it again now.
      – crobar
      Jul 3 '17 at 20:54




      1




      1




      Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
      – pst007x
      Oct 8 '17 at 2:28




      Change the Touchpad setting in your BIOS from ADVANCED to BASIC, makes no difference with regards to functionality, and the touchpad still works when resumed from suspend.
      – pst007x
      Oct 8 '17 at 2:28













      5














      This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?



      If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:



      #!/bin/sh

      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


      It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.



      The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....






      share|improve this answer























      • I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
        – cgogolin
        Mar 29 '18 at 16:08
















      5














      This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?



      If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:



      #!/bin/sh

      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


      It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.



      The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....






      share|improve this answer























      • I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
        – cgogolin
        Mar 29 '18 at 16:08














      5












      5








      5






      This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?



      If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:



      #!/bin/sh

      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


      It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.



      The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....






      share|improve this answer














      This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?



      If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:



      #!/bin/sh

      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


      It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.



      The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Sep 24 '16 at 2:26

























      answered Sep 24 '16 at 1:23









      WinEunuuchs2UnixWinEunuuchs2Unix

      44.6k1079169




      44.6k1079169












      • I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
        – cgogolin
        Mar 29 '18 at 16:08


















      • I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
        – cgogolin
        Mar 29 '18 at 16:08
















      I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
      – cgogolin
      Mar 29 '18 at 16:08




      I think it would be better to use the standard SUSPEND_MODULES feature of pm-utils for this linux.die.net/man/8/pm-suspend
      – cgogolin
      Mar 29 '18 at 16:08











      3














      I deal with two simple approaches with this issue. The first, which not always works (as you mentioned) just restarts the mouse module after the suspend action.




      sudo rmmod psmouse ; sudo modprobe psmouse




      Here is a nice discussion on how to do this "automatically":
      how to execute a command after resume from suspend?



      An alternative approach is to kill the module before suspend, avoiding to lock of the module after the resume (which apparently is what generates the issue, as WinEunuuchs2Unix underlined).



      To do that I use a simple command line to suspend the laptop instead of just closing the lid "manually". Of course this is not fancy at all, but works and it is a straigh forward solution. No time to hack involved.




      sudo rmmod psmouse ; sudo pm-suspend




      And then, after resuming the laptop, you should re-enable the module by typing:




      sudo modprobe psmouse




      You can always hack the default pm-suspend script, but I won't recommend it. It is simple and safer to generate these ad-hoc small command sequences.



      Last, an easy, fast way to quickly do the "killing/suspend" and the "re-enable" of the mouse module is to associate those steps with keyboard shortcuts: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?).



      Hope it works, it does for me, although is really uncomfortable to deal with this in such way. I have this issue in both, HP and Asus Laptops.






      share|improve this answer























      • This works for me where nothign else did- thanks!
        – daboross
        Oct 8 '18 at 18:16










      • Cheers! Glad it was helpful! ;D
        – Rho
        Oct 27 '18 at 11:33
















      3














      I deal with two simple approaches with this issue. The first, which not always works (as you mentioned) just restarts the mouse module after the suspend action.




      sudo rmmod psmouse ; sudo modprobe psmouse




      Here is a nice discussion on how to do this "automatically":
      how to execute a command after resume from suspend?



      An alternative approach is to kill the module before suspend, avoiding to lock of the module after the resume (which apparently is what generates the issue, as WinEunuuchs2Unix underlined).



      To do that I use a simple command line to suspend the laptop instead of just closing the lid "manually". Of course this is not fancy at all, but works and it is a straigh forward solution. No time to hack involved.




      sudo rmmod psmouse ; sudo pm-suspend




      And then, after resuming the laptop, you should re-enable the module by typing:




      sudo modprobe psmouse




      You can always hack the default pm-suspend script, but I won't recommend it. It is simple and safer to generate these ad-hoc small command sequences.



      Last, an easy, fast way to quickly do the "killing/suspend" and the "re-enable" of the mouse module is to associate those steps with keyboard shortcuts: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?).



      Hope it works, it does for me, although is really uncomfortable to deal with this in such way. I have this issue in both, HP and Asus Laptops.






      share|improve this answer























      • This works for me where nothign else did- thanks!
        – daboross
        Oct 8 '18 at 18:16










      • Cheers! Glad it was helpful! ;D
        – Rho
        Oct 27 '18 at 11:33














      3












      3








      3






      I deal with two simple approaches with this issue. The first, which not always works (as you mentioned) just restarts the mouse module after the suspend action.




      sudo rmmod psmouse ; sudo modprobe psmouse




      Here is a nice discussion on how to do this "automatically":
      how to execute a command after resume from suspend?



      An alternative approach is to kill the module before suspend, avoiding to lock of the module after the resume (which apparently is what generates the issue, as WinEunuuchs2Unix underlined).



      To do that I use a simple command line to suspend the laptop instead of just closing the lid "manually". Of course this is not fancy at all, but works and it is a straigh forward solution. No time to hack involved.




      sudo rmmod psmouse ; sudo pm-suspend




      And then, after resuming the laptop, you should re-enable the module by typing:




      sudo modprobe psmouse




      You can always hack the default pm-suspend script, but I won't recommend it. It is simple and safer to generate these ad-hoc small command sequences.



      Last, an easy, fast way to quickly do the "killing/suspend" and the "re-enable" of the mouse module is to associate those steps with keyboard shortcuts: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?).



      Hope it works, it does for me, although is really uncomfortable to deal with this in such way. I have this issue in both, HP and Asus Laptops.






      share|improve this answer














      I deal with two simple approaches with this issue. The first, which not always works (as you mentioned) just restarts the mouse module after the suspend action.




      sudo rmmod psmouse ; sudo modprobe psmouse




      Here is a nice discussion on how to do this "automatically":
      how to execute a command after resume from suspend?



      An alternative approach is to kill the module before suspend, avoiding to lock of the module after the resume (which apparently is what generates the issue, as WinEunuuchs2Unix underlined).



      To do that I use a simple command line to suspend the laptop instead of just closing the lid "manually". Of course this is not fancy at all, but works and it is a straigh forward solution. No time to hack involved.




      sudo rmmod psmouse ; sudo pm-suspend




      And then, after resuming the laptop, you should re-enable the module by typing:




      sudo modprobe psmouse




      You can always hack the default pm-suspend script, but I won't recommend it. It is simple and safer to generate these ad-hoc small command sequences.



      Last, an easy, fast way to quickly do the "killing/suspend" and the "re-enable" of the mouse module is to associate those steps with keyboard shortcuts: How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?).



      Hope it works, it does for me, although is really uncomfortable to deal with this in such way. I have this issue in both, HP and Asus Laptops.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 16 '17 at 12:12

























      answered May 16 '17 at 11:50









      RhoRho

      8241614




      8241614












      • This works for me where nothign else did- thanks!
        – daboross
        Oct 8 '18 at 18:16










      • Cheers! Glad it was helpful! ;D
        – Rho
        Oct 27 '18 at 11:33


















      • This works for me where nothign else did- thanks!
        – daboross
        Oct 8 '18 at 18:16










      • Cheers! Glad it was helpful! ;D
        – Rho
        Oct 27 '18 at 11:33
















      This works for me where nothign else did- thanks!
      – daboross
      Oct 8 '18 at 18:16




      This works for me where nothign else did- thanks!
      – daboross
      Oct 8 '18 at 18:16












      Cheers! Glad it was helpful! ;D
      – Rho
      Oct 27 '18 at 11:33




      Cheers! Glad it was helpful! ;D
      – Rho
      Oct 27 '18 at 11:33











      1














      Patching the kernel will solve this problem. You can find




      1. the patch on the Linux kernel mailing list and


      2. patching instructions at “How to patch the kernel with a specific commit”.



      My K501LB now works as it should.






      share|improve this answer




























        1














        Patching the kernel will solve this problem. You can find




        1. the patch on the Linux kernel mailing list and


        2. patching instructions at “How to patch the kernel with a specific commit”.



        My K501LB now works as it should.






        share|improve this answer


























          1












          1








          1






          Patching the kernel will solve this problem. You can find




          1. the patch on the Linux kernel mailing list and


          2. patching instructions at “How to patch the kernel with a specific commit”.



          My K501LB now works as it should.






          share|improve this answer














          Patching the kernel will solve this problem. You can find




          1. the patch on the Linux kernel mailing list and


          2. patching instructions at “How to patch the kernel with a specific commit”.



          My K501LB now works as it should.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 20 '16 at 22:53









          David Foerster

          27.9k1364110




          27.9k1364110










          answered Sep 20 '16 at 20:57









          Savel MtrxSavel Mtrx

          111




          111























              0














              I have several Asus laptops, I have had to disable the touchpad on all of them. They cause locking issues, and other problems.






              share|improve this answer





















              • Not what I was hoping to hear but I appreciate the response
                – Ross Allen
                Sep 9 '15 at 0:12










              • its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
                – ChangosMuertos
                Sep 9 '15 at 0:20
















              0














              I have several Asus laptops, I have had to disable the touchpad on all of them. They cause locking issues, and other problems.






              share|improve this answer





















              • Not what I was hoping to hear but I appreciate the response
                – Ross Allen
                Sep 9 '15 at 0:12










              • its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
                – ChangosMuertos
                Sep 9 '15 at 0:20














              0












              0








              0






              I have several Asus laptops, I have had to disable the touchpad on all of them. They cause locking issues, and other problems.






              share|improve this answer












              I have several Asus laptops, I have had to disable the touchpad on all of them. They cause locking issues, and other problems.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 8 '15 at 23:59









              ChangosMuertosChangosMuertos

              1337




              1337












              • Not what I was hoping to hear but I appreciate the response
                – Ross Allen
                Sep 9 '15 at 0:12










              • its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
                – ChangosMuertos
                Sep 9 '15 at 0:20


















              • Not what I was hoping to hear but I appreciate the response
                – Ross Allen
                Sep 9 '15 at 0:12










              • its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
                – ChangosMuertos
                Sep 9 '15 at 0:20
















              Not what I was hoping to hear but I appreciate the response
              – Ross Allen
              Sep 9 '15 at 0:12




              Not what I was hoping to hear but I appreciate the response
              – Ross Allen
              Sep 9 '15 at 0:12












              its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
              – ChangosMuertos
              Sep 9 '15 at 0:20




              its the Elan Touchpad. It literally makes me use ctrl-alt-f1/2/3 to change and change back to unfreeze it. Once I disabled it, no problems. As you know you can use it in short bursts and use my method mentioned above to get out of the lock up. Hope that helps.
              – ChangosMuertos
              Sep 9 '15 at 0:20











              0














              Drivers that don't respond well to suspension are pretty common regardless of the OS. I'm glad you found a workaround via hibernation.



              Since suspend doesn't fully power off and hibernation does, that would appear to indicate that the driver doesn't respond well to the "1/2 life" of suspension, but is perfectly capable of coming up during a power-on cycle which is what hibernation provides upon waking.



              source: http://manpages.ubuntu.com/manpages/trusty/man8/pm-action.8.html






              share|improve this answer





















              • You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
                – WinEunuuchs2Unix
                Sep 20 '16 at 22:17








              • 1




                @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
                – Elder Geek
                Sep 21 '16 at 18:23










              • sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
                – WinEunuuchs2Unix
                Sep 21 '16 at 19:38












              • I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
                – WinEunuuchs2Unix
                Sep 25 '16 at 23:37
















              0














              Drivers that don't respond well to suspension are pretty common regardless of the OS. I'm glad you found a workaround via hibernation.



              Since suspend doesn't fully power off and hibernation does, that would appear to indicate that the driver doesn't respond well to the "1/2 life" of suspension, but is perfectly capable of coming up during a power-on cycle which is what hibernation provides upon waking.



              source: http://manpages.ubuntu.com/manpages/trusty/man8/pm-action.8.html






              share|improve this answer





















              • You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
                – WinEunuuchs2Unix
                Sep 20 '16 at 22:17








              • 1




                @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
                – Elder Geek
                Sep 21 '16 at 18:23










              • sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
                – WinEunuuchs2Unix
                Sep 21 '16 at 19:38












              • I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
                – WinEunuuchs2Unix
                Sep 25 '16 at 23:37














              0












              0








              0






              Drivers that don't respond well to suspension are pretty common regardless of the OS. I'm glad you found a workaround via hibernation.



              Since suspend doesn't fully power off and hibernation does, that would appear to indicate that the driver doesn't respond well to the "1/2 life" of suspension, but is perfectly capable of coming up during a power-on cycle which is what hibernation provides upon waking.



              source: http://manpages.ubuntu.com/manpages/trusty/man8/pm-action.8.html






              share|improve this answer












              Drivers that don't respond well to suspension are pretty common regardless of the OS. I'm glad you found a workaround via hibernation.



              Since suspend doesn't fully power off and hibernation does, that would appear to indicate that the driver doesn't respond well to the "1/2 life" of suspension, but is perfectly capable of coming up during a power-on cycle which is what hibernation provides upon waking.



              source: http://manpages.ubuntu.com/manpages/trusty/man8/pm-action.8.html







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 9 '15 at 15:35









              Elder GeekElder Geek

              26.5k952126




              26.5k952126












              • You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
                – WinEunuuchs2Unix
                Sep 20 '16 at 22:17








              • 1




                @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
                – Elder Geek
                Sep 21 '16 at 18:23










              • sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
                – WinEunuuchs2Unix
                Sep 21 '16 at 19:38












              • I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
                – WinEunuuchs2Unix
                Sep 25 '16 at 23:37


















              • You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
                – WinEunuuchs2Unix
                Sep 20 '16 at 22:17








              • 1




                @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
                – Elder Geek
                Sep 21 '16 at 18:23










              • sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
                – WinEunuuchs2Unix
                Sep 21 '16 at 19:38












              • I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
                – WinEunuuchs2Unix
                Sep 25 '16 at 23:37
















              You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
              – WinEunuuchs2Unix
              Sep 20 '16 at 22:17






              You can hook into wake routines to restart the driver maybe... Much like how network manager is reloaded. Just haven't figured how to do it yet myself yet. I did have it working to restart pulseaudio but managed to break that 2 days ago :(
              – WinEunuuchs2Unix
              Sep 20 '16 at 22:17






              1




              1




              @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
              – Elder Geek
              Sep 21 '16 at 18:23




              @WinEunuuchs2Unix I'd love to see that. ping me if you figure it out.
              – Elder Geek
              Sep 21 '16 at 18:23












              sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
              – WinEunuuchs2Unix
              Sep 21 '16 at 19:38






              sure thing. I'll probably do one of those "answer your own question" things in about six months at this rate of 6 weeks on it already.
              – WinEunuuchs2Unix
              Sep 21 '16 at 19:38














              I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
              – WinEunuuchs2Unix
              Sep 25 '16 at 23:37




              I've posted an answer but I seem to be able to ping everyone except you (Elder Geek) for some weird reason.
              – WinEunuuchs2Unix
              Sep 25 '16 at 23:37











              0














              This worked for me:




              1. Boot into BIOS, on system boot-up hold F2 or ESC


              2. Change the Touchpad setting in your BIOS from ADVANCED to BASIC (makes no difference with regards to functionality)



              Now the touchpad should still work when resumed from suspend.






              share|improve this answer


























                0














                This worked for me:




                1. Boot into BIOS, on system boot-up hold F2 or ESC


                2. Change the Touchpad setting in your BIOS from ADVANCED to BASIC (makes no difference with regards to functionality)



                Now the touchpad should still work when resumed from suspend.






                share|improve this answer
























                  0












                  0








                  0






                  This worked for me:




                  1. Boot into BIOS, on system boot-up hold F2 or ESC


                  2. Change the Touchpad setting in your BIOS from ADVANCED to BASIC (makes no difference with regards to functionality)



                  Now the touchpad should still work when resumed from suspend.






                  share|improve this answer












                  This worked for me:




                  1. Boot into BIOS, on system boot-up hold F2 or ESC


                  2. Change the Touchpad setting in your BIOS from ADVANCED to BASIC (makes no difference with regards to functionality)



                  Now the touchpad should still work when resumed from suspend.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 8 '17 at 2:32









                  pst007xpst007x

                  3,901174874




                  3,901174874






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f671910%2ftouchpad-not-working-after-suspending-laptop%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Category:香港粉麵

                      List *all* the tuples!

                      Channel [V]