V-sync in minecraft

Hey! So, im playing minecraft 1.8.9 with optifine, and my max fps is 60 (only in manjaro, at ubuntu it get high) i think it is a v-sync, but all mc configs that envolve v-sync on is off.
before i go to manjaro in mc 1.8.9 it get more than 60 fps, i think it is from manjaro xfce.

Hello :slightly_smiling_face:!
Minecraft versions < 1.13.0 don’t disable the Desktop environment’s compostior, which may limit your FPS to the monitor’s refresh rate. I don’t know about xfce, but this problem frequently annoys me in KDE Plasma.
The solution is to manually toggle your compositor off before starting minecraft, here’s the archwiki article that states how to toggle the XFCE compositor:
According to it, you can just run the command xfwm4-tweaks-settings, then a window allowing you to turn off the compositor should appear. Don’t forget to turn it back on when you’re back at the desktop or you might get screen tearing, ect…

1 Like

oh nice!
can i do it automatically with a script or from the launcher itself?

Sure, you can make a script, e.g. called “minecraft.sh”, and past the following code into it:

xfconf-query -c xfwm4 -p /general/use_compositing -s false
xfconf-query -c xfwm4 -p /general/use_compositing -s true

This script will essentially turn off XFCE’s compositor, run the minecraft launcher, and automatically re-enable XFCE’s compositor after both the minecraft launcher and minecraft itself are closed.
If you whish to improve performance even further, install gamemode and use the following code to run minecraft with gamemode:

xfconf-query -c xfwm4 -p /general/use_compositing -s false
gamemoderun minecraft-launcher
xfconf-query -c xfwm4 -p /general/use_compositing -s true

If you haven’t got gamemode installed yet, you may install it with this command:

sudo pacman -Syu gamemode lib32-gamemode

Make sure to make you script file executable, and in case it cannot be executed by double clicking you may need to run the following command:

xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true

That will however make executing the default action for double-clicking shell scripts, so be careful when you download other scripts from the web!

1 Like

it technically worked, my fps now is better but it continue in 60 (thats not so much problem if it stay at like 55-60 fps)
thank you!

1 Like

Hey! i was navigating in my mc, and i see snooper settings, i open, and, i see a value
“fps 60”
i think it is the limit, so, has a way to i change it?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.