From owner-freebsd-x11@freebsd.org Sun Apr 18 21:31:15 2021 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEB985F69CA; Sun, 18 Apr 2021 21:31:15 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FNjmy4pBQz4ZRL; Sun, 18 Apr 2021 21:31:14 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id DA6F3211DEB; Mon, 19 Apr 2021 00:31:05 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id w98ZAzajJ9Vf; Mon, 19 Apr 2021 00:30:56 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id A4E4121230E; Mon, 19 Apr 2021 00:30:56 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 8278C42211F; Mon, 19 Apr 2021 00:30:47 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id EFdR4dPdIIjI; Mon, 19 Apr 2021 00:30:40 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id 44BEC42211C; Mon, 19 Apr 2021 00:30:40 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Sun, 18 Apr 2021 21:30:40 +0000 From: Vladimir Kondratyev To: Michael Gmelin Cc: Ronald Klop , freebsd-x11@freebsd.org, owner-freebsd-x11@freebsd.org Subject: Re: (solved) Re: mouse scrolling activates back/forward in browser In-Reply-To: <20210418224959.1343d2f5@bsd64.grem.de> References: <806D1887-2275-48C5-9CA4-715E3F57C6DB@grem.de> <47e51983-b83f-8248-29ad-c23db2523610@klop.ws> <20210418224959.1343d2f5@bsd64.grem.de> Message-ID: X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.3.5 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4FNjmy4pBQz4ZRL X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of vladimir@kondratyev.su has no SPF policy when checking 195.170.219.3) smtp.mailfrom=vladimir@kondratyev.su X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kondratyev.su]; RBL_DBL_DONT_QUERY_IPS(0.00)[195.170.219.3:from]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[195.170.219.3:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8299, ipnet:195.170.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-x11,owner-freebsd-x11] X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 21:31:15 -0000 On 2021-04-18 20:49, Michael Gmelin wrote: > On Fri, 16 Apr 2021 21:38:29 +0200 > Ronald Klop wrote: >=20 >> On 4/16/21 9:14 PM, Michael Gmelin wrote: >> > >> > >> >> On 16. Apr 2021, at 21:05, Ronald Klop >> >> wrote: >> >> >> >> =EF=BB=BFOn 4/15/21 9:11 PM, Michael Gmelin wrote: >> >>>>> On 15. Apr 2021, at 20:54, Ronald Klop >> >>>>> wrote: >> >>>> >> >>>> =EF=BB=BFOn 4/15/21 9:53 AM, Ronald Klop wrote: >> >>>>> Hi, >> >>>>> When I use the scrollwheel of the mouse my browser triggers >> >>>>> back/forward. What happens is this: If I scroll up (button 4) >> >>>>> after scrolling down (button 5) it triggers button 8 and 9. I >> >>>>> see it generating a ButtonPress 8/9 if I go down and than up. >> >>>>> And a ButtonRelease 8/9 if I first go up and than down. I have >> >>>>> no config in /etc/X11. Xorg logs: >> >>>>> https://www.klop.ws/Xorg.0.log This happens on the trackpad of >> >>>>> the laptop and with a bluetooth connected mouse. What makes it >> >>>>> a little more complex is that this is running FreeBSD 14 in >> >>>>> VirtualBox on Windows 10 with. NB: It happened in Virtualbox 5 >> >>>>> and now in 6 also. This started around a year ago. >> >>> That=E2=80=99s because we switched to udev/libinput by default aro= und >> >>> that time. >> >>>>> https://lists.freebsd.org/pipermail/freebsd-ports/2020-March/117= 879.html >> >>>>> But didn't have time to look into it. Any thoughts or similar >> >>>>> experiences? Regards, >> >>>>> Ronald. >> >>>> >> >>>> >> >>>> Some more googling found this: >> >>>> https://forums.freebsd.org/threads/mouse-wheel-strange-behavior-w= ith-firefox.57494/ >> >>>> >> >>>> Just removed button 8 and 9. >> >>>> xmodmap -e "pointer =3D 1 2 3 4 5 6 7 0 0 10 11 12" >=20 > Hi Ronald, >=20 > I could reproduce the issue in VirtualBox. When checking the output of > `libinput debug-events' I can see button press and release events for > BTN_SIDE and BTN_EXTRA (which maps to back and forward by default)=20 > every > time scrolling changes direction. After that, the proper AXIS events=20 > are > shown. Scrolling left and right also emits those events - therefore X11 > sees button 8 and 9 instead of buttons 6 and 7. So far so good. The > problem also happens when an evdev driver is used, so it's not a > libinput problem. >=20 > Instead of removing buttons with xmodmap, you can also use >=20 > xinput set-button-map "IntelliMouse Explorer" 1 2 3 4 5 6 7 0 0 >=20 > e.g., in ~/.xinitrc, the effect is the same. >=20 > An alternative approach is to change virtualbox to use the USB Tablet > driver: >=20 > VBoxManage modifyvm "VM Name" --mouse usbtablet >=20 > (or using the VirtualBox GUI) and then, inside the VM, do: >=20 > pkg install utouch-kmod xf86-input-evdev > echo "utouch_load=3DYES" >>/boot/loader.conf utouch-kmod is not required in 13+ anymore. Built-in hms(4) driver=20 handles absolute mouses too. To enable it just insert in to /boot/loader.conf hw.usb.usbhid.enable=3D1 usbhid_load=3D"YES" > Create a file called /usr/local/etc/X11/xorg.d/99-vbox.conf, > containing: >=20 > Section "InputClass" > Identifier "VirtualBox Mouse" > MatchIsTouchscreen "on" > MatchDevicePath "/dev/input/event*" > Driver "evdev" > EndSection >=20 > and reboot, then start X. libinput can handle such a devices, but it expect them to be tagged by=20 udev as mouse rather than touchscreen. I made a pull request that fixes=20 libudev: https://github.com/FreeBSDDesktop/libudev-devd/pull/21, so you can test=20 it now or wait for it to be merged. > (in case you're not rebooting, do "kldload utouch; kldunload uhid"). >=20 > You also need to make sure that Mouse Integration is enabled in > VirtualBox. >=20 > This will essentially have the same net-result: Vertical scrolling > works okay, no forward/back button issues, no horizontal scrolling. So > it's not necessarily worth the trouble, but I wanted to document it > anyway for future reference. >=20 > Ideally, there would be a solution that would allow the mouse to > actually emit horizontal scroll events. I suspect that the reason why > this isn't working with PS/2 emulation is in our IntelliMouse Explorer > driver, but I don't know for sure. >=20 > Best, > Michael --=20 WBR Vladimir Kondratyev