Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Touching screen causes fps drops on high refresh rate

Discussion in 'Android' started by SerpentDash, Feb 16, 2023.

  1. SerpentDash

    SerpentDash

    Joined:
    Aug 20, 2017
    Posts:
    3
    Hello everyone,
    I have an issue with nearly empty project. The only addition is a script to set higher fps in Awake function (in my case 90fps).

    As in title, when I move finger on the device screen, fps drops from 90 to 60. Mouse input in editor don't have this issue. Also, on 60 fps everything works fine.

    With Development Build and Profiler I made some screenshots that might be useful. The most concerning aspects are (or at least i think):
    - higher 'WaitForLastPresent' usage
    - higher CPU latency

    90_to_60_(moving_finger).PNG

    When I'm only pressing screen (without moving), graph looks a little bit different but also fps drop occurs...

    90_to_60_(only_pressing)_1.PNG 90_to_60_(only_pressing)_2.PNG

    Any idea what's the problem or how to fix it? Was trying a lot of stuff like using only newer input system or other settings with the same result.
    Would be awesome if I could let my current project run on higher frame rate but if it's not possible then i will have to stick with 60fps..

    Tested on:
    Oneplus 7T Pro (Android 12) - Snapdragon 855+, Adreno 640, 8GB RAM, 90Hz display
    2D Core and 2D Mobile Core Templates
    Unity 2022.2.6 and 2023.1.0b3
     
  2. SerpentDash

    SerpentDash

    Joined:
    Aug 20, 2017
    Posts:
    3
    Okay, I guess I found the issue... As always, issue was on my side...
    On my phone's OS display settings i had set min refresh rate to 60 and max refresh rate to 90. For some reason, without interacting with screen phone was rendering stable 90 frames but with touching only 60 with occasional brightness flickering.
    After I set min refresh rate to 90 (basically force this refresh rate all the time) everything works fine...
    Optimization of my phone cost me 2 weeks of pain... cool...