Date: Fri, 2 Sep 2016 21:11:59 +0300 From: Alexander Mishurov <alexander.m.mishurov@gmail.com> To: Anthony Jenkins <Scoobi_doo@yahoo.com>, abi <abi@abinet.ru>, Arto Pekkanen <isoa@kapsi.fi> Cc: freebsd-x11@freebsd.org Subject: Re: Problem with touchpad Message-ID: <e1b2a52d-0389-641a-a7bc-38a570e53026@gmail.com> In-Reply-To: <93a22054-c180-47f0-0b9a-77f13ff90020@yahoo.com> References: <3ff36b68-bc63-b3f9-ffb7-ade8c6b3e690@abinet.ru> <255e5a1340573719da0c32f870523449@kapsi.fi> <63738d79-fa1e-7401-9f07-242ccbf2f40c@abinet.ru> <1d85bba2228e2a4b9c2ccd7721ccffe6@kapsi.fi> <670f7ff4-81cb-af50-be2a-5a97318dd5e8@abinet.ru> <3009df27-0b1a-a6c2-44e8-d8cfcb31307f@yahoo.com> <3f635241-a5ed-3d76-2451-0d2e246c1125@abinet.ru> <ace1550f-7d52-d697-1603-0dc5d754abb3@yahoo.com> <dc767fa9-5558-a2ee-4bee-09626beb68ae@abinet.ru> <93a22054-c180-47f0-0b9a-77f13ff90020@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I'm sorry for an interruption. I also made a patch for Cypress touchpad, it is in some Chromebooks. The original module uses it's own node and converts touchpad data to PS/2 format. I added popular gestures: 'two finger tap for right button' and 'tap-and-drag gesture'. There's still no any reaction. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206649 On 02/09/16 21:03, Anthony Jenkins via freebsd-x11 wrote: > Weird! Itt's supposed to see the /dev/psm0 device, see the > hw.psm.synaptics.margin_topsysctl and pick the 'synaptics' driver for > that device. The "psm" protocol shouldn't work for the Synaptics device > (I don't believe), and I don't think you should need an Xorg.conf file. > Not sure what's up with the x11-drivers/xf86-input-synaptics losing sync > all the time. I can add more logging to config/devd.c. I've been > running this code for years on 2 laptops. Did you reinstall all 3 > ports? I'll pick through your logfile to see if I spot anything. > > Anthony > > On 09/02/2016 01:06 PM, abi wrote: >> Patch can be applied to current revision of port tree. >> >> Here are changes >> >> I recompiled xorg-server and mouse drivers and noticed that nothing is >> attached to touchpad. xorg now looking for synaptics driver. Is it >> expected? We have support for synaptics in kernel and recently it was >> unproved to support 2 fingers touch. >> >> I installed synaptics driver. Without hint, it failed to attach with >> error that it can't detect protocol. This is common one, if you need >> exact error, I can repeat test. >> >> So, I put >> >> Section "InputClass" >> Identifier "Mouse" >> MatchDevicePath "/dev/psm0" >> Option "Protocol" "psm" >> EndSection >> >> psm is protocol driver can't detect. I think, in FreeBSD this is the >> only option. Maybe hardcode it into driver? >> >> As with kernel's touchpad driver, synaptics driver worked until reboot >> and I must say, this driver is even worse - mouse is not moving at all >> and just emits random key presses. Xorg log is a little bit more >> interesting. It's big, so I posting it as gist. >> >> https://gist.github.com/abishai/14b32a93001201c51bb984802b0fff92 >> >> 1. kbd tried to attach to USB mouse. I suppose it failed due to rights >> issue. /dev/ukbd0 is root:wheel, while I'm only operator. Should I >> test what will happen if it actually attaches? But I don't think this >> is the right thing to attach. >> >> 2. Every touch of synaptic driver emits synaptics touchpad found block >> in xorg log. >> >> 3. (EE) Synaptics driver lost sync... got gigantic packet! is when I >> actively use touchpad. So, I doubt this is the root of the problem. >> Delicate touching :P keeps this error from spawning. >> >> >> >> On 02/09/2016 17:11, Anthony Jenkins wrote: >>> The problem is the mouse(4) Xorg driver doesn't work (well) with the >>> Synaptics-flavored psm(4) device. My xorg-server port should attach the >>> synaptics(4) Xorg driver. >>> >>> If you can, try grabbing my version of the following ports: >>> >>> x11-servers/xorg-server - >>> https://github.com/ScoobiFreeBSD/freebsd-ports/tree/xorg-synaptics/x11-servers/xorg-server >>> >>> x11-drivers/xf86-input-synaptics - >>> https://github.com/ScoobiFreeBSD/freebsd-ports/tree/xorg-synaptics/x11-drivers/xf86-input-synaptics >>> >>> x11-drivers/xf86-input-mouse - >>> https://github.com/ScoobiFreeBSD/freebsd-ports/tree/xorg-synaptics/x11-drivers/xf86-input-mouse >>> >>> >>> The 2 drivers just change the autodetection of FreeBSD's >>> Synaptics-flavored psm(4). >>> >>> Patch version: >>> https://github.com/ScoobiFreeBSD/freebsd-ports/commit/4e1b8522e770b54264f393b4fd8ce5b3acebcabe.patch >>> >>> >>> (I'm not sure if any of the x11 ports changed since I did these patches, >>> so they might not apply cleanly) >>> >>> Anthony >>> >>> On 09/02/2016 03:00 AM, abi wrote: >>>> No need to sorry, I'm very thankful you're answering at all! :) >>>> >>>> I removed moused config from /etc/rc.conf and from xorg configuration, >>>> so I have only hw.psm.synaptics_support=1 in /boot/loader/conf >>>> >>>> Here is how xorg initializing pointing devices >>>> >>>> [ 27.114] (II) LoadModule: "mouse" >>>> [ 27.114] (II) Loading >>>> /usr/local/lib/xorg/modules/input/mouse_drv.so >>>> [ 27.115] (II) Module mouse: vendor="X.Org Foundation" >>>> [ 27.115] compiled for 1.17.4, module version = 1.9.1 >>>> [ 27.115] Module class: X.Org XInput Driver >>>> [ 27.115] ABI class: X.Org XInput driver, version 21.0 >>>> [ 27.115] (II) Using input driver 'mouse' for 'sysmouse' >>>> [ 27.115] (**) sysmouse: always reports core events >>>> [ 27.115] (**) Option "Device" "/dev/sysmouse" >>>> [ 27.115] (==) sysmouse: Protocol: "Auto" >>>> [ 27.115] (**) sysmouse: always reports core events >>>> [ 27.115] (==) sysmouse: Emulate3Buttons, Emulate3Timeout: 50 >>>> [ 27.115] (**) sysmouse: ZAxisMapping: buttons 4 and 5 >>>> [ 27.115] (**) sysmouse: Buttons: 5 >>>> [ 27.115] (**) Option "config_info" "devd:sysmouse" >>>> [ 27.115] (II) XINPUT: Adding extended input device "sysmouse" >>>> (type: MOUSE, id 7) >>>> [ 27.115] (**) sysmouse: (accel) keeping acceleration scheme 1 >>>> [ 27.115] (**) sysmouse: (accel) acceleration profile 0 >>>> [ 27.115] (**) sysmouse: (accel) acceleration factor: 2.000 >>>> [ 27.115] (**) sysmouse: (accel) acceleration threshold: 4 >>>> [ 27.116] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0 >>>> [ 27.116] (II) sysmouse: SetupAuto: protocol is SysMouse >>>> [ 27.116] (II) config/devd: device /dev/ums0 already opened >>>> [ 27.205] (II) config/devd: adding input device Mouse (/dev/psm0) >>>> [ 27.205] (II) Using input driver 'mouse' for 'Mouse' >>>> [ 27.205] (**) Mouse: always reports core events >>>> [ 27.205] (**) Option "Device" "/dev/psm0" >>>> [ 27.205] (==) Mouse: Protocol: "Auto" >>>> [ 27.205] (**) Mouse: always reports core events >>>> [ 27.288] (==) Mouse: Emulate3Buttons, Emulate3Timeout: 50 >>>> [ 27.288] (**) Mouse: ZAxisMapping: buttons 4 and 5 >>>> [ 27.288] (**) Mouse: Buttons: 5 >>>> [ 27.288] (**) Option "config_info" "devd:psm0" >>>> [ 27.288] (II) XINPUT: Adding extended input device "Mouse" (type: >>>> MOUSE, id 8) >>>> [ 27.288] (**) Mouse: (accel) keeping acceleration scheme 1 >>>> [ 27.288] (**) Mouse: (accel) acceleration profile 0 >>>> [ 27.288] (**) Mouse: (accel) acceleration factor: 2.000 >>>> [ 27.288] (**) Mouse: (accel) acceleration threshold: 4 >>>> [ 27.361] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 13 >>>> [ 27.361] (II) Mouse: SetupAuto: protocol is PS/2 >>>> [ 27.906] (II) Mouse: ps2EnableDataReporting: succeeded >>>> >>>> I also rebuild kernel with options PSM_DEBUG=1, so here is some >>>> extended info from dmesg. Nothing criminal as well >>>> >>>> Sep 2 09:42:22 sphinx kernel: atkbdc0: <Keyboard controller (i8042)> >>>> port 0x60,0x64 irq 1 on acpi0 >>>> Sep 2 09:42:22 sphinx kernel: atkbd0: <AT Keyboard> irq 1 on atkbdc0 >>>> Sep 2 09:42:22 sphinx kernel: kbd0 at atkbd0 >>>> Sep 2 09:42:22 sphinx kernel: atkbd0: [GIANT-LOCKED] >>>> Sep 2 09:42:22 sphinx kernel: psm0: current command byte:0065 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 02 64 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 00 64 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 03 64 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 03 64 >>>> Sep 2 09:42:22 sphinx kernel: psm: data 08 00 00 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 02 47 18 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 01 e2 a1 >>>> Sep 2 09:42:22 sphinx kernel: psm: status f0 02 23 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 80 3f >>>> Sep 2 09:42:22 sphinx kernel: psm: status 84 03 00 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 12 e8 00 >>>> Sep 2 09:42:22 sphinx kernel: psm: status b1 f1 93 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 27 fe 22 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 2c de 40 >>>> Sep 2 09:42:22 sphinx kernel: psm: status 00 02 64 >>>> Sep 2 09:42:22 sphinx kernel: psm0: <PS/2 Mouse> irq 12 on atkbdc0 >>>> Sep 2 09:42:22 sphinx kernel: psm0: [GIANT-LOCKED] >>>> Sep 2 09:42:22 sphinx kernel: psm0: model Synaptics Touchpad, device >>>> ID 3-00, 4 buttons >>>> Sep 2 09:42:22 sphinx kernel: psm0: config:00004000, flags:00000008, >>>> packet size:6 >>>> Sep 2 09:42:22 sphinx kernel: psm0: syncmask:c0, syncbits:00 >>>> >>>> abishai@sphinx:~ % xinput >>>> ⎡ Virtual core pointer id=2 [master pointer >>>> (3)] >>>> ⎜ ↳ Virtual core XTEST pointer id=4 [slave >>>> pointer (2)] >>>> ⎜ ↳ sysmouse id=7 [slave >>>> pointer (2)] >>>> ⎜ ↳ Mouse id=8 [slave >>>> pointer (2)] >>>> ⎣ Virtual core keyboard id=3 [master keyboard >>>> (2)] >>>> ↳ Virtual core XTEST keyboard id=5 [slave >>>> keyboard (3)] >>>> ↳ kbdmux id=6 [slave >>>> keyboard (3)] >>>> >>>> I still have the original issue: taps and button click are working 1 >>>> time from 10, buttons can easily hang in pressed state. >>>> Also, I noticed that when touchpad in this broken state, pointer moves >>>> slower than normal. >>>> >>>> The only way to fix the problem is to run >>>> xinput disable Mouse >>>> xinput enable Mouse >>>> >>>> On the second command system hangs until it gets some input from >>>> touchpad (clicking or touching). And nothing in the logs! >>>> I see only this one when I disable/enable it >>>> Sep 2 09:52:37 sphinx kernel: psm: status 00 03 64 >>>> Sep 2 09:52:37 sphinx kernel: psm: status 2c de 40 >>>> Sep 2 09:52:37 sphinx kernel: psm: status 20 01 14 >>>> >>>> This freeze worries me: system is completely disabled until it get >>>> touchpad input and no component is unhappy enough to write something >>>> in the logs. >>>> >>>> On 01/09/2016 21:14, Anthony Jenkins wrote: >>>>> Sorry for late reply, and for top-posting (trying to stay consistent). >>>>> >>>>> Pointing devices on FreeBSD are typically handled by a number of >>>>> drivers, including: >>>>> >>>>> * ums(4) - A USB HID device which is a mouse class >>>>> * psm(4) - A serial mouse/touchpad attached to PS/2 keyboard port >>>>> >>>>> moused(8) can detect these devices and create composite pseudodevice >>>>> /dev/sysmouse which aggregates the events from the devices it manages. >>>>> The problem with psm(4) touchpad devices and moused(8) is that psm(4) >>>>> can be in "Synaptics" mode which makes it incompatible with moused(8). >>>>> So if you boot with the hw.psm.synaptics_support="1" tunable and >>>>> moused(8) enabled, (unless this has changed recently) you get weird >>>>> behavior from the touchpad and none of the gestures work. >>>>> >>>>> The devd(8) interface to x11-servers/xorg-server waits for devd(8) to >>>>> notify the X server that a device has attached/detached. The >>>>> notification includes a simple path under /dev (e.g. /dev/ums0, >>>>> /dev/psm0 or /dev/sysmouse). The multi-mode behavior of psm(4) makes >>>>> the current implementation of the devd interface awkward, because each >>>>> device path maps to a single driver (e.g. "/dev/ums*" -> "mouse", >>>>> "/dev/psm*" -> "mouse", "/dev/sysmouse" -> "mouse", >>>>> "/dev/vboxguest" -> >>>>> "vboxmouse", etc.) >>>>> >>>>> My implementation maps each new device notification to a function to >>>>> determine which driver should be attached to each device node. For >>>>> example, the function for "/dev/psm" checks for the presence of a >>>>> sysctl >>>>> that indicates what mode psm(4) is in. >>>>> >>>>> Even with the current implementation of xorg-server's devd stuff, all >>>>> this should "just work" when using moused(8) and USB mice. It's >>>>> multimode devices like psm(4) which confuse the current >>>>> implementation. >>>>> >>>>> Anthony >>>>> >>>>> On 08/30/2016 02:43 AM, abi wrote: >>>>>> How can it be - all devices attached to one devd node? What if I want >>>>>> different drivers? synaptics for touchpad and generic mouse for USB ? >>>>>> Not in this particular case, but generally speaking. >>>>>> >>>>>> On 29/08/2016 19:19, Arto Pekkanen wrote: >>>>>>> I never used the psm device directly with X.org, because >>>>>>> /dev/sysmouse (which operated by moused) is the the standard, >>>>>>> multiplexed interface for mice and touchpads. Every touchpand and >>>>>>> mice attached will be handled by moused. >>>>>>> >>>>>>> Take out all moused -related stuff from your rc.conf, remove ALL >>>>>>> your >>>>>>> X.org input device configuration. Then try again. Ie. don't touch >>>>>>> the >>>>>>> vanilla settings. >>>>>>> >>>>>>> USB mice work out of the box without any configuration. Devd will >>>>>>> notify X.org, which then configures the mice etc. >>>>>>> >>>>>>> abi kirjoitti 29.08.2016 16:34: >>>>>>>> I'm not sure what is attached to /dev/sysmouse >>>>>>>> >>>>>>>> I suspect USB one, but I disabled sysmouse in xorg configuration >>>>>>>> for >>>>>>>> sure >>>>>>>> >>>>>>>> Section "InputClass" >>>>>>>> Identifier "VanishBastardo" >>>>>>>> MatchDevicePath "/dev/sysmouse" >>>>>>>> Option "Ignore" "true" >>>>>>>> EndSection >>>>>>>> >>>>>>>> and >>>>>>>> >>>>>>>> moused_enable="NO" >>>>>>>> moused_nondefault_enable="NO" >>>>>>>> >>>>>>>> [ 17.061] (II) config/devd: adding input device (null) >>>>>>>> (/dev/sysmouse) >>>>>>>> [ 17.061] (**) sysmouse: Ignoring device from InputClass >>>>>>>> "VanishBastardo" >>>>>>>> >>>>>>>> So, if both devices clashing for 1 node, no driver attached to it >>>>>>>> anyway. Also, I tried CURRENT - it has the same problem. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 29/08/2016 15:16, Arto Pekkanen wrote: >>>>>>>>> With a PS2 touchpad you could also try this: >>>>>>>>> https://www.freebsd.org/doc/faq/x.html#idp64092272 >>>>>>>>> >>>>>>>>> abi kirjoitti 27.08.2016 03:51: >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> I have strange issue with Dell XPS 13 (Skylake) touchpad. It >>>>>>>>>> works >>>>>>>>>> until xorg restart. After restart, buttons become >>>>>>>>>> unresponsive, the >>>>>>>>>> most common is if button remains pressed somehow. >>>>>>>>>> >>>>>>>>>> I found simple workaround - toggle touchpad with xinput. >>>>>>>>>> However, on >>>>>>>>>> xinput enable system hangs - screen is not updated and it ignores >>>>>>>>>> keyboard input until I use touchpad. After that, system and >>>>>>>>>> touchpad >>>>>>>>>> becomes operational. Until restart. >>>>>>>>>> >>>>>>>>>> Synaptics driver has the same problem. >>>>>>>>>> Touchpad in generic ps/2 mode (without >>>>>>>>>> hw.psm.synaptics_support=1) >>>>>>>>>> works. >>>>>>>>>> >>>>>>>>>> I made a search and found this commit >>>>>>>>>> http://svnweb.freebsd.org/base?view=revision&revision=281440 in >>>>>>>>>> CURRENT release notes. However it's pretty old and should be >>>>>>>>>> included >>>>>>>>>> in 11. >>>>>>>>>> >>>>>>>>>> FreeBSD 11.0-RC1 >>>>>>>>>> Xorg log >>>>>>>>>> https://gist.github.com/abishai/844c3221d9388a5a6f8c65bd13ad2d88 >>>>>>>>>> USB receiver is generic wireless mouse >>>>>>>>>> Mouse is touchpad >>>>>>>>>> No idea what is sysmouse. I have moused_enable="NO" and >>>>>>>>>> moused_nondefault_enable="NO" in /etc/rc.conf >>>>>>>>>> >>>>>>>>>> I appreciate any help or suggestions :) >>>>>>>>>> _______________________________________________ >>>>>>>>>> freebsd-x11@freebsd.org mailing list >>>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-x11 >>>>>>>>>> To unsubscribe, send any mail to >>>>>>>>>> "freebsd-x11-unsubscribe@freebsd.org" >>>>>> _______________________________________________ >>>>>> freebsd-x11@freebsd.org mailing list >>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-x11 >>>>>> To unsubscribe, send any mail to >>>>>> "freebsd-x11-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e1b2a52d-0389-641a-a7bc-38a570e53026>