Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minecraft Java running slowly on Raspberry OS 64bit on RPi 4B 2GB (fan cooled) #32

Closed
scedric opened this issue Oct 21, 2020 · 10 comments
Closed

Comments

@scedric
Copy link

scedric commented Oct 21, 2020

Hello,
Thanks a lot for pi-apps it's a real time saver for me. I am fairly new in the RPi communauty and having pi-apps helps a lot to setup a new pi.
You installer for Mincecraft Java works like a charm, I also installed optifine with it. After a few tweaking in the settings to have a decent framerate the game starts smoothly. However after a few seconds of smooth gameplay it stops for a few seconds and then it alternates between smooth and stop.
The issue seems to be the Java memory heap size. The 450Mb or so of allocated memory are quickly full. On my other RPi 4B 2GB (32bit os) Minecraft is launched using the "runMC_16_1OptifineG2pre.sh" script where I modified the -Xmx (1GB) and -Xms (256MB) values to match the RPi ram and the game runs pretty smoothly.

I don't know where to set the memory heap size with the pi-apps installed Minecraft.
Is-it something that could be set automatically during the installation? Even a user input would be nice.
Thanks again :)

@NoozAbooz
Copy link
Contributor

Actually, the install script is just all the commands from https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=284448 smashed together. I think that you can change the xmx and xms stuff in the JVM Arguments textbox when you click "Edit Profile" in the launcher.

@scedric
Copy link
Author

scedric commented Oct 21, 2020

thank you. I tried that but I had another error.
I updated pi-apps today and now Minecraft won't start at all.

Executable: /opt/jdk/jdk1.8.0_251/bin/java
JVM Arguments: -Dorg.lwjgl.librarypath=/home/pi/lwjgl3arm64 -Xmx1G -Xmn128M
(as suggested here https://www.noxxtech.tk/minecraft-install)
Launcher Log:
[15:33:52] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[15:33:53] [Render thread/INFO]: Setting user: siroderap
[15:33:53] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[15:33:53] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[15:33:54] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10
[15:33:54] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[15:33:55] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[15:33:56] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[15:34:01] [Render thread/WARN]: ERROR : Couldn't load Narrator library : Unable to load library 'fliteWrapper': Native library (linux-aarch64/libfliteWrapper.so) not found in resource path ([file:/home/pi/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar, file:/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar, file:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar, file:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar, file:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar, file:/home/pi/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar, file:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar, file:/home/pi/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar, file:/home/pi/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar, file:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar, file:/home/pi/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar, file:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar, file:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar, file:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar, file:/home/pi/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar, file:/home/pi/.minecraft/libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar, file:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar, file:/home/pi/.minecraft/libraries/com/mojang/authlib/1.6.25/authlib-1.6.25.jar, file:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar, file:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar, file:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar, file:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar, file:/home/pi/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar, file:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar, file:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar, file:/home/pi/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar, file:/home/pi/.minecraft/versions/1.16.3/1.16.3.jar])
[15:34:01] [Render thread/INFO]: Reloading ResourceManager: Default
[15:34:56] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
AL lib: (EE) ALCplaybackAlsa_reset: snd_pcm_hw_params_set_period_time_near failed: Invalid argument
java: pcm_params.c:170: snd1_pcm_hw_param_get_min: Assertion `!snd_interval_empty(i)' failed.

@NoozAbooz
Copy link
Contributor

Umm. I think you forgot some JVM args. You seem to only have -Dorg.lwjgl.librarypath=/home/pi/lwjgl3arm64 -Xmx1G -Xmn128M whereas it normally has -Dorg.lwjgl.librarypath=/home/pi/lwjgl3arm32 -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M

@scedric
Copy link
Author

scedric commented Oct 21, 2020

my bad, I misread the instruction to add and the beginning of the arguments and not replace
Still an error:
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[16:33:24] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[16:33:24] [Render thread/INFO]: Setting user: siroderap
[16:33:24] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[16:33:24] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[16:33:25] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10
[16:33:25] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[16:33:27] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[16:33:28] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
[16:33:33] [Render thread/WARN]: ERROR : Couldn't load Narrator library : Unable to load library 'fliteWrapper': Native library (linux-aarch64/libfliteWrapper.so) not found in resource path ([file:/home/pi/.minecraft/libraries/com/mojang/patchy/1.1/patchy-1.1.jar, file:/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar, file:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar, file:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar, file:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar, file:/home/pi/.minecraft/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar, file:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar, file:/home/pi/.minecraft/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar, file:/home/pi/.minecraft/libraries/com/google/guava/guava/21.0/guava-21.0.jar, file:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar, file:/home/pi/.minecraft/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar, file:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar, file:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar, file:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar, file:/home/pi/.minecraft/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar, file:/home/pi/.minecraft/libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar, file:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar, file:/home/pi/.minecraft/libraries/com/mojang/authlib/1.6.25/authlib-1.6.25.jar, file:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar, file:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar, file:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar, file:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar, file:/home/pi/.minecraft/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar, file:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.8.1/log4j-api-2.8.1.jar, file:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2.jar, file:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar, file:/home/pi/.minecraft/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar, file:/home/pi/.minecraft/versions/1.16.3/1.16.3.jar])
[16:33:34] [Render thread/INFO]: Reloading ResourceManager: Default
[16:34:33] [Render thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
sure the folder it points to contains the shared libraries of the correct LWJGL version.
b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.
AL lib: (EE) ALCplaybackAlsa_reset: snd_pcm_hw_params_set_period_time_near failed: Invalid argument
java: pcm_params.c:170: snd1_pcm_hw_param_get_min: Assertion `!snd_interval_empty(i)' failed.

@scedric
Copy link
Author

scedric commented Oct 21, 2020

image

@NoozAbooz
Copy link
Contributor

@scedric
Copy link
Author

scedric commented Oct 22, 2020

I'll do it, thanks for the help :)

@NoozAbooz
Copy link
Contributor

Has it worked yet? If it has then please close this issue.

@scedric
Copy link
Author

scedric commented Oct 22, 2020

nope, I posted on the link you sent earlier.
I guess I'll close the issue since it's not related to pi-apps.
Thanks again!

@scedric scedric closed this as completed Oct 22, 2020
@NoozAbooz
Copy link
Contributor

np

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants