Difference between revisions of "Linux/touchpad"
(Created page with "<hide> {{subpage}} page type::article subject::touchpads in Linux </hide> ==Notes== In some laptop models (e.g. HP Pavilion dv4), the touchpad deactivation toggle butt...") |
(better solution) |
||
Line 4: | Line 4: | ||
[[subject::touchpads in Linux]] | [[subject::touchpads in Linux]] | ||
</hide> | </hide> | ||
− | == | + | ==Problem== |
− | In some laptop models (e.g. HP Pavilion dv4), the touchpad deactivation toggle button works properly; in others (e.g. HP G60), it seems to have no effect, even in the same version of Linux on a liveCD. | + | In some laptop models (e.g. [[HP/Pavilion/DV4|HP Pavilion dv4]]), the touchpad deactivation toggle button works properly; in others (e.g. [[HP/G60|HP G60]]), it seems to have no effect, even in the same version of Linux on a liveCD. |
+ | ==Solution== | ||
+ | Tentatively, [http://vajiv.com/blog/disable-touchpad-in-linux-mint/ this solution] seems to be universal: | ||
+ | * use <code>[[xinput]]</code> (seems to be installed by default) to get a device listing. | ||
+ | * use <code>xinput list-props "{{arg|name of touchpad device}}"</code> to verify that "Device Enabled" is set to "1". | ||
+ | * use <code>xinput set-prop "{{arg|name of touchpad device}}"</code> to deactivate the touchpad. (Works instantaneously; no reboot required.) | ||
+ | Once you've verified that this works and you know what your device is named, it's simple to create a .sh file to turn off your touchpad and another one to turn it on. | ||
+ | ==Older Solutions== | ||
* <code>synclient TouchpadOff=1</code> to disable the touchpad (...<code>=0</code> to re-enable) | * <code>synclient TouchpadOff=1</code> to disable the touchpad (...<code>=0</code> to re-enable) | ||
** Depending on how old your X server is you may have to add this to [[xorg.conf]]: | ** Depending on how old your X server is you may have to add this to [[xorg.conf]]: |
Latest revision as of 20:17, 15 May 2016
Problem
In some laptop models (e.g. HP Pavilion dv4), the touchpad deactivation toggle button works properly; in others (e.g. HP G60), it seems to have no effect, even in the same version of Linux on a liveCD.
Solution
Tentatively, this solution seems to be universal:
- use
xinput
(seems to be installed by default) to get a device listing. - use
xinput list-props "<name of touchpad device>"
to verify that "Device Enabled" is set to "1". - use
xinput set-prop "<name of touchpad device>"
to deactivate the touchpad. (Works instantaneously; no reboot required.)
Once you've verified that this works and you know what your device is named, it's simple to create a .sh file to turn off your touchpad and another one to turn it on.
Older Solutions
synclient TouchpadOff=1
to disable the touchpad (...=0
to re-enable)- Depending on how old your X server is you may have to add this to xorg.conf:
Section "InputDevice" Identifier "synaptics" Driver "synaptics" Option "SHMConfig" "true" EndSection
...or possibly:
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "SHMConfig" "true" EndSection
The X server may need to be restarted (i.e. reboot) after making changes. (The latter block is what worked for me.)
In theory, one can then use xbindkeys to assign a key to toggle activation of the touchpad -- where xbindkeys does apparently see the touchpad's deactivation button as a keystroke. (In practice, this also deactivated clicking from the external mouse. It's also not clear how to set xbindkeys to issue alternate commands so that toggling can be effected. Further experimentation is needed.)
Discussion here