Difference between revisions of "Fix for suspend problems on T410s with touchscreen"

From ThinkWiki
Jump to: navigation, search
(Linux is only a kernel. The script will work on any distro that has hid_ntrig as a module. Cleaned up.)
 
Line 1: Line 1:
In {{Ubuntu}} (and a lot of other Linux distrubutions) the Lenovo {{T410s}} with a [[MultiTouch|touchscreen]] has the issue that it cannot go into suspend.
+
In {{Ubuntu}} (and a lot of other GNU/Linux distrubutions) the Lenovo {{T410s}} with a [[MultiTouch|touchscreen]] has (had?) the issue that it cannot go into suspend.
  
 
It is the kernel module hid_ntrig that seems to be causing the problem. Thus a work around this is to turn off the kernel module hid_ntrig by running the following command:
 
It is the kernel module hid_ntrig that seems to be causing the problem. Thus a work around this is to turn off the kernel module hid_ntrig by running the following command:
Line 6: Line 6:
 
This will disable the touch screen, but now suspend works.  
 
This will disable the touch screen, but now suspend works.  
  
If you want to have both your touch screen and suspend, go to the folder: /etc/pm/sleep.d/. You should create a script file in this folder which will then be called when your laptops goes into and awakens from suspend. The script should contain the following code and remember to make the file executable:
+
If you want to have both your touch screen and suspend, go to the folder: /etc/pm/sleep.d/. You should create a script file in this folder which will then be called when your laptops goes into and awakens from suspend. The script should contain the following and remember to make the file executable (<code>chmod +x disable-enable-hid-ntrig.sh</code>):
 
 
 
  #!/bin/sh
 
  #!/bin/sh
 
   
 
   
 
  # Disable ntrig on suspend and enable it when awakening from suspend.
 
  # Disable ntrig on suspend and enable it when awakening from suspend.
  # Goal: Turn off touch screen which makes suspend not work on Lenovo ThinkPad T410
+
  # Goal: Make both suspend and touchscreen work on Lenovo ThinkPad T410s.
 
   
 
   
 
  # pm-action(8) - <action> <suspend method>
 
  # pm-action(8) - <action> <suspend method>
Line 24: Line 23:
 
  esac
 
  esac
  
When your laptop goes into suspend, the touch screen module will be disabled
+
When your laptop goes into suspend, the touch screen module will be disabled; <code>modprobe -r hid_ntrig</code> and on awakening the module is enabled; <code>modprobe hid_ntrig &</code>
modprobe -r hid_ntrig      
 
 
 
and on awakening the module is enabled.
 
modprobe hid_ntrig &
 
  
I add the ampersand (&) at the end when enabling hid_ntrig, because this command is rather slow. By doing so the command in run in the background, and thus it will not make your computer stall on awakening, but it might take 10 seconds before you can use your touch screen.
+
Ampersand (&) was added when enabling hid_ntrig, because this command is rather slow. By doing so the command in run in the background, and thus it will not make your computer stall on awakening, but it might take 10 seconds before you can use your touch screen.
  
This has been implemented in Linux Mint 10 but I guess it should also work in a normal {{Ubuntu}} 10.10 installation.
+
This has been implemented in Mint 10 but I guess it will also work in a normal {{Ubuntu}} 10.10 installation.

Latest revision as of 04:11, 3 May 2025

In Ubuntu (and a lot of other GNU/Linux distrubutions) the Lenovo T410s with a touchscreen has (had?) the issue that it cannot go into suspend.

It is the kernel module hid_ntrig that seems to be causing the problem. Thus a work around this is to turn off the kernel module hid_ntrig by running the following command:

modprobe -r hid_ntrig

This will disable the touch screen, but now suspend works.

If you want to have both your touch screen and suspend, go to the folder: /etc/pm/sleep.d/. You should create a script file in this folder which will then be called when your laptops goes into and awakens from suspend. The script should contain the following and remember to make the file executable (chmod +x disable-enable-hid-ntrig.sh):

#!/bin/sh

# Disable ntrig on suspend and enable it when awakening from suspend.
# Goal: Make both suspend and touchscreen work on Lenovo ThinkPad T410s.

# pm-action(8) - <action> <suspend method>

case "${1}" in
        suspend|hibernate)
                modprobe -r hid_ntrig       
                ;;
        resume|thaw)
                modprobe hid_ntrig &
                ;;
esac

When your laptop goes into suspend, the touch screen module will be disabled; modprobe -r hid_ntrig and on awakening the module is enabled; modprobe hid_ntrig &

Ampersand (&) was added when enabling hid_ntrig, because this command is rather slow. By doing so the command in run in the background, and thus it will not make your computer stall on awakening, but it might take 10 seconds before you can use your touch screen.

This has been implemented in Mint 10 but I guess it will also work in a normal Ubuntu 10.10 installation.