Just Cause 3

Just Cause 3

Not enough ratings
Fixing Mouse Stuttering on Linux
By 🌸 幻 | Valinypse
This guide aims to help those who suffer from an annoying stutter on Just Cause 3 when they're moving the camera, despite having high framerate. The steps named here worked for me on Pop!_OS 22.04 (at the moment of writing this) which is based on Ubuntu, so it might be different for you on Windows or another distro.
   
Award
Favorite
Favorited
Unfavorite
Installing Gamemode Utility
The gamemode utility may help you to improve performance and fix the stutter caused by your mouse, it appears to be enough for some people, but generally you'll need to do both running the game on gamemode and changing the Polling Rate on your mouse.

But for now let's focus on how to install Gamemode. Notice that I'm running on Pop!_OS 22.04, based on Ubuntu, so here's the tips that helped me but depending on your distro you'll probably need to do something different.

Open your terminal and use this command:

sudo apt install gamemode

The gamemode package ships with a utility command that can be used to simulate the effects of various tweaks applied by the main gamemode command. This command can be used to verify if gamemode has been installed successfully in your Linux system and if it is working as intended. To simulate gamemode, run the following command:

gamemode-simulate-game

If the gamemode is working correctly in your Linux PC, this command will exit without producing any output or without throwing any error after running for around 10 seconds.



In case of any issue, the simulation command will throw an error message in the terminal and you can use it to identify / debug the problem.

You can use the following command to run Linux games with gamemode optimizations.

"game_command or path_to_game_executable"

Replace the text in quotes with either game command or with the full path to the game executable binary.

And the following command is for Wine games.

gamemoderun wine "exe_file or path_to_game_executable"

I think you might need to do something else, but this is Steam and we're working with Just Cause 3 so all you have to do is go to your Library, Just Cause 3, Properties, General and set the following command as your Launch Options.

gamemoderun %command%


Now you're playing Just Cause 3 on gamemode, but if this does not work for you and you still have that stutter when moving your mouse, the next step will have it probably fixed.
Polling Rate
As I covered on my guide on how to run Just Cause 2 on Linux <link here>[linuxhint.com], the Polling Rate alludes to how frequently your mouse sensor refreshes its position each second. For instance, on the off chance that you have your mouse set to 125Hz Polling Rate, your mouse will refresh its position 125 times each second.

Correct me if I'm wrong, but Just Cause 3 uses an updated version of the same Avalanche Engine 2.0 from Just Cause 2 and this is why both games share this same problem.

Just Cause 3 suffers from this when you have a Polling Rate superior to 250 (or 500 according to some people), so you can use a tool called Piper to change this or you can use these following tips.

Type this on console.

sudo gedit /etc/modules

After every text with an # you need to add this.

-r usbhid usbhid mousepoll=x

But change "x" with one of the following values.

1 = 1000Hz
2 = 500Hz
4 = 250Hz
8 = 125Hz
10 = 100Hz (Default)

In my case I want to have my mouse on 250Hz, so I change "x" with "4" and it looks like this.



Now save, close and reboot. You can test your current Polling Rate with this command, again changing the "x" with the number you used.

cat /sys/module/usbhid/parameters/mousepoll x

In my case it looks like this.

cat /sys/module/usbhid/parameters/mousepoll 4

If it answers you with the same number that you're using, it worked. If it answers with "0" everytime you try, even if you followed above steps correctly, it probably means that your Polling Rate can't be change due to hardware limitations.

If nothing here helped, try searching for software related to your mouse.
Extra step and conclusion
If that did not worked for you, I suggest you to read this Discussion thread from the user t0o0m, it might help you.

Originally posted by t0o0m:
I am playing JC3 on Linux, and also experienced horrible stutter produced by mouse movement. As I saw on other threads, Windows players fixed this kind of jitter by bumping process affinity to a higher value. In Linux however I can confirm that it is also fixed entirely by lowering cpu priority on the JustCause3.exe Proton process.

(On Linux, process affinity is called niceness). Look it up.) A quick way to change niceness while you run the game is, e.g. using the htop tool:
filter the JustCause3 process in the list by pressing F4 and typing JustCause3
then selecting it in the list (it will high on CPU usage) and
pressing F8 once.
This will have added one to the JC process' niceness. Higher niceness means the process lets other processes use CPU time first (hence the name, it's "playing nice").

I hope this guide was helpful for you! And have a nice day.
1 Comments
TheBackyardGamer 2 Dec, 2022 @ 11:58am 
Simpler solution move to windows :D (this is a joke)