csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

[Gnu/Linux] Mouse Acceleration

Open ChrisLuck opened this issue 12 years ago • 21 comments

This thread is NOT about mousespeed. (There is already another one for this)

I deactivated mouse accel using ("xset m 0 0") and i can confirm by testing that it is really deactivated in my window-manager. It is also deactivated in the CS:GO menu, but ingame there is a very noticeable amount of mouseaccel. And of course i made sure that m_customaccel is set to 0. I also experimented with rawinput but it didnt help either.

You can test if you have active mouse acceleration by using the method described in this movie: http://www.youtube.com/watch?v=Al-sz0Hcbrs In order to be a bit more accurate i used a ruler on my mousepad instead of my finger ;) But you really dont need to be that accurate, as the amount of acceleration is quite big.

System Information:

Processor Information: Vendor: AuthenticAMD CPU Family: 0x15 CPU Model: 0x2 CPU Stepping: 0x0 CPU Type: 0x0 Speed: 3500 Mhz 8 logical processors 8 physical processors HyperThreading: Unsupported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported

Network Information: Network Speed:

Operating System Version: Ubuntu 14.04 LTS (64 bit) Kernel Name: Linux Kernel Version: 3.13.0-30-generic X Server Vendor: The X.Org Foundation X Server Release: 11501000 X Window Manager: i3 Steam Runtime Version: steam-runtime-release_2014-08-20

Video Card: Driver: ATI Technologies Inc. AMD Radeon R9 200 Series

Driver Version:  4.4.13084 Compatibility Profile Context 14.301.1001
OpenGL Version: 4.4
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 119 Hz
VendorID:  0x1002
DeviceID:  0x67b1
Number of Monitors:  1
Number of Logical Video Cards:  1
Primary Display Resolution:  1920 x 1080
Desktop Resolution: 1920 x 1080
Primary Display Size: 20,04" x 11,26"  (22,95" diag)
                                        50,9cm x 28,6cm  (58,3cm diag)
Primary VRAM Not Detected

Sound card: Audio device: AV200

Memory: RAM: 7945 Mb

Miscellaneous: UI Language: English LANG: en_US.UTF-8 Microphone: Not set Total Hard Disk Space Available: 136171 Mb Largest Free Hard Disk Block: 104538 Mb

Installed software:

Recent Failure Reports:

ChrisLuck avatar Oct 18 '14 13:10 ChrisLuck

Source from here. https://wiki.archlinux.org/index.php/Mouse_acceleration#Disabling_mouse_acceleration

Mouse acceleration has changed dramatically in recent X server versions; using xset to disable acceleration doesn't work as it used to and is not recommended anymore.

shoober420 avatar Oct 18 '14 17:10 shoober420

Thanks for this link, thats where i got my information about mouseacceleration, too. I already tried every method (xinput, xset and the configuration file).

Indeed, whatever i set in xset, my acceleration is always deactivated on desktop and the method using xinput doesnt work for me because "xinput listprops 8" doestn give me any acceleration related props.

None of the three methods mentioned on archlinux.org solves the problem: Desktop: Mouseacceleration deactivated CSGO-Menu: Mouseacceleration deactivated CSGO-Ingame: Mouseacceleration clearly ACTIVATED

Thats why i think that the problem is csgo itself and not my configuration...

ChrisLuck avatar Oct 19 '14 11:10 ChrisLuck

Hello,

I confirm your observations concerning mouse accel. in linux CSGO.

There is certainly a form of mouse accel which is connected to the game itself.

Other games (e. g. Half-Life 1) do not show this acceleration.


Device Accel Profile (274): -1 Device Accel Constant Deceleration (275): 1.000000 Device Accel Adaptive Deceleration (276): 1.000000 Device Accel Velocity Scaling (277): 2.000000 # using 500 Hz Debian Jessie, Xorg 1.16.1, Mesa 10.2.8 (ATI)

RM0cRu avatar Oct 20 '14 18:10 RM0cRu

I would like to piggyback on this thread as I'm experiencing sensitivity/acceleration issues within CSGO on Ubuntu. I've added the file that disables acceleration and it does indeed disable it in the operating system. The sensitivity slider does not do anything when the file is in place, however, in the game that's not the case. The sensitivity within the game is maybe 3 or 4 times greater than in windows. When doing the typical mouse acceleration tests, the pointer does not end up where it began (but quite close).

Update: I was wrong, there's no acceleration when setting up the 50-mouse-acceleration file. However, the fact that the sensitivty does not match the one in windows worries me. It makes it difficult to switch from one to the other effortlessly. In Windows my sens is 0.63 and in Linux it is 0.31. So roughly/exactly half of what windows is.

clyqme avatar Oct 20 '14 23:10 clyqme

ChrisLuck I already tried every method (xinput, xset and the configuration file).

Are you sure you used the "50-mouse-accleration.conf" file method? That should completely disable mouse acceleration everywhere. Did you put the conf file in the "/etc/X11/xorg.conf.d" directory? Did you also disable mouse acceleration in the game options?

clyqme In Windows my sens is 0.63 and in Linux it is 0.31. So roughly/exactly half of what windows is.

I noticed this too. I figured it was because Linux mouse sensitivity is different then Windows. In Windows, I play 3.6 sensitivity. On Linux, I have to drop it down to 2.1 for it to feel the same. I even took out a ruler to measure the distance my mouse moves so its as close as possible to Windows.

shoober420 avatar Oct 21 '14 20:10 shoober420

I am using the 50-mouse-acceleration file and it doesnt help. There still is mouse acceleration ingame.

chris@chris-PC:/etc/X11/xorg.conf.d$ cat 50-mouse-acceleration.conf Section "InputClass" Identifier "My Mouse" MatchIsPointer "yes" Option "AccelerationProfile" "-1" Option "AccelerationScheme" "none" EndSection chris@chris-PC:/etc/X11/xorg.conf.d$

ChrisLuck avatar Oct 26 '14 18:10 ChrisLuck

change identifier from my mouse to what it is called in the xinput list :D

gedu17 avatar Nov 23 '14 19:11 gedu17

Hmm, talking about mouse acceleration... I don't really know how maccel "feels" in CS because on Windows I played without it, and, on Linux, after in-game maccel disabling and sens setup, I don't really some significant difference with Windows version, BUT: when I move my mouse VERY quickly (for example, trying to spin myself 180 degrees as fast as I can), I can see some kind of acceleration: it feels like mouse moves not so fast, as I want, and after I stop my hand it still moves for some small time (like 0.1 s).

I've tried @shoober420 's way from archwiki, creating that file and changing Identifier to "Mouse0" inside it, but looks like it didn't help.

Can anyone comment something to this? Because:

  1. I'm not sure if that "behavior" when I move my mouse very fast is caused by xorg maccel settings.
  2. If answer to 1) is YES, has anyone else disabled maccel and that behavior, by @shoober420 's way or by any other way?

Sorry for my English :)

lexandrop avatar Nov 24 '14 19:11 lexandrop

libsdl doesn't actually care about your X settings for mouse (imho), so setting raw input should work just fine (e.g. it reads mouse events directly not via X input layer).

I remember some people posting console settings for this on reddit, maybe worth a try.

edit: actually, it seems that if X11 video driver is enabled, csgo really uses X for acceleration. According to wiki this behavior can be changed via ENVVAR:

    SDL_VIDEO_X11_MOUSEACCEL
    For X11, sets the mouse acceleration. The value should be a string on the form:
    "n/d/t"
    where n and d are the acceleration numerator/denumerators (so mouse movement is accelerated by n/d), and t is the threshold above which acceleration applies (counted as number of pixels the mouse moves at once).

to change this ingame, you need to edit your csgo.sh script and add this line to top:

export SDL_VIDEO_X11_MOUSEACCEL="1/1/0"

edit2: ofcourse disabling acceleration in X should help too (if that's what you want).

tpruzina avatar Nov 24 '14 21:11 tpruzina

@kankanas I finally tried to modify the identifier like you suggested. Unfortunately this didnt change a thing :( Here is what i did:

chris@chris-PC:/etc/X11/xorg.conf.d$ xinput
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Kingsis Peripherals ZOWIE Gaming mouse    id=8    [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)]
    ↳ RAPTOR-GAMING RAPTOR-USB-Keyboard           id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=10   [slave  keyboard (3)]
chris@chris-PC:/etc/X11/xorg.conf.d$ cat 50-mouse-acceleration.conf 
Section "InputClass"
    Identifier "Kingsis Peripherals ZOWIE Gaming mouse"
    MatchIsPointer "yes"
    Option "AccelerationProfile" "-1"
    Option "AccelerationScheme" "none"
EndSection

I also tried @tpruzina method with no success. The first problem is that i cant start the game using csgo.sh so i set the environment variable and started steam from the same terminal but this didnt help.

One strange thing i noticed is, that i have no acceleration-props in xinput for my mouse (like Device Accel Profile for example). They are all missing. The mouse is a "Zowie FK1", by the way.

chris@chris-PC:/etc/X11/xorg.conf.d$ xinput --list-props 8
Device 'Kingsis Peripherals ZOWIE Gaming mouse':
    Device Enabled (143):   1
    Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Product ID (262):    6899, 1
    Device Node (263):  "/dev/input/event9"
    Evdev Axis Inversion (274): 0, 0
    Evdev Axes Swap (276):  0
    Axis Labels (277):  "Rel X" (153), "Rel Y" (154), "Rel Vert Wheel" (269)
    Button Labels (278):    "Button Left" (146), "Button Middle" (147), "Button Right" (148), "Button Wheel Up" (149), "Button Wheel Down" (150), "Button Horiz Wheel Left" (151), "Button Horiz Wheel Right" (152), "Button Side" (266), "Button Extra" (267), "Button Forward" (268), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265)
    Evdev Middle Button Emulation (279):    0
    Evdev Middle Button Timeout (280):  50
    Evdev Third Button Emulation (281): 0
    Evdev Third Button Emulation Timeout (282): 1000
    Evdev Third Button Emulation Button (283):  3
    Evdev Third Button Emulation Threshold (284):   20
    Evdev Wheel Emulation (285):    0
    Evdev Wheel Emulation Axes (286):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (287):    10
    Evdev Wheel Emulation Timeout (288):    200
    Evdev Wheel Emulation Button (289): 4
    Evdev Drag Lock Buttons (290):  0

ChrisLuck avatar Nov 30 '14 12:11 ChrisLuck

@ChrisLuck You don't need to start it manually, steam executes csgo.sh itself. I actually have xorg acceleration and that environment var turns it off for me (ingame only). Not sure why it's not working for you, but it yields very noticeable difference on my machine.

Please provide output of /var/log/Xorg.0.log so we can verify that your mice is matched correctly to your noaccell config (it should be, but if it really is, xorg log should show that).

tpruzina avatar Dec 03 '14 18:12 tpruzina

okay, I put this line in csgo.sh (first line after comment)

export SDL_VIDEO_X11_MOUSEACCEL="1/1/0"

I also have the 50-mouse-acceleration.conf file mentioned earlier in place

Section "InputClass"
    Identifier "Kingsis Peripherals ZOWIE Gaming mouse"
    MatchIsPointer "yes"
    Option "AccelerationProfile" "-1"
    Option "AccelerationScheme" "none"
EndSection

This is what i get in /var/log/Xorg.0.log when i connect my mouse

[  3408.118] (II) config/udev: Adding input device Kingsis Peripherals ZOWIE Gaming mouse (/dev/input/mouse0)
[  3408.118] (**) Kingsis Peripherals ZOWIE Gaming mouse: Applying InputClass "Kingsis Peripherals ZOWIE Gaming mouse"
[  3408.118] (II) No input driver specified, ignoring this device.
[  3408.118] (II) This device may have been added with another device file.
[  3408.119] (II) config/udev: Adding input device Kingsis Peripherals ZOWIE Gaming mouse (/dev/input/event9)
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: Applying InputClass "evdev pointer catchall"
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: Applying InputClass "Kingsis Peripherals ZOWIE Gaming mouse"
[  3408.119] (II) Using input driver 'evdev' for 'Kingsis Peripherals ZOWIE Gaming mouse'
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: always reports core events
[  3408.119] (**) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Device: "/dev/input/event9"
[  3408.119] (--) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Vendor 0x1af3 Product 0x1
[  3408.119] (--) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Found 10 mouse buttons
[  3408.119] (--) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Found scroll wheel(s)
[  3408.119] (--) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Found relative axes
[  3408.119] (--) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Found x and y relative axes
[  3408.119] (II) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Configuring as mouse
[  3408.119] (II) evdev: Kingsis Peripherals ZOWIE Gaming mouse: Adding scrollwheel support
[  3408.119] (**) evdev: Kingsis Peripherals ZOWIE Gaming mouse: YAxisMapping: buttons 4 and 5
[  3408.119] (**) evdev: Kingsis Peripherals ZOWIE Gaming mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[  3408.119] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/input/input14/event9"
[  3408.119] (II) XINPUT: Adding extended input device "Kingsis Peripherals ZOWIE Gaming mouse" (type: MOUSE, id 8)
[  3408.119] (II) evdev: Kingsis Peripherals ZOWIE Gaming mouse: initialized for relative axes.
[  3408.119] (**) Option "AccelerationScheme" "none"
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: (accel) selected scheme none/0
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: (accel) acceleration factor: 2.000
[  3408.119] (**) Kingsis Peripherals ZOWIE Gaming mouse: (accel) acceleration threshold: 4

Result: The same as always, no acceleration on desktop and game menu, but a lot of acceleration in game :(

and yes, i have turned it off in settings and also in console with m_customaccel 0

I should try to reinstall everything since it seems like i am the only one with this problem....

ChrisLuck avatar Dec 13 '14 22:12 ChrisLuck

I've recently enountered a similar problem with mouse acceleration / sensitity at low speed on Arch Linux which I dont experience in Ubuntu 15.04 on the same hardware.

Turns out libinput is still in development and doesn't support disabling acceleration yet which is probably why adding the Xorg config didnt resolve the issue.

The solution is to sudo pacman -R libinput xf86-input-libinput and restart X

X will then use xf86-input-evdev which supports disabling mouse acceleration.

I dont think this is an issue with CSGO.

Fixles avatar May 22 '15 21:05 Fixles

@Fixles

That is one way, another is modifying your section input class in xorg config to contain: Driver "evdev"

Or disabling libinput entirely in modules section.

tpruzina avatar May 22 '15 22:05 tpruzina

Just made a new thread but I found this so I'll post it here as well.

I have the same problem exactly. Can't get rid of this positive acceleration ingame. It's turned off through xinput, I'm not using libinput, theres no accel on my desktop or anywhere else (including other games), but in CSGO I have a significant amount of positive acceleration regardless of any ingame settings. I've also tried all suggestions from this thread.

petejones7 avatar Sep 22 '15 00:09 petejones7

Keeping open for informational purposes.

Tele42 avatar Jun 24 '16 16:06 Tele42

Libinput 1.1.0 added a "flat" acceleration profile (whose usage should be documented here).

Does this solve the issue?

mirh avatar Mar 22 '17 22:03 mirh

@mirh: yes, either of these works just fine:

Evdev version

Section "InputClass"
	Identifier "mouse-generic"
	Driver "evdev"
	MatchIsPointer "yes"
	Option "AccelerationProfile" "-1"
	Option "AccelerationScheme" "none"
EndSection

Libinput version

Section "InputClass"
	Identifier "mouse-generic"
	Driver "libinput"
	MatchIsPointer "yes"
	Option "AccelProfile" "flat"
EndSection

tpruzina avatar Mar 23 '17 18:03 tpruzina

GNOME manages mouse acceleration by itself. So not only the Xorg settings should be adjusted, but also the Gnome ones.

$ gsettings set org.gnome.desktop.peripherals.mouse accel-profile flat
$ gsettings set org.gnome.desktop.peripherals.mouse speed 0

And you can enjoy CS:GO now :-)

ghost avatar Dec 27 '18 16:12 ghost

Hello, Since yesterday, the problem occurred again. The sensitivity changed dramatically and as mentioned in this comment, I have no acceleration in my desktop on the game menu but I have acceleration in game...

I tried everything but I have the mouse acceleration only in game and that since yesterday.

Judibet avatar May 13 '20 10:05 Judibet