Mouse/Touchpad Drivers and Settings

From TheBeard Science Project Wiki
Revision as of 12:55, 4 October 2018 by Beard (talk | contribs) (Monitor Keyboard and Pointer Events)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Monitor Keyboard and Pointer Events

This command actively monitors input events. It requires the proper packages:

apt-get install xserver-xorg-input-libinput libinput-tools
libinput debug-events
 event5   POINTER_MOTION    +3.08s	 -4.23/  6.11
 event5   POINTER_MOTION    +3.10s	 -3.76/  5.17
 event5   POINTER_MOTION    +3.11s	 -2.82/  4.70
 event5   POINTER_MOTION    +3.13s	 -2.35/  3.76
 event5   POINTER_MOTION    +3.14s	 -1.41/  2.82
 event5   POINTER_MOTION    +3.16s	 -1.41/  1.88
 event5   POINTER_MOTION    +3.17s	 -0.94/  1.41
 event5   POINTER_MOTION    +3.20s	  2.31/  0.46
-event4   KEYBOARD_KEY      +3.32s	*** (-1) pressed
 event4   KEYBOARD_KEY      +3.57s	*** (-1) pressed

Finding Device Information

Modinfo

Get info about psmouse:

modinfo psmouse
filename:       /lib/modules/4.15.0-29-generic/kernel/drivers/input/mouse/psmouse.ko
license:        GPL
description:    PS/2 mouse driver
author:         Vojtech Pavlik <vojtech@suse.cz>
srcversion:     1310A3C9230C0210612A329
alias:          serio:ty05pr*id*ex*
alias:          serio:ty01pr*id*ex*
depends:        
retpoline:      Y
intree:         Y
name:           psmouse
vermagic:       4.15.0-29-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           synaptics_intertouch:Use a secondary bus for the Synaptics device. (int)
parm:           proto:Highest protocol extension to probe (bare, imps, exps, any). Useful for KVM switches. (proto_abbrev)
parm:           resolution:Resolution, in dpi. (uint)
parm:           rate:Report rate, in reports per second. (uint)
parm:           smartscroll:Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled. (bool)
parm:           resetafter:Reset device after so many bad packets (0 = never). (uint)
parm:           resync_time:How long can mouse stay idle before forcing resync (in seconds, 0 = never). (uint)

/proc/bus/input/devices

Some device information:

cat /proc/bus/input/devices
...
I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech Touchpad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input749
U: Uniq=
H: Handlers=mouse0 event5 
B: PROP=9
B: EV=b
B: KEY=e420 30000 0 0 0 0
B: ABS=260800011000003

Xinput Info

Required package:

apt-get install xinput

Get list of devices:

xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ WebCam: WebCam                          	id=10	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=11	[slave  keyboard (3)]
    ↳ Acer WMI hotkeys                        	id=13	[slave  keyboard (3)]

Refer to the device by ID:

xinput list 12
ETPS/2 Elantech Touchpad                	id=12	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 12. Type: XIButtonClass
		Buttons supported: 12
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None None None
		Button state:
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: 0.000000 - 1408.000000
		  Resolution: 31000 units/m
		  Mode: relative
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: 0.000000 - 640.000000
		  Resolution: 31000 units/m
		  Mode: relative
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Scroll
		  Range: 0.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Scroll
		  Range: 0.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 12. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 30.000000
		  flags: 0x0
		Class originated from: 12. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: 30.000000
		  flags: 0x0

List the device properties:

xinput list-props 12
Device 'ETPS/2 Elantech Touchpad':
	Device Enabled (132):	1
	Coordinate Transformation Matrix (134):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (263):	1
	Device Accel Constant Deceleration (264):	2.500000
	Device Accel Adaptive Deceleration (265):	1.000000
	Device Accel Velocity Scaling (266):	12.500000
	Synaptics Edges (557):	56, 1352, 34, 606
	Synaptics Finger (558):	1, 1, 0
	Synaptics Tap Time (559):	180
	Synaptics Tap Move (560):	68
	Synaptics Tap Durations (561):	180, 180, 100
	Synaptics ClickPad (562):	0
	Synaptics Middle Button Timeout (563):	75
	Synaptics Two-Finger Pressure (564):	282
	Synaptics Two-Finger Width (565):	7
	Synaptics Scrolling Distance (566):	30, 30
	Synaptics Edge Scrolling (567):	1, 0, 0
	Synaptics Two-Finger Scrolling (568):	0, 0
	Synaptics Move Speed (569):	1.000000, 1.750000, 0.129366, 0.000000
	Synaptics Off (570):	0
	Synaptics Locked Drags (571):	0
	Synaptics Locked Drags Timeout (572):	5000
	Synaptics Tap Action (573):	2, 3, 0, 0, 0, 0, 0
	Synaptics Click Action (574):	1, 0, 0
	Synaptics Circular Scrolling (575):	0
	Synaptics Circular Scrolling Distance (576):	0.100000
	Synaptics Circular Scrolling Trigger (577):	0
	Synaptics Circular Pad (578):	0
	Synaptics Palm Detection (579):	0
	Synaptics Palm Dimensions (580):	10, 200
	Synaptics Coasting Speed (581):	20.000000, 50.000000
	Synaptics Pressure Motion (582):	30, 160
	Synaptics Pressure Motion Factor (583):	1.000000, 1.000000
	Synaptics Resolution Detect (584):	1
	Synaptics Grab Event Device (585):	0
	Synaptics Gestures (586):	1
	Synaptics Capabilities (587):	1, 0, 1, 1, 1, 1, 1
	Synaptics Pad Resolution (588):	31, 31
	Synaptics Area (589):	0, 0, 0, 0
	Synaptics Noise Cancellation (590):	7, 7
	Device Product ID (256):	2, 14
	Device Node (255):	"/dev/input/event5"

More xinput options:

xinput -h

Libinput Info

Required packages:

apt-get install xserver-xorg-input-libinput libinput-tools

List devices:

libinput list-devices
...
Device:           ETPS/2 Elantech Touchpad
Kernel:           /dev/input/event5
Group:            9
Seat:             seat0, default
Size:             45x21mm
Capabilities:     pointer 
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    none
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Xorg Log

While loading and unloading mouse drivers, it was useful to monitor the X.org log:

tail -f /var/log/Xorg.0.log

When I run...

modprobe -r psmouse && modprobe psmouse proto=auto

The X.org log shows:

...
[ 25827.995] (EE) ETPS/2 Elantech Touchpad: Read error 19
[ 25827.995] (II) config/udev: removing device ETPS/2 Elantech Touchpad
[ 25828.024] (II) UnloadModule: "synaptics"
[ 25831.493] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse0)
[ 25831.493] (**) ETPS/2 Elantech Touchpad: Ignoring device from InputClass "touchpad ignore duplicates"
[ 25831.535] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event5)
[ 25831.536] (**) ETPS/2 Elantech Touchpad: Applying InputClass "libinput touchpad catchall"
[ 25831.536] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"
[ 25831.536] (**) ETPS/2 Elantech Touchpad: Applying InputClass "Default clickpad buttons"
[ 25831.536] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'
[ 25831.536] (**) ETPS/2 Elantech Touchpad: always reports core events
[ 25831.536] (**) Option "Device" "/dev/input/event5"
[ 25831.560] (II) synaptics: ETPS/2 Elantech Touchpad: ignoring touch events for semi-multitouch device
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: x-axis range 0 - 1408 (res 31)
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: y-axis range 0 - 640 (res 31)
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: pressure range 0 - 255
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: finger width range 0 - 15
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: buttons: left right double triple
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: Vendor 0x2 Product 0xe
[ 25831.560] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found
[ 25831.560] (**) ETPS/2 Elantech Touchpad: always reports core events
[ 25831.592] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input751/event5"
[ 25831.592] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 12)
[ 25831.592] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MinSpeed is now constant deceleration 2.5
[ 25831.592] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MaxSpeed is now 1.75
[ 25831.592] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) AccelFactor is now 0.129
[ 25831.593] (**) ETPS/2 Elantech Touchpad: (accel) keeping acceleration scheme 1
[ 25831.593] (**) ETPS/2 Elantech Touchpad: (accel) acceleration profile 1
[ 25831.593] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000
[ 25831.593] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4
[ 25831.593] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found

Setting Device Properties

Synclient

Required packages:

apt-get install xserver-xorg-input-synaptics

Get property info:

synclient -l
Parameter settings:
    LeftEdge                = 56
    RightEdge               = 1352
    TopEdge                 = 34
    BottomEdge              = 606
    FingerLow               = 1
    FingerHigh              = 1
    MaxTapTime              = 180
    MaxTapMove              = 68
    MaxDoubleTapTime        = 180
...

Set a property:

synclient MaxTapTime=0

Xinput

Show properties of device (by device ID):

xinput list-props 12

Change a property (Enable two-finger scrolling):

xinput set-prop 12 "Synaptics Two-Finger Scrolling" 1 0

Change a property (Disable two-finger scrolling):

xinput set-prop 12 "Synaptics Two-Finger Scrolling" 0 0