Minecraft is arguably one of the most popular, truly-cross-platform games out there, so it’s common for Linux users to own a copy of the game. While it usually runs well on most systems, it does still suffer from performance issues from time to time. Since Java, the language that Minecraft is written in, offers cross-platform capability at the cost of good performance, you may not achieve a perfectly lag-free experience (unless you have powerful hardware to support it). However, there are some steps that you can take that can make every little bit of difference.
Grab The Latest JRE
Since Minecraft is written in Java, it’s important that you run the latest version of the Java Runtime Environment (JRE). The JRE is what is needed to turn the Java code into machine code that your computer can actually understand, and there are different versions of the JRE for different operating systems so that the Minecraft developers only need to write the code once and have the different JREs generate the appropriate machine code. You can get the JRE from the official Java website, or you can follow this guide if you run Ubuntu or a derivative. Other distributions should have luck following this guide instead.
Latest Graphics Drivers (and Kernel)
Of course, as with any other game, it’s also important that you ensure that you’re running the latest graphics drivers available for your graphics card. You can easily grab the proprietary drivers from AMD and NVIDIA respectively, which I recommend using over the open source drivers if you want to improve performance. Alternatively, you can also look at distro repos for the drivers . If you use Intel or still opt to use the open source AMD and NVIDIA drivers, then make sure that you’re running the latest version of those. If you use Ubuntu or a derivative, it’s easy to do so with the Oibaf and X-Edgers PPA repositories .
While you’re at it, try looking at running the latest kernel version as well if you aren’t already. Ubuntu users can easily grab the latest version from the Ubuntu Mainline Kernel repository. However, I only recommend upgrading the kernel if you’re using Intel or open source drivers. The proprietary drivers from AMD and NVIDIA tend to take a while to add support for new kernels, so it’s better to just stick with the one you’re currently on (or whichever ones your distribution will update you to automatically).
The OptiFine mod is an addon that you can install onto Minecraft which will make various changes to the stock game. Mods for Minecraft can add functionality to the game as well as rework existing functionality, and OptiFine can do both. To get the performance benefits, you’ll want to grab OptiFine Light, but if you want the HD textures (which, be warned, may cause performance to suffer again), then you can grab OptiFine Ultra. The developers of the mod also recommend that you use Magic Launcher to help you with the installation of OptiFine.
Minecraft makes use of the LWJGL, or Light-Weight Java Game Library, in order to create graphics. This library gets updated on a regular basis, but Minecraft sometimes takes a while before a newer version of the library is bundled with Minecraft. Grabbing the newest version yourself can give you performance benefits, and it’s sometimes even necessary if you encounter a black window when you launch the game. To update the library manually, visit this page and download the first .zip file. Then, go into your Home folder, enable view of hidden folders with Ctrl + H, and then go into the .minecraft folder. In here, you’ll want to extract into the /bin folder:
And these files should be extracted into the /bin/natives folder:
Explicit Memory Parameters
Java also allows Java applications and games to send some command line parameters when launching the application which may make a difference in the application’s performance. For Minecraft, it’s recommended that you create a simple text file, save it as Minecraft.sh and place it in the same folder as the Minecraft.jar launcher, and then enter this into the file:
java -Dsun.java3d.opengl=true -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame
This will force the game to use OpenGL (in case it isn’t already) and explicitly allows the game to use more memory than it would otherwise do by default. With more memory readily accessible to the game, it can arguably run faster as more resources will already be loaded and ready to go. Once the file is saved, right click on it, choose Properties, and then mark it as executable. Now you can just double click on Minecraft.sh instead of Minecraft.jar to include these parameters when launching the game.
Force CPU Into “Performance” Mode
Although the difference will most likely be minimal, you can also change the CPU frequency scaling governor to “performance”. Most likely, your current governor will scale down the frequency of your CPU whenever it isn’t actively used so that it saves power, but it also takes time (albeit not much) to scale it back up when stuff needs to be done. Setting the governor to “performance” forces the CPU to run at maximum frequency the entire time, so you’ll have access to full power at all times, with no scaling.
Do note that this will draw a lot more electricity, so it’s not good if you are trying to keep your energy bill low or if you’re running on battery power. Also note that this is not the same thing as overclocking, which makes the CPU go faster than it was designed to go and might cause damage and overheating. The “performance” governor is safe and doesn’t cause damage (so long as the fans are ventilating properly).
To do this, all you need to do is run the following command in a terminal BEFORE launching the game:
cpupower frequency-set -g performance
Once that is done, you’ll be good to go. Once you’re done, just run the same command but replace
ondemand, or simply restart your computer.
If Minecraft is still running terribly despite all of these tweaks (and be sure to change the graphics settings to their lowest settings!), then maybe your system just isn’t cut out for running Minecraft. However, that doesn’t mean you have to leave behind the joy of playing the game. Instead, you can try out Minetest, a not-quite-as-good free clone of Minecraft. It’s much more lightweight, and it’s written in other languages such as C++ which are translated to native machine code before running the game, unlike Java which does the translation while you play the game. It’s worth checking out if all other hope seems to be lost.
How Do You Improve Minecraft Performance?
These seven steps should allow you to squeeze out some extra performance out of the game, which can be especially crucial once you’ve added all sorts of exciting mods and texture packs that, sadly but ultimately, slow down the game even more than it already was to begin with.
Wondering if you should let your child play Minecraft ? Check out our guide to the age rating explained for parents.
Image Credit: Minetest.net