[Patch] psm(4) ClickPad detection (was Re: Lenovo W540 so far)
Anthony Jenkins
Scoobi_doo at yahoo.com
Thu Jun 19 01:32:36 UTC 2014
Try this patch of x11-drivers/xf86-input-synaptics to fix Synaptics detection - it's from my old patchset, leaving off the sysutils/hald stuff.
[root at ajenkins-hplaptop /usr/ports/x11-drivers/xf86-input-synaptics]# svn diff
Index: files/patch-src__psmcomm.c
===================================================================
--- files/patch-src__psmcomm.c (revision 0)
+++ files/patch-src__psmcomm.c (working copy)
@@ -0,0 +1,22 @@
+--- ./src/psmcomm.c.orig 2013-05-12 19:18:02.000000000 -0400
++++ ./src/psmcomm.c 2013-09-18 08:56:55.344635632 -0400
+@@ -165,11 +165,18 @@
+ return PS2ReadHwStateProto(pInfo, &psm_proto_operations, comm, hwRet);
+ }
+
++static Bool
++PSMAutoDevProbe(InputInfoPtr pInfo, const char *device)
++{
++ return pInfo && pInfo->name && !strcmp(pInfo->name, "PS/2 Mouse") &&
++ device && !strncmp(device, "/dev/psm", 8);
++}
++
+ struct SynapticsProtocolOperations psm_proto_operations = {
+ NULL,
+ NULL,
+ PSMQueryHardware,
+ PSMReadHwState,
+- NULL,
++ PSMAutoDevProbe,
+ NULL
+ };
Property changes on: files/patch-src__psmcomm.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
On 06/17/2014 17:26, Ivan Rokotov wrote:
> 2014-06-17 19:54 GMT+02:00 Anthony Jenkins <Scoobi_doo at yahoo.com>:
>> On 06/17/2014 13:30, Ivan Rokotov wrote:
>>> Anyway, I tested your patch. This is from my logs. (It also blocked my
>>> keyboard under X - I don't know if I had to rebuild my keyboard and
>>> synaptics drivers.)
>> Weird... shouldn't have any affect on your keyboard...I'm typing on my laptop now!
>> Can you grep(1) your kernel messages for 'atkbd' and grep the Xorg log for
>> '\(keyboard\|kbd\)'?
> Sure.
>
> (Some of the messages are from my attempt to plug in a USB keyboard to
> be able to go back to the console. :))
>
> % grep -i '\(keyboard\|kbd\)' /var/log/messages
> Jun 17 19:02:24 thor kernel: kbd1 at kbdmux0
> Jun 17 19:02:24 thor kernel: atkbdc0: <Keyboard controller (i8042)>
> port 0x60,0x64 irq 1 on acpi0
> Jun 17 19:02:24 thor kernel: atkbd0: <AT Keyboard> irq 1 on atkbdc0
> Jun 17 19:02:24 thor kernel: kbd0 at atkbd0
> Jun 17 19:02:24 thor kernel: atkbd0: [GIANT-LOCKED]
> Jun 17 19:02:24 thor kernel: psm0: <PS/2 Mouse> irq 12 on atkbdc0
> Jun 17 19:12:16 thor kernel: ukbd0: <GASIA product 0x0022, class 0/0,
> rev 1.10/2.10, addr 2> on usbus0
> Jun 17 19:12:16 thor kernel: kbd2 at ukbd0
> Jun 17 19:12:16 thor devd: Executing '/etc/rc.d/syscons setkeyboard /dev/ukbd0'
> Jun 17 19:12:27 thor kernel: ukbd0: at uhub0, port 2, addr 2 (disconnected)
> Jun 17 19:12:27 thor devd: Executing '/etc/rc.d/syscons setkeyboard /dev/kbd0'
>
> % grep -i '\(keyboard\|kbd\)' /var/log/Xorg.0.log
> [ 368.215] (**) |-->Input Device "Keyboard0"
> [ 368.224] (II) LoadModule: "kbd"
> [ 368.225] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
> [ 368.225] (II) Module kbd: vendor="X.Org Foundation"
> [ 368.377] (II) Initializing built-in extension XKEYBOARD
> [ 368.743] (II) config/hal: Adding input device AT Keyboard
>
>>> In Xorg log I got
>>> [ 368.692] (--) synaptics: Touchpad0: synaptics touchpad found
>>> [ 368.692] (--) synaptics: Touchpad0: no supported touchpad found
>>> [ 368.692] (EE) synaptics: Touchpad0: Unable to query/initialize
>>> Synaptics hardware.
>>> but again, I didn't recompile any drivers.
>> Yeah I wanna say that's because xf86-input-synaptics is talking to /dev/psm0
>> instead of /dev/sysmouse, but that doesn't sound right. Anyway that's what I'm
>> looking at now - the devd patch to x11-servers/xorg-server, and next is
>> x11-drivers/xf86-input-synaptics.
> Good. :)
>
>> If you're handy with code you could probably find the code in xf86-input-synaptics
>> that balks at the Synaptics device. My goal is having the user install these two
>> packages on a touchpad laptop and have it just DTRT and correctly load the
>> Synaptics driver.
> I could probably find that code, but that's all. :) Anyway, as always,
> I'm more than willing to test anything you find useful.
>
> Ivan
More information about the freebsd-mobile
mailing list