29

most of the time I do an Alt+Tab (switch windows), go from browser (chrome) to Visual Code and vice versa, mouse scrolling misbehaves, it jumps to somewhere in the page, either way down the current scroll position, or way up, any thoughts on what's going on?

19

Installing and running imwheel fixes the problem for me.

$ sudo apt-get install imwheel
$ imwheel
INFO: imwheel started (pid=80085)

You have to start it at every boot (or add it at the applications to start).
pgrep -lf imwheel to see if it's running ; you can stop it with pkill imwheel.

/!\ It disables the zoom by Ctrl + wheel in applications (Firefox, Chromium, LibreOffice, PDF reader...)
(Maybe a setting in imwheelrc could fix that)

  • 2
    To add to startup, go to 'startup applications' from the menu, then add an item. Just use the command 'imwheel'. – wordsforthewise Oct 7 '19 at 1:15
  • 2
    Just wanted to explicitly thank you for providing a solution to this problem which drove me mad for weeks now. – NiKo Apr 16 '20 at 10:01
  • 1
    Thanks! Works for me, this bug was driving me mad too...! I would up-vote mutiple times if I could! – SeF May 13 '20 at 7:27
  • to re-enable ctrl + wheel, see here – maxbellec Dec 4 '20 at 10:08
2

If you are asking for a solution, It's still an unsolved bug. But if you wonder why such a thing may happen, I think the reason is that scroll position is being unique for all windows, or it's being changed for all of them when you scroll. for example, if you scroll up in a window a little, then go to the other one and start scrolling, the bar jumps a little upper and starts moving from there, showing that scroll changes from the other tab are being applied to the new one too.

1

I solved this problem by logging in with configuration Ubuntu on Wayland instead of simply Ubuntu. Something like that. Image quality is low but you'll get the point.

That means I use Wayland instead of xorg but changing file /etc/gdm3/custom.config does not seem to solve the problem as stated here.

0

If you are not too attached to GNOME, switching to Unity solves the scroll issue on the mouse & trackpad:

sudo apt install ubuntu-unity-desktop

Source: https://itsfoss.com/use-unity-ubuntu-17-10/#:~:text=Switch%20from%20GNOME%20to%20Unity%20in%20Ubuntu%2017.10,option%20to%20switch%20to%20Unity


To restore the natural scrolling and other trackpad features, also install synaptics drivers:

sudo apt install xserver-xorg-input-synaptics

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.