Skip to content
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

Sustained performance mode not working correctly #11018

Closed
szale9001 opened this issue May 8, 2018 · 24 comments
Closed

Sustained performance mode not working correctly #11018

szale9001 opened this issue May 8, 2018 · 24 comments

Comments

@szale9001
Copy link

What happens?

Using Pixel 2 (Android 8.1) with sustained performance mode checked in settings.

When opening the app with Auto rotation selected, sustained performance mode activates. However, when rotating the device, sustained performance mode will then deactivate and processor will return to normal mode. Can verify with cpu monitor.

Video link to demonstrate. When in Sustained perf mode, freq shouldn't go above or below 1.2Ghz. After rotating, frequency is operating in normal mode again, rising and lowering based on demand (in video, cpu monitor is in upper left corner of status bar)
https://gfycat.com/WelloffVengefulEuropeanpolecat

What should happen?

Sustained perf mode should not disable upon rotation.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

PPSSPP 1.5.4-957 (latest as of yesterday, I think)
Android 8.1

@unknownbrackets
Copy link
Collaborator

I guess we just need to call updateSustainedPerformanceMode() in surfaceChanged? Or really looks like it should be done on onWindowFocusChanged probably.

-[Unknown]

@szale9001
Copy link
Author

Tested build 980-g6615e55c5, and it looks like the issue is still present

@hrydgard
Copy link
Owner

hrydgard commented May 9, 2018

Think I'm just gonna call it from surfaceChanged too, let's see...

@szale9001
Copy link
Author

Fingers crossed ;)

And thanks for looking into it

@hrydgard
Copy link
Owner

How is this now?

@szale9001
Copy link
Author

No dice, unfortunately. Tested 985, and it still does it.

Also, I noticed that if I select Landscape in PPSSPP, but launch the app in Portrait mode, Sustained performance mode won't even engage. Not sure if that'd help diagnose, but I figured I should mention it.

@hrydgard
Copy link
Owner

hrydgard commented May 10, 2018

That's very curious, and makes it seem like the bug maybe isn't in PPSSPP... Bumping to 1.7.0.

@hrydgard hrydgard modified the milestones: v1.6.0, v1.7.0 May 10, 2018
@szale9001
Copy link
Author

I'm not so sure. I tested tinyCAM free (which is literally the only other app I know of that has an option for Sustained perf mode) and it seems to operate as you'd expect. When rotating back and forth, the mode sticks and the CPU is consistent at 1.2Ghz.

Linked to another capture:
https://gfycat.com/TornFocusedCaterpillar
(full disclosure, I recently upgrade to the Android 9 preview, but the behavior I posted about was also present in 8.1.)

Also, not posting this to pressure you or anything, just for information's sake.

@hrydgard
Copy link
Owner

Okay, hm. Can't explain it though..

@hrydgard
Copy link
Owner

hrydgard commented May 10, 2018

By the way, what are you using to get the cpu frequency in the notification area?

@szale9001
Copy link
Author

App called CPU Stats
https://play.google.com/store/apps/details?id=jp.takke.cpustats&hl=en_US

It's wonky with how it displays CPU clusters, but its enough to get the info I need.

@unknownbrackets
Copy link
Collaborator

Are there any open source Android apps which use this feature and work properly, that we could perhaps reference?

-[Unknown]

@szale9001
Copy link
Author

I did some googling and couldn't really find much. I did find a repo for something called moonlight-stream. Not sure what it is but they apparently use sustained perf mode.

https://github.com/moonlight-stream/moonlight-android

In this commit, they disable SPF during split screen
moonlight-stream/moonlight-android@912925e

Not sure if it helps, but there you go.

@unknownbrackets
Copy link
Collaborator

Have the latest changes here helped or is it still happening?

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.7.0, v1.8.0 Sep 16, 2018
@szale9001
Copy link
Author

Sorry, just got around to testing this just now. Yes, it does seem to still occur despite latest changes.

@hrydgard hrydgard modified the milestones: v1.8.0, v1.9.0 Feb 8, 2019
@hrydgard hrydgard modified the milestones: v1.9.0, v1.10.0 Jun 27, 2019
@unknownbrackets
Copy link
Collaborator

I wonder if there would be drawbacks to calling setSustainedPerformanceMode just every second or even frame.

Maybe the only solution to our weird race conditions with backbuffer size (immersive) and sustained perf is a timer that rechecks them every 73 frames or something...

-[Unknown]

@unknownbrackets
Copy link
Collaborator

We call this a bit more now, has anything improved? Make sure you're testing the latest git build (v1.9.3-754-g6edf4ddc5 or newer.)

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.10.0, Future May 17, 2020
@unknownbrackets unknownbrackets removed this from the Future milestone Apr 12, 2021
@unknownbrackets
Copy link
Collaborator

This issue is being closed because it hasn't been updated with feedback.

It's hard to tell when fixes in PPSSPP might fix other games, and sometimes certain settings or cheats may cause bugs that can't be fixed.

If you have more information or can confirm it still happens in the latest git builds, please reply to this issue and it'll be reopened. If you have a new issue with the same game, just create a new issue instead.

-[Unknown]

@ghost
Copy link

ghost commented Oct 27, 2021

Why I cannot enable sustained performance mode in ppsspp?
IMG_20211027_232827

But present in both ePSXe and DuckStation (ps1 emulator)?
IMG_20211027_232640
IMG_20211027_232608

@unknownbrackets
Copy link
Collaborator

For some reason, my device says it doesn't support it. I noticed DuckStation is not even checking for support:
stenzek/duckstation@3b433d8#diff-b5c324b11f05a6b53b367c41fee15123da64aaf3774f3b3cc8707087f8b1b323R687

Are you sure it's actually doing anything in those emulators? This might actually be a bug in them. Though I'm not sure why Android on my device says it's unsupported.

-[Unknown]

@ghost
Copy link

ghost commented Oct 29, 2021

For some reason, my device says it doesn't support it.

Weird that my phone is supported 😂 btw what is your phone unknown?

Are you sure it's actually doing anything in those emulators? This might actually be a bug in them.

I don't feel any improvement when I enable it 🤔

@ghost
Copy link

ghost commented Oct 29, 2021

But I notice this on my logs.


[10-29 13:27:30.588 1382:9647 D/PerfShielderService]
com.github.stenzek.duckstation|com.github.stenzek.duckstation/com.github.stenzek.duckstation.MainActivity|201|7725634851844|147|0|2

[10-29 13:27:30.589 3114:5004 W/MiuiPerfServiceClient]
interceptAndQueuing:28343|com.github.stenzek.duckstation|201|147|unknown|null|com.github.stenzek.duckstation/com.github.stenzek.duckstation.MainActivity|7725634851844|Slow main thread|2

@unknownbrackets
Copy link
Collaborator

It shows as supported on my Pixel 1 (Android 10) with a slightly older version of PPSSPP, but not on a Pixel 5a (Android 11 or Android 12.)

-[Unknown]

@hrydgard
Copy link
Owner

I think they kinda gave up on the feature, it wasn't used a lot I guess

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

No branches or pull requests

3 participants