mouse wheel strange behavior with firefox

Hi All

I have FreeBSD 10.3 installed in VirtualBox with MATE on Linux mint. When I browse Firefox and scroll up to the top of a page with mouse wheel I get back to the previous page.

I tried some mouse configuration on xorg.conf the problem still.

Here the configuration I found on some mailing list:

Code:
/etc/rc.conf
moused_enable="NO"

/etc/X11/xorg.conf
Section "InputDevice"
  Identifier  "Mouse0"
  Driver  "mouse"
  Option  "Protocol" "Auto"
  Option  "Device" "/dev/sysmouse"
EndSection

~/.xinitrc
xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11"
 
As a cat owner I agree with you that mice wheels are just annoying.
The cat hairs in it make them oversensible.
They begin moving erratically in no time.

Thus I have written a script to deactivate them.
Just call it from your .xinitrc

Code:
#!/usr/local/bin/perl
use strict;

# get output of "xinput list"
my $xinp = `xinput list`;
# get the sysmouse id
(my $smid) = $xinp =~ /^.*sysmouse\s+id=(\d)\s+.*$/gm;
# now get info for sysmouse device
$xinp = `xinput list $smid`;
# get the information in the "Button labels" line
(my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm;
# separate the button descriptions
my @btnt = split(/\"\s\"/, $bl);
# now get the button map
my @bmap = split(' ', `xinput get-button-map $smid`);
# build the command string to be executed
my $cmd = "xinput set-button-map $smid";
for (my $bid = 0; $bid < scalar @bmap; $bid++) {
  $cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]);
}
# finally turn off the wheels :)
`$cmd`;
 
Puzzled, the mouse driver would not know if a firefox window was midpage or pegged at the top? Isn't this a GUI setting somewhere, mate or firefox?

Juha
 
I have FreeBSD 10.3 installed in VirtualBox with MATE on Linux mint. When I browse Firefox and scroll up to the top of a page with mouse wheel I get back to the previous page.
Firefox in the Linux VM or Firefox on the FreeBSD host?
 
Within the VirtualBox settings make sure the "Pointing Device" isn't set to "USB Tablet". I've noticed it doesn't work too good with a FreeBSD guest. PS/2 should be fine. Then make sure to add to /etc/rc.conf:
Code:
moused_enable="YES"
 
mhmdchebbi:
So the problem seems to persist even with deactivated mouse wheel. There might be other mappings that interfere.
I should maybe add some diagnostic output options to my script that show the complete button mapping so one can see whether there is something unusual.

Like SirDiceI guess that there might be some pointer device settings you might have to modify in the VirtualBox settings. But as my laptop with virtualbox just died, I cannot look into it now.
 
Same issue here

EDIT 2:

Host: VirtualBox 5.1.14 on Windows 8.1 x64
Guest: FreeBSD 11.0 x64

Code:
$ uname -a
FreeBSD beastie 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

EDIT 1: I try to fix the issue with a configuration of X11 in /usr/local/etc/X11/xorg.conf.d/vbox-mouse.conf

Template:

Code:
Section "InputClass"
  Identifier "MouseDefaults"
  MatchIsPointer "on"
  ... (options here)
EndSection

Options I tried to put off the wheel's behavior:

Code:
Option "Protocol" "Auto"
# Also tried with: Logitech, PS/2, SysMouse

Code:
Option "Buttons" "2"
# Also tried with: 3

Code:
Option "ZAxisMapping" "X"
# Also tried with: Y

None of these options fix the issue, the scroll up always simulate a go back.
 
fwiw, I used to notice this problem until recently without being in a VM. I can't say it's gone. I just haven't noticed or thought about it till now. Not all the time. Just occasionally, especially on fast mouse wheel spins.
 
Same issue with this configuration:


Host: Versione 5.1.24 r117012 (Qt5.6.2) on Windows 10 x64
Guest: FreeBSD 11.0 x64

Code:
FreeBSD freebsd-vm 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Nowaday I can't find any fix for this issue...
 
I got same issue on my FreeBSD virtualbox guest on my Redhat Linux.

Code:
FreeBSD FreeBSD 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
 
Hello, I installed FreeBSD 11.1 on Virtualbox 5.1.28 and this annoying bug is still present. Where do I have to report a bug? FreeBSD? Xorg? Virtualbox?
I don't think it is a virtualbox bug, because this bug appear even before I installed the virtualbox-ose-additions.
It seems to be a Xorg bug where the mousewheel is associated with a mouse button...
 
After two days of search all over the internet, I finally found a workaround to this bug.
Look at this discussion on VirtualBox Forum:
https://forums.virtualbox.org/viewtopic.php?f=4&t=80912
Like Oclair I tested my mouse action with xev and I obtained the same result as him: if I use my mousewheel up and down, sometimes xorg translates this action with button 8 and 9 instead of 4 and 5.
Next I searched a workaround to ask Xorg to ignore 8 and 9 button of my mouse, I found the solution here:
https://unix.stackexchange.com/questions/20550/how-to-disable-the-forward-back-buttons-on-my-mouse
Like explained in this article, I installed xmodmap, it found 10 button to my mouse, more than I need lol
So I put this .xmodmap file to disable button 8 to 10:
Code:
! Disable buttons 8 to 10
pointer = 1 2 3 4 5 6 7 0 0 0
And it works!!! Now enjoy Firefox mousewheel without forward/back annoying bug :D
 
After two days of search all over the internet, I finally found a workaround to this bug.
Look at this discussion on VirtualBox Forum:
https://forums.virtualbox.org/viewtopic.php?f=4&t=80912
Like Oclair I tested my mouse action with xev and I obtained the same result as him: if I use my mousewheel up and down, sometimes xorg translates this action with button 8 and 9 instead of 4 and 5.
Next I searched a workaround to ask Xorg to ignore 8 and 9 button of my mouse, I found the solution here:
https://unix.stackexchange.com/questions/20550/how-to-disable-the-forward-back-buttons-on-my-mouse
Like explained in this article, I installed xmodmap, it found 10 button to my mouse, more than I need lol
So I put this .xmodmap file to disable button 8 to 10:
Code:
! Disable buttons 8 to 10
pointer = 1 2 3 4 5 6 7 0 0 0
And it works!!! Now enjoy Firefox mousewheel without forward/back annoying bug :D

It work perfectly!!!! Thank you so much! :)
 
I can confirm that this issue still exists - in my case in an XFCE desktop environment on a FreeBSD guest OS on a Windows host in VirtualBox - and disabling one single mouse pointer mapping with xmodmap indeed solved it. My mapping used to be:
xmodmap -pp
Code:
There are 12 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              4
        5              5
        6              6
        7              7
        8              8
        9              9
       10             10
       11             11
       12             12

Then I disabled button 8:
xmodmap -e "pointer = 1 2 3 4 5 6 7 0 9 10 11 12"
And the output of xmodmap -pp is now:
Code:
There are 12 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              4
        5              5
        6              6
        7              7
        8              0
        9              9
       10             10
       11             11
       12             12
Now Firefox works as it should.
 
I had this exact issue and this fixed it but whenever I restart the issue comes back and I have to reapply it. How do I get it to save? I'm on a VirtualBox.
 
I had this exact issue and this fixed it but whenever I restart the issue comes back and I have to reapply it. How do I get it to save? I'm on a VirtualBox.
Well, I'm still getting the issue in Firefox. Because of course. It doesn't always happen like before but it does still happen sometimes. Any other suggestions to stop it altogether?
 
So after much research, I tried this and it worked for me.

Install xmodmap.

Create a file named .xmodmap in your home directory.

Edit the .xmodmap file and add

Code:
pointer = 1 2 3 4 5 6 7 0 0 0 11 12

Save the file.

Edit the .profile file in your home directory and add

Code:
/usr/local/bin/xmodmap /home/<user>/.xmodmap

I used the full path just to be sure. Replace <user> with your login name.

Save the file.

The fixed the problem for me and it works even after a reboot. My shell is /bin/sh if that make a difference.
 
This seems to be still relevant for 14.0-RELEASE in VirtualBox.
Adding the xmodmap line to .profile didn't work for me. But works adding as startup script executed when xfce4 loads.

The buttons necessary to make my ordinary mice to work (2 button + scroll wheel including click) in .xmodmap is:
Code:
! Disable buttons 5 to 10
pointer = 1 2 3 4 5 0 0 0 0 0
 
Back
Top