Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth scrolling absurdly fast for Performance MX #158

Closed
AlicesReflexion opened this issue May 9, 2014 · 38 comments
Closed

Smooth scrolling absurdly fast for Performance MX #158

AlicesReflexion opened this issue May 9, 2014 · 38 comments

Comments

@AlicesReflexion
Copy link

Right now, the option to use Logitech's Stepless/Smooth scrolling is available in Solaar, but it's not particularly useful because everything scrolls at an unusably fast speed.

An ideal solution would probably be to let the user set scroll sensitivity.

@karlitos
Copy link

alexskc is right, I had to turn the smooth-scrolling off. In gnome shell it tokk about 3-4 movements with the scroll-wheel to change the system volume level from 0% to 100%, this is definitely too sensitive.

@KDB2
Copy link

KDB2 commented May 18, 2014

I have to agree with the 2 previous comments :)

@Lekensteyn
Copy link
Member

What about using changing the mouse scrolling speed with from the system settings? SetPoint under Windows does not configure the mouse hardware directly for controlling scrolling speed.

I've an Anywhere MX here which seems to advertise a Smooth Scrolling option in Solaar (which is not prevent in the Setpoint UI though).

@w-shackleton
Copy link

This isn't really a problem with Solaar, but more a problem with GTK. When the mouse is in smooth scroll mode it sends about ten "scroll down" events for every step of the mouse. GTK needs to be reconfigured to interpret each scroll event as a smaller unit of distance.

@w-shackleton
Copy link

I have been tweaking xserver-xorg-input-evdev and have managed to add an xinput option to change the number of steps in one whole scroll - with this patch the mouse can be easily configured using xinput set-prop to work properly in smooth scroll mode. I'm going to email to try and get this patch into xorg, at which point this feature is built in to evdev 2.9.0, so we could perhaps get Solaar to automatically set this option.

@w-shackleton
Copy link

I've made an Ubuntu PPA containing evdev 2.9.0 - with this PPA you can use xinput to change the scroll sensitivity:

xinput set-prop <devnum> "Evdev Scrolling Distance" 8 1 1 # for smooth scroll
xinput set-prop <devnum> "Evdev Scrolling Distance" -8 1 1 # for smooth 'natural' scroll

This version of evdev will hopefully be present in Ubuntu 14.10 and with this version it would be possible to add a scroll sensitivity slider to Solaar.

@FrederikNJS
Copy link
Contributor

@w-shackleton I tried your PPA and the command you mentioned, and it works perfectly! Thank you very much, now my Performance Mouse MX is awesome again.

@w-shackleton
Copy link

Currently working on getting smooth scrolling working properly as it does in the windows implementation (smooth when wheel in smooth mode, non-smooth otherwise)

@vivin
Copy link

vivin commented Apr 14, 2015

I'm using a PerformanceMouse MX. I added the PPA above and installed xserver-xorg-input-evdev, but xinput still doesn't show the "Evdev Scrolling Distance" property. I'm wondering if I'm missing something or perhaps haven't set up something right?

@vivin
Copy link

vivin commented Apr 14, 2015

This is working now. I just had to log out and log back in.

@MagicFab
Copy link
Contributor

This also worked in Debian 8:

  • Install the xinput package
  • Issue these commands:

xinput (shows my mouse as device #13)
xinput set-prop 13 "Evdev Scrolling Distance" 8 1 1 # for smooth scroll

Scrolling now works at expected usable speeds.

@w-shackleton
Copy link

FWIW xinput set-prop "Logitech Performance MX" "Evdev Scrolling Distance" -8 1 1 also works 😄

@strelec
Copy link

strelec commented Oct 13, 2015

How to do that on wayland?

@metopa
Copy link

metopa commented Oct 13, 2015

Works perfect to me as well (Kubuntu 15.04). Thank you!

@lschneiderbauer
Copy link

Any news on this?
Setting xinput set-prop "Evdev Scrolling Distance" 8 1 1 seems to fix scrolling in firefox, but breaks scrolling completely in e.g. dolphin.
When I do a logout/login the original setting is restored, i.e. 1 1 1.

What do I do wrong?

@w-shackleton
Copy link

Lots of programs don't support updating smooth scrolling on the fly - try closing and re-opening Dolphin.

The X server doesn't remember parameters like that - you'll need to get that command to run every time you log in.

@lschneiderbauer
Copy link

Ah, thanks for answering.
Hm, restarting dolphin doesn't help. I suspect this is a problem within dolphin, since other applications behave fine.

@carewolf
Copy link

That works great with Qt5 applications too. Still wish the solaar commands would make it into either xinput or the kernel though

@w-shackleton
Copy link

So the real place to solve this would be in the kernel / in X11 (I'm not quite sure which one). This is something I'd like to do at some point, time permitting.

Basically, this mouse has a mode (incorrectly labelled "side scrolling" in Solaar) that switches it into "I'm being controlled by a Logitech driver, not just a mouse driver" mode (the off setting in Solaar). In this mode the mouse gives more raw outputs rather than those a normal mouse would.

The main difference is that the scroll wheel lock switch gets reported as a mouse button. This allows the driver to determine if it is in smooth or clicky mode. The other difference is that in smooth scrolling mode (ie. the smooth scrolling switch in Solaar) the left/right side scrolling outputs output really, really fast.

Such a Linux driver could enable the smooth scrolling flag on the mouse if and only if the hardware scroll lock is disabled. In this mode it could then adjust the xinput2 scroll rate (currently set using xinput set-prop) on the vertical and horizontal axes such that when disabled the mouse smoothly scrolls in both directions, but when the scroll lock is engaged it acts as a classic scroll wheel. This is what the windows driver does with the exception that it only goes into smooth mode if it knows the application can support it. Due to the design of the Linux input system this would be true for all apps, simplifying the task.

This is something I'd love to have a go at writing but I'm currently far too busy with university. Perhaps I'll have a stab over the summer (when I might buy an MX master too).

@haarp
Copy link

haarp commented Apr 29, 2016

@w-shackleton

Basically, this mouse has a mode (incorrectly labelled "side scrolling" in Solaar) that switches it into "I'm being controlled by a Logitech driver, not just a mouse driver" mode (the off setting in Solaar). In this mode the mouse gives more raw outputs rather than those a normal mouse would.

Correct. And I think this really needs to be relabelled.

(It can also break left-clicking when the mode is enabled and the wheel clutch disengaged. No idea what's happening there)

Such a Linux driver could enable the smooth scrolling flag on the mouse if and only if the hardware scroll lock is disabled. In this mode it could then adjust the xinput2 scroll rate (currently set using xinput set-prop) on the vertical and horizontal axes such that when disabled the mouse smoothly scrolls in both directions, but when the scroll lock is engaged it acts as a classic scroll wheel. This is what the windows driver does with the exception that it only goes into smooth mode if it knows the application can support it. Due to the design of the Linux input system this would be true for all apps, simplifying the task.

This is something I'd love to have a go at writing but I'm currently far too busy with university. Perhaps I'll have a stab over the summer (when I might buy an MX master too).

This would be a great feature to have! Sometimes it's the little things that subtly improve the experience and feel of software :)

For a good reference, you could have a look at the (currently not yet merged) patch that enables smooth scrolling for Evdev's wheel emulation: https://lists.x.org/archives/xorg-devel/2014-January/039892.html

Do Logitech mice use evdev? I don't really know how to check.

@w-shackleton
Copy link

xinput list-props <devnum> reveals my Performance MX uses evdev on Ubuntu 16.04.

Smooth scrolling on Linux seems to have become my life mission.. I've recently got code accepted into Chromium to support it too.

@heynnema
Copy link

heynnema commented May 1, 2016

Check out the add-on Smoothwheel. It works in Thunderbird and Firefox. Makes your scroll wheel nice and smooth.

Cheers, Al

@hyperair
Copy link

hyperair commented Oct 3, 2017

@strelec Not sure if you're still looking for a wayland solution but here's mine which also works with the libinput driver for X11 on the M705:

/etc/udev/hwdb.d/99-m705-click-angle.hwdb:

mouse:*:name:Logitech M705:                             
 MOUSE_DPI=800@166                                      
 MOUSE_WHEEL_CLICK_ANGLE=3 

@RomuloPBenedetti
Copy link

RomuloPBenedetti commented Apr 30, 2018

Is this solved? I still get steppy scrolling everywhere with "Wheel Resolution" enabled, and still an absurd sensitivity, even a middle click in a link is pretty much impossible.

I'm using Fedora 28, Xorg.

@hyperair
Copy link

hyperair commented May 1, 2018

I don't think there's any mechanism in udev/libinput to automatically detect the wheel resolution state and adjust MOUSE_WHEEL_CLICK_ANGLE, so you have to fix that on your own with the snippet I used above.

@haarp
Copy link

haarp commented May 1, 2018

It seems libinput does not yet have the API to change MOUSE_WHEEL_CLICK_ANGLE on-the-fly. See the last comments in ths bug:

https://bugs.freedesktop.org/show_bug.cgi?id=92772

I doubt they will be implemented anytime soon. Maybe a new freedesktop bug should be opened, as this one is closed already.

@RomuloPBenedetti
Copy link

@hyperair I've tried your solution with no success

mouse:*:name:Logitech MX Master 2S:                             
  MOUSE_DPI=4000@125                                      
  MOUSE_WHEEL_CLICK_ANGLE=3 

and also tried to match with

evdev:input:*:name:Logitech MX Master 2S:   

and

libinput:name:Logitech MX Master 2S:                         

@hyperair
Copy link

hyperair commented May 2, 2018

@RomuloPBenedetti The hwdb lookup happens in two places:

Check what name you should be using by looking for the name field in the output of lsinput, e.g.:

/dev/input/event19
   bustype : BUS_USB
   vendor  : 0x46d
   product : 0x101b
   version : 273
   name    : "Logitech M705"
   phys    : "usb-0000:00:14.0-1.1:1"
   uniq    : "101b-26-c9-72-b9"
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

In my case, it's also in /sys/class/input/event19/device/name:

% cat /sys/class/input/event19/device/name
Logitech M705

After that, you need to update the hwdb:

sudo udevadm hwdb -u

Then disconnect and reconnect the device and verify that the attribute has been successfully added:

% udevadm info --query=all --name=/dev/input/event19 | grep MOUSE_WHEE
E: MOUSE_WHEEL_CLICK_ANGLE=3

@arooni
Copy link

arooni commented Nov 13, 2018

On ubuntu 18.04 I already have xserver-xorg-input-evdev but can't get access to the evdev value.

solarr is great but i can't really use my scroll wheel grr..

0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
[I] ~/D/Calibre Library  install xserver-xorg-input-evdev
Reading package lists... Done
Building dependency tree
Reading state information... Done
xserver-xorg-input-evdev is already the newest version (1:2.10.5-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
[I] ~/D/Calibre Library  xinput list-props 18
Device 'Logitech Anywhere MX':
Device Enabled (141): 1
Coordinate Transformation Matrix (143): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (276): 0
libinput Natural Scrolling Enabled Default (277): 0
libinput Scroll Methods Available (278): 0, 0, 1
libinput Scroll Method Enabled (279): 0, 0, 0
libinput Scroll Method Enabled Default (280): 0, 0, 0
libinput Button Scrolling Button (281): 2
libinput Button Scrolling Button Default (282): 2
libinput Middle Emulation Enabled (283): 0
libinput Middle Emulation Enabled Default (284): 0
libinput Accel Speed (285): -0.165468
libinput Accel Speed Default (286): 0.000000
libinput Accel Profiles Available (287): 1, 1
libinput Accel Profile Enabled (288): 1, 0
libinput Accel Profile Enabled Default (289): 1, 0
libinput Left Handed Enabled (290): 0
libinput Left Handed Enabled Default (291): 0
libinput Send Events Modes Available (261): 1, 0
libinput Send Events Mode Enabled (262): 0, 0
libinput Send Events Mode Enabled Default (263): 0, 0
Device Node (264): "/dev/input/event5"
Device Product ID (265): 1133, 4119
libinput Drag Lock Buttons (292):
libinput Horizontal Scroll Enabled (293): 1
[I] ~/D/Calibre Library  cd ../P2P\ Downloads/^C
[I] ~/D/Calibre Library  xinput set-prop 18 'Evdev Scrolling Distance' 3 1 1
property 'Evdev Scrolling Distance' doesn't exist, you need to specify its type and format
[I] ✘  ~/D/Calibre Library 

@hyperair
Copy link

You're using libinput, not evdev (note all the libinput properties). You'll need to do some udev tweaks like I described in #158 (comment) and #158 (comment)

@jturcotte
Copy link

For those like me wondering why this doesn't work out of the box when touchpads already have smooth scrolling, here is what seems to be the proper solution, still pending in libinput: https://gitlab.freedesktop.org/libinput/libinput/merge_requests/139

@pfps
Copy link
Collaborator

pfps commented Feb 21, 2020

It looks to me as if this enhancement request is out of scope for Solaar.

@markonius
Copy link

@hyperair Hi! I can't get this to work on Fedora 31.
I've got in /etc/udev/hwdb.d/99-mxanywhere2-wheel-angle.hwdb:

mouse:*:name:Logitech MX Anywhere 2:                             
 MOUSE_WHEEL_CLICK_ANGLE=3

udevadm info --query=all --name=/dev/input/event8 reportsE: MOUSE_WHEEL_CLICK_ANGLE=3

But the mouse scrolling speed is still very fast. Do you have any ideas?

@hyperair
Copy link

hyperair commented Apr 6, 2020

@markonius Try upgrading your kernel and libinput -- the kernel now reports the scroll tick multiplier (you can see it in dmesg when you connect your mouse), and libinput probably no longer reads MOUSE_WHEEL_CLICK_ANGLE.

Edit: I was wrong about MOUSE_WHEEL_CLICK_ANGLE (I see references to it in the source code), but I've no idea what's going on.

Edit2: I think smooth scrolling is broken for now and we need to wait for https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/139

@markonius
Copy link

@hyperair Thanks for your efforts!

@pfps
Copy link
Collaborator

pfps commented May 18, 2020

Closing as out of scope

@pfps pfps closed this as completed May 18, 2020
@sibblegp
Copy link

sibblegp commented Aug 4, 2021

I just spent hours trying to fix this and turned the mouse off and back on and it worked.

@pfps
Copy link
Collaborator

pfps commented Aug 4, 2021

See Known Issues in https://github.com/pwr-Solaar/Solaar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests