Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Disabling trackpad when trackpoint is in use. (Debian-X220)

Linux on ThinkPads
Post Reply
Message
Author
MANTA
Posts: 2
Joined: Sat May 14, 2011 9:59 am
Location: Baltimore, MD

Disabling trackpad when trackpoint is in use. (Debian-X220)

#1 Post by MANTA » Sat May 14, 2011 10:20 am

I just installed Debian wheezy on my X220 and I noticed how annoying the trackpad is when using the trackpoint as my palm brushes on the pad. Previously I was using Debian on an X300 and simply disabled the trackpad from the BIOS menu, but I am looking for a more flexible solution. When in windows the trackpad is disabled whenever the keyboard of the trackpoint is in use. I was wondering if there is a similar situation for linux.

I have installed gpointing-device-settings but none of the options there worked. I have seen a daemon that that disables the pad when typing, but I don't really have a problem when typing, it is when using the trackpoint that the pad becomes a bother. Does Lenovo have a solution that they use with their preinstalled linux or is there a third party solution for this?

Thanks for the help.

GomJabbar
Moderator
Moderator
Posts: 9872
Joined: Tue Jun 07, 2005 6:57 am

Re: Disabling trackpad when trackpoint is in use. (Debian-X220)

#2 Post by GomJabbar » Sat May 14, 2011 9:23 pm

If you use the KDE desktop, there is a checkbox for "Input devices" that disables the TrackPad. Gnome does not seem to have the same functionality out of the box.

See if the following is any help: http://www.thinkwiki.org/wiki/Synaptics ... iver_for_X
DKB

comps
Freshman Member
Posts: 83
Joined: Thu Jan 27, 2011 2:56 pm
Location: Prague, Czech Republic

Re: Disabling trackpad when trackpoint is in use. (Debian-X220)

#3 Post by comps » Sat May 14, 2011 11:29 pm

GomJabbar wrote:If you use the KDE desktop, there is a checkbox for "Input devices" that disables the TrackPad. Gnome does not seem to have the same functionality out of the box.

See if the following is any help: http://www.thinkwiki.org/wiki/Synaptics ... iver_for_X
The problem isn't in disabling the touchpad manually, that's really easy to do, however it's hard to disable it automatically when the trackpoint is in use (ie. the mouse cursor is being moved by it), which is probably why this topic was created in the first place.

MANTA wrote:...
Unfortunately, there's probably no easy way, you may take a look at "man 4 synaptics" to see all the options you can use to tune the touchpad, however it's still touchpad-only.

See

Code: Select all

dmesg | grep input:
- that should give you some idea on how to do it. My lines are

Code: Select all

input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input5
input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input15
so I list /sys/devices/platform/i8042/serio1/input/input5 to find a directory named "event5" and /sys/devices/platform/i8042/serio1/serio2/input/input15 to find another named "event15". Those names (5/5, 15/15) might differ if you ie. rmmod psmouse and modprobe it again, so don't extract those numbers from the dmesg output.
Now you can "cat /dev/input/event5" to get some output when the touchpad is active and "cat /dev/input/event15" when the trackpoint is active. So now it should be pretty easy to make a userspace daemon read(2) /dev/input/event15 and disable (with some delay) trackpoint if that input line is active (ie. using calls provided by the synaptics driver).

MANTA
Posts: 2
Joined: Sat May 14, 2011 9:59 am
Location: Baltimore, MD

Re: Disabling trackpad when trackpoint is in use. (Debian-X220)

#4 Post by MANTA » Mon May 16, 2011 2:08 pm

Thank for the assistance, I guess there isn't a ready solution out there so if I want one I have to roll one out myself. I guess I will give that a shot.

Thanks for all the help.

gehidore
Posts: 1
Joined: Sat Nov 17, 2012 8:55 pm
Location: Cinebar, WA

Re: Disabling trackpad when trackpoint is in use. (Debian-X220)

#5 Post by gehidore » Sat Nov 17, 2012 9:03 pm

I know this thread is old, It's just the first one I found in my searches.

I too have been irritated with this and since I couldn't manage to find an acpi even for my trackstick on an edge 430 I came up with this script to solve the problem, modify it to suit your needs

Please bear with me since I'm no professional bash scripter.

Code: Select all

#!/bin/bash
#
#Change /dev/input/event13 to your trackstick event
	cat /dev/input/event13 > /tmp/mousemove &
#initialize counter to prevent garbage file from growing
	i="0";
	while true ; do	
		i=$[$i+1];
		#variables	
		oldchecksum=${newchecksum};
		newchecksum=`md5sum /tmp/mousemove | awk '{print $1}'`
		#see if trackpad is already disabled
		if [ "$trackpad" = "off" ]; then

			#compare previous checksum to current if they're same trackstick is not moving
			if [ "$oldchecksum" = "$newchecksum" ]; then
				#make sure trackpad is enabled
				xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1;
				trackpad="on";
			fi

		else
			
			#compare previous checksum to current if they're different trackstick is moving
			if [ "$oldchecksum" != "$newchecksum" ]; then
				#disable trackpad
				xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0;
				trackpad="off";
			fi

		fi

		#check for count to keep poll file smaller
		if [ "$i" = "300" ]; then
			echo '' > /tmp/mousemove;
			i="0";
			newchecksum=`md5sum /tmp/mousemove | awk '{print $1}'`
		fi
			#sleep for 1 second so we don't eat up resources
#if you find that the update is not fast enough a smaller number such as .5 might suit you.
			sleep 1;
	done
The only caveat I've found is that if you decide to run 'pkill cat' as root the script will fail to function, also if you kill the script manually without killing cat and restart it you will have multiple cat processes running.

SInce I run fluxbox I've added this script to my ~/.fluxbox/apps with "sudo /path/to/script" as the script will require root access for the mouse event.
Hope this helps someone!

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 28 guests