• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

How To Guide Screen refresh rate twinkering

Search This thread

foobar66

Senior Member
Jan 8, 2011
2,036
2,072
Brussels
Google Pixel 6 Pro
Screen refresh rate is controlled by several variables, 3 which I found are:
Code:
# getprop ro.surface_flinger.use_content_detection_for_refresh_rate
This instructs the screen compositor (surface flinger) to look at screen content to control screen refresh rate. 'true' by default; you will need root and Magisk's resetprop to override it, e.g.
Code:
# resetprop ro.surface_flinger.use_content_detection_for_refresh_rate false
But note that that does not stick after reboot, you will need a magisk module to force that upon boot. Add the property to system.prop file in the magisk module top directory.

Then:
Code:
# settings get system min_refresh_rate
0 by default; you can set e.g. to '60'
Code:
# settings put system min_refresh_rate 60
And the peak refresh:
Code:
# settings get system peak_refresh_rate
60 or 120 depending on toggle 'Smooth display' in Settings.

When you use 'Force peak refresh rate' in developer options then:
Code:
# settings list system | grep refresh
min_refresh_rate=120.00001

Weird number by the way. Anyway that forces the driver into 120Hz continuously.

I have personally set min=60, peak=120 and the surface flinger content detection to 'false' ... just to see how this goes for a couple of days.

And finally some other properties related to surface_flinger:
Code:
# indicates whether SurfaceFlinger should use refresh rate switching on the device, e.g. between 60 and 120 Hz (default: true)
ro.surface_flinger.refresh_rate_switching

# value used by the Scheduler to trigger display power inactivity callbacks (default: 1000)
ro.surface_flinger.set_display_power_timer_ms

# used by the Scheduler to trigger touch inactivity callbacks that will switch display to a lower refresh rate (default: 200)
ro.surface_flinger.set_touch_timer_ms
 
Last edited:

foobar66

Senior Member
Jan 8, 2011
2,036
2,072
Brussels
Google Pixel 6 Pro
So far no issues ... all working fine. I have now set the minimum as well to 120 Hz ... just to see how that might affect things ...
LOL ... as expected ... significantly more battery drain keeping the screen to 120 Hz all the time.
But scrolling ... oh so smooth ...

Looking for a middle with increased ground with ro.surface_flinger.set_touch_timer_ms to avoid switching too soon to lower rate (and ro.surface_flinger.use_content_detection_for_refresh_rate=false to avoid switching to lower rate based on content).
 

kevinireland11

Senior Member
Apr 10, 2014
936
237
Samsung Galaxy S21
LOL ... as expected ... significantly more battery drain keeping the screen to 120 Hz all the time.
But scrolling ... oh so smooth ...

Looking for a middle with increased ground with ro.surface_flinger.set_touch_timer_ms to avoid switching too soon to lower rate (and ro.surface_flinger.use_content_detection_for_refresh_rate=false to avoid switching to lower rate based on content).
Can min=90? Or will it only run between 60-120?
 

foobar66

Senior Member
Jan 8, 2011
2,036
2,072
Brussels
Google Pixel 6 Pro
Actually, you can see the refresh rate of the screen.
Go to developer settings. There is a toggle there called 'Show refresh rate' ;-)
Tried setting min rate to 90 ... but does not work via this mechanism.
Code:
settings put system min_refresh_rate 90
It switches the minimum rate to 120.
So looks like only 60 and 120 are accepted.

If you set system peak_refresh_rate to 60, then the screen will always be in 60 Hz. That is very clearly visible when scrolling.

When you touch the screen, it seems to immediately switch into 120 HZ as there is of course a possibility that you will start scrolling ... so makes sense. As soon as you lift your finger and the screen content is not moving the frequency is lowered to 60.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Screen refresh rate is controlled by several variables, 3 which I found are:
    Code:
    # getprop ro.surface_flinger.use_content_detection_for_refresh_rate
    This instructs the screen compositor (surface flinger) to look at screen content to control screen refresh rate. 'true' by default; you will need root and Magisk's resetprop to override it, e.g.
    Code:
    # resetprop ro.surface_flinger.use_content_detection_for_refresh_rate false
    But note that that does not stick after reboot, you will need a magisk module to force that upon boot. Add the property to system.prop file in the magisk module top directory.

    Then:
    Code:
    # settings get system min_refresh_rate
    0 by default; you can set e.g. to '60'
    Code:
    # settings put system min_refresh_rate 60
    And the peak refresh:
    Code:
    # settings get system peak_refresh_rate
    60 or 120 depending on toggle 'Smooth display' in Settings.

    When you use 'Force peak refresh rate' in developer options then:
    Code:
    # settings list system | grep refresh
    min_refresh_rate=120.00001

    Weird number by the way. Anyway that forces the driver into 120Hz continuously.

    I have personally set min=60, peak=120 and the surface flinger content detection to 'false' ... just to see how this goes for a couple of days.

    And finally some other properties related to surface_flinger:
    Code:
    # indicates whether SurfaceFlinger should use refresh rate switching on the device, e.g. between 60 and 120 Hz (default: true)
    ro.surface_flinger.refresh_rate_switching
    
    # value used by the Scheduler to trigger display power inactivity callbacks (default: 1000)
    ro.surface_flinger.set_display_power_timer_ms
    
    # used by the Scheduler to trigger touch inactivity callbacks that will switch display to a lower refresh rate (default: 200)
    ro.surface_flinger.set_touch_timer_ms
    2
    Interesting ...
    2
    So far no issues ... all working fine. I have now set the minimum as well to 120 Hz ... just to see how that might affect things ...