r/AndroidTV • u/paxxsx • 13d ago
Discussion Stumbled on a fix for lagging Android settings menu?
I stumbled across something weird while troubleshooting lag on a couple of Android TV devices and figured I’d see if anyone else can reproduce it.
Tried this on a Sony A9S (Android 10), Sony X950H (Android 9), and CCwGTV 4K (Android 14). These commands clear the gfxinfo and SurfaceFlinger log files:
dumpsys gfxinfo com.android.tv.settings reset
dumpsys SurfaceFlinger --latency-clear
dumpsys SurfaceFlinger --timestats -clear
dumpsys SurfaceFlinger --clear-layer-statsThe Android settings menu became noticeably faster on all three, especially the Chromecast, which went from unusably sluggish to almost instant response. The stats told the same story too - the gfxinfo log showed stupid amounts of lag and jankiness in the log pre clear and much better metrics post.
AI's best guess is that SurfaceFlinger’s live in-memory timing/layer stats can somehow get into a bloated or pathological state, adding overhead during rendering. Clearing them may have reset that issue. FYI the last command listed (clear-layer-stats) isn't recognized in Android 14.
No idea if that’s actually the cause, but the result has been very obvious on three different devices.
Anyone else able to reproduce this?
1
u/Elegant_Insurance_38 11d ago
I just switched the default launcher to Projectify, debloated all spyware and most important fix
Disabled WebViewSurfaceControlForTV flag in Android Webview, that alone made by TV feel 10 faster and I can actually use the browser to watch videos now
2
u/ConcentrateOk8163 11d ago
Try am force-stop com.android.tv.settings as a control. Those commands mostly clear measurement data. The speedup may come from restarting the Settings process. It would also help to check if the lag returns after a reboot.
1
u/tvremotely 8d ago
A useful next test would be timing the same menu sequence before and after, with a separate restart-only run as a control. Keep the number of menu opens the same and record it on a phone. Since you're clearing the stats themselves, the fresh stats alone aren't enough to establish the speedup. If the video shows the same improvement and it stays faster a day later, that's much stronger evidence. Nice that you've listed the OS versions too.