# How to fix iw4x: Modern Warfare 2 mouse sensitivity bug when playing on Linux! If your mouse feels weird, spins and doing other weird stuff (high sensitivity etc) you could try the following, it worked for my setup and I tried it with two different mice. The mice I tried were `Razer Naga Hex v2 Trinity` and `Logitech G502 Hero` with both mice I was able to eliminate the weird mouse behaviour. I wrote two bash scripts, these scripts are being called when I start the game and after I quit the game, made possible by launching iw4x through Lutris. ## Find your device ID `xinput --list` In my case it's `8` and looks like this: `⎜ ↳ Logitech G502 HERO Gaming Mouse id=8 [slave pointer (2)]` yours can of course be different you gotta try out a bit. ## Starting the game `disable_accel.bash` (This will disable the mouse acceleration via xinput - ratbagctl is a Logitech mouse only thing, with the ratbag command I just set the perfect dpi for myself) ``` #!/usr/bin/env bash xinput --set-prop 8 'libinput Accel Profile Enabled' 0, 1 ratbagctl Logi dpi set 1600 ``` ## After game is stopped `enable_accel.bash` (This is going to re-enable mouse acceleration via xinput and reverts my default desktop use settings for dpi) ``` #!/usr/bin/env bash xinput --set-prop 8 'libinput Accel Profile Enabled' 1, 0 ratbagctl Logi dpi set 2400 ``` ## Adding to Lutris If you have installed iw4x via Lutris, right click the game icon in Lutris, head over to Configure -> System options and add `disable_accel.bash` in the Pre-launch script section and `enable_accel.bash` in the Post-exit script section