You are not logged in.

#1 2017-08-10 09:51:50

Apjue
Member
Registered: 2017-08-05
Posts: 18

Change mouse wheel scrolling distance with libinput

Hello,
Output of xinput --list:

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Areson Corp. USB Device                 	id=9	[slave  pointer  (2)]
⎜   ↳ Microsoft Wired Keyboard 600            	id=11	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600            	id=10	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600            	id=12	[slave  keyboard (3)]

(I have a Gigabyte MX6800 mouse)
So I assume my mouse is the Areson Corp one, my output of xinput --list-props 'Areson Corp. USB Device' is:

Device 'Areson Corp. USB Device':
	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 Accel Speed (279):	0.000000
	libinput Accel Speed Default (280):	0.000000
	libinput Accel Profiles Available (281):	1, 1
	libinput Accel Profile Enabled (282):	1, 0
	libinput Accel Profile Enabled Default (283):	1, 0
	libinput Natural Scrolling Enabled (284):	0
	libinput Natural Scrolling Enabled Default (285):	0
	libinput Send Events Modes Available (264):	1, 0
	libinput Send Events Mode Enabled (265):	0, 0
	libinput Send Events Mode Enabled Default (266):	0, 0
	libinput Left Handed Enabled (286):	0
	libinput Left Handed Enabled Default (287):	0
	libinput Scroll Methods Available (288):	0, 0, 1
	libinput Scroll Method Enabled (289):	0, 0, 0
	libinput Scroll Method Enabled Default (290):	0, 0, 0
	libinput Button Scrolling Button (291):	2
	libinput Button Scrolling Button Default (292):	2
	libinput Middle Emulation Enabled (293):	0
	libinput Middle Emulation Enabled Default (294):	0
	Device Node (267):	"/dev/input/event0"
	Device Product ID (268):	1578, 13960
	libinput Drag Lock Buttons (295):	<no items>
	libinput Horizontal Scroll Enabled (296):	1

Looks like I use libinput.
After a bit of searching, I found these is no way to change it unless doing some kind of workaround ? https://unix.stackexchange.com/q/307663/189361
So, is there a way to use evdev instead, or stay with libinput but change the scroll distance ?
Thanks.

Offline

#2 2017-08-10 14:49:30

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

install xf86-input-evdev and add /etc/X11/xorg.conf.d/10-mouse.conf

Section "InputClass"
	Identifier "evdev pointer catchall"
	MatchIsPointer "on"
	MatchDevicePath "/dev/input/event*"
	Driver		"evdev"
        # your options here
EndSection

Offline

#3 2017-08-10 14:51:18

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Re: Change mouse wheel scrolling distance with libinput

Evdev should be used in replacement of libinput and in the man page they mention settings for scroll distance. Search "Evdev Scrolling Distance" in https://www.mankier.com/4/evdev

I think you can set this with

xinput set-prop <device id> "Evdev Scrolling Distance" <vertical distance> <horizontal distance> <dial>

The integers you use to replace <blah> depends on the device you have.


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#4 2017-08-11 09:35:57

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

Looks like I'm almost there, I still have a few questions:
When changing Evdev scrolling distance property, I was expecting to set it to something like 10 10 1 for a bigger scrolling distance, but I had to put it to 0.01 0.01 1 (and it's still not what I want...), I didn't understand clearly what the dial property do, when changing it nothing happens
To put the property permanently, is the syntax in the 10-mouse.conf file

Option "Evdev Scrolling Distance" ...

or ?

"Evdev Scrolling Distance" ...

Last edited by Apjue (2017-08-11 09:37:30)

Offline

#5 2017-08-11 10:16:23

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

Neither

man evdev

;-)

Offline

#6 2017-08-11 20:41:00

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

Option "VertScrollDelta" "integer", I see, thanks
However, the problem is still not solved, the scroll distance is still too small, even with 0.001, and changing the dial property does absolutely nothing, I don't clearly understand what it is (sorry about that, I'm not english)

Offline

#7 2017-08-11 20:58:06

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

A dial input is eg. a steering wheel (for racing games etc)

The option takes only integers, 1 is the smallest possible (positive, negative numbers reverse the direction) value.
"0.001" is simply invalid and will be ignored. Same holds for the xinput interface.

Maybe this is an xy problem: why is your scroll speed too slow? Does this affect any application or do you have a specific (group of) offender(s)?

Offline

#8 2017-08-12 09:37:31

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

Actually, it looks like changing anything does nothing. When verifying if it's changed with xinput --list-props, I get the right values though.
I have no idea why my scroll speed is so slow, and it affects every app. There's nothing in my DE (deepin) settings to change it
Same thing in Gnome, scroll speed too slow, every app, no setting to change it

Last edited by Apjue (2017-08-12 09:43:29)

Offline

#9 2017-08-12 10:28:21

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

Try setting the values to "10 10 10" - prepare for even slower scroll speed.
Let's play on "every app" - install and try xterm. Does every wheel click produce a line scroll? Is every click registered by "xev -event mouse"?

(Cheap mice have a lousy design for the wheel which easily "breaks" and then only occasionally produces events and ultimately breaks entirely. This can be fixed by a single drop of superglue, what tells you a lot about how these things are designed and manufactured)

Offline

#10 2017-08-12 16:19:59

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

Nope, line scroll is every 10 wheel clicks with xterm, for Chrome it's still every wheel click, but for Mattermost it's every 10 clicks. Looks like some apps want to be rebels
Same with xev, it's every 10 wheel clicks.

(I'm sure it's not a hardware problem, on Windows it works fine)

Last edited by Apjue (2017-08-12 16:22:18)

Offline

#11 2017-08-12 16:34:31

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

Is this after setting "Evdev Scrolling Distance" to "10 10 10"? Then it's expected, but scrolling speed in chrome should have dropped to a 10th as well. Setting the values to "100 100 100" should "break" scrolling in chrome altogether?
Anyway - doesn't sound like a broken device.

Please define "slow": How many pixels/lines do you scroll in chrome per wheel click? What's the output of "xdpyinfo  | grep resolution" and "xrandr -q"?

Offline

#12 2017-08-12 19:02:07

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

seth wrote:

Is this after setting "Evdev Scrolling Distance" to "10 10 10"?

Yep

Setting the values to "100 100 100" should "break" scrolling in chrome altogether?

Yep too, Seems Chrome "obey" to the vertical scroll delta but not the dial thing

Please define "slow": How many pixels/lines do you scroll in chrome per wheel click?

With 1 1 1, I get something like 60 pixels per scroll. I would like 120

What's the output of "xdpyinfo  | grep resolution" and "xrandr -q"?

1) "Bash: command not found"
More seriously, I can't install it for some reason. When running pacman -Ss xdpyinfo I get the right output, the package is in extra, but when installing it, "impossible to find target".
2)

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  74.92    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)

Offline

#13 2017-08-12 20:55:03

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

"pacman -S xorg-xdpyinfo", but you're likely outversioned, so "pacman -Syu xorg-xdpyinfo"
You should be at ~102 DPI and ~60px is the expectable scroll width, ie. you're not facing a bug but are simply not happy with the behavior ;-)

One problem here is that you cannot even expect chrome (or any client) to rely on the wheel delta but simply apply a static translation for every event.
At best you could fake 2 events out ot one (screwing line based scrolls like in xterm), but if you just want to be able to scroll faster through documents and the mouse likey las more than one button, I'd suggest /etc/X11/xorg.conf.d/10-mouse.conf

Section "InputClass"
	Identifier "evdev pointer catchall"
	MatchIsPointer "on"
	MatchDevicePath "/dev/input/event*"
	Driver		"evdev"
	Option      "EmulateWheel"				"true"
	Option      "EmulateWheelButton"		"9" # pick the one you like
	Option      "EmulateWheelInertia"		"3"
	Option      "EmulateWheelTimeout"	"80"
EndSection

This allows you to press and hold a button and then the movement of the mouse is translated into wheel events (basically you get a scrollbar everywhere)

Offline

#14 2017-08-13 09:13:19

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

Installed xdpyinfo, got "resolution: 96x96 dots per inch"
I really don't want to use the emulate wheel option, I just want a wheel that scrolls like I want to
Why increasing the Evdev Vertical Scrolling Distance makes the wheel scroll slower ? (I'm not sure to understand the logic)
There's really no way to increase the scroll speed with some command ?

Edit:

seth wrote:

One problem here is that you cannot even expect chrome (or any client) to rely on the wheel delta but simply apply a static translation for every event.

But chrome, and every client I use rely on that wheel delta (Easy to know it: it's so slow). They just don't care of the dial property, which is fine for me

Last edited by Apjue (2017-08-13 09:22:28)

Offline

#15 2017-08-13 09:52:44

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

This would require a fraction value (ie. acception float values rather than integers) - you'll require an upstream patch.
A problem I'd see with this approach is that you cannot wheel a single line in line scrolling clients anymore.
Any smarter solution would have to be provided by the toolkit, but I don't know at hand whether gtk/gdk provides such and whether chromium honors such setting.

The option basically says "how much wheel clicks to generate one full wheel event", the logic is fine.

Offline

#16 2017-08-13 13:08:09

Apjue
Member
Registered: 2017-08-05
Posts: 18

Re: Change mouse wheel scrolling distance with libinput

seth wrote:

This would require a fraction value (ie. acception float values rather than integers) - you'll require an upstream patch.
A problem I'd see with this approach is that you cannot wheel a single line in line scrolling clients anymore.

That's fine to me, I really don't want to scroll line by line
So uh... what do I do ?

Offline

#17 2017-08-13 13:28:48

seth
Member
Registered: 2012-09-03
Posts: 64,448

Re: Change mouse wheel scrolling distance with libinput

File a bug/feature request against evdev (and probably best libinput, I doubt evdev will see new features) to support factors [0-1]

As for chromium (only) see
https://chrome.google.com/webstore/deta … jnkfcgfkhb
https://bbs.archlinux.org/viewtopic.php?id=122260

(neither tested myself)

Offline

#18 2018-09-19 07:03:12

bilabila
Member
Registered: 2018-08-07
Posts: 28
Website

Re: Change mouse wheel scrolling distance with libinput

I made a libinput patch to increase wheel scroll distance, see libinput_patch

Offline

Board footer

Powered by FluxBB