From owner-freebsd-x11@freebsd.org Fri Sep 2 14:11:15 2016 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 940FEBCC1CA for ; Fri, 2 Sep 2016 14:11:15 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm2-vm1.bullet.mail.bf1.yahoo.com (nm2-vm1.bullet.mail.bf1.yahoo.com [98.139.213.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55B7ED82 for ; Fri, 2 Sep 2016 14:11:15 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1472825473; bh=T1x4ZimiuWMfZtcUNyq3PC7jQ8CXfgZBJdO332c2RYA=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=VB8JRjRvo8cnZrzV9xSvuyE3g/knt4aTwMBJ/9JB/yCQ0ZprjpzpfqsUBzU59+oZUD0gpOZglFu/Lg/LkoKCNLMRInzEb8qArk8l8KYRkifr/gMZpBBPjdZTmXENUxMlHyaLzUX54AnTR6N3PSzALSFDi/9G4/5K1RTc/1VLfm/QQ+DCX/Pr6F+DPDT7ShdlnGcJV4wktMMoXGSDMj5/JKU7639BvIBUED84/gSaIhC18naysCT3KPcJihOtQrBnfjkNOXRI0pfH8B04X5frTj0lEzgkaSmbUJcXv9xa0V63GdhtclqSuWiBNOK11eM4/03k2BbFC2L+h3D6SNz04w== Received: from [66.196.81.173] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 02 Sep 2016 14:11:13 -0000 Received: from [98.139.211.196] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 02 Sep 2016 14:11:13 -0000 Received: from [127.0.0.1] by smtp205.mail.bf1.yahoo.com with NNFMP; 02 Sep 2016 14:11:13 -0000 X-Yahoo-Newman-Id: 676459.21005.bm@smtp205.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: phj6eG8VM1nhG5gC.ysysIpQoPCkB3uohi0IZo_3hZ1_2bk sn1wi82VLM6vfl6Yo9sLsGGGiWPrCBQH42Ts7bn9YpsrTb0unstUGpnVnMXt uQ0KeD8qXlkQ1N.d4y4o8iX77SXrdegQZXGlZGiXT3WmNhWE3bg_D.MBwDSf gCCwt50UXPXcK0bVWL2mqkQBU3wsu6RqbKp5iIsuXuxpbYG1yCoXW5slqhDJ Ak6z5IWGktCCcIxP6a4VxUR5IuGI9uiUiG51qcqP4l9jAhtDejZA4Ekm.51u mgnlJXeiiLdensxKfSS87RCThwBM4uPMAu8FcU8dCyTa31nNXcxlcWwBg_yT l4CAstnZ3DtX2wojGQzeVN3rzzcqIba7TqzZQP.nJf3SH22H4.rHRCQ6ki.o slBIbGPfPT28.pYQkDp57JCsviV2cgUU1n.aFswz_yGbpwM1s3tYDE.Iq06i X2hmzHCR7nO20MkuZyaLUYxQ8hL4zPp8H6I8584H6uHuDheAcpXjB4loJHRp hUG12T9D9T2abl2gKlmUiFXiZ9iTkw7bO_L_dTEXQj8mudVE- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- Subject: Re: Problem with touchpad To: abi , Arto Pekkanen 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> Cc: freebsd-x11@freebsd.org From: Anthony Jenkins Message-ID: Date: Fri, 2 Sep 2016 10:11:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <3f635241-a5ed-3d76-2451-0d2e246c1125@abinet.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 14:11:15 -0000 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-se= rvers/xorg-server x11-drivers/xf86-input-synaptics - https://github.com/ScoobiFreeBSD/freebsd-ports/tree/xorg-synaptics/x11-dr= ivers/xf86-input-synaptics x11-drivers/xf86-input-mouse - https://github.com/ScoobiFreeBSD/freebsd-ports/tree/xorg-synaptics/x11-dr= ivers/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/4e1b8522e770b54264f= 393b4fd8ce5b3acebcabe.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=3D1 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.s= o > [ 27.115] (II) Module mouse: vendor=3D"X.Org Foundation" > [ 27.115] compiled for 1.17.4, module version =3D 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] (=3D=3D) sysmouse: Protocol: "Auto" > [ 27.115] (**) sysmouse: always reports core events > [ 27.115] (=3D=3D) 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] (=3D=3D) Mouse: Protocol: "Auto" > [ 27.205] (**) Mouse: always reports core events > [ 27.288] (=3D=3D) 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=3D1, so here is some > extended info from dmesg. Nothing criminal as well > > Sep 2 09:42:22 sphinx kernel: atkbdc0: > port 0x60,0x64 irq 1 on acpi0 > Sep 2 09:42:22 sphinx kernel: atkbd0: 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: 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 > =E2=8E=A1 Virtual core pointer id=3D2 [master= pointer=20 > (3)] > =E2=8E=9C =E2=86=B3 Virtual core XTEST pointer id=3D= 4 [slave > pointer (2)] > =E2=8E=9C =E2=86=B3 sysmouse id=3D= 7 [slave > pointer (2)] > =E2=8E=9C =E2=86=B3 Mouse id=3D= 8 [slave > pointer (2)] > =E2=8E=A3 Virtual core keyboard id=3D3 [master= keyboard > (2)] > =E2=86=B3 Virtual core XTEST keyboard id=3D5 [sl= ave > keyboard (3)] > =E2=86=B3 kbdmux id=3D6 [sl= ave > 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=3D"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 sysc= tl >> 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= =2E >> >> 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 you= r >>>> X.org input device configuration. Then try again. Ie. don't touch th= e >>>> 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 fo= r >>>>> sure >>>>> >>>>> Section "InputClass" >>>>> Identifier "VanishBastardo" >>>>> MatchDevicePath "/dev/sysmouse" >>>>> Option "Ignore" "true" >>>>> EndSection >>>>> >>>>> and >>>>> >>>>> moused_enable=3D"NO" >>>>> moused_nondefault_enable=3D"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 work= s >>>>>>> until xorg restart. After restart, buttons become unresponsive, t= he >>>>>>> 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=3D= 1) >>>>>>> works. >>>>>>> >>>>>>> I made a search and found this commit >>>>>>> http://svnweb.freebsd.org/base?view=3Drevision&revision=3D281440 = 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=3D"NO" and >>>>>>> moused_nondefault_enable=3D"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= " > --=20 Anthony Jenkins