mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Additional performance fixes (#87)
* perf: answer Turnip's zero-timeout KGSL timestamp polls without blocking Turnip polls a timeline point with IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID and a timeout of 0, which KGSL reads as wait forever; Mesa does it under a lock on every signalling submit, so vkd3d-proton, DXVK, gamescope and Zink ran in lock-step with the GPU. The session preload now answers those polls from the context's retired timestamp and passes everything else to the kernel. Bannerlator measured a D3D12 demo at 614 -> 4335 fps with the same answer in its Vulkan adapter. BL_NO_KGSL_POLL_FIX=1 turns it off. * perf: frame limiter, live panel refresh, opt-in GPU clock pin, cheaper cursor sync - A per-mode frame limit (Steam and desktop settings, off by default): gamescope's -r, the compositor's buffer-release pacer, the display layer's frame-rate vote and a panel mode the cap divides evenly, as WinNative's per-shortcut limit does. BL_FPS was always 0 and the pacer's limit was never set. - The compositor follows the panel's refresh rate when it changes mid-session instead of reporting the rate read at start. (WinNative.) - Performance > GPU: hold the Adreno clock at its top through KGSL's power-control property, no root (Bannerlator's PerfGpuTurbo). Off by default; cleared when the session stops and at the next app start if a killed process left it set. - The cursor image is copied across JNI only when its serial changes, not on every pointer move. * perf: stop re-seeding every prefix every 5 s, and run the library helpers only on change - bannerlator-seed-redists stamped its change check from a block that carried the current time, so it never matched: every prefix had ~32 keys appended to system.reg on every beat. The stamp now comes from the names; Proton's prefix template is seeded too (date kept), with WinNative's built-in list until the client has the install scripts. - The library beat runs the seeder every 15 s and steam-compat only when a directory it reads has changed, or once a minute. - The client-core pin reads /proc itself and runs taskset -a only for new processes or ones that grew threads. - The games watcher backs off after a failed ownership probe and does not probe while a game runs. - The Proton launcher runs the newest ARM64 depot by build number, and PROTON_USE_PIPEWIRE defaults to 0. (WinNative.) * perf: Mesa's database shader cache, and proot's tracer above the guest - MESA_DISK_CACHE_DATABASE=1 for the session: the file cache opens a file per lookup and opens and renames one per store, each a proot stop; the database is opened once and used with pread/pwrite. - proot's single tracer thread is raised to nice -6 (under the compositor's -8) two seconds after it starts, so the first guest process it forks keeps nice 0. setpriority() directly, not Process.setThreadPriority, which would also move its cgroup.
This commit is contained in:
1 parent
6c5d6cda73
commit
8ee1cbe3eb
20 files changed
+527
-67
No files matched your search
@@ -47,6 +47,8 @@ class ModeSettings(
|
||||
val shapeMode: String,
|
||||
val hdr: Boolean,
|
||||
val hdrReason: String?,
|
||||
/** Frames per second the session is capped at; 0 = none. */
|
||||
val fpsLimit: Int = 0,
|
||||
val linuxRows: List<DriverRow>,
|
||||
val linuxSelected: String,
|
||||
val androidRows: List<DriverRow>,
|
||||
@@ -106,6 +108,7 @@ class ModeSettingsActions(
|
||||
val onCustomResolution: (Pair<Int, Int>?) -> Unit = {},
|
||||
val onShape: (String) -> Unit,
|
||||
val onHdr: (Boolean) -> Unit,
|
||||
val onFpsLimit: (Int) -> Unit = {},
|
||||
val onSelectLinux: (String) -> Unit,
|
||||
val onImportLinux: () -> Unit,
|
||||
val onRemoveLinux: (String) -> Unit,
|
||||
@@ -220,6 +223,12 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
if (custom != null) "Set by the custom resolution." else "Auto uses at least 16:9.",
|
||||
com.droiddeck.launcher.session.SessionPrefs.shapeChoices, s.shapeMode, enabled = custom == null, onPick = a.onShape,
|
||||
)
|
||||
ChoiceRow(
|
||||
host, "fps", "Frame limit", "Applies next session.",
|
||||
com.droiddeck.launcher.session.SessionPrefs.fpsLimitChoices, s.fpsLimit,
|
||||
note = "Caps the whole session. The screen switches to a rate the cap divides evenly.",
|
||||
onPick = a.onFpsLimit,
|
||||
)
|
||||
if (editCustom) CustomResolutionDialog(
|
||||
initial = custom,
|
||||
onSave = { size -> editCustom = false; a.onCustomResolution(size) },
|
||||
|
||||
@@ -38,6 +38,7 @@ fun PerformancePage(
|
||||
noGlError: Boolean,
|
||||
noXalia: Boolean,
|
||||
gamescopeRealtime: Boolean,
|
||||
gpuClockPin: Boolean,
|
||||
prootNoSeccomp: Boolean,
|
||||
guestHostname: String,
|
||||
phantomWarning: String?,
|
||||
@@ -48,6 +49,7 @@ fun PerformancePage(
|
||||
onNoGlError: (Boolean) -> Unit,
|
||||
onNoXalia: (Boolean) -> Unit,
|
||||
onGamescopeRealtime: (Boolean) -> Unit,
|
||||
onGpuClockPin: (Boolean) -> Unit,
|
||||
onProotNoSeccomp: (Boolean) -> Unit,
|
||||
onGuestHostname: (String) -> Unit,
|
||||
onClientCore: (Int, Boolean) -> Unit,
|
||||
@@ -102,6 +104,13 @@ fun PerformancePage(
|
||||
gamescopeRealtime, onChange = onGamescopeRealtime,
|
||||
)
|
||||
}
|
||||
SettingsGroup("GPU") {
|
||||
ToggleRow(
|
||||
host, "gpuclock", "Hold the GPU at its top clock",
|
||||
"Adreno only. Fewer hitches from the clock ramping up, at the cost of battery and heat. Released when the session ends.",
|
||||
gpuClockPin, onChange = onGpuClockPin,
|
||||
)
|
||||
}
|
||||
SettingsGroup("Session fixes") {
|
||||
ToggleRow(
|
||||
host, "sysmem", "Turnip: sysmem rendering",
|
||||
|
||||
Reference in new issue
Block a user