From ca337f3171c81213f57ff1ad6ea9b4ab0ebffabc Mon Sep 17 00:00:00 2001 From: noxy Date: Sun, 24 Oct 2021 10:18:09 +0200 Subject: [PATCH] adding iw4x mouse fix and updating readme --- README.md | 1 + iw4x-linux | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 iw4x-linux diff --git a/README.md b/README.md index e69de29..fb0e95f 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +# All of my important snippets in one place, in case they might help me or someone else one day! \ No newline at end of file diff --git a/iw4x-linux b/iw4x-linux new file mode 100644 index 0000000..d5aaed6 --- /dev/null +++ b/iw4x-linux @@ -0,0 +1,29 @@ +# 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. + + +## 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 +``` +