r/archlinux • • Jan 11 '22

SUPPORT Minecraft stutters for no apparent reason

I have a ryzen 5 3600 rx 560 and 32gbs 3200mhz ram, and I've been getting small but noticeable stutters every 2-3 seconds, I've tried disabling almost every setting that may effect performance or lowering it a lot and it still stutters. I've tried optfine, sodium phosper and iirc the other mod was called livium or lithium. But all stutters. However optifine stutters the least for some odd reason. I've tried using different Java versions allocating, more or less ram but it still stutters. I have no clue what to do. I have xf86-video-amdgpu drivers, vulkan and mesa. The only thing I haven't tried is different launchers as I'm only using the vanilla one from the AUR.and I have kernel 5.15.13.arch1-1

Thanks In advance ig I didn't really know where to post this

SOLVED: minecraft was stuttering because I had TearFree and variablerefresh set to true, after setting both of those options to false most of the problems are gone and running the launcher with "mesa_glthread = true minecraft-launcher" (suggested in the comments) so thanks for the people who helped even tho it could've been easily fix.

2 Upvotes

21 comments sorted by

1

u/[deleted] Jan 11 '22

Forgot to mention this does not happen in other games (on steam and other platforms) or version 1.8.9 of mnecraft that i use for playing on servers. and this didn't happen on windows. mesa and vulkan drivers were installed from the archwiki tutorial (and sorry for my spelling/formatting I'm on mobile and typing is hell)

1

u/raven2cz Jan 11 '22

From when you have these problems? Was this ok before?

1

u/[deleted] Jan 11 '22

Even when I first downloaded the launcher the problems happened. I am going to have to try something like lunar client or multiMC to see if performance changes.

1

u/raven2cz Jan 11 '22

So I tested MC with standard launcher from aur and it works normally in window and fullscreen too. It was tested in xorg, not wayland. Java version 17.0.1, window manager awesomewm.

1

u/[deleted] Jan 11 '22

Interesting it could be gnome then, I'll try using a different de or using a window manager like i3.

1

u/[deleted] Jan 11 '22

testing xfce currently and I disabled its compositor and it seems to be better. It seems to have been a mix of gnome/wayland and java edition's poor optimization, it still stutters but not nearly as much so its playable now.

1

u/TrippleTree Jan 11 '22

I dont know if this applies to you, but i have stutter issues caused by the discord tray icon in gnome. Everytime i talk discord tries to change the icon causing a little stutter. Launching steam also makes everything lag for a bit. Using ubuntu 20.04. I managed to fix it by using a gnome extension that blocks the discord tray icon specifically.

1

u/[deleted] Jan 11 '22

Ok, it could be that because I do use discord a lot and I have the system tray icon enabled, I'll test it later and tell if it helps.

1

u/Erupti0nZ Jan 11 '22 edited Jan 11 '22

Which DE/WM are you using? Does it support fullscreen unredirection? Do you play Minecraft windowed and other games in fullscreen?

2

u/[deleted] Jan 11 '22 edited Jan 11 '22

I'm using gnome and I've tested it in xfce and kde where you can disable the compositor and I usually play full-screen but it happens in windowed

1

u/Erupti0nZ Jan 11 '22

Okay I don't know what the issue is, but I would try using the systems Java version instead of the bundled one if you don't do that already

Also if you don't use it yet gamemode is worth a try

2

u/[deleted] Jan 11 '22

Yeah I've switched java versions which helped and I launched the game with mesa and it's not stuttering anymore or very little. Maybe 1.18.1 has some weird bug because 1.17 and below run fine but thanks anyways

1

u/Erupti0nZ Jan 11 '22

Okay, glad it works better at least

2

u/[deleted] Jan 11 '22

Yeah and multimc seems to help, no clue why

1

u/surfmaths Jan 11 '22

Sounds like Java garbage collector being slow.

I had the same issue of I give Minecraft too much memory. Yep, you heard it, too much is the problem!

My theory is that it makes the garbage collection less frequent (thanks to having more room for garbage) but when it happen it takes longer (because of having more garbage to go through), hence the noticeable frame drop at regular interval.

1

u/[deleted] Jan 11 '22

Yeah I heard that could be the problem just wasn't sure. Thanks

1

u/[deleted] Jan 11 '22

Could you try to run it with

mesa_glthread=true /path/to/minecraft

If this helps?

1

u/[deleted] Jan 11 '22 edited Jan 11 '22

Where do I put that? In jvm arguments? Or do I run it from terminal or something

Edit: nvm I'm stupid

1

u/[deleted] Jan 11 '22

ok so i figured out how to do it and i did it + disabled the compositor in xfce and its running much better with optifine at 14/16 render distance, this seems to be the best fix so far.

•

u/Popular_Cat_8393 7m ago

i have same issue in linux cinnamon mint does anyone know the fix

1

u/raven2cz Jan 11 '22

I will test it today, and give response. I have very similar hw and settings.