Challenge getting touchpad to work since src/sys/isa/psm.c 1.71
David Wolfskill
david at catwhisker.org
Wed Aug 4 14:00:27 PDT 2004
Sorry about the delay; right around the time of the commit, I was having
some thermal issues with my laptop (a Dell Inspiron 5000e). I believe
those are fixed now -- it's gone through 5 days, each of which has
involved a "buildworld cycle" for each of -STABLE & -CURRENT, without
incident.
But I'm now having trouble getting a "touchpad tap" to be recognized as
a press/release of a mouse button in -CURRENT; I believe that the recent
commit to src/sys/isa/psm.c 1.71 is involved.
I normally run in -STABLE (booted from slice 1), and access the mouse
via moused; the resulting command line is
/usr/sbin/moused -3 -p /dev/psm0 -t auto
Thus, in -STABLE, tapping the touchpad is equivalent to a press/release
of the left mouse button (button 1); press/release for the right button
is button 3, and both the left & right button "chorded" are used to
simulate the middle button (button 2).
Until the above-cited commit, this was also the case in -CURRENT.
In an attempt to discover a bit more, I fired up moused without the -3
flag, but with the -f ("foreground") and -d ("debug") flags, so I could
see what the packets were when each event occurred. I see some
differences between any two of them, but I'm managing to fail to see how
those differences map to src/sys/sys/mouse.h's assignments.
Event First generated packet (hex)
Press/release left button 83 00 00 00 00 00 00 7f
Press/release right button 86 00 00 00 00 00 00 7f
Press/release both buttons 82 00 00 00 00 00 00 7f
Touchpad tap 87 00 00 00 00 00 00 7f
That leftmost byte is to be mapped by src/sys/sys/mouse.h thus:
/* button */
#define MOUSE_BUTTON1DOWN 0x0001 /* left */
#define MOUSE_BUTTON2DOWN 0x0002 /* middle */
#define MOUSE_BUTTON3DOWN 0x0004 /* right */
#define MOUSE_BUTTON4DOWN 0x0008
#define MOUSE_BUTTON5DOWN 0x0010
#define MOUSE_BUTTON6DOWN 0x0020
#define MOUSE_BUTTON7DOWN 0x0040
#define MOUSE_BUTTON8DOWN 0x0080
#define MOUSE_MAXBUTTON 31
#define MOUSE_STDBUTTONS 0x0007 /* buttons 1-3 */
#define MOUSE_EXTBUTTONS 0x7ffffff8 /* the others (28 of them!) */
#define MOUSE_BUTTONS (MOUSE_STDBUTTONS | MOUSE_EXTBUTTONS)
which seems a little confusing: moused is apparently reporting the
touchpad tap as all 3 buttons being down.
Perhaps a bit stranger, the device is now probed as having 3 buttons,
vs. the 2 that are seen in -STABLE or that were seen in -CURRENT prior
to the commit.
Here's a cut/paste of the probe messages from recent -CURRENT, with
PSM_DEBUG=1:
Aug 4 11:22:31 localhost kernel: psm0: unable to allocate IRQ
Aug 4 11:22:31 localhost kernel: psmcpnp0 irq 12 on acpi0
Aug 4 11:22:31 localhost kernel: psm0: current command byte:0047
Aug 4 11:22:31 localhost kernel: Synaptics Touchpad:
Aug 4 11:22:31 localhost kernel: Version: 4.3
Aug 4 11:22:31 localhost kernel: Model id: 88 58 a1
Aug 4 11:22:31 localhost kernel: infoRot180: 1
Aug 4 11:22:31 localhost kernel: infoPortrait: 0
Aug 4 11:22:31 localhost kernel: infoSensor: 8
Aug 4 11:22:31 localhost kernel: infoHardware: 44
Aug 4 11:22:31 localhost kernel: infoNewAbs: 1
Aug 4 11:22:31 localhost kernel: capPen: 0
Aug 4 11:22:31 localhost kernel: infoSimplC: 1
Aug 4 11:22:31 localhost kernel: infoGeometry: 1
Aug 4 11:22:31 localhost kernel: Capability Bytes: 55 47 55
Aug 4 11:22:31 localhost kernel: Mode byte set by BIOS: 41
Aug 4 11:22:31 localhost kernel: psm0: found Synaptics Touchpad
Aug 4 11:22:31 localhost kernel: psm0: <PS/2 Mouse> irq 12 on atkbdc0
Aug 4 11:22:31 localhost kernel: psm0: [GIANT-LOCKED]
Aug 4 11:22:31 localhost kernel: psm0: model Synaptics Touchpad, device ID 0-00, 3 buttons
Aug 4 11:22:31 localhost kernel: psm0: config:00000000, flags:00000000, packet size:6
Aug 4 11:22:31 localhost kernel: psm0: syncmask:c0, syncbits:80
Anyone have clues? I'm not married to the idea of using moused. I
tried running X without moused (telling X to access the mouse directly),
and I managed to get the same behavior.
Thanks,
david
--
David H. Wolfskill david at catwhisker.org
I do not "unsubscribe" from email "services" to which I have not explicitly
subscribed. Rather, I block spammers' access to SMTP servers I control,
and encourage others who are in a position to do so to do likewise.
More information about the freebsd-current
mailing list