17

I have a problem with my Kali installation. Since I have updated it today, the mouse scrolling is inverted.

I have tried the .Xmodmap method and also checking 'natural scroll' option but without success.

Could anybody help me?

6 Answers 6

22

This seemed to be what i was looking for: How to *disable* natural scrolling?... enter this at the command line:

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

To add on to jknox and JoorDaddee's answers (and to address papaiatis's concern):

Turning off "Natural Scrolling" in the settings didn't work for me, and neither did running gsettings set org.gnome.desktop.peripherals.mouse natural-scroll false, since both were already disabled.

What worked for me is running gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false. This fixed both the mouse and the touchpad (unplugging the mouse and plugging it back in made it work if it didn't apply immediately).

To be clear, I'm running Kali in VirtualBox, so I'm not sure if this applies otherwise. Then again, the OP didn't specify what environment he's running Kali in.

1
  • I am running Kali inside Windows 10 and this worked for me. Mar 22, 2017 at 16:04
2

I auto - answer to me, I find a solution that works. Invert mouse scroll wheel in debian

I have edit the /usr/share/X11/xorg.conf.d/10-evdev.conf file to add

Option "ButtonMapping" "1 2 3 5 4 6 7 8"

And restart X server.

2
  • You have to use xorg, not wayland for this. Verify with echo $XDG_SESSION_TYPE (giving x11) - and pay attention to a capital first x at X11,
    – Cadoiz
    Jun 21 at 23:01
  • Here is how to restart the X server
    – Cadoiz
    Jun 21 at 23:16
0

Or you could have just clicked on the down arrow by the time selected Settings(tools icon on left). Click on Mouse & Touchpad and turned off "Natural Scrolling"

1
  • 3
    That doesn't work for me. Ubuntu 16.10 host, Kali 2016.2 in VirtualBox.
    – papaiatis
    Nov 13, 2016 at 20:14
0

Try this: enter about:config into the Firefox address bar (confirm the info message in case it shows up) and search for the preference named mousewheel.default.delta_multiplier_y. Double-click it and change its value to -100.

1
  • Thank you for the answer - but doesn't this only affect firefox then?
    – Cadoiz
    Jun 21 at 23:17
0

After a long journey and no answer, this thread brought me into the correct direction.

  1. Type xinput --list --short | grep pointer into your terminal to get the device name and id of the desired pointer (works for both mice and touchpads). Sample output:
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎜   ↳ lircd-uinput                              id=14   [slave  pointer  (2)]
⎜   ↳ Logitech MX Vertical Advanced Ergonomic Mouse Consumer Control    id=25   [slave  pointer  (2)]
⎜   ↳ Logitech MX Vertical Advanced Ergonomic Mouse id=26   [slave  pointer  (2)]

In my case, I wanted to change SynPS/2 Synaptics TouchPad with id=12.

  1. Now I typed the command xinput --list-props 12 (you could also paste it's name instead of the id 12) to get:
Device 'SynPS/2 Synaptics TouchPad':
    Device Enabled (183):   1
    Coordinate Transformation Matrix (185): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (312): 1
    Device Accel Constant Deceleration (313):   2.500000
    Device Accel Adaptive Deceleration (314):   1.000000
    Device Accel Velocity Scaling (315):    12.500000
    Synaptics Edges (316):  1659, 5337, 1531, 4401
    Synaptics Finger (317): 25, 30, 0
    Synaptics Tap Time (318):   180
    Synaptics Tap Move (319):   238
    Synaptics Tap Durations (320):  180, 180, 100
    Synaptics ClickPad (321):   1
    Synaptics Middle Button Timeout (322):  0
    Synaptics Two-Finger Pressure (323):    282
    Synaptics Two-Finger Width (324):   7
    Synaptics Scrolling Distance (325): -108, 108
    Synaptics Edge Scrolling (326): 1, 0, 0
    Synaptics Two-Finger Scrolling (327):   1, 0
    Synaptics Move Speed (328): 1.000000, 1.750000, 0.036880, 0.000000
    Synaptics Off (329):    0
    Synaptics Locked Drags (330):   0
    Synaptics Locked Drags Timeout (331):   5000
    Synaptics Tap Action (332): 2, 3, 0, 0, 1, 3, 0
    Synaptics Click Action (333):   1, 3, 0
    Synaptics Circular Scrolling (334): 0
    Synaptics Circular Scrolling Distance (335):    0.100000
    Synaptics Circular Scrolling Trigger (336): 0
    Synaptics Circular Pad (337):   0
    Synaptics Palm Detection (338): 0
    Synaptics Palm Dimensions (339):    10, 200
    Synaptics Coasting Speed (340): 20.000000, 50.000000
    Synaptics Pressure Motion (341):    30, 160
    Synaptics Pressure Motion Factor (342): 1.000000, 1.000000
    Synaptics Resolution Detect (343):  1
    Synaptics Grab Event Device (344):  0
    Synaptics Gestures (345):   1
    Synaptics Capabilities (346):   1, 0, 0, 1, 1, 1, 1
    Synaptics Pad Resolution (347): 53, 36
    Synaptics Area (348):   0, 0, 0, 0
    Synaptics Soft Button Areas (349):  3498, 0, 4033, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (350): 27, 27
    Device Product ID (306):    2, 7
    Device Node (307):  "/dev/input/event6"

I could also, but didn't want to change Device Accel Constant Deceleration, the interesting thing here was xinput --list-props 12 | grep 'Synaptics Scrolling Distance' (if you use a different driver, you might want to find something similarly adequate to Synaptics Scrolling Distance).

  1. In the last step, I inverted the vertical scroll direction by putting -108 instead of 108, leaving the absolute values unchanged. The final command is then xinput --set-prop 12 325 -108, 108

Notes:

  • instead of 12 325, you will probably need values specific to your setup
  • as far as I'm concerned, this method might be limited to OSes using Xorg aka the x server - some Ubuntu for example use wayland instead. To check, you can use echo $XDG_SESSION_TYPE, "if you see X11, it’s Xorg. If you see Wayland, quite obviously, the display server in use is Wayland."
  • usually, the changes should apply immedeately, but if not, you can restart the x server. To do so, enter sudo systemctl restart display-manager, but beware that this kills all your graphical interfaces and probably loggs you off!
1
  • Just to add some more experience: on 5.15.48-1-MANJARO, you cann't tweak neither Device Accel Constant Deceleration, nor Synaptics Scrolling Distance, but instead I used libinput Natural Scrolling Enabled (320). I could (untested) probably also have used libinput Scrolling Pixel Distance (338) with a negative distance analogous as in my answer. The difference seems to be the pointer driver, libinput here instead of Synaptics. You can work it through exactly like in the answer using commands 1, 2, 3 with 3 being adjusted to xinput --set-prop 11 320 1.
    – Cadoiz
    Jul 18 at 8:52

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