Skip to content

[DO NOT MERGE] Android: try to make my Pixel 6 run at full speed #13652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

landfillbaby
Copy link

@landfillbaby landfillbaby commented May 11, 2025

Just guessing at what will make my Pixel 6 run Mario Sunshine at full speed, other than when I'm actively causing UI updates.
Specifically, I can trigger this speedup tapping or dragging my finger on the system notification bar, left side menu, controller overlay, etc. Holding my finger in place doesn't do anything. Pressing volume or power buttons also works since it brings up the volume overlay or fades the screen out.
Seems to be CPU based, since raising the internal resolution makes no difference (another good idea would be to have separate CPU and GPU usage stats in the overlay instead of just guessing based on the maximum speed estimate).
Making it a PR for ease of getting builds.

#10206 (comment)

@landfillbaby
Copy link
Author

landfillbaby commented May 11, 2025

this is just random guesses at what will fix my issue since i have no way of knowing exactly how sched_pixel or whatever works.

decided to try setpriority(PRIO_PROCESS, 0, -20); in Core::CPUThread first since it's the simplest of the ideas* i have.
if it works i'll set it to a lower value. maybe -10 (THREAD_PRIORITY_VIDEO).

*the ideas in question are:
thread priority (testing failed)
thread affinity to fast cores (only cpu thread: testing failed) (more threads pinned ?)
something to do with the newish Android Dynamic Performance Framework (either GameState or PerformanceHint)

@JMC47
Copy link
Contributor

JMC47 commented May 11, 2025

@dolphin-emu-bot rebuild

@JMC47
Copy link
Contributor

JMC47 commented May 11, 2025

I myself can't give you auto-build privileges, but I can at least make it build

@landfillbaby
Copy link
Author

thanks :)

@landfillbaby
Copy link
Author

ok so that didn't work. i'll try another way later today hopefully.

@landfillbaby landfillbaby force-pushed the patch-1 branch 3 times, most recently from 0c3d278 to b302e48 Compare May 13, 2025 09:10
@landfillbaby
Copy link
Author

ok can i have another build please? nasty wip of thread pinning

@landfillbaby
Copy link
Author

landfillbaby commented May 13, 2025

oh oops

@landfillbaby
Copy link
Author

try again please?

@landfillbaby
Copy link
Author

... that somehow made the performance even worse ????

@landfillbaby
Copy link
Author

backed up the broken wip of thread pinning at https://github.com/landfillbaby/dolphin/tree/threadpinningwip
maybe i just did it wrong

for now i think i'll try android.app.GameState stuff

@landfillbaby
Copy link
Author

landfillbaby commented May 13, 2025

oh no. i was wrong before. it is gpu throttling due to system ui stuff.

and i think maybe the only way to fix it is to have a new activity that doesn't have any android java system ui elements or fragments or whatever, only the emulation and a custom controller overlay. not the current one but one that runs in native code. maybe will have to be implemented separately for each renderer???

that's why only dolphin is affected and not ppsspp or duckstation or nethersx2 or melonds-android or retroarch or ...

really wish stenzek hadn't made duckstation's android branch closed-source ...

i'll still try this GameState and PerformanceHint stuff though maybe ...

@landfillbaby landfillbaby force-pushed the patch-1 branch 2 times, most recently from 2b3c186 to 97c7ef4 Compare May 13, 2025 13:06
@landfillbaby
Copy link
Author

it does happen for melonds-android too btw

@landfillbaby
Copy link
Author

ohno it is . everything

@landfillbaby
Copy link
Author

ok actually i would like to see what performance mode does

@landfillbaby
Copy link
Author

i give up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants