[PATCH] Synaptics & devd(4) support
Anthony Jenkins
Scoobi_doo at yahoo.com
Wed Jan 28 15:41:42 UTC 2015
I don't see any Synaptics support in the kernel boot messages for your
psm(4) device; it says "Generic PS/2 mouse, device ID 0-00, 3 buttons":
Jan 28 09:20:05 MyBSD kernel: psmcpnp0: <PS/2 mouse port> irq 12 on acpi0
Jan 28 09:20:05 MyBSD kernel: atkbdc0: <Keyboard controller (i8042)>
port 0x60,0x64 irq 1 on acpi0
Jan 28 09:20:05 MyBSD kernel: atkbd0: <AT Keyboard> irq 1 on atkbdc0
Jan 28 09:20:05 MyBSD kernel: atkbd: the current kbd controller command
byte 0065
Jan 28 09:20:05 MyBSD kernel: atkbd: keyboard ID 0x41ab (2)
Jan 28 09:20:05 MyBSD kernel: kbd0 at atkbd0
Jan 28 09:20:05 MyBSD kernel: kbd0: atkbd0, AT 101/102 (2), config:0x0,
flags:0x1d0000
Jan 28 09:20:05 MyBSD kernel: ioapic0: routing intpin 1 (ISA IRQ 1) to
lapic 0 vector 65
Jan 28 09:20:05 MyBSD kernel: atkbd0: [GIANT-LOCKED]
Jan 28 09:20:05 MyBSD kernel: psm0: current command byte:0065
Jan 28 09:20:05 MyBSD kernel: psm0: <PS/2 Mouse> flags 0x3000 irq 12 on
atkbdc0
Jan 28 09:20:05 MyBSD kernel: ioapic0: routing intpin 12 (ISA IRQ 12) to
lapic 0 vector 66
Jan 28 09:20:05 MyBSD kernel: psm0: [GIANT-LOCKED]
Jan 28 09:20:05 MyBSD kernel: psm0: model Generic PS/2 mouse, device ID
0-00, 3 buttons
Jan 28 09:20:05 MyBSD kernel: psm0: config:00003000, flags:00000008,
packet size:3
Jan 28 09:20:05 MyBSD kernel: psm0: syncmask:c0, syncbits:00
Mine, on the other hand, displays Synaptics support ("Synaptics
Touchpad, device ID 0-00, 3 buttons"):
[ajenkins at ajenkins-hplaptop ~]$ dmesg
...
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
kbd0: atkbd0, generic (0), config:0x0, flags:0x3f0000
ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 16 vector 65
atkbd0: [GIANT-LOCKED]
psm0: unable to allocate IRQ
psmcpnp0: <PS/2 mouse port> irq 12 on acpi0
psm0: current command byte:0067
psm0: <PS/2 Mouse> irq 12 on atkbdc0
ioapic0: routing intpin 12 (ISA IRQ 12) to lapic 16 vector 66
psm0: [GIANT-LOCKED]
psm0: model Synaptics Touchpad, device ID 0-00, 3 buttons
psm0: config:00004000, flags:00000008, packet size:6
psm0: syncmask:c0, syncbits:00
Can you post the contents of your /boot/loader.conf file? If you have
the requisite loader variable to turn on Synaptics support, it's
possible your psm(4) device isn't a (recognized) Synaptics device.
The patches I'm proposing are applied to your /usr/ports tree, where you
should have installed the ports files.
$ cd /usr/ports
$ patch -p0 < path/to/a/patch/file.patch
# Repeat for each patchfile
$ for dir in x11-server/xorg-server x11-drivers/xf86-input-synaptics
x11-drivers/xf86-input-mouse; do (cd "${dir}" && make clean && make &&
make deinstall reinstall; ); done
No changes to the kernel.
Anthony
On 01/28/2015 01:22 AM, Mohammad Najafi wrote:
> Dear Anthony Jenkins:
>
> Thanks for taking time to look at my log files and help me.
>
> I should let you know that I have already enabled synaptic psm in
> loader.conf.
> However, attached, you can find the verbose boot message and all the
> other files including loader.conf with psm enabled in it.
>
> By the way, I do not know how I can apply a patch in FreeBSD. I use
> the Generic kernel and am not familiar with building kernel.
>
> Thanks again for all the help.
> M.Najafi
>
>
>
> *M. Najafi (Dr.)*
>
> On Tue, Jan 27, 2015 at 8:32 PM, Anthony Jenkins via freebsd-x11
> <freebsd-x11 at freebsd.org <mailto:freebsd-x11 at freebsd.org>> wrote:
>
> The attached patches allow x11-servers/xorg-server with devd(4)
> support enabled to attach the x11-drivers/xf86-input-synaptics
> driver. The largest change is to config/devd.c, mainly because
> psm(4) can attach either the synaptics or mouse driver.
>
> Changes:
> x11-drivers/xf86-input-synaptics:
> - Added a PSMAutoDevProbe() method which returns TRUE if psm(4)
> is in Synaptics mode (hw.psm.synaptics_support=1).
>
> x11-drivers/xf86-input-mouse:
> - Do not attach if psm(4) is in Synaptics mode.
>
> x11-servers/xorg-server:
> - Changed struct hw_type to consist of 3 members:
> - name of driver
> - handler to configure driver
> - flag to ignore device path (for atkbd(4))
> - Changed hw_types[] to associate driver names with handlers
> - Moved test for open device file to is_path_openable().
> - Added char *rtrim(char *) to strip trailing whitespace (called
> from device_removed()).
> - Changed device_added() to setup device generically, then call
> driver-specific handler.
> - Moved keyboard quirks to atkbd(4) handler (get_default_device()).
> - Moved "driver" input option setting to individual driver handlers.
> - Added get_default_device(), get_usb_device() and
> get_psm_device() handlers.
> - Reordered mousedrivers[] array to favor specialized pointer
> drivers ("synaptics", "evdev", "vmmouse") over generic driver
> ("mouse").
>
> Patches should perform correctly regardless of psm(4) synaptics
> support, but it's been a while since I've tested without synaptics
> support. I also have an associated patch for sysutils/hal to
> support attaching the Synaptics driver properly; I'll have to dig
> that up though.
>
> Comments/suggestions/criticisms welcome.
>
> --
> Anthony Jenkins
>
>
> _______________________________________________
> freebsd-x11 at freebsd.org <mailto:freebsd-x11 at freebsd.org> mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to
> "freebsd-x11-unsubscribe at freebsd.org
> <mailto:freebsd-x11-unsubscribe at freebsd.org>"
>
>
--
Anthony Jenkins
More information about the freebsd-x11
mailing list