Skip to content

Commit

Permalink
hanoip: enable adaptive refresh rate
Browse files Browse the repository at this point in the history
-- thnx to all the people who helped me ---

- based on below commits -

Fix adaptive refresh rate
Not sure what happened here but this limits refresh rate to 60 unless
manually switched with the picker, let's just move to adaptive one

Change-Id: I1f7ebc4b9272288e948c7ea31bdf565bea80f1e4

Enable refresh rate toggle in Settings
sweet supports switching between 60 and 120 Hz refresh rates, so let's
expose it in Settings -> Display -> Smooth Display for users to save
battery if necessary.

Test: visual confirmation after toggling several times
Change-Id: Ie698ec4d4e738afd2a9055dba2369233103a4f13

Co-authored-by: Sebastiano Barezzi <seba@sebaubuntu.dev>
Co-authored-by: DhineshCool <dhineshcool585@gmail.com>

Signed-off-by: DhineshCool <dhineshcool585@gmail.com>
Signed-off-by: anoosragh69 <ok.ano0s6090@gmail.com>
  • Loading branch information
kdrag0n authored and anoosragh69 committed Jan 19, 2025
1 parent 450664a commit 6a790a1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
10 changes: 10 additions & 0 deletions overlay/Frameworks/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@
Used to decide if we show pulse settings -->
<bool name="config_ledCanPulse">true</bool>

<!-- The default refresh rate for a given device. Change this value to set a higher default
refresh rate. If the hardware composer on the device supports display modes with a higher
refresh rate than the default value specified here, the framework may use those higher
refresh rate modes if an app chooses one by setting preferredDisplayModeId or calling
setFrameRate().
If a non-zero value is set for config_defaultPeakRefreshRate, then
config_defaultRefreshRate may be set to 0, in which case the value set for
config_defaultPeakRefreshRate will act as the default frame rate. -->
<integer name="config_defaultRefreshRate">0</integer>

<!-- The default peak refresh rate for a given device. Change this value if you want to allow
for higher refresh rates to be automatically used out of the box -->
<integer name="config_defaultPeakRefreshRate">120</integer>
Expand Down
6 changes: 6 additions & 0 deletions overlay/Settings/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@
<!-- Show battery cycle count -->
<bool name="config_show_battery_cycle_count" translatable="false">true</bool>

<!-- Whether to show min/max refresh rate in display settings -->
<bool name="config_show_refresh_rate_controls">true</bool>

<!-- Whether to show peak refresh rate in display settings -->
<bool name="config_show_peak_refresh_rate_switch">true</bool>
<bool name="config_show_min_refresh_rate_switch">true</bool>
</resources>
6 changes: 5 additions & 1 deletion vendor.prop
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# GFX
ro.config.avoid_gfx_accel=true
ro.config.avoid_gfx_accel=true

#Refresh Rate
ro.surface_flinger.set_idle_timer_ms=80
ro.surface_flinger.use_content_detection_for_refresh_rate=true

0 comments on commit 6a790a1

Please sign in to comment.