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
Games running way better with their windows' unfocused #8363
Comments
Yup, started using RPCS3 2 days ago and I get the same thing (you can see and heard clearly the difference when I have 7zip window in focus vs. RPCS3): https://youtu.be/yd82ziVAa7Y edit: A video I made a bit before, showing in movements (I didn't turn graphs ON yet however): https://youtu.be/5k08BAVT-lg The SPU utilization goes from ~30-40% to ~60-70%. Pretty much unplayable with it on the foreground :( I could post a log file a bit later if it can help. Windows 10 |
@bslenul As a workaround, I should probably mention that controller input is still registered, even when the games aren't in focus. This enables you to play with a maximized and unfocused window, until this issue gets properly resolved. @Lenox548 Oh, that's interesting. I searched high and low for a ticket that describes this behaviour but I couldn't find anything, sorry that I've missed it. This isn't really a regression however, as I'm more or less sure I observed this issue prior to the PRs mentioned in your ticket. The underlying issue was always there, just didn't surface this reliably. I'll keep this ticket open, and so if a fix arrives and it fixes the issue for you as well, both will be closed. |
@dio-gh Yup, I'm aware, but thanks! I think I'll either play unfocused like you said, or I'll just wait for a fix. @Lenox548 I just tried the version you mentioned in your issue (0.0.7-8677, no graphs for stats in this version it seems): https://youtu.be/tFlGluyDKlo It is indeed much better, I can't really see any difference with Both videos were made with the exact same settings btw:
The other options are defaults. Not sure it will be of any help, but here's the logs just in case: |
I'm facing the same issue, which is quite frustrating cuz I can't "unfocus" on my hyperspin cade... I tried switching every type of settings and the result is always the same. Slow game while focusing, and smooth game while running in background... |
I personally gave up, I still update from time to time, then I cross my fingers and launch the game, but nope... It's soooooooo frustrating because you know RPCS3 capable of running your games in a decent way since you can see them running fine unfocused, and then as soon as you select the game window it becomes a stutter fest... Don't get me wrong, I still think it's an impressive emulator, and I still love following/watching progress being made to it, I just can't enjoy it by myself :( |
This issue is going to be looked into a bit later, kd is crunching through other tickets right now. Be patient. |
That's great news (well, not for kd I guess... :p ), thanks for letting us know! 👍 |
I'd like to add that setting the process priority of RPCS3 lower actually helps in this case (at least for me), but even at lowest priority the performance is far worse than when unfocused. (This is on Win 7) EDIT: And I can confirm that the problem doesn't happen on 0.0.6, but does on 0.0.7. |
Still happening in rpcs3-v0.0.11-10808-af9e217f_win64. There is sound chopping too because of the FPS drops. Tried the following, but no dice:
Removing focus from the game window seems to fix the FPS, but then how do you play the game using a keyboard? This issue doesn't happen in an older build, rpcs3-v0.0.5-6815-c9669818_win64. But that build has its own issues, like the DLC not loading often times. System Configuration: |
A recent PR fixed Goldeneye 007's graphics and while testing it I found out that for me the frame rate will halve if I have the window focused. This happens even when something untaxing like the intro videos are playing:
I have tried just about every single option and combination I can think of to get around this but no dice. I also tested all my other games and found that only Killzone 2 has a similar issue but instead of an across the board FPS drop I just get bursts of dropped frames and audio drop outs every few seconds when the window is focused. I also agree that it might be a threading issue - I'm thinking that if you have more than four cores this doesn't happen even on demanding games. I saw a report on the forum from someone with a Ryzen 9 4900hs getting a steady 60fps in Goldeneye, for example. My Specs: |
Just so we're on the same page - this only happens with 4 threads or less, right? |
^ I was about to comment that every single person in this thread has a 4C4T(which is horrible for rpcs3 in general). |
I can't say for sure but it is starting to look that way |
Some screenshots that illustrate the issue for me: |
Is that a game specific problem The only difference that I probably have is that I am not using the latest nvidia drivers i7-6700HQ with GTX1060 and 442.74 drivers |
For me yes - I tested six games but only two were affected. Of the two that were affected one suffered far more than the other (see the screenshots in my post above). |
I don't know if it's because of the recent Windows update I had or if there was some work made on this issue in a recent RPCS3 update, but it's much better for me now: https://youtu.be/RJYMPMJbSHI So let me explain what happens in the video:
So basically, as long as I don't move the RPCS3 window, it's fine! |
OK so I tried going back to 0.0.10-10477 (same version I used in a few posts above) to see how it behaves now, and same thing as my post from yesterday, so I'd guess it's thanks to the Windows update? 🤔 Or maybe something else, but it doesn't seem related to recent RPCS3 versions. Also, idk if that's an interesting find or not but I was doing some tests on a fresh RPCS3 version and while waiting for the PPUs to compile before the 1st launch of the game I started a twitch stream in the background and to my surprise it had the exact same issue! edit: Here's an example with a YT video: https://youtu.be/Pizwtq40BkY |
I can imagine that the Qt main thread (GUI thread) is a prioritized thread, which would mean that when focused, it tries to handle events like mouse input, window movement and so on, taking away recources from the OS or the emulation. But that's just me doing some brainstorming. |
According to kd, it's the RSX thread being pinned causing it, but he didn't have the time to investigate yet. |
Makes no difference at all for me |
@davewuk @bslenul @MIC132 @Rex000 @TheBloodstomper Could you guys retest with
The PR has been merged into master since, so just update RPCS3 to test. |
Thanks for the link to the build, but unfortunately no change for me.
|
I'll do more testings later, but I booted Demon's Souls, loaded my save and played just a bit and it seems to have fixed the issue for me as well! 🎉 |
I can confirm that the problem has been fixed here for me, I can't believe it because it has plagued me for years and now it's perfect, this is wonderful. thank you very much for resolving this issue RPCS3 Team. |
Still the same issue on my end. |
Unassigning, this issue has been shown to not be caused by RSX routines which was the first hypothesis. Seems to be caused by windows thread waking behavior which is dependent heavily on windows version and some undocumented windows kernel behavior. |
Hello friends, So, I ran into the same problem while playing The Guided Fate Paradox, 60 FPS clean sound while on BG, choppy audio and stuttering video while on FG. What I did to solve was, instead of getting RPCS3 to low priority, getting it to realtime priority, the highest. It fixed for me, there are some very ocasional stuttering still, but it happens mostly if I try to do things other than using RPCS3. By messing with Core Affinity on task manager, it really seems like a thread/core schedulling problem. Now, how to solve, I don't have the slightest idea unfortunately. Hope this helps someone else! |
Setting the process priority can genuinely help, but using the realtime priority may lock up your system completely. Use it with caution. |
Maybe this is related to that fix we made a while ago (The one where the running games with no-gui was slower). |
I don't think this issue is related to RPCS3 in particular. I suspect it's one of Win10 "Smart" features, but I can't be certain. |
My original report was made on Win8.1. More powerful hardware also fails to show this issue. |
Since this issue is specific to hardware that is under the renewed recommended requirements of RPCS3, should I close the ticket, or should it be kept open? @Nekotekina It's probably a mixture of very difficult to investigate issues, and the prospect of fixing them isn't super great. There hasn't been an update on it for more than a quarter either. |
There were no replies, but I'm reasonably sure that this isn't meant to happen, no matter how under someone's PC is of the requirements. I'll keep this open and unsubscribe. Good luck in tackling it, seems pretty tough. |
@dio-gh Yeah I agree that this isn't meant to happen. I have a feeling something is being overlooked likely unintentionally. |
I'm willing to bet that the problem just goes away with a better CPU . |
I suspect that windows skips some frames when it is out of focus, so the frames seem higher but in reality if you try on something in motion you will realize that there is some stuttering generated by the skipping of the frames. |
2022, issue still remains, although it is circumventable by just pressing somewhere on your desktop, on your second screen while in fullscreen for example, it is still odd. |
Maybe it's a Multimonitor issue. |
I only have a single monitor and still have the same issue in the same games with the latest build. I've given up on Goldeneye, I don't think it will ever be playable until I upgrade my PC. |
Recently I had to reinstall windows from scratch and I found, to my surprise, that the issue had gone away. Goldeneye still suffers from very uneven frame rates and is still hard to play but it doesn't matter if the window is focussed or unfocussed any more. |
Closing since this seems to be unrelated to rpcs3 specifically. |
To my absolute surprise there was no ticket about this (despite being known for years now), so here we are. The issue is as in the title, so let's dive into the details we know so far!
Preconditions:
Results:
I'm running a Windows 8.1 Pro install with an i5 4440 as my CPU, and the frametimes probably speak for themselves. With the game window in focus, the frametimes become wildly erratic, and the framerate generally drops to at least its half. After unfocusing it however, everything smoothens out like a charm.
However, I am "lucky" to say that I can repro this issue with perfect reliability, so confirming a fix shouldn't be a nightmare (hopefully).
Clues:
During a brief troubleshooting session with kd yesterday, we found that the issue is:
Current clues seem to point to a thread prioritization issue. This is somewhat confirmed by setting realtime priority for RPCS3, as that also alleviates the frametime and framerate issues, just like unfocusing. Hopefully this will be less of a nightmare to fix than the title makes it sound. 🤞
The text was updated successfully, but these errors were encountered: