PDA

View Full Version : How to set up system-wide Natural Scrolling/Reverse Scrolling for a mouse in Fedora



dcharlespyle
27th April 2014, 04:17 PM
This is for Microsoft Mouse, or for any other mouse that has the "Scrolling Distance" property. (Some mice, such as the Dell PixArt Mouse, do not have this property; I will post an update for that mouse below, as soon as I figure it out.) This has been tested to work even in rawhide. I had a serious problem with previous methods used to accomplish a working Natural Scrolling/Reverse Scrolling with my mouse that began with obsoleting of the xorg-x11-drv-mouse driver. I found that my mouse cursor would freeze and the mouse become unusable. If you are using the method that has the 99-wt-natural-scrolling.conf file in /etc/X11/xorg.conf.d you will likely hit that same bug I did once you upgrade to Fedora 21 (or perhaps earlier if the Evdev driver obsoletes the earlier driver in previous versions of Fedora as it does in rawhide). This method fixes that issue and should work even in rawhide, without any freezing problems. This should be extendable to a touch pad device as well as the mouse. This method also will be set system wide, so you should be aware of that. Methods to do this per user can be found elsewhere on the internet.

1. Find your mouse device id:


$ xinput list

In my case, the following was displayed:


$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=9 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=10 [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)]
↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=8 [slave keyboard (3)]
↳ UVC Camera (046d:0821) id=11 [slave keyboard (3)]

2. Find the id number of your device and use that number in the following (substituting your device id number for "{device id}"):


$ xinput list-props {device id} | grep "Scrolling Distance"

In my case, my device was 'id=9' and the following was displayed (your results may vary):


$ xinput list-props 9 | grep "Scrolling Distance"
Evdev Scrolling Distance (273): 1, 1, 1

In the case of my mouse, the scrolling distance was 1 but yours might be any number. To use this number, you convert it to a negative number ("1" becomes "-1"; if yours is 156 then you use -156, and so forth) and use it in a file you will create in the next step.

3. Create a file in /usr/share/X11/xorg.conf.d named 20-natural-scrolling.conf.


$ sudo touch /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

4. Open the file using a text editor as superuser:


$ sudo nano /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

5. Put the following contents (modified to fit your mouse device using the number obtained in the above steps) in the file you created:


Section "InputClass"
Identifier "Natural Scrolling"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-1"
Option "HorizScrollDelta" "-1"
Option "DialDelta" "-1"
EndSection

6. Save the file and reboot.

You should see natural scrolling/reverse scrolling for all users. The advantage to doing it this way is that it also works in nemo and nautilus as well as it does in caja or elsewhere, and doesn't seem to conflict with the new Evdev drivers like previous methods did for me.

weitjong
28th April 2014, 04:58 AM
Thanks for sharing it.

weitjong
28th April 2014, 05:25 AM
Unfortunately, it does not work on my Logictech mouse. Xinput does not report any "scrolling distance" property for my case. Attempting to use -1 setting anyway but it does not work (after reboot). I am falling back to use xmodmap approach instead of my 99-wt-natural-scrolling.conf for quite some time now. Until I figure this one out, I just have to bear myself with Nautilus.

dcharlespyle
28th April 2014, 11:46 PM
Unfortunately, it does not work on my Logictech mouse. Xinput does not report any "scrolling distance" property for my case. Attempting to use -1 setting anyway but it does not work (after reboot). I am falling back to use xmodmap approach instead of my 99-wt-natural-scrolling.conf for quite some time now. Until I figure this one out, I just have to bear myself with Nautilus.

That is really odd that your mouse does not report a scrolling distance. It is case sensitive, though, unless you use the -i option with grep. If you did not capitalize the 'S' and the 'D', you would get no report. Did you also substitute your device id number for {device id}? Be sure you do not use the id numbers of any "virtual core" devices that may appear in the output of xinput list.

Make sure that you are not using the xmodmap method when you try what I provided above. It will not work if you are.

Also try doing the following:


xinput list-props {your device id} | grep -i "scrolling distance"

I got the following when I ran it (my device id was 9):

$ xinput list-props 9 | grep -i "scrolling distance"
Evdev Scrolling Distance (273): 1, 1, 1

Then run the following (again, make sure you are not using the xmodmap method):

xinput set-prop {device id} {numbers in output of above command line}

In my case, I ran it in the following format:


xinput set-prop 9 273 -1 -1 -1

You will need to quit and restart nautilus after running the above.


nautilus -q
nautilus -n &

weitjong
29th April 2014, 02:08 AM
Thanks for your elaborate explanation. I understand how grep command works. I have also just use "xinput list-props" without piping to grep command to see what are all the available properties for my case. My Logitech does not have the "Evdev Scrolling Distance (273)" property, so grepping the string will not produce anything regardless of case sensitivity :). In fact I reckon the property id mapping between Microsoft and Logitech is totally different. Here is what I got when I grep by property id 273.


$ xinput list-props 12 |grep 273
Button Labels (285): "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147), "Button Horiz Wheel Left" (148), "Button Horiz Wheel Right" (149), "Button Side" (271), "Button Extra" (272), "Button Forward" (273), "Button Back" (274), "Button Task" (275), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260)

I am currently using a high end Logitech mouse that have multi-programmable buttons. That is exactly the reason why I fallback to xmodmap instead of using my old 99-wt-natural-scrolling.conf as only evdev supports multiple buttons.

I have tried to do xinput test after I have rebooted without xmodmap setting done. Actually it does not really matter also. The list of properties in the xinput output is the same with or without xmodmap.

dcharlespyle
29th April 2014, 04:08 AM
Thanks for your elaborate explanation. I understand how grep command works. I have also just use "xinput list-props" without piping to grep command to see what are all the available properties for my case. My Logitech does not have the "Evdev Scrolling Distance (273)" property, so grepping the string will not produce anything regardless of case sensitivity :). In fact I reckon the property id mapping between Microsoft and Logitech is totally different. Here is what I got when I grep by property id 273.


$ xinput list-props 12 |grep 273
Button Labels (285): "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147), "Button Horiz Wheel Left" (148), "Button Horiz Wheel Right" (149), "Button Side" (271), "Button Extra" (272), "Button Forward" (273), "Button Back" (274), "Button Task" (275), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (260)

I am currently using a high end Logitech mouse that have multi-programmable buttons. That is exactly the reason why I fallback to xmodmap instead of using my old 99-wt-natural-scrolling.conf as only evdev supports multiple buttons.

I have tried to do xinput test after I have rebooted without xmodmap setting done. Actually it does not really matter also. The list of properties in the xinput output is the same with or without xmodmap.

Why would you grep by property id? You should grep by device id. And, you cannot do it properly or have it work when you are using xmodmap methods. You will get incorrect numbers as a result. You have to revert your system to default beforehand or it won't work. All mice with scroll wheels and trackpad devices have a scrolling distance property in one form or another.

dcharlespyle
29th April 2014, 05:10 AM
I needed to point something else out. The xorg-x11-drv-mouse driver will be obsoleted by Evdev. This has already occurred in F21 rawhide, which is what led up to my starting this thread. When the mouse driver got obsoleted I had frozen mouse problems.

Updated:

I just plugged in in one my Logitech USB mice and got the following


$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=9 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=10 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=12 [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)]
↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=8 [slave keyboard (3)]
↳ UVC Camera (046d:0821) id=11 [slave keyboard (3)]


$ xinput list-props 12 | grep "Scrolling Distance"
Evdev Scrolling Distance (273): -1, -1, 1

weitjong
29th April 2014, 05:34 AM
Perhaps I was not making myself clear. For my case, the list-props shows a list of properties except the "Scrolling Distance". I can use grep to short list anything I want to, instead of just following other example like a fool. I modified the grep command in my last post to proof my point that the property id mapping is not the same as your system, at least on my system.

And I have tested without the xmodmap, of course. But when the prop is not there, it is simply not there.

dcharlespyle
29th April 2014, 06:12 AM
What mouse driver and mouse model are you using? Besides that, I never suggested or even entertained the thought that all your device properties would be the same as those on my system.

The Logitech mice I have tested (I only gave one example above) all have a "Scrolling Distance" property in the Evdev driver, just like my Microsoft Mouse does.

weitjong
29th April 2014, 06:30 AM
It's evdev (as shown in /var/log/X0rg.0.log) and m950t. As this thread is not about troubleshooting for my case, I will not bother you further with it. I am also quite happy with my current setup with xmodmap, xbindkeys, and xdotool to bind all the buttons.

Again, thanks for sharing this. I believe it will be useful to others and may be myself also in the future after I get rid of this over priced mouse.

dcharlespyle
30th April 2014, 06:53 AM
I was actually going to suggest xbindkeys but I see you are ahead of the game. Thanks for sharing information about your configuration. You might want to post a how-to in another thread for those using the same mouse as you are using. That, too, would be most useful.

sjzurek
13th March 2015, 12:36 PM
Hi All,

I have Dell WM514 mouse and Dell KM714 keyboard, but it seems that they're made by Logitech.
It works fine on my F21, but after a reboot it goes back to what it was before. Any idea how to make the change persistent?
Also the property id fluctuates. I had:

Evdev Scrolling Distance (286): -1, -1, 1
Evdev Scrolling Distance (287): -1, -1, 1
Right now I have:

$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:4029 id=8 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:4015 id=9 [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)]

$ xinput list-props 8
Device 'Logitech Unifying Device. Wireless PID:4029':
Device Enabled (145): 1
Coordinate Transformation Matrix (147): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (277): 0
Device Accel Constant Deceleration (278): 1.000000
Device Accel Adaptive Deceleration (279): 1.000000
Device Accel Velocity Scaling (280): 10.000000
Device Product ID (266): 1133, 50475
Device Node (267): "/dev/input/event2"
Evdev Axis Inversion (281): 0, 0
Evdev Axes Swap (283): 0
Axis Labels (284): "Rel X" (155), "Rel Y" (156), "Rel Horiz Wheel" (275), "Rel Vert Wheel" (276)
Button Labels (285): "Button Left" (148), "Button Middle" (149), "Button Right" (150), "Button Wheel Up" (151), "Button Wheel Down" (152), "Button Horiz Wheel Left" (153), "Button Horiz Wheel Right" (154), "Button Side" (270), "Button Extra" (271), "Button Forward" (272), "Button Back" (273), "Button Task" (274), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269)
Evdev Scrolling Distance (286): -1, -1, -1
Evdev Middle Button Emulation (287): 0
Evdev Middle Button Timeout (288): 50
Evdev Third Button Emulation (289): 0
Evdev Third Button Emulation Timeout (290): 1000
Evdev Third Button Emulation Button (291): 3
Evdev Third Button Emulation Threshold (292): 20
Evdev Wheel Emulation (293): 0
Evdev Wheel Emulation Axes (294): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (295): 10
Evdev Wheel Emulation Timeout (296): 200
Evdev Wheel Emulation Button (297): 4
Evdev Drag Lock Buttons (298): 0
Side buttons does not wok at all. Any testing tool shows all buttons working, except from side buttons.

Regards,
Simon.

dcharlespyle
18th March 2015, 10:17 PM
Hi All,

I have Dell WM514 mouse and Dell KM714 keyboard, but it seems that they're made by Logitech.
It works fine on my F21, but after a reboot it goes back to what it was before. Any idea how to make the change persistent?
Also the property id fluctuates. I had:

Evdev Scrolling Distance (286): -1, -1, 1
Evdev Scrolling Distance (287): -1, -1, 1
Right now I have:

$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:4029 id=8 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:4015 id=9 [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)]

$ xinput list-props 8
Device 'Logitech Unifying Device. Wireless PID:4029':
Device Enabled (145): 1
Coordinate Transformation Matrix (147): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (277): 0
Device Accel Constant Deceleration (278): 1.000000
Device Accel Adaptive Deceleration (279): 1.000000
Device Accel Velocity Scaling (280): 10.000000
Device Product ID (266): 1133, 50475
Device Node (267): "/dev/input/event2"
Evdev Axis Inversion (281): 0, 0
Evdev Axes Swap (283): 0
Axis Labels (284): "Rel X" (155), "Rel Y" (156), "Rel Horiz Wheel" (275), "Rel Vert Wheel" (276)
Button Labels (285): "Button Left" (148), "Button Middle" (149), "Button Right" (150), "Button Wheel Up" (151), "Button Wheel Down" (152), "Button Horiz Wheel Left" (153), "Button Horiz Wheel Right" (154), "Button Side" (270), "Button Extra" (271), "Button Forward" (272), "Button Back" (273), "Button Task" (274), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269)
Evdev Scrolling Distance (286): -1, -1, -1
Evdev Middle Button Emulation (287): 0
Evdev Middle Button Timeout (288): 50
Evdev Third Button Emulation (289): 0
Evdev Third Button Emulation Timeout (290): 1000
Evdev Third Button Emulation Button (291): 3
Evdev Third Button Emulation Threshold (292): 20
Evdev Wheel Emulation (293): 0
Evdev Wheel Emulation Axes (294): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (295): 10
Evdev Wheel Emulation Timeout (296): 200
Evdev Wheel Emulation Button (297): 4
Evdev Drag Lock Buttons (298): 0
Side buttons does not wok at all. Any testing tool shows all buttons working, except from side buttons.

Regards,
Simon.

Interesting. All my side buttons work just fine. Did you do the following?

1. Create a file in /usr/share/X11/xorg.conf.d named 20-natural-scrolling.conf.


sudo touch /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

2. Open the file using a text editor as superuser:


sudo nano /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf

3. Put the following contents in the file you created:



Section "InputClass"
Identifier "Natural Scrolling"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-1"
Option "HorizScrollDelta" "-1"
Option "DialDelta" "-1"
EndSection


4. Save the file and reboot.

Once we get the file squared away to make this permanent we can work on the side buttons if they still don't work. Warning: If you have tried any other method to try to set and make natural scrolling work you have to remove all of those first or they will undo what I have stated here and make it do the opposite.

weitjong
19th March 2015, 02:41 AM
Time flies. It has been almost a year since I last tried this. Now that I have upgraded my system to F21, the evdev driver now reports this "Scrolling Distance" property for my Logitech mouse. It does not use the same property-id as the OP but that is totally expected. Using "set-prop" to revert the value does the trick this time round. :dance:

sjzurek
7th April 2015, 10:35 AM
@dcharlespyle Many thanks!
Your xorg conf file works great. It also works correctly with file manager, where other methods fail (e.g. flipping the wheel buttons sequence).
The buttons that were not working... well, they are working. After some digging I've found that the side buttons work as modifier button. When pressed all buttons have different functions. It works in a way "Fn" button on a keyboard. When pressed wheel left/right becomes back/forward buttons and up/down becomes zoom. Weird mouse...

dcharlespyle
7th April 2015, 05:46 PM
Glad it's working for you. It is always annoying when hardware doesn't work right in Linux and it forces one to use Windows for real work. Well, there is that and the fact that certain applications won't run on Linux no matter what one does, and there will never be a Linux version. I'm just glad that this xorg.conf file works and we don't have to worry about how nautilus will do something different. The newer evdev makes all the difference, too. It also works the same on Ubuntu as long as the latest evdev is used.

sjzurek
28th April 2015, 09:37 PM
This method also works in ubuntuGNOME 15.04
Do you know how to reduce dpi of this mouse?
This is probably question for another thread... Anyway I've found good source of knowledge here (http://www.x.org/wiki/Development/Documentation/PointerAcceleration/).

dcharlespyle
30th April 2015, 02:18 PM
I'm using Unity, of all things. What is the mouse you are using? One can alter behavior and sensitivity using various commands in X (as you posted later) or one could have used the Mouse & Touchpad control panel in System Settings/gnome-control-center there (although it would seem that this setting no longer is there in that control panel).

So, now you can instead use dconf-editor to alter mouse acceleration behavior. You'll have to experiment with the setting until it feels right to you. If you don't have that installed, you can install it using apt-get install in Ubuntu.

I would have attached a screenshot to show where the settings can be found there, but for some reason I am unable to upload to the site anymore. So, when you have opened dconf-editor, you navigate to org > gnome > settings-daemon > peripherals > mouse and you will see two settings at the bottom relating to mouse behavior. You will also see several other useful settings for other situations there, too.

Hope this helps.

fedorabawks
2nd June 2015, 01:31 PM
Anyone know why synclient overrides the xorg settings?

For example I have this in a xorg.conf file:



Section "InputClass"
Identifier "Natural Scrolling"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-1"
Option "HorizScrollDelta" "-1"
Option "DialDelta" "-1"
EndSection


But these settings aren't applied to the synaptics touchpad. It would seem synclient is overrides these settings.

dcharlespyle
2nd June 2015, 06:30 PM
Anyone know why synclient overrides the xorg settings?

For example I have this in a xorg.conf file:



Section "InputClass"
Identifier "Natural Scrolling"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-1"
Option "HorizScrollDelta" "-1"
Option "DialDelta" "-1"
EndSection


But these settings aren't applied to the synaptics touchpad. It would seem synclient is overrides these settings.

These settings are only for a mouse. They must be customized for your mouse as well, depending upon what your evdev settings are. For synaptics hardware, there are a couple other lines that have to be added to the above but I do not recall what those are. I'll get back to you when I find the needed lines unless someone beats me to it. You may also need to set the number lower on the file in your xorg.conf directory if the synaptics device has a lower number (higher priority).

fedorabawks
2nd June 2015, 06:57 PM
I was hoping for a least specific, most general solution. So that means without resorting any specific driver. So no evdev, no synaptics in xorg.conf.

Correct me if I'm wrong but I was thinking the synaptics driver connects via evdev to translate the input signals to the GUI commands such as pointing, scrolling etc..

By that token I'm looking for a general solution to set natural scrolling through evdev which doesn't rely on any specific driver. There is a property of most input devices called:



Evdev Scrolling Distance (272): 1, 1, 1


Setting these to -1 reverses the scrolling.

This leads me to a next question of directly setting evdev options in xorg.conf and doing away with mouse or touchpad specific settings. Can it be done and what is the syntax? I've already tried playing around with the evdev driver but haven't been able to make it work..

dcharlespyle
2nd June 2015, 10:07 PM
I have not been able to find the file I mentioned but it is most likely on one of my Linux boxes anyway. In the meantime, see if anything in the following page might suit your needs.

http://www.thinkwiki.org/wiki/Buttonless_Touchpad

sjzurek
3rd June 2015, 12:35 PM
Fedora 22 Twenty Two - this solution works no more.
xinput list has changed:

$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Dell KB714 id=8 [slave pointer (2)]
⎜ ↳ Logitech Dell WM514 id=9 [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)]

$ xinput list-props 9
Device 'Logitech Dell WM514':
Device Enabled (148): 1
Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (285): 0.000000
libinput Accel Speed Default (286): 0.000000
libinput Natural Scrolling Enabled (283): 0
libinput Natural Scrolling Enabled Default (284): 0
libinput Send Events Modes Available (268): 1, 0
libinput Send Events Mode Enabled (269): 0, 0
libinput Send Events Mode Enabled Default (270): 0, 0
libinput Left Handed Enabled (287): 0
libinput Left Handed Enabled Default (288): 0
libinput Scroll Methods Available (289): 0, 0, 1
libinput Scroll Method Enabled (290): 0, 0, 0
libinput Middle Emulation Enabled (291): 0
libinput Middle Emulation Enabled Default (292): 0
Device Node (271): "/dev/input/event8"
Device Product ID (272): 1133, 16425
Now I have to do:
$ xinput set-prop 9 283 1I will have to find a solution to make that change persistent, but I bet dcharlespyle will be quicker ;-)

dcharlespyle
3rd June 2015, 03:59 PM
I'll have to upgrade to F22 first. :)

dcharlespyle
3rd June 2015, 06:18 PM
Bad news. I upgraded to Fedora 22 and I have nothing with which to test. The above method still is working for me on Fedora 22 after upgrade using Fedup, using a Microsoft mouse and keyboard. I'll have to do some digging to see if something else is at play. It may just be the way the new evdev works with your hardware. I'll see what I can come up with as soon as I can. What is your evdev version?

Here is what I have on my system:


$ rpm -qa *evdev*
libevdev-1.4.2-1.fc22.x86_64
xorg-x11-drv-evdev-devel-2.9.2-1.fc22.x86_64
xorg-x11-drv-evdev-2.9.2-1.fc22.x86_64


$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=11 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=12 [slave pointer (2)]
⎜ ↳ MCE IR Keyboard/Mouse (mceusb) id=13 [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)]
↳ UVC Camera (046d:0821) id=8 [slave keyboard (3)]
↳ Media Center Ed. eHome Infrared Remote Transceiver (0471:0815) id=9 [slave keyboard (3)]
↳ Microsoft Microsoft® 2.4GHz Transceiver v7.0 id=10 [slave keyboard (3)]

$ xinput list-props 11
Device 'Microsoft Microsoft® 2.4GHz Transceiver v7.0':
Device Enabled (137): 1
Coordinate Transformation Matrix (139): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (266): 0
Device Accel Constant Deceleration (267): 1.000000
Device Accel Adaptive Deceleration (268): 1.000000
Device Accel Velocity Scaling (269): 10.000000
Device Product ID (255): 1118, 1861
Device Node (256): "/dev/input/event3"
Evdev Axis Inversion (270): 0, 0
Evdev Axes Swap (272): 0
Axis Labels (273): "Rel X" (147), "Rel Y" (148), "Rel Horiz Wheel" (262), "Rel Dial" (263), "Rel Vert Wheel" (264), "Rel Misc" (265)
Button Labels (274): "Button Left" (140), "Button Middle" (141), "Button Right" (142), "Button Wheel Up" (143), "Button Wheel Down" (144), "Button Horiz Wheel Left" (145), "Button Horiz Wheel Right" (146), "Button Side" (260), "Button Extra" (261), "Button Unknown" (258), "Button Unknown" (258), "Button Unknown" (258), "Button Unknown" (258)
Evdev Scrolling Distance (275): -1, -1, -1
Evdev Middle Button Emulation (276): 0
Evdev Middle Button Timeout (277): 50
Evdev Third Button Emulation (278): 0
Evdev Third Button Emulation Timeout (279): 1000
Evdev Third Button Emulation Button (280): 3
Evdev Third Button Emulation Threshold (281): 20
Evdev Wheel Emulation (282): 0
Evdev Wheel Emulation Axes (283): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (284): 10
Evdev Wheel Emulation Timeout (285): 200
Evdev Wheel Emulation Button (286): 4
Evdev Drag Lock Buttons (287): 0

sjzurek
4th June 2015, 10:03 AM
Although man libinput states:
Option "NaturalScrolling" "bool"
Enables or disables natural scrolling behavior. it does not work.

The only way at the moment is to set it manually as in my previous post.

dcharlespyle check your /usr/share/X11/xorg.conf.d/90-libinput.conf There should be catch all entries to enable libinput for your mouse and keyboard. It looks like you are still using "old" evdev.

dcharlespyle
4th June 2015, 05:44 PM
Although man libinput states:
Option "NaturalScrolling" "bool"
Enables or disables natural scrolling behavior. it does not work.

The only way at the moment is to set it manually as in my previous post.

dcharlespyle check your /usr/share/X11/xorg.conf.d/90-libinput.conf There should be catch all entries to enable libinput for your mouse and keyboard. It looks like you are still using "old" evdev.

No such file exists on my system.

But, libinput is installed.


$ rpm -qa libinput
libinput-0.15.0-4.fc22.x86_64

UPDATED:

I just found that xorg-x11-drv-libinput was not installed. I just installed it and now have the file. Here is what it contains:


# Match on all types of devices but tablet devices and joysticks

Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

dcharlespyle
4th June 2015, 06:12 PM
OK. I rebooted and now see that with the xorg-x11-drv-libinput package installed it interferes with my solution above. Now at least I have something to work with. I'll let you know what I figure out as soon as I can.

dcharlespyle
4th June 2015, 07:37 PM
That is a really, really buggy driver at the moment. You should see what it does in Wayland when you try to set natural scrolling. At least on my system, I ended up with double-clicking disabled! I could not navigate directories with my mouse when setting properties using a *.conf file. So, until I can manage to find the time to get to the bottom of the problem, just make a desktop file in the autostart directory in your home folder. It won't be system-wide but at least it will work for now.

Create a file named natural-scrolling.desktop in the ~/.config/autostart directory.

Inside the file put the following:


[Desktop Entry]
Type=Application
Exec=sh -c "sleep 5; exec xinput set-prop 11 272 1"
Hidden=false
X-MATE-Autostart-enabled=true
Name[en_US]=Enable Natural Scrolling
Name=Natural Scrolling Enabler
Comment[en_US]=Enables Natural Scrolling in X.
Comment=Enables Natural Scrolling in X.

Be sure to use the numbers in the exec line actually used by your hardware. Mine were 11 and 272.

Save the file.

Logoff and logon again.

See if that works for you in the meantime. You also could try to put the file in the system-wide xdg autostart directory. I haven't tried it yet but it may work there, too.

sjzurek
5th June 2015, 09:30 AM
Haha, this hack is only going to work if your xinput props ids stay the same, but they doesn't.
I've seen a python script that will search for the right ID and set it for you. It's a bit outdated now, but with some modifications it should do the trick.
I'm also considering rolling back to evdev, as I'm not using any touch input devices for which libinput seems to be designed in mind.

Here is the github repo for this script:
https://github.com/cemmanouilidis/naturalscrolling

dcharlespyle
5th June 2015, 06:02 PM
That's odd. My device ID has always remained the same unless I reinstalled the OS. But, then, I don't tend to change hardware in and out all that frequently. Once it's plugged in it stays that way and there is nothing that would take the originally assigned device ID.

Like you, I also am considering rolling back to Evdev. I do not like how setting natural scrolling to on causes double-clicks to be lost when in Wayland. Of course, with Wayland, the appearance is just awful when it loads and initializes the video graphics card. Seems like a step backward the way Wayland initializes the card, about like the original alpha release of Mesa before it became more mature. :)

sjzurek
15th June 2015, 04:45 PM
That's odd. My device ID has always remained the same unless I reinstalled the OS. But, then, I don't tend to change hardware in and out all that frequently. Once it's plugged in it stays that way and there is nothing that would take the originally assigned device ID.
It is odd. See my post #12 (http://forums.fedoraforum.org/showpost.php?p=1727006&postcount=12). Even better, now on F22 it seems not to change. :dis:

johnlinux
5th July 2016, 02:26 AM
after upgrading to fedora 24 I made some updates a couple of weeks later, and then the mouse wheel
switched to natural scrolling. To set up back reverse scrolling I run these commands as you explained
here

$ xinput --list

⟹ ImPS/2 BYD TouchPad id=12 [slave pointer (2)]

$ xinput list-props 12

⟹ libinput Natural Scrolling Enabled (264): 1

$ xinput set-prop 12 264 0

thank you very much for your advice, very useful really :cool:

wicking
9th December 2016, 04:56 PM
Haha, this hack is only going to work if your xinput props ids stay the same, but they doesn't.
No need for complex script. Why use the numbers? Just use the property names, which is easier to read and understand and memorize.

I am on Fedora 24, and I want to disable natural scrolling, see my ~/.config/autostart/natural-scrolling.desktop


[Desktop Entry]
Type=Application
Exec=sh -c "sleep 5; exec xinput set-prop 'ImExPS/2 BYD TouchPad' 'libinput Natural Scrolling Enabled' 0"
Hidden=false
X-MATE-Autostart-enabled=true
Name[en_US]=Disable Natural Scrolling
Name=Natural Scrolling Disabler
Comment[en_US]=Disables Natural Scrolling in X.
Comment=Disables Natural Scrolling in X.

Copy this file to the $HOME of each user. For me it is the only working solution. Things written in /etc/X11/xorg.conf.d/20-natural-scrolling.conf don’t work for me.

Edit: It is better to use the gsettings command in my next answer, because this solution stops to work if you change the user. Very annoying!

DBelton
10th December 2016, 11:12 PM
That is a very good solution, wicking.

The *.desktop files are not used for nearly as much as they could be. Mainly because I believe that a lot of people just don't understand them.

weitjong
11th December 2016, 02:43 AM
That is a very good solution, wicking.

The *.desktop files are not used for nearly as much as they could be. Mainly because I believe that a lot of people just don't understand them.

There used to be a little utility program called 'gnome-session-properties' as I recall it that could add/remove autostart sessions graphically. Without the GUI program, I agree with you that it is harder to use the feature.

wicking
19th December 2016, 07:26 AM
The ultimate solution for the Fedora 24 bug is to disable natural-scrolling (if you don’t like natural scrolling) for the touchpad, as many (all?) mice in Fedora 24 are recognized/treated as touchpads. Therefore in the terminal use this command for every user that doesn’t like natural-scrolling:



gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false


Or to turn it on, replace false with true. And for mice replace .touchpad with .mouse (except for Fedora 24, where your mouse is treated as a touchpad).

See this thread: http://forums.fedoraforum.org/showthread.php?t=310681 and the kernel bug https://bugzilla.redhat.com/show_bug.cgi?id=1352159