LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Keyboard Jumps While Typing (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/keyboard-jumps-while-typing-4175459782/)

thund3rstruck 04-27-2013 09:12 AM

Keyboard Jumps While Typing
 
Well a year has past since my original post:
http://www.linuxquestions.org/questi...typing-946138/

So I imagine a lot of Inspiron 15R laptops have been sold by Dell. I figured I'd ressurect this thread and aim to solve this problem before I completely give up on this laptop (and Dell) and move onto a new laptop.

In a nutshell this laptop is essentially unusable on Linux. Over the last year I've jumped around from Slackware, to OpenSuse, to Arch, to Kubuntu and all result in the same infuriating problem whereby anytime I'm typing anything the cursor will jump around and screw up what I'm typing.

I have 2 choices; I can type really s-l-o-w-l-y or I can unload the generic psmouse driver, perform my work with the keyboard and then reload the driver to turn back on the touchpad.

Code:

# Everytime I need to type more than a few words I have to unload the module
sudo rmmod psmouse

# Now, using just the keyboard, I can type away without issue
# When I'm done I have to then reload the module to enable the touchpad
sudo modprobe psmouse

In KDE if I try to configure the tocuhpad I get a message that there is no touchpad installed... I use it everyday so I'm not exactly sure why KDE thinks its not installed.

The laptop has some handy hotkeys (FN+F3) to disable the touchpad but that function only works in Windows.

I guess I could look into making my own keyboard shortcut to unload and reload the psmouse driver?

Sigg3.net 04-27-2013 09:28 AM

Since you're using KDE, synaptiks is the program you're looking for. Enable the "disable touch when typing" option.

Here's a step-by-step from OpenSUSE mailinglist:
KDE Kickoff Application | Openning on All
Applications->System Configuration->Synaptiks. Open Synaptiks Touchpad
Management | Automatically Switch off touchpad on keyboard activity (Checkbox)

This is not a Dell-specific problem. All "hypersensitive" touchpads will infuriate users until configured. Google's your friend:)

thund3rstruck 04-27-2013 09:40 AM

Quote:

Originally Posted by Sigg3.net (Post 4940026)
Since you're using KDE, synaptiks is the program you're looking for. Enable the "disable touch when typing" option.

Here's a step-by-step from OpenSUSE mailinglist:
KDE Kickoff Application | Openning on All
Applications->System Configuration->Synaptiks. Open Synaptiks Touchpad
Management | Automatically Switch off touchpad on keyboard activity (Checkbox)

This is not a Dell-specific problem. All "hypersensitive" touchpads will infuriate users until configured. Google's your friend:)

Been down that route already. Synaptiks says there is no touchpad installed.

TobiSGD 04-27-2013 09:58 AM

On my laptop I use a little script that I have created a keybinding for to switch the touchpad on or off:
Code:

#!/bin/bash

synclient TouchpadOff=$(synclient -l|grep -c 'TouchpadOff.*=.*0')

Works fine for me.

H_TeXMeX_H 04-27-2013 10:09 AM

Get yourself an external mouse and leave psmouse unloaded.

Sigg3.net 04-27-2013 10:19 AM

Sorry, it was my first thought:)

Can you give us a lsusb and dmesg | grep pad outputs here so we can identify the specific hardware?

thund3rstruck 04-27-2013 05:29 PM

Quote:

Originally Posted by TobiSGD (Post 4940044)
On my laptop I use a little script that I have created a keybinding for to switch the touchpad on or off:
Code:

#!/bin/bash

synclient TouchpadOff=$(synclient -l|grep -c 'TouchpadOff.*=.*0')

Works fine for me.

I'm sure that works great if KDE detects your touchpad; which for me it doesn't:
Code:

synclient
Couldn't find synaptics properties. No synaptics driver loaded?

Quote:

Originally Posted by H_TeXMeX_H (Post 4940049)
Get yourself an external mouse and leave psmouse unloaded.

This machine is strictly for use after work on the couch or in the bed. Connecting a mouse is not an option.

Quote:

Originally Posted by Sigg3.net (Post 4940057)
Sorry, it was my first thought:)

Can you give us a lsusb and dmesg | grep pad outputs here so we can identify the specific hardware?

Code:

lsusb | grep -i pad
# no output

dmesg | grep -i pad
[  10.186713] psmouse serio1: alps: Unknown ALPS touchpad: E7=73 03 50, EC=73 02 02

I sincerely appreciate any assistance in helping me finally resolve this problem. At this point the Inspiron 15R model is a year old so I would imagine there are a whole lot of Linux users out there affected. It's a shame because Dell laptops have traditionally made outstanding Linux workstations.

TobiSGD 04-27-2013 06:10 PM

Quote:

Originally Posted by thund3rstruck (Post 4940216)
I'm sure that works great if KDE detects your touchpad; which for me it doesn't:

I am not a KDE user, synclient should work with any DE/WM, but it seems that you have an ALPS touchpad, I don't know if there are any tools with a similar function for those touchpads.

Sigg3.net 04-28-2013 03:05 AM

So apparently the touchpad is recognized as a ps/2 mouse instead of a touchpad.
This has been fixed in Ubuntu 12.04 for some of the affected models according to this.

I'd contact someone in any of the touchpad driver projects and hear whether they'd be interested in creating a driver. Seems like there is recent work going on here: https://patchwork.kernel.org/patch/2007961/

They would probably be interested in bug reports from you.

gdizzle 04-28-2013 05:58 PM

Hi not sure if you solved this?

This is how I solved it in Centos either way:

My touchpad was getting identified as a PS/2 Generic mouse, you can confirm this by unplugging your mouse and typing:

xinput --list

xinput list-props "PS/2 Generic Mouse" : gives you more details about the device.

To disable the touchpad from moving:

Code:

xinput --set-prop "PS/2 Generic Mouse" "Device Enabled" 0

To renable the touchpad

Code:

xinput --set-prop "PS/2 Generic Mouse" "Device Enabled" 1

thund3rstruck 04-28-2013 08:39 PM

Quote:

Originally Posted by Sigg3.net (Post 4940335)
So apparently the touchpad is recognized as a ps/2 mouse instead of a touchpad.
This has been fixed in Ubuntu 12.04 for some of the affected models according to this.

I'd contact someone in any of the touchpad driver projects and hear whether they'd be interested in creating a driver. Seems like there is recent work going on here: https://patchwork.kernel.org/patch/2007961/

They would probably be interested in bug reports from you.

This machine is running (k)ubuntu 13.04. I will look into submitting a bug report. Thanks for the suggestion. The irony here is that i bought this Laptop specifically for Linux and it has turned out to be the very first pc I've owned that is ended up being totally un-usable in Linux (other than this problem; also the wireless stops functioning when going from AC to battery power --but that unresolved issue has its own thread).

Quote:

Originally Posted by gdizzle (Post 4940750)
Hi not sure if you solved this?
This is how I solved it in Centos either way:

My touchpad was getting identified as a PS/2 Generic mouse, you can confirm this by unplugging your mouse and typing:

xinput --list

xinput list-props "PS/2 Generic Mouse" : gives you more details about the device.

To disable the touchpad from moving:

Code:

xinput --set-prop "PS/2 Generic Mouse" "Device Enabled" 0

At present anytime I need to draft some text (like right now) I unload the psmouse module, write out all my text, and then reload the module:

Code:

# Need to use the keyboard so I have to disable touchpad
sudo rmmod psmouse
# use text editor

# Done typing text so now I must enable the touchpad
sudo modprobe psmouse

Does the xinput solution function differently than the rmmod/modprobe sequence?

In reality I think this machine is going to the trash bin. Next time I'll not assume Dell machines work in Linux and dig around to find a vendor that works out of the box.

Sigg3.net 04-29-2013 11:00 AM

If this works:
Code:

# Everytime I need to type more than a few words I have to unload the module
sudo rmmod psmouse

# Now, using just the keyboard, I can type away without issue
# When I'm done I have to then reload the module to enable the touchpad
sudo modprobe psmouse

Then perhaps you could create a bash script as a temporary workaround, and assign a keyboard combo similar to the Fn+Fx combo?

Script example:
Code:

#!/bin/bash
# Specify mousetoggle file
mousetoggle="/home/username/mousetoggle"

touch -a $mousetoggle

# 1 enables TP, 0 disables TP

if [ -s $mousetoggle ] ; then
        if [ $mousetoggle -eq 1 ] ; then
                # mousetoggle currently 1 so disable mouse
                rmmod psmouse
                echo "0" > $mousetoggle
        else
                # mousetoggle currently 0 so enable mouse
                modprobe psmouse
                echo "1" > $mousetoggle
else
        # $mouestoggle is empty, so disable mouse and exit
                rmmod psmouse
                echo "0" > $mousetoggle
fi

exit

if you save this as whatever.sh in ~, do:
Code:

$ sudo chown root:root /home/username/whatever.sh
$ sudo chmod 700 /home/username/whatever.sh

then run 'sudo visudo' to allow mousetoggle.sh to run without sudo. Below the ~25th line "%sudo ALL=(ALL:ALL) ALL" add:
Code:

username  ALL=(ALL) NOPASSWD: /home/username/whatever.sh
Change with your username, of course, and save it.

Finally, in your ~/.xbindkeysrc add
Code:

"/home/username/whatever.sh"
    Control + Alt + m

This is from xbindkeys manpage. You could probably do this in Keyboard Shortcuts in GNOME or KDE instead.

Running CTRL+Alt+m will run whatever.sh and enable or disable the touchpad depending on the current setting.

thund3rstruck 04-29-2013 11:28 AM

Quote:

Originally Posted by Sigg3.net (Post 4941228)
If this works:
Code:

# Everytime I need to type more than a few words I have to unload the module
sudo rmmod psmouse

# Now, using just the keyboard, I can type away without issue
# When I'm done I have to then reload the module to enable the touchpad
sudo modprobe psmouse

Then perhaps you could create a bash script as a temporary workaround, and assign a keyboard combo similar to the Fn+Fx combo?

Script example:
Code:

#!/bin/bash
# Specify mousetoggle file
mousetoggle="/home/username/mousetoggle"

touch -a $mousetoggle

# 1 enables TP, 0 disables TP

if [ -s $mousetoggle ] ; then
        if [ $mousetoggle -eq 1 ] ; then
                # mousetoggle currently 1 so disable mouse
                rmmod psmouse
                echo "0" > $mousetoggle
        else
                # mousetoggle currently 0 so enable mouse
                modprobe psmouse
                echo "1" > $mousetoggle
else
        # $mouestoggle is empty, so disable mouse and exit
                rmmod psmouse
                echo "0" > $mousetoggle
fi

exit

if you save this as whatever.sh in ~, do:
Code:

$ sudo chown root:root /home/username/whatever.sh
$ sudo chmod 700 /home/username/whatever.sh

then run 'sudo visudo' to allow mousetoggle.sh to run without sudo. Below the ~25th line "%sudo ALL=(ALL:ALL) ALL" add:
Code:

username  ALL=(ALL) NOPASSWD: /home/username/whatever.sh
Change with your username, of course, and save it.

Finally, in your ~/.xbindkeysrc add
Code:

"/home/username/whatever.sh"
    Control + Alt + m

This is from xbindkeys manpage. You could probably do this in Keyboard Shortcuts in GNOME or KDE instead.

Running CTRL+Alt+m will run whatever.sh and enable or disable the touchpad depending on the current setting.

Thank you for this outstandingly thorough response!. I'll dig into the xbindkeys tonight after work. Being able to toggle on and off would dramatically increase my productivity while using this machine.

Sigg3.net 04-29-2013 11:48 AM

It's only meant as a workaround. They already did fix this bug for other models in the same series, so don't give up:)
Personally, I always bring a USB mouse with me wherever I go, but that's not for everyone.

Also, let me know how/if the script works. I can help debug it if something doesn't work.

thund3rstruck 04-29-2013 03:35 PM

Quote:

Originally Posted by Sigg3.net (Post 4941257)
Also, let me know how/if the script works. I can help debug it if something doesn't work.

For the benefit of anyone who might stumble on this thread; here's the script (which I slightly modified to make it enterprise grade --I hope you don't mind.)

:-)

Code:

#!/bin/bash
#: Title: toggletouchpad
#: Author: Sigg3.net@linuxquestions.org
#:        nealbailey@hotmail.com
#: Date: 04/29/2013
#: Purpose: Allows the user to enable and disable the laptop touchpad.
#:          Designed for use with a keyboard shortcut on machines that use
#:          an un-recognized or unsupported laptop touchpad.
#
#: Usage: ./toggletouchpad [options]
#: Options: -v - Display version information
#:            -h, --help - print help synopsis
#:
#  Notes: To prevent prompting for su credentials add the following lines into /etc/sudoers
#
#  #Allow users to load/unload touchpad (psmouse)
#  %cdrom ALL=NOPASSWD:NOEXEC:/sbin/modprobe psmouse
#  %cdrom ALL=NOPASSWD:NOEXEC:/sbin/rmmod psmouse
#

# Metadata
scriptname=${0##*/}
description="Enables and disables unidentified touchpads"
usage="$scriptname [-h|-v]"
optionusage="-h:\tPrint help (this screen)\n  -v:\tPrint version info\n"
optionusagenotes=" No options fetches usage."
optionexamples=" ./toggletouchpad \n"
date_of_creation=2013-04-29
version=1.0
author="Sigg3.net@linuxquestions.org"

# Variables
CONFIG="$HOME/mousetoggle" # Specify mousetoggle file
SETTING=                    # Current setting
IsKDE=                          # Got kdialog?

# Default setting (Touchpad is enabled)
if [ ! -f $CONFIG ]; then
  echo "1" > $CONFIG
fi

usage() #@ DESCRIPTION: print usage information
{      #@ USAGE: usage
  printf "%s - %s\n" "$scriptname" "$description"
  printf "Usage: %s\n" "$usage"
  printf "%s  $optionusage"
}

version() #@ DESCRIPTION: print version information
{        #@ USAGE: version
  printf "%s (v%s)\n" "$scriptname" "$version"
  printf "by: %s, %d\n" "$author"  "${date_of_creation%%-*}"
}

verifyKde() #@ DESCRIPTION: send notification if kdialog is available
{          #@ USAGE: verifyKde (0 = false, 1 = true)
  # if using gnome might want to replace kdialog with 'notify-send'
  if [ $(which kdialog 2>/dev/null | grep -c "kdialog") -eq 0 ]; then
        IsKDE="0"
  else
        IsKDE="1"
  fi
}

enablePad() #@ DESCRIPTION: load the psmouse module
{          #@ USAGE: enablePad
  sudo modprobe psmouse
  echo "1" > $CONFIG
}

disablePad() #@ DESCRIPTION: unload the psmouse module
{            #@ USAGE: disablePad
  sudo rmmod psmouse
  echo "0" > $CONFIG
}

SETTING=$(head -n 1 "$CONFIG")
verifyKde

optstring=hv
while getopts $optstring opt
do
  case $opt in
    h) usage; exit ;;
    v) version; exit ;;
  esac
done
shift "$(( $OPTIND - 1 ))"

if [ "$SETTING" -eq 1 ] ; then
  # mousetoggle currently 1 so disable mouse
  disablePad
  if [ "$IsKDE" -eq 1 ] ; then
        kdialog --passivepopup "Disabled psmouse module." --title "$scriptname" 5
  fi
fi

if [ "$SETTING" -eq 0 ] ; then
  # mousetoggle currently 0 so enable mouse
  enablePad
  if [ "$IsKDE" -eq 1 ] ; then
        kdialog --passivepopup "Enabled psmouse module." --title "$scriptname" 5
  fi
fi

exit

I'm sure using this laptop will be slightly less aggrivating moving forward but thanks again everyone for your input and suggestions.


All times are GMT -5. The time now is 03:55 AM.