I recently purchased Minecraft, but after I have been playing for about 5-10 minutes, the Java process uses all CPU power, leading to a sudden shutdown.
This is weird, because some months ago it ran without any problems.
Is there any way to fix this?
My OS is Ubuntu 11.04.
ACCEPTED]
I am using Ubuntu too here are a couple of questions and suggestions ...
1) Are you using the open JDK? If you install sun's JDK and run the command sudo update-alternatives --config java and select Sun's JDK.
2) What speed is your processor and how many cores and how much RAM do you have? You might to specficy some command parameters when you run minecraft. Try giving minecraft more RAM by using the -Xmx and -Xms to give Minecraft more RAM at startup. You can read more about that
here
[1]. For example the command I use is java -Xmx5000m -Xms5000m -jar minecraft.jar
3) Try turning down your video settings. Turn down the render distance and switch the graphics settings to Fast.
[1] http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.htmljava -Xmx1024M -Xms512M -jar minecraft.jar - gumbo
I just had this exact problem with a fresh 11.04, setting up the Sun JDK was a doozie, and even then my CPU was spiking over 100% usage, whoa! I could hear the clock in my headphones
Here where my steps to solve it:
completely remove the open jdk and jre.
java -version in a terminal you should get: Java(TM) SE Runtime Environment instead of the OpenJDKjava -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrameI was stunned that this worked. I remember my old dell laptop had a CPU clock issue where I could hear the high freq in my headphones, the solution was to underclock the processor to get rid of the noise. Pretty cool, it's like underclocking the JVM or telling it to be more sparring with the CPU (which in this case solved made everything run smoothly)
Hope this helps someone
I get a similar problem on Windows 7 if I select "Fancy" graphics.
Selecting "Fast" allows me to play for as long as I like.
No guys, this is a confirmed bug in Minecraft with Linux. Even on an extremely powerful system using < 400MB of 4 GB of allocated memory, Minecraft will play wonderfully and then suddenly drop to 0 FPS and cause the whole X server to lag. Once closed, everything comes back to normal.
No known fix as of yet.
https://mojang.atlassian.net/browse/MC-2258