Hi everyone,
I’m having an issue with my Unity Android game where it’s being locked to 60 FPS even though my device supports 120 Hz and other apps can use the higher refresh rate.
Here’s what I’ve tried:
- Setting Application.targetFrameRate to 120
- Setting QualitySettings.vSyncCount to 0
- Using Screen.SetResolution with the highest available refresh rate
- Setting android:hardwareAccelerated=“true” in the manifest
- Removed the adaptive performance package
- Tried setting the Optimized Frame Pacing to false
The game correctly detects the 120 Hz capability (I can see this in the logs), and Screen.resolutions shows 120 Hz is available. However, when running the game, it remains locked at 60 FPS. I’m using a FPS counter that shows “60/120”, indicating it’s targeting 120 but actually running at 60.
My Unity version: 2022.3.46f
Build target: IL2CPP
Has anyone encountered this issue and found a solution? What am I missing?
Screen.resolutions.ForEach(x => Debug.Log($"Resolution => {x.width}x{x.height}, refresh rate => {x.refreshRateRatio.value}"));
double maxRefreshRate = 0;
Resolution highestRes = default;
for (int i = 0; i < Screen.resolutions.Length; i++)
{
var res = Screen.resolutions[i];
if (res.refreshRateRatio.value > maxRefreshRate)
{
maxRefreshRate = res.refreshRateRatio.value;
highestRes = res;
}
}
Debug.Log("Setting highest res possible: " + highestRes);
Screen.SetResolution(highestRes.width, highestRes.height, FullScreenMode.FullScreenWindow, highestRes.refreshRateRatio);
Application.targetFrameRate = (int)highestRes.refreshRateRatio.value + 1;
Debug.Log("FRAME RATE: " + Application.targetFrameRate);
The logs are correct and what I am expecting to see, btw I also removed the adaptive performance package and tried setting the Optimized Frame Pacing to false. The frame rate is still capped at 60
Let me know if you’d like me to include any additional details,
Thank you for your help!
What kind of FPS counter? There’s so many broken ones out there. Try Graphy.
There’s a chance the device locks your app into 60 Hz. I could imagine a power-saving feature. Or apps may need to specifically request refresh rates beyond 60 Hz. Check the Android SDK documentation if there’s any mention of this.
What do you mean by requesting refresh rates beyond 60hz?
If I go to the display settings on my phone, I can see there that there are some apps that use 120hz but for my app it says “based on app’s preference”, is it somehow related?
I am using my own fps counter but its basically displaying (1 / Time.delta), I don’t think the issue is with displaying since on other phones, it reaches the target frame rate I set with Application.targetFrameRate.
All other phones can reach 90/120/144, my phone locks it to 60 for some reason, Power Saving feature is off.
Am I missing something in unity settings or need to add something to Android Manifest?
EDIT: After some investigation it might be related to a feature on my phone called GameBoost
(A notification of that feature appears for every other game that supports 120 but for games including mine it doesn’t appear and the refresh rate drops to 60 after entering the game)
I also reproduced the problem with unity6, so it may be related to the Android API version, not the unity version.
For the GameBoost mentioned before, this should be the device manufacturer’s white list according to app package names, and only applications within this can get the highest refresh rate.
Therefore, you can temporarily change the project to use the package name of the most popular game in the app store to disguise it.
Tested on my device, it can indeed be recognized and increased the refresh rate (Screen.currentResolution.refreshRate) to 120.
Besides, I also tried to create a override MainActivity, then added surface.setFramerate and window.setAttributes.
However, it will still run at 60fps, and I am very confused.
This may not work entirely, but may only fool the OS on the surface. If GameBoost is some sort of “certified apps only” feature I bet they will verify this against the App’s unique identifier, not merely the App’s name as the publisher could change that at any time (ie “CoolGame v1.1”).
Do you set targetFramerate? If so, remove that. It’s not meant to be used to make the game “render more” but rather the opposite, to throttle the game and it does so imperfectly because the CPU throttling the delta times of updates. Setting targetFramerate may thus negatively affect how the game performs.
But I bet the issue is with GameBoost being for certified apps only - at least it sounds that way.