cizia64 / CrossMix-OS

Enhanced OS for the TrimUI Smart Pro
GNU General Public License v3.0
71 stars 9 forks source link

[Feature] System-wide performance profiles #12

Open cobaltgit opened 1 month ago

cobaltgit commented 1 month ago

I've thought of some performance profiles that could be used system-wide rather than being overridden by each emulator, obviously with a default setting to keep using the emulator-specific profiles, maybe these could be implemented into Crossmix:

Profile Name Governor MinFreq MaxFreq Online Core # Notes
Ultra Battery Saver PowerSave 408000 408000 2 For the lightest emulators (i.e. GameBoy, NES) and ports
Battery Saver Conservative 408000 816000 2 For lighter emulators (i.e. most GBA/SNES and some lightweight PS1)
Balanced OnDemand 600000 1416000 3 For all-round emulation, should work with all PS1 and most DS and ports
High Performance OnDemand 816000 1800000 4 For higher performance in N64/DC/PSP, frequency still scales back if needed
Max Performance OnDemand 1008000 2000000 4 For maximum performance in higher-end games and ports

Not quite sure yet as this might conflict with the per-emulator profiles

cizia64 commented 1 month ago

Really interesting, thank you. A default configuration for each emulator will be good, it's a big work (it's long to test all the emulators included ) but it will be useful ! However we have to measure the power consumption differences between these modes.

I also plan to make a shortcut to switch between these different modes on the fly, LED colors will help to understand in which mode we are.

cobaltgit commented 1 month ago

Sounds a great idea to have LED colours for each profile, these could be menu shortcuts on System Tools? Or some kind of button bindings, no?

P.S. Expect the CPU to become a hotbox when using the full 2GHz mode 😅

cizia64 commented 1 month ago

Yes the idea is a button binding / Shortcut available from everywhere / anytime. It will be probably L2 + vol-/+ as I already have what I need thanks to 樂俊/Boss/Kiwi . The idea : you press L2 + vol+, it goes from Balanced to High Performance. And may be something like this (if there is a significant power consumption between each mode, otherwise we will keep less modes) :

cobaltgit commented 1 month ago

Oh yeah that sounds great! Don't think the power consumption would be too much between ultra battery saver and normal battery saver but still

cizia64 commented 3 weeks ago

I really like this approach with only 5 modes. In fact we don't need to have a real vision on the level of granularity offered by Governor, CPU speed and CPU cores.

We could have something like that in each launch file :

PowerMode=1  # choose a value between 1 to 5 (5 is "Max Performance" mode)
source /mnt/SDCARD/..../a_script_centalized_to_apply_this_power_parameter.sh

Or even easier 5 scripts centralized (and not in each Emus subfolder),example :

/mnt/SDCARD/..../PowerMode_BatterySaver.sh

Simple to tune and less files everywhere. @cobaltgit @Kvn0l , what do you think about this option ? Could it fit with the PR that you made ? Do you have more than 5 different settings applied to the different emulators ?

cobaltgit commented 3 weeks ago

I think there is more than 5 different settings from what I've seen in the emulator settings, the frequencies set are what the emulators need to run most or all games at full speed

cobaltgit commented 3 weeks ago

Revised the profiles according to https://discord.com/channels/529983248114122762/1054333456928219167/1250047837421699072

cobaltgit commented 3 weeks ago

Another caveat would be that games (especially compressed roms) load slower on lower performance profiles, unless we can somehow change the CPU frequency after the game loads to have as little impact on loading times as possible?

cobaltgit commented 2 weeks ago

Since Retroarch cores are single-threaded, there's a way to eke out the best efficiency here

Kvn0l commented 1 week ago

Since Retroarch cores are single-threaded, there's a way to eke out the best efficiency here

I dont think they're really single-threaded, i've monitored cpu cores on PC with Snes9X-Current and all my 4 cores are used, both with threaded video on and off. Maybe single only on ARM or only on TSP build?