Results 1 to 8 of 8

Thread: Disable Mouse Acceleration Permanently

  1. #1
    Join Date
    Apr 2011
    Beans
    2

    Disable Mouse Acceleration Permanently

    Ok, so this is driving me insane now...

    I use this to set my mouse acceleration off:
    Code:
    xinput set-prop 14 273 -1
    It works but... I have to do this after every boot cuz it doesn't save any of my settings.

    I tried to edit /etc/init.d/rc.local and /etc/rc.local and I added those scripts there but nothing happened after reboot. Also, everytime I reboot my mouse changes its ID so it was first 13 then 15, then 14, etc.......

    I read ArchLinux guide on how to edit xorg.conf but I just can't figure it out. I just started with Linux :S
    Last edited by mithril; April 20th, 2011 at 01:00 PM.

  2. #2

    Re: Disable Mouse Acceleration Permanently

    I also want to know this, I have x set m 0 0 on my startup list but don't know if it's correct.

    If you google ubuntu mouse acceleration disable, there is a site that tells you to change something in the mouse device list, I haven't tried it though- http://www.linuxlog.org/?p=107

  3. #3
    Join Date
    Jul 2006
    Location
    London, UK
    Beans
    818
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disable Mouse Acceleration Permanently

    I tried to edit /etc/init.d/rc.local and /etc/rc.local and I added those scripts there but nothing happened
    It won't, because your command needs to be run as the user yourself, once X is running, and those scripts are run as root, without X

    What you need to do is put your command in a file called nomouseacc
    Make it look line this
    Code:
    #!/bin/bash
    #wait for the desktop to settle
    sleep 5
    # turn off mouse acceleration
    xinput set-prop 14 273 -1
    Make the file executable with chmod +x nomouseacc
    Then add it to System Preferences Startup applications.

    It will be run every time you login.

  4. #4
    Join Date
    Apr 2011
    Beans
    2

    Re: Disable Mouse Acceleration Permanently

    Thanks I got it fixed! =)

    First I realized it's possible to refer to a device as 'pointer: Device Name' so it doesn't matter if it changes ID. (I also had two devices: a pointer and a keyboard, with the same exact name)

    So that's how you create Batch-files for linux! I had tried same thing but without #!/bin/bash and also without chmod +x

    Thank you both.

  5. #5
    Join Date
    Apr 2009
    Location
    South Jersey
    Beans
    29
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Disable Mouse Acceleration Permanently

    Quote Originally Posted by tredegar View Post
    It won't, because your command needs to be run as the user yourself, once X is running, and those scripts are run as root, without X

    What you need to do is put your command in a file called nomouseacc
    Make it look line this
    Code:
    #!/bin/bash
    #wait for the desktop to settle
    sleep 5
    # turn off mouse acceleration
    xinput set-prop 14 273 -1
    Make the file executable with chmod +x nomouseacc
    Then add it to System Preferences Startup applications.

    It will be run every time you login.
    How do you make a command file with these instructions?

  6. #6
    Join Date
    Apr 2011
    Beans
    4

    Re: Disable Mouse Acceleration Permanently

    hi,

    firstly thanks for the info provided here, secondly i have further refined the script ..

    i found that even the numerical value for a device driver property can and does change.. BUT they can be reffered to by name

    so currently i use the following script:

    #!/bin/bash
    #wait for the desktop to settle
    sleep 5
    # turn off mouse acceleration
    xinput set-prop 'Razer DeathAdder' 'Evdev Middle Button Emulation' 0
    xinput set-prop 'Razer DeathAdder' 'Device Accel Profile' -1
    xinput set-prop 'Razer DeathAdder' 'Device Accel Velocity Scaling' 1
    this works regardless of device id changing or property id changing

    as for how to create script, thought i guess you know by now, create a new file, insert the above script, save it, allow it to be executed as a program, chmod in terminal or right click>properties on it, then add it to list of start-up programs.

  7. #7
    Join Date
    Apr 2011
    Beans
    4

    Re: Disable Mouse Acceleration Permanently

    oh yeah, sorry, this really should be mentioned for completion:

    use
    xinput -h
    in terminal for a list of xinput commands

    we want:
    xinput list
    which will display input devices with their device ID in brackets

    and then
    xinput list-props #
    where # is the device name or device ID. this lists configurable device settings and their numerical ID in (brackets)

    then use:
    xinput set-prop deviceID settingID value
    replacing deviceID and settingID with their corresponding numerical values, and value with the new value you wish to set for the variable. (ie. -1 for AccelProfile)

    you can then test this has worked by repeating:
    xinput list-props deviceID

    when you add it to the script, refine it to refer to your device by name and the setting by name so when their values change your script still works (replace numerical value with precise device/setting name, as displayed using xinput list and xinput list-props)

    check in terminal whether you can apply the desired change using
    xinput set-prop 'device NAME' 'setting NAME' value

    then when it works, create a script out of it as shown in this thread
    Last edited by moki12; June 29th, 2011 at 09:04 PM.

  8. #8
    Join Date
    May 2007
    Beans
    25
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disable Mouse Acceleration Permanently

    Thanks for the help everyone!

    I had to modify the script slightly to do what I wanted which was to slow down the mouse permanently (not sure I disabled all acceleration).

    In addition to the fact that both device IDs and property IDs change, since I have a Logitech M505 which uses their new unified receiver, the pointer entry and the keyboard entry will share the same name in xinput --list.

    This is solved by stating the device name with a prefix, as in pointer:devicename or keyboard:devicename


    Code:
    #!/bin/bash
    #wait for the desktop to settle
    sleep 5
    # adjust mouse acceleration
    xinput set-prop 'pointer:Logitech USB Receiver' 'Device Accel Constant Deceleration' 2.5
    xinput set-prop 'pointer:Logitech USB Receiver' 'Device Accel Adaptive Deceleration' 15
    xinput set-prop 'pointer:Logitech USB Receiver' 'Device Accel Velocity Scaling' 9
    EDIT: Well the effect vanishes upon suspend/sleep -> wake - the script should probably go somewhere else than startup scripts...
    Last edited by canakas; October 23rd, 2011 at 11:57 AM. Reason: more info

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •