Flickering UI after MacOS update
Type
GPU
Operating System
MacOS
OS Version
MacOS Tahoe 26.0
Bug description
After upgrading to MacOS Tahoe, some UI elements started stuttering. When I turn off the GPU plugin it stops stuttering
Screenshots or videos
https://github.com/user-attachments/assets/3ca5ef84-4339-4011-9f5c-051d8e42933b
RuneLite version
RuneLite version: 1.11.16 Launcher version: 1.12.0
Logs
No response
I wish I could upload a longer video but 10MB is the maximum file size..
Does it happen also with the 117 HD plugin from the plugin hub?
Not sure, I don't use that plugin since it's a bit too intense for my PC
@aHooder was able to test this, it seems that 117 HD plugin is not showing the same symptoms as the GPU plugin. No stuttering of the UI elements
Interesting. Even if you reduce the draw distance all the way to 1 (ensuring your FPS is high), does the UI still not flicker? Also, make sure you have the same settings for VSync and Unlock FPS as you have in your GPU plugin's settings.
After another test with the 117 plugin it does seem to have these symptoms. It is stuttering a bit today. Vsync and Unlock FPS match GPU plugin settings
For me it happens every time when map is loading. Both when entering new location (like taking stairs) or by moving far enough to trigger map loading. Same with 117 HD plugin, same with GPU plugin, and even without any of those.
MacOS Version: 15.6.1, Mbp 14" M3 pro Runelite version: 2.7.2
Can Also confirm the stutter as well.
M4 Pro MacOS 26 Tahoe Release.
Seems like dropping the FPS target seems to help with the stuttering. If I drop my FPS target to 60 the stuttering about stops, anything above 100fps it's much worse.
I was playing at 120fps on previous MacOS version without issues
So I decided to try just using the .Jar file instead of the native macOS Launcher.
The JVM is the Latest Oracle LTS (Java21).
I configured the Launcher to pass these JVM arguments: -XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4m along with switching hardware acceleration to METAL instead of AUTO; As AUTO always defaults to OPENGL
So far this issue has disappeared and I've actually got a very nice performance boost.
EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslow
So I decided to try just using the .Jar file instead of the native macOS Launcher.
The JVM is the Latest Oracle LTS (Java21).
I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost.
EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslow
So with this in mind, I think we can say its some sort of configuration Issue, that being the following:
- JVM Version
- GC Collector used
- Memory Settings
- METAL instead of AUTO for hardware acceleration.
So one of these 4 might lead to where we need to.
So I decided to try just using the .Jar file instead of the native macOS Launcher.
The JVM is the Latest Oracle LTS (Java21).
I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost.
EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslow
I'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
- Java 21
- G1 -> ZGC
- Max heap increase
- Thread stack size increase (I'd hope not this since that doesn't really make sense lol)
- Switching j2d from OPENGL to METAL
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METAL
If I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html
EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METALIf I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html
EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
I was hoping you would be willing to experiment with it a bit and figure out the answer conclusively.
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METALIf I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
I was hoping you would be willing to experiment with it a bit and figure out the answer conclusively.
I mean, I can do that. Im on The Whisperer Grind and thats where my stuttering was happening. I would just like to know, what kind of diagnostic data would you like collected?
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METALIf I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
I was hoping you would be willing to experiment with it a bit and figure out the answer conclusively.
I mean, I can do that. Im on The Whisperer Grind and thats where my stuttering was happening. I would just like to know, what kind of diagnostic data would you like collected?
A good start would be to set everything back to normal, change each one at a time, and test it to see if it fixes the flickering issue (or gives you a "very nice performance boost" as you say. That isn't totally relevant but is nonetheless interesting).
A good start would be to set everything back to normal, change each one at a time, and test it to see if it fixes the flickering issue (or gives you a "very nice performance boost" as you say. That isn't totally relevant but is nonetheless interesting).
Ill collect and report back
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METALIf I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
I was hoping you would be willing to experiment with it a bit and figure out the answer conclusively.
I mean, I can do that. Im on The Whisperer Grind and thats where my stuttering was happening. I would just like to know, what kind of diagnostic data would you like collected?
A good start would be to set everything back to normal, change each one at a time, and test it to see if it fixes the flickering issue (or gives you a "very nice performance boost" as you say. That isn't totally relevant but is nonetheless interesting).
Alright, using just JVM 21 with all the current defaults:
== Java 21 - defaults ==
- GPU: High of 89%, low of 48%;
- GPU Temp high of 174 low of 137
Impression: Frequent Jitter in FPS, occasional noticeable drops during drawing of elements. Experienced Flickering == Java 21 - defaults + Metal ==
- GPU: High of 90%, low of 46%;
- GPU Temp high of 170 low of 125
Impression: Reduced amount of Jitter in FPS, drops quickly regain; did not notice when drops occurred while playing. No flickering experienced.
================
More long term testing with better data would be needed to remove outliers, but this option alone shows performance gains.
So I decided to try just using the .Jar file instead of the native macOS Launcher. The JVM is the Latest Oracle LTS (Java21). I configured the Launcher to pass these JVM arguments:
-XX:+DisableAttachMechanism -XX:+UseZGC -XX:+ZGenerational -Xmx2048m -Xss4malong with switching hardware acceleration toMETALinstead ofAUTO; AsAUTOalways defaults toOPENGLSo far this issue has disappeared and I've actually got a very nice performance boost. EDIT: Forgot to add this Is with the GPU Plugin set to 120 FPS, @joshwinslowI'd be interested in knowing which part(s) of the various changes you've made can be attributed to the performance boost.
* Java 21 * G1 -> ZGC * Max heap increase * Thread stack size increase (I'd hope not this since that doesn't really make sense lol) * Switching j2d from OPENGL to METALIf I had to guess, I would say having j2d using METAL (Since Apple Silicon uses Tile Based rendering, and OpenGL 4.1 is probably not well tuned for it), and ZGC look at these benchmarks here talking about GC gains across Java Versions: https://kstefanj.github.io/2023/12/13/jdk-21-the-gcs-keep-getting-better.html EDIT: Forgot to add Metal is completely tuned for Tile based Rendering.
I was hoping you would be willing to experiment with it a bit and figure out the answer conclusively.
I mean, I can do that. Im on The Whisperer Grind and thats where my stuttering was happening. I would just like to know, what kind of diagnostic data would you like collected?
A good start would be to set everything back to normal, change each one at a time, and test it to see if it fixes the flickering issue (or gives you a "very nice performance boost" as you say. That isn't totally relevant but is nonetheless interesting).
Alright, using just JVM 21 with all the current defaults:
== Java 21 - defaults ==
* GPU: High of 89%, low of 48%; * GPU Temp high of 174 low of 137Impression: Frequent Jitter in FPS, occasional noticeable drops during drawing of elements. Experienced Flickering == Java 21 - defaults + Metal ==
* GPU: High of 90%, low of 46%; * GPU Temp high of 170 low of 125Impression: Reduced amount of Jitter in FPS, drops quickly regain; did not notice when drops occurred while playing. No flickering experienced.
================
More long term testing with better data would be needed to remove outliers, but this option alone shows performance gains.
Im so bad at posting before finishing my thoughts, so sorry for being annoying.
I wanted to add it looks like the GPU is better able to handle it loads, not only in the usage data collected, but it also shows in temperatures. Temperatures really give a good idea of total workload happening (Utilization and Frequency), since the temps are dramatically lower, but utilization is higher, its able to clock lower but still be utilized more. I think thats great evidence on its own, but again, I need people to test to be sure its not just my configuration.
Alright I isolated the issue, its tied to the zoom in!
Certain levels of zoom-in/out causes a major jump in FPS, ~100 FPS Jitter. It is more stable on using Metal, but on OpenGL it is significantly more common from what im experiencing.
EDIT: It's the FPS jittering itself that causes the issue period.
EDIT2: When using the Metal Renderer, enabling/disabling compute shaders also gives ~100 FPS more on Max zoom-in, and about ~100 less on max Zoom-out. In general though, enabling Metal gives a more stable FPS generation.
The flickering is related to the rendering process as a whole. -- Makes me wonder what Apple changed in the OpenCL/OpenGL drivers...
Can you check if your display settings are set to variable refresh rate in the System Settings? In my personal experience, Apple has very subpar support for variable refresh rate and I get all kinds of flickering issues, both in and out of games, depending on the application being used and the actual refresh rate range being targeted.
It makes sense that Apple may have changed things related to their display drivers in a major MacOS update, and they tend to screw things up a lot particularly related to displays.
Can you check if your display settings are set to variable refresh rate in the System Settings? In my personal experience, Apple has very subpar support for variable refresh rate and I get all kinds of flickering issues, both in and out of games, depending on the application being used and the actual refresh rate range being targeted.
It makes sense that Apple may have changed things related to their display drivers in a major MacOS update, and they tend to screw things up a lot particularly related to displays.
Its on "ProMotion", so yes, I havent had any issues using it on any other apps, runelite is the only time I've seen this issue. I turned the frame limiter off and set the target to 999 for both OpenGL and Metal to have some constant to work with and be able to gauge performance of both, along with using the same tile in my PoH and world to also limit variability. The flickering only happens when the zoom level is on an "unstable" level where the frame generation refuses to be mostly stable; this unstable level being where the frame generation will drop/rise rapidly by ~50 - ~100 frames at a time. Everytime im at this level, the UI will flicker heavily.
I'm curious if turning off ProMotion and using a set refresh rate resolves the issue for you. Even if you don't want to keep it off, it may be useful to know whether this is indeed related to having a variable refresh rate or not.
I'm curious if turning off ProMotion and using a set refresh rate resolves the issue for you. Even if you don't want to keep it off, it may be useful to know whether this is indeed related to having a variable refresh rate or not.
Just so we can cross this probability off, I decided to try it. The issue is still there.
I had noticed an overall performance hit to game play since going to macOS 26, these args fixed not only frame rate but what had felt overall delays in gameplay.
Is there anything I can do to resolve this on my client? Seems like I'd have to pass some arguments to the JVM which I have no idea how to do. Is there a more permanent solution that could be done here for all Mac users?