OpenComputers

OpenComputers

49M Downloads

Poor screen performance on Linux

Shijikori opened this issue ยท 6 comments

commented

Hi, I am playing a modpack with a friend which contains OpenComputers version 1.7.5.192.
It seems that screen updates cause my frame rate to dip really badly when I run programs that cause frequent screen updates.

https://i.imgur.com/RhRpC8e.png

This is an example of frequent screen updates using cmatrix available through oppm.

Important system information should be already available in the screenshot. If you need additional information, let me know.

I use AdoptOpenJDK 8 Hotspot JVM, build 302.

My JVM arguments are the following:
-XX:+UnlockExperimentalVMOptions, -XX:+UseG1GC, -XX:MaxGCPauseMillis=30, -XX:G1NewSizePercent=20, -XX:G1ReservePercent=20, -XX:G1HeapRegionSize=32M, -XX:+ExplicitGCInvokesConcurrent, -XX:+TieredCompilation, -XX:+UseCompressedOops, -XX:+UseSuperWord, -Xms7040m, -Xmx7040m

I also tried with built-in and system GLFW library (as MultiMC allows me to do), no difference.

commented

My issue seems to be very similar to issue #3402

commented

I've had less extreme versions of this happen, where large amount of screen updates do cause stutters, but never to the extent of making the game unplayable (and it seems to only happen on AMD GPUs, at least on Linux - I don't recall my machine with an Intel card having this issue, and i haven't got an NVidia-equipped machine with which to test). It also only gets really bad for me when large portions of the screen are updating at once.

EDIT: I see you have an AMD GPU as well, and are also running Linux. I'm not sure why this issue would be so much worse for you than for me.

Asie was working on a project called OC-Staging, which includes VBO[2] rendering[1] (as opposed to the current TBO[3] system) but he has since mostly exited the Minecraft modding community and I don't think I have the modding-related know-how to merge those changes.

[1] As I understand it, VBO rendering is more performant and might fix this issue.
[2] Vertex-buffer object
[3] Text-buffer object

commented

Someone with an RTX 2060 got a similar issue where screen updates cause the game to go down to 20fps in their case in issue #3402

Also, I am aware the merge didn't get through. Right now, I am mostly worried that the mod is probably not being worked on as much anymore since there will be supposedly a successor coming for 1.16.5 and later. See the Curse Forge mod page.

And the program I used to display the issue does make a significant amount of screen updates. So most programs might not cause this many screen updates but it does limit my ability to use the mod.

commented

The issue seems to be less as bad depending on the JVM and JVM arguments. I used to have big slowdowns with only the screen up using OpenJDK 8. I tried GraalVM recently for JVMCI and Graal doesn't give me slow downs with the screen up but cmatrix still drops my frames immensely. I also tried the mesa_glthread=true environment variable. It improves performance but completely breaks OpenComputers screens.

commented

Newer versions of graphics drivers seems to have fixed the issue. Along with slightly different java arguments and I am still using GraalVM. I am on mesa 21.3.2, LLVM 13.0.0, DRM 3.42.0, Linux 5.15.12-arch1-1.

commented

closing based on last comment

Newer versions of graphics drivers seems to have fixed the issue