From owner-freebsd-x11@freebsd.org Sun Apr 18 20:51:12 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 CE8D75F4F87 for ; Sun, 18 Apr 2021 20:51:12 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.evolve.de (mail.evolve.de [213.239.217.29]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.evolve.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNhtl5Dlqz4WvC for ; Sun, 18 Apr 2021 20:51:11 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mail.evolve.de (OpenSMTPD) with ESMTP id 9f333452; Sun, 18 Apr 2021 20:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20180501; bh=Qlr2lKLH EHVjiEtK7uCNlcgDNWg=; b=j9409DezdCZrzxWeJ00a/tFrmJIy8eQWOoHEG5gJ ++Ep2A5+vCnnukp6GO0xz9nRVs0wzgURpyc0ahROCPF+5Ae1EIHyK/RCS92Ye6Ql kUtMxGAl8399eUq84HFFz6ytPXEEHS+lsYNcADxQrfcrMHz83VvWTG2meeugx5v3 hBb5b6jXpzE/+7q8HBwaOESGirFpKuY6+x+x/NZmq8+AN90YpqgmvwU9Vw0MrEkd QNd8zI7jOwMTjYtS1q28wSzpDr1cbQyqNIY0lFmzcAwqFutntA69LUaIQpZEgrrk CHA3+WMVWarzIT+WNHaOaBgPhz1BCBTumrtO2FYsHW/z0A== DomainKey-Signature: a=rsa-sha1; c=nofws; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=20180501; b=GW VqKdx3x+hCq7lifvOsoeU5Whhb6cHwjTUy7LThAclmQTgzEQY47AAIOhkpZiJLm4 X9ycp5mr+YY5T6BNlKsZW4OUzv7vouq9CyyMu8237v0w45eVRf6T6gb7RqCIMx1e nTQv/2lSS473LIJOyqJlP/8hp7esYUMlT+GLSIRc3cIhD/6zd4gZ11YynMLsfmXU UEZXUBy/UVM14+R2IGo0aZvHDJ16+mTQRa+n0OoHFQivstBrY5sC/sEI7p1FEp6Z aCJGiaJSQmSRsUKv4lnt/NsqfeSv9MjryqZ8luQUHserhi8s1zDFPIUR/eVlmVb8 ev7NsXzme8tsf8k3i4Zg== Received: by mail.evolve.de (OpenSMTPD) with ESMTPSA id 3412bba2 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Sun, 18 Apr 2021 20:50:56 +0000 (UTC) Date: Sun, 18 Apr 2021 22:49:59 +0200 From: Michael Gmelin To: Ronald Klop Cc: Michael Gmelin , freebsd-x11@freebsd.org Subject: Re: (solved) Re: mouse scrolling activates back/forward in browser Message-ID: <20210418224959.1343d2f5@bsd64.grem.de> In-Reply-To: <47e51983-b83f-8248-29ad-c23db2523610@klop.ws> References: <806D1887-2275-48C5-9CA4-715E3F57C6DB@grem.de> <47e51983-b83f-8248-29ad-c23db2523610@klop.ws> X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4FNhtl5Dlqz4WvC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=grem.de header.s=20180501 header.b=j9409Dez; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@grem.de designates 213.239.217.29 as permitted sender) smtp.mailfrom=freebsd@grem.de X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[grem.de:s=20180501]; RBL_SENDERSCORE_FAIL(0.00)[213.239.217.29:server fail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:213.239.217.29/32]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grem.de]; NEURAL_HAM_LONG(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[213.239.217.29:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[grem.de:+]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[213.239.217.29:from]; ASN(0.00)[asn:24940, ipnet:213.239.192.0/18, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[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 20:51:12 -0000 On Fri, 16 Apr 2021 21:38:29 +0200 Ronald Klop wrote: > On 4/16/21 9:14 PM, Michael Gmelin wrote: > >=20 > > =20 > >> On 16. Apr 2021, at 21:05, Ronald Klop > >> wrote: > >> > >> =EF=BB=BFOn 4/15/21 9:11 PM, Michael Gmelin wrote: =20 > >>>>> On 15. Apr 2021, at 20:54, Ronald Klop > >>>>> wrote: =20 > >>>> > >>>> =EF=BB=BFOn 4/15/21 9:53 AM, Ronald Klop wrote: =20 > >>>>> 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. =20 > >>> That=E2=80=99s because we switched to udev/libinput by default around > >>> that time. =20 > >>>>> https://lists.freebsd.org/pipermail/freebsd-ports/2020-March/117879= .html > >>>>> But didn't have time to look into it. Any thoughts or similar > >>>>> experiences? Regards, > >>>>> Ronald. =20 > >>>> > >>>> > >>>> Some more googling found this: > >>>> https://forums.freebsd.org/threads/mouse-wheel-strange-behavior-with= -firefox.57494/ > >>>> > >>>> Just removed button 8 and 9. > >>>> xmodmap -e "pointer =3D 1 2 3 4 5 6 7 0 0 10 11 12" Hi Ronald, 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) every time scrolling changes direction. After that, the proper AXIS events 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. Instead of removing buttons with xmodmap, you can also use xinput set-button-map "IntelliMouse Explorer" 1 2 3 4 5 6 7 0 0 e.g., in ~/.xinitrc, the effect is the same. An alternative approach is to change virtualbox to use the USB Tablet driver: VBoxManage modifyvm "VM Name" --mouse usbtablet (or using the VirtualBox GUI) and then, inside the VM, do: pkg install utouch-kmod xf86-input-evdev echo "utouch_load=3DYES" >>/boot/loader.conf Create a file called /usr/local/etc/X11/xorg.d/99-vbox.conf, containing: Section "InputClass" Identifier "VirtualBox Mouse" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection and reboot, then start X. (in case you're not rebooting, do "kldload utouch; kldunload uhid"). You also need to make sure that Mouse Integration is enabled in VirtualBox. 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. 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. Best, Michael --=20 Michael Gmelin