libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.08k stars 1.81k forks source link

Back with another streaming/remote gameplay issue. #9435

Open klepp0906 opened 5 years ago

klepp0906 commented 5 years ago

First and foremost consider this:

Description

Sigh - back again, im the worst i know. A lot of streaming issues that werent present before, popping up now. @LazyBumHorse helped resolve the last one which was due to when shaders were being applied. I believe ive omitted that from being related in this case, as I've removed the shader entirely (and mucked with the setting he implemented). Also removed anything from loading on start apart from the game. .

I believe its a retroarch issue and not a dolphin issue partially due to the aforementioned shader issue which behaves in the same way (blank screen with audio) and partially due to the fact I tried 2 different dolphin cores, a known good i was using to circumvent another issue from may'ish that streamed fine in the past and tried the newest push from i believe last week.

Anyhow, I tried to return to twilight princess today and got a black screen with audio playing. I could still go in and out of the RA menu (and see fine at the points I was in the RA menu), but no gameplay would appear on my tv (or if i looked at the pc I was streaming from, screen was black as well).

If launched at my pc. Works. If launched at my pc through steam, still works. Only stops working if launched through steam from my tv/streaming.

I did try 4 diff nvidia drivers. Also tried an older RA which had worked before which curiously gave the same result, so im not really sure what to think.

Its worth noting, and probably relevant that I can start a game streaming via a command line shortcut in steam and it works fine. (takes ages to load relative to opening one in RA for unbeknownst reasons) but when it finally loads, it works fine. Its only launching through a streamed retroarch that it craps out. All other systems are fine.

Sorry this is so vague, Ive eliminated all i know to. If theres anything else I can do to narrow it down by all means. Ive already got some hours in so Im ready to see it through. On the flipside, i know its obscure and not everyone streams, so i imagine priority is somewhere near the bottom. Tis out of my hands.

Expected behavior

The game to display when streaming it :)

Actual behavior

I get a popup about my config being loaded over the top of a black screen that stays black. Yet i can hear the game running in the background, and can go freely from the black screen to the retroarch menu and back in. Its purely the game render not showing up.

Steps to reproduce the bug

  1. Create a non-steam shortcut to retroarch.
  2. load retroarch from said shortcut on your platform of choice. steamlink/shieldtv etc.
  3. navigate to, and attempt to play a wii or gamecube game.
  4. enjoy the soundtrack

Bisect Results

Wish i knew more other than it worked, and now it does not. Unfortunately its been some time since I last tried. Dolphin commits are few and far between, and I tried one from may with the same result, and dropped in a 1.77 retroarch with the same result. Probably not helpful >.<

Version/Commit

You can find this information under Information/System Information

Environment information

LazyBumHorse commented 5 years ago

Hm... this might actually be the same issue. Afaik, Dolphin compiles a lot of shaders right when starting a game.

Can you try turning on the "Wait for Shaders before Starting" core option and see if that does something? If it doesn't, you can try fiddling with the "Shader Compilation Mode", the "a-sync" methods could help because they might delay the shader compilation just enough for it to "fix" the issue.

klepp0906 commented 5 years ago

I "believe" I did try both of those. However not together. I know I DID try the shader comp mode (ive always had it on async-uber as my computers high end and was my understanding this was ideal, and tried the default with no change.

I tried most of the settings trying to get it working before i came here whimpering to you guys. Its the worst ;p

The wait for shaders Im foggy on whether I tried or not so I'll give it a go today after the morning routine w/ the kids etc and report back. I may not have considering I removed the shader preset without realizing dolphin loaded its own in some fashion.

trotsky40 commented 5 years ago

I started seeing this recently with "newer" cores (Dolphin, PPSSPP) and Steam Link (older cores like SNES9X would stream fine). I was able to resolve by turning on "Use NVFBC capture on NVIDIA GPU" in advanced host options in Steam.

klepp0906 commented 5 years ago

I'll give nvfbc another go (pretty sure i tried that as well) when i try the shader compilation stuff lazybumhorse suggested. Either way, it worked perfectly for ages up until - as you say, recently. Now im gonna have to give ppsspp a try too to see if it happens there.

Will report back soonish.

klepp0906 commented 5 years ago

oh geeze. well, all those suggestions ended the same. No bueno.

also as you mentioned, ppsspp in fact no longer works. Yuck. It appears those arent the only casualties though. I'm grateful you turned me onto ppsspp being included, as it led me to test everything (all 30+ playlists).

Turns out the now-non-workers are Dolphin, PPSSPP, Citra Canary, and Mupen64Plus-Next OpenGL

yikes. Perhaps theres something those in the know can spot that ties those 4 together that will lend some insight into what changed/what the problem is.

I do know they all worked perfectly previously,

klepp0906 commented 5 years ago

What im foggy on, is why the aforementioned will run fine if started from the same platform, through the same app, but by using a command line shortcut as opposed to RA.

same presets, same configs load. same everything. The only difference is its not launched from a playlist via the RA interface.

klepp0906 commented 5 years ago

ftr, i went so far as joining the skip ahead branch of windows insider on a different pc to obtain the wddm 2.7 440.23 branch nvidia driver from microsoft and install it. I can say with certainty now, its not driver related - and the fact it happens on several cores eliminates it being dolphin/core related.

Unless it can be proven otherwise - im calling this an RA problem for sure. Whether its worth the time for someone else to look into is something else entirely unfortunately lol.

I wish it were as simple as being the same problem as the issue you linked, but ive even turned up the delay to like 8 seconds or something crazy and doesnt help. It might be innate shader related (whatever the aforementioned cores load on their own) but not the same I dont think.

If you have any other ideas ill be glad to give em a rip

LazyBumHorse commented 5 years ago

Unless it can be proven otherwise - im calling this an RA problem for sure.

That's a bit backwards if you ask me, since everything works like it should until the streaming software butts in.

But since you said it worked before, we should do more testing in that direction.

Can you

I don't think that all the mentioned cores really do something wrong and afaik we don't have an archive for old cores, so you'd have to do the testing with the newest versions.

Was also wondering: Nvidia drivers have a "shadercache" setting (which should default to "on"). In the best case this should immediately compile shaders it already compiled. So if you start a core, exit RetroArch and immediately restart it, does the issue still happen? (This might actually be what happend in #9340, maybe the shaders were cached because they were loaded in the menu before.)

If it still doesn't work, it could be a change in Steam Link or even Windows 10. Do you have the Creators Update installed? Because that can cause lots of trouble with it's game mode / game bar / DVR / fullscreen optimization and so on.

Maybe someone reported a similar issue with other games for Steam Link. E.g. it doesn't sound unlikely that changing a game's graphic settings (which cause a video reinit) could cause the same issue as with RA, so maybe Google knows something we don't.

I wonder if it's somehow possible to delay the whole core...

klepp0906 commented 5 years ago

Your right, thats fair - RA itself DOES work if im at my pc. So its more of a change with RA that affects it only when using streaming software than an RA "problem" I guess. But yes, it had always worked, and im not talking on the order of months - more than that, much more. I even entertained it was a steam issue, im nothing if not objective. Unfortunately fact that much of RA works fine, makes that unlikely (and anything else including the aforementioned via command line). I was convinced it was an nvidia driver issue at first - as this has happened in the past with them. I went forward and far back with them though, so no bueno.

While i imagine like most software, theres the disclaimer that "not responsible/not required to support working with 3rd party blah blah" or however it goes. The nature of RA, and the fact its literally STEAM probably at least makes this a bit more concerning than otherwise though id like to think.

My assertion about RA is probably bias due to (as you mentioned) our previous similar issue that surrounded shaders that was tied to RA that was resolved.

I will definitely do another round of testing today and get back. Nvidia settings were done at default - that was one of the first things I checked :) I pester you guys enough, i try to do everything I can on my end before I make a stink.

Nvidia does have a shader cache, it defaults to on. When researching similar issues someone said something about "corrupt shader cache blah blah" is this something I should try to turn off and try? Or delete and let rebuild.

I do have the latest windows 10 installed. Unfortunately that seems a dead end as well. Being a gamer (and ex sli user) I have long since disabled gamebar and FSO globally via registry, basically since it became a thing ;p

Ive been poking around the steam forums, and entire internet and the steam forums themselves are pretty dead. I did find references to dolphin exclusive not working right with OGL for some people and a switch to D3D solved it.

With RA it seems if i switch the video renderer or sometimes another setting, itll stream like once - then go to being black again if i try to restart it.

Care to speak on why it works via command line vs not if i stream RA and load from a playlist? What happens differently there as far as the process that could have a bearing on this?

After the morning routine I'll go ahead and try with the shadercache/disabled/cleared etc.

Ill try to rapid restart a few times and see what happens there as well. Also set up an old RA and give it a go.

Will report back.

I'm very grateful for your time and help. considering building a HTPC to run RA on the several tv's i play from is a pipedream unlikely to happen in the near future if ever, remote play is very important to me :)

LazyBumHorse commented 5 years ago

Nvidia does have a shader cache, it defaults to on. When researching similar issues someone said something about "corrupt shader cache blah blah" is this something I should try to turn off and try?

By how I think the problem occurs, turning the shader cache off will be worse, but since we don't know, it's still worth a try regardless.

I did find references to dolphin exclusive not working right with OGL

Hm... so far the issue was always with OpenGL, is that right? Many cores do support Vulkan, maybe you can give that a shot as well? Ah, and make sure to restart RetroArch after switching video drivers, RA doesn't fully support "live" switching yet.

Care to speak on why it works via command line vs not if i stream RA and load from a playlist?

I can only guess that the 'window grabbing' works differently when an application is started vs when the window disappears and reappears again - aka a video reinit occurs, because that's what happens when you start a core from the menu. I'm guessing there's a 'grabbing' delay for the former but not for the latter, something like that?

klepp0906 commented 5 years ago

Ah, that makes sense, I didnt think of it from that angle. Moreso some additional steps RA took when launched via the GUI or something.

As for the dolphin references I'm speaking of - they were quite old and it was with dolphin standalone.

It did launch if I changed to D3D, but i have to do more testing to see if it "stays" that way or just launches once. Even if i toggle windowed fullscreen on/off (which doesnt seem to change anything visibly i can tell, not even a redraw) I can usually get it to launch once (with ogl) it just wont launch again after that. Its hit or miss and I had so many settings (in core options, in RA, with steam, with nvidia drivers) to go through, I did quite a bit of "test one, omit, move on" type stuff and in various combinations.

Not to mention the walk back n forth between my tv and my pc over n over lol. Not fun - but like i first said - im gonna see this through damnit. for remote players everywhere! :p

will be back in a few with some more information for ya.

LazyBumHorse commented 5 years ago

Even if i toggle windowed fullscreen on/off (which doesnt seem to change anything visibly i can tell, not even a redraw)

The setting isn't applied immediately but switching between windowed and fullscreen mode (by pressing F) or starting a core should make it use exclusive fullscreen mode - if supported. Though I heard Windows 10 likes to "convert" exclusive fullscreen into an almost as good windowed mode again, so I'm not sure if it really makes a difference.

I can usually get it to launch once (with ogl) it just wont launch again after that

Keep in mind that it might very well be random if it happens or not because it looks like it's timing dependent. Maybe exclusive fullscreen delays it for a tiny bit though?

klepp0906 commented 5 years ago

ok. first round of testing done.

you may be right about the randomness/timing as I just tested with all of the D3D's and couldnt get it to work with any of them this time.

Also tried the rapid/restarting as you mentioned. No go.

Tried fse vs otherwise. No go.

Cant try vulkan as steam has never streamed vulkan properly. This isnt exclusive to retroarch, even vulkan windows games such as doom wont stream. At this point im unsure if steam will ever address that. Its part of the reason why I use OGL, the other part is since we have no fast driver switching anyways, i need something that works for all cores as I try to be as much "set it and forget it" as i can.

Gonna move on to mucking with the nvidia shader cache and then setting up a standalone old RA build.

Will report back again in a bit.

klepp0906 commented 5 years ago

next round down.

shader cache disabled makes no difference apart from raping my pc's startup time something awful. I disabled and cleared it. No go. So restarted it and still no go.

Went ahead and downgraded steam to a minimal bandwidth, quality, and resolution. even tried software encoder to remove hardware encoding from the equation.

Same result.

Gonna go find an old retroarch now. and try that angle.

klepp0906 commented 5 years ago

Well, tried 1.70 as you suggested. No go there either. Now im at a loss. @trotsky40 what platform are you running on out of curiosity? and what gpu?

trotsky40 commented 5 years ago

I have it running on two systems:

Main system is a Hades Canyon NUC with an AMD GPU (RX Vega M GH) and haven't had any issues with Steam Link and RA (this is my "prod" system that my son uses).

Secondary system has an NVIDIA GTX 1060, updated to the latest GPU firmware, Steam, and RA nightly. I was seeing the same behavior as you on this one but enabling "Use NVFBC capture..." resolved it for me. I can't narrow the start of the issue down beyond "recently" because I only use this system for testing out new cores or if I want to play something while my son uses the main system.

klepp0906 commented 5 years ago

yea, im having the same issue with narrowing down the start, even though as you say - it was pretty recently.

I guess it has something to do with nvidia encoding/decoding relative to steam and the timing launching RA from command line vs playlist.

I asked obviously to see if you were using an nvidia gpu (you are - though i can omit it being a driver thing as I used a half dozen versions ranging back months - to some that are meant for the next windows build, and even vulkan developer drivers). Also to see if you were using a shieldtv as the platform, as they updated their OS recently and I thought it may have been related to that. At least that can be removed as a contributing factor then.

klepp0906 commented 5 years ago

you using the steam client beta or non? I guess i should eliminate that as well.

EDIT Whelp, can omit that too. Rolled back to non beta. It started the first time, then wouldnt start anymore after that. Ultimately the same as a ton of the variables above. Sometimes when i first make a switch of something major, it'll load proper once and thats it.

klepp0906 commented 5 years ago

i really dont know what it can be now. Ive tried old RA's. ive tried old steams. ive tried old drivers. I even tried an old dolphin core.

a question about the setup your using nvfbc on. Are you streaming 4k?

trotsky40 commented 5 years ago

No, I just stream in 1080 from both computers.

klepp0906 commented 5 years ago

okay - i asked due to what seems is a limitation of nvfbc of 1440p anyhow. It would be great to see if it worked around the issue but A) it wont work with retroarch for me period (more on this later) and B) when I use it, it automatically downscales my captures to 1440p for who knows why.

As for RA not allowing nvfbc (for me) i think it has to do with retroarch's wonky full screen behavior. I dont believe its always been this way, but for a very long time it has not allowed for a true full screen exclusive.

I can mouse in and out of the game area onto another monitor with no repercussions, fast all tabbing without redraw, it behaves like its borderless windowed more or less.

the issue is talked about here https://github.com/libretro/RetroArch/issues/7430

Anyhow, I tested with witcher 3. I can enable NVFBC and it works (at 1440p lol) until I change from fullscreen to windowed fullscreen, then it stops working. If i swap back to FSE, it works again.

The fact it doesnt work with RA (irrespective of the resolution issue) seems to me that its seeing/treating RA as borderless and not true fullscreen. Who knows what other ramifications this has with vsync and input lagand such, but its been the case for quite some time, and of course never hampered my playing remote before (course i never had to bother trying nvfbc before either).

So in short, if i could get nvfbc working w/ RA to begin with - id try it and presume it would work around the issue at least. Unfortunately - for me - dead end until someone addresses why it doesnt work as proper fullscreen.

I'm digressing though.

As for the issue at hand, ive spent all day testing every single variable I can think of. Its simply not gonna happen without intervention from someone much higher up the ladder than I. At least if push comes to shove, I can add a command line shortcut to games i want to play. Inconvenient, sure. Janky looking? you bet. But it will load/stream properly that way ;p

I did cross post to everywhere under the sun, so should someone on some other streaming/steam/gpu forum reply with something that is helpful, I'll report back.

klepp0906 commented 5 years ago

add beetle PSX HW renderer to that list.

SW works fine. If HW is set, it requires loading from command line vs loading through retroarch in order to work.

Whatever ties all those aforementioned cores together will likely help identify whats going on I guess.

Is hw rendering what all the aforementioned cores have in common?

klepp0906 commented 5 years ago

you know, im still digging into this.

turns out if i set retroarch to run in a window, it will work through the RA interface. Unfortunately it also puts some unsightly letterboxing across the top and bottom of the screen.

Soooo frustrating. Cant understand how or why this would happen considering everything is 4k through and through end to end.

tried the borderless windowed toggle, but as noted in the issue above, it pretty much does nothing/changes nothing.

Also noted, if i minimize steam big picture mode - and run RA straight from the desktop it will work as well. Its some interaction with steam and retroarch and the capture method.

@trotsky40

in my never ending saga to get this stuff working again - i found this https://developer.nvidia.com/capture-sdk

looks like NVFBC is leaving the building. If its a workaround, might not be for long >.<

LazyBumHorse commented 5 years ago

turns out if i set retroarch to run in a window, it will work through the RA interface. Unfortunately it also puts some unsightly letterboxing across the top and bottom of the screen.

How unsightly is "unsightly"? If it's just a little bit, it could be because of the menu bar which can be disabled under User Interface -> Menu Bar.

klepp0906 commented 5 years ago

its unsightly in that it crunches down the image and puts a 1.5" black bar across the top and the bottom of the tv :p

menu bar is already disabled unfortunately. Dont you worry, im gonna figure this out. I'm beginning to wonder if its something that changed with windows, one of the last few windows updates. I did find sprinklings of people complaining about a recent windows update wreaking havoc on OBS.

The fact that beta or non beta steam client doesnt fix it. Old or new nvidia drivers doesnt fix it. Even different RA's and different core versions doesnt fix it. I just dont know.

What im stuck on is the fact it works fine via CLI, fine windowed, and that past issue we had with your push & beetle psx. Its starting to look like that while similar, may have just been isolated and coincidental relative to this.

I re-enabled game mode and FSO just to test, and the result was the same. Windows 1909 is soon, and with it wddm 2.7 i believe, so perhaps that'll shake something loose.

klepp0906 commented 5 years ago

well, headway has been made. Sort of.

If NVFBC will in fact circumvent the aforementioned issue, I at least think I understand whats going on a bit better.

I believe retroarch isnt triggering NVFBC because its not being seen as a full screen application due to the issue report I referenced above.

The downscaling to 1440p, I do have figured out - and its obnoxious.

I use windows built in scaling to 150% due to 4k on a 27" being painful to read. It seems thats what does it.

Helps me about 0 considering A) I cant NOT use the windows scaling, and no idea who i'd take that up with anyhow, especially since nvidia is deprecating nvfbc.

also even if microsoft/nvidia were able to untether them from one another (or theres a work around, just found this out - havent begun looking) it still leaves me with retroarch not properly functioning the way normal fullscreen exclusive apps function, and as such not triggering nvfbc anyhow.

Oh, and theres the fact this all worked without needing nvfbc since I began using RA anyhow grrrrr! At least some headway in the several days ive given this though.

honestly RA aside, if I wanted to play a regular game using nvfbc id literally have to change the windows setting each time. Absurd. (even though to be fair i do 99.99% of my gaming w/ RA)

Interesting to note, if i change both displays to 100% scaling, I get 3840x2160 captured. If i change my accessory display (not the one that displays games/RA) to 150% (my usual) and keep the primary at 100%, i capture 3840x1440. If i change both to 150, thats when I capture at 2560x1440.

absurd.

klepp0906 commented 5 years ago

so after some research - it seems there is no workaround for the NVFBC thing regarding the scaling that affects it. It is part of why its deprecated. If your interested in the capture modes downfall due to limitations, what those limitations are, and what is/should be alternatives - see here. https://developer.download.nvidia.com/designworks/capture-sdk/docs/NVFBC_Win10_Deprecation_Tech_Bulletin.pdf

As for it not working with retroarch see #7430

regarding the agnostic game-polled and game-delayed capture methods that are applied outside of NVFBC (that always worked until recently) based on the only troubleshooting im capable of doing with my limited knowledge - I'm gonna have to pin this one on microsoft more likely than not.

Waiting for them to push 1909 with high hopes, as what im certainly not gonna do is get an older windows image and format etc.

In the meantime, everything works perfect via commandline - still wish i understood the discrepancy between the two. Would make more sense if everything captured via commandline, and nothing did via retroarch. Yet most stuff does via retroarch, including retroarch's interface itself.

I dont doubt it may be circumventable from retroarch's side considering its only some stuff not working - but Im also reasonable and I knew from the getgo that remote players is likely a minority of your userbase and dev time is limited and almost entirely altruistic.

I wont clutter this up anymore, unless i magically stumble upon a solution and/or windows fall update or w/e fixes it - it is what it is for now.

lesson learned. Now i know to test retroarch before each and every upgrade, whether it be cores, versions, drivers, or windows releases. Savage!

EDIT: so I just had it randomly work again. Seems when it works, i click the game in the playlist and it loads it up quickly and all is well. 99% of the time i click it and theres a delay between running it and the overlay popping up of a couple seconds with a black screen which is probably where the breakdown is happening.

klepp0906 commented 5 years ago

worth mentioning, the standalones work. Spent all day trying to narrow down whats left.

I believe the problem comes to pass due to the lapse of time when retroarch launches a game vs when the game actually presents on the screen.

We're talking 6-7 seconds and this is on a 8700k/2080ti pc with 32gb of memory.

Whereas via CLI its almost instantaneous.

the standalone is somewhere between the two.

So what is causing retroarch to launch things so slowly from the GUI?

I cant say. I just sourced some VERY old nvidia drivers im going to try, and imaged my hard drive and am about to roll up to windows insider fast ring to alleviate those two "further" as being the culprit.

I reaaaaaally dont want to use standalone emulators. Really really.

klepp0906 commented 4 years ago

yikes, again with a break in playing cause... life.

Now even closing content causes the stream to freeze. well on some cores (lighter ones it seems) the freeze is temporary, 2 seconds and you can carry on as usual.

things like psx hw (loaded from command line, cause the OP problem still persists) once the content is closed, the screen freezes. Can hear it running, can navigate, but the image is frozen.

whatevers been changing under the hood has not been friendly to remote play. I'm to the point now Im entertaining the possibility of having to use standalones if things get much worse.

afaik save states etc wont save if you dont close the content properly, so that means every time i quit a game - i now have to go to my pc and shutdown RA there and re start the remote play.

ugh.

LazyBumHorse commented 4 years ago

things like psx hw (loaded from command line, cause the OP problem still persists) once the content is closed, the screen freezes. Can hear it running, can navigate, but the image is frozen.

And that isn't temporary I take?

Now

Since what version? Do earlier versions work? (You can look it up under Information -> System Information -> Git version)

whatevers been changing under the hood has not been friendly to remote play.

That's the thing, I don't think anything related has even changed.

afaik save states etc wont save if you dont close the content properly

Save states should always be written immediately and closing content should not affect this at all. Save games work differently however, they are usually written periodically (every few seconds) or when closing the core.

klepp0906 commented 4 years ago

Ill do more testing ideally later today to see if i can pinpoint a point in time which it began behaving that way in regard to closing of content. To say things have been busy, ugh - just ugh.

as for your first question, no with psxhw (and presumably the rest of the cores that present the initial issue) it was permanent. Had to go to the pc to shut down RA.

As for states, your saying if i were to save state, and then do the equivalent of an end-process via control-alt-del it would still be saved? This would be good news at least. I know conventionally saves via memory cards have that 10 second refresh or whatnot you can set in settings to make sure your saved which is likely where my assumption it applied to states as well came from.

klepp0906 commented 4 years ago

so, im back with a development.

I did some more updating of RA and associated goodies and it stopped loading from the command line even. lol. the aids that is trying to play remotely has finally reached such a level im beginning to question if its worth exploring other avenues going forward.

fortunately (in case it helps you guys localize where this stems from) the failure to load (and a few other RA quirks) led me to attack google with a ferocity today.

It led me to this setting.

image

which now allows me to load everything. I can load from command line, i can load from the gui, psx hw, dolphin. All is well. The shame is it requires what amounts to a power user to even have nvinspector as the option isnt exposed anywhere else.

A few more related things to mention.

First and foremost, apart from this setting allowing me to play over steam again - it seems to have altered the way the window itself behaves.

I say window, because retroarch hasnt ran in true fullscreen for a loooong time. (the optimist in me hopes that this finding will lead to the culprit behind that as well lol).

Still, thats neither here nor there at the moment.

I use 2 displays. Before turning the ogl buffer flipping on (it defaults to off) if I moused over to use my browser, then returned to my main display and gave Retroarch focus back, it would flash, almost like a refresh or redraw. After enabling the setting which seemingly fixed everything (aside from giving me true fullscreen exclusive ;p) this is no longer the case. I give focus back/click back on the window - and nothing happens, it behaves as if the mouse never left.

I'm not sure if this is how its supposed to function or not, but it allows streaming to work - so evidently the issue has something to do with ogl buffer flipping (whatever that is :P)

You guys would know more than I.

klepp0906 commented 4 years ago

holy mother of god. that setting allows me to even stream vulkan now... game changer.

of course i shouldnt have to dive into nvidias hidden driver flags in order for this stuff to work. not sure where the fault lay, or why I do.

i found this http://discussions.virtualdr.com/showthread.php?133706-what-is-buffer-flippimg-mode-and-vertical-sync-mean-on-A-NVIDIA-gforce4-ti4200 which is old as balls, but if I had to take a big giant guess, id imagine the default is auto-select and its choosing wrong maybe. I think "on" is using block transfer now?

LazyBumHorse commented 4 years ago

Huh, so this tweet was relevant for this issue as well, never would have thought, seems you cracked the case!

I'm not sure if there's anything we can do about it however, since this seems to purely be a driver decision.

At least when Vsync is on, OpenGL uses at least 2 frame buffers, one buffer to draw the scene in and the front buffer which is displayed on the screen and those 2 buffers get "swapped" once the next frame needs to be drawn, so the last drawn frame buffer becomes the front buffer.

I believe the "force blit" option changes this behavior so it copies the buffers instead, which is worse performance wise but more compatible in cases like this.

It might be that turning Vsync off is another "fix" for this issue, since it might only use one buffer and thus there's no swapping? No idea.

klepp0906 commented 4 years ago

yea, after plenty of salt - at least i can make it work. I'm not sure at which point this became required, but it used to not be. Performance wise im not sure where it would suffer. be it latency, frame rate, cpu/gpu load etc. I havent noticed anything glaringly different other than it working and not flashing/refreshing when losing/regaining focus.

I do recall someone somewhere along the line saying to disable triple buffering, but its not enabled (at least in nvcp) anyways. Playing without vsync is a no go, but at some point today ill give it a test just to see. I think i probably already tried that during the first barrage of testing but cant say for certain as ive tried so much.

This leads me to my next issue which is why exclusive fullscreen wont work. I was really hoping it was related to this, but no such luck. That causes so many complications. If there was fullscreen exclusive there wouldnt be a flicker/refresh/redraw as i wouldnt be able to leave the screen anyways, and I'd be able to use nvfbc capture instead of nvenc as a black screen work around (which has been suggested, but never an option for me due to the inability to get RA to go FSE). Never mind the performance ramifications and the hassles it creates with other frontends that count on fullscreen for specific functions.

part way there now though. Certainly a large weight off my back.

Thanks for hanging out and following along ;p Hopefully someone in need finds this cause lord knows info is limited ;p

n8jadams commented 3 years ago

Is there any update on this?

I am running into this problem with a Radeon RX 580 gpu in v1.9.0 on Windows 10 with the Vulkan renderer. Oddly enough, a workaround is to set User Interface -> Open Desktop Menu on Startup to ON , boot Retroarch, and then alt+tab into the game window and press F to go into fullscreen mode. The framerate is skippy when I do this, and it's more trouble than it's worth. but perhaps this is a clue to figuring out what's causing this bug.

Also, if I run Retroarch with Global Steam Controller it works as well, although it seems that the framerate still seems skippy...

EDIT: I jumped on the Steam beta and set the video driver to DX11 (same as my duckstation hardware rendering,) and everything in Steam Link works perfectly.

klepp0906 commented 3 years ago

if you can find a way to change the buffer method on the amd side of the fence, i imagine that would solve it and be a bit less cumbersome.

Had to use a 3rd party utility to do it with nvidia - no idea whats out there for amd cards though.