psieg / Lightpack

Lightpack and Prismatik open repository
GNU General Public License v3.0
1.57k stars 188 forks source link

UPDATE 13/12/2018: still framepacing/freesync issues with Win8 Desktop Duplication #199

Open Garwinski opened 5 years ago

Garwinski commented 5 years ago

I was one of the few people that received 1809 before it got pulled back because of the loosing files situation. I noticed that after that, freesync did not work anymore in full screen games. I tried reinstalling drivers, reinstalling all VC++ etc. In the end, I even grabbed an ISO of 1809 and did a fresh install, freshly installed AMD drivers and Prismatik with that, and still, freesync did not work in full screen. However, I only discovered recently that Prismatik plays a role in this.

When I use desktop Duplication (with and without DX hooking) freesync is not engaged in full screen. when I choose WinAPI as a capture source, all works fine again: Freesync is engaged again in full screen games (with a heavy performance cost of course compared to Desktop Duplication, but that is a good trade-off vs loosing freesync for now). I can replicate the issue 100% of the time on my machine: Start game with Desktop duplication: no Freesync, choose WinAPI: Freesync engaged. Games I have tried this with:

Ghost Recon Wildlands COD: MW 3 Kingdom Come: Deliverance ARMA 3 Metro Last Light Redux Squad Total War: Rome 2 Ryse: Son of Rome Frostpunk DOOM Alan Wake 3D Mark benchmarks

All applications showed the same behaviour.

I am not sure if there is a problem with desktop duplication in 1809 and it will be fixed when 1809 will be released to the public again, or that this is due to a change in how Windows handles Desktop Duplication, due to a change in AMD drivers in general, or due to the new driver model. If a change in fundamental ways Windows 10 handels Desktop Duplication is the culprit, I thought I would give you a heads up that changes are coming to systems in Windows 10 which are used by the Desktop Duplication method of Prismatik.

I included my dxdiag. I have a Fury X and this issue has been there with all the 18.9.x AMD drivers and later. 18.9.1 and 18.9.2 did not have WDDM 2.5 support yet, but I had the issue non the less on those drivers in Windows 10 1809. I am now on 18.10.2.

Feel free to ask for any more information if you need it. I would love to keep using Freesync in combination with Desktop Duplication, as Freesync is a must, and the performance impact of Desktop Duplication is so little in comparison to the WinAPI method. Glad there is a fallback method to make them both work, but it is not ideal.

DxDiag.txt

EDIT: So I was one of the few people that had VSR (virtual super resolution) support for non-standard aspect ratios (in my case, 21:9) in the latest few drivers https://www.reddit.com/r/Amd/comments/9ndqzw/amd_radeon_software_adrenalin_edition_18101/e7ls9dx . This was the case consistently: after a reinstall of drivers the option was still there. I did look at this option as the cause of my problem. I tried it enabled (with my normal resolution and refresh rate, so just the option enabled, I didnt make use of it) and disabled, it made no difference for the problem described above. I did an in-place update from 18.10.1 to 18.10.2, as this newer driver was just some added support for new games.

However, after reinstalling the latest driver (18.10.2) from scratch again today with DDU (which I always use for a clean install), I dont have the option for VSR anymore, and lo and behold: Desktop Duplication works again in games with Freesync!

Probably the VSR option was enabled by accident in some of the latest drivers for non-standard aspect ratios, as they are testing it probably for their yearly milestone driver at the end of the year (VSR for non-standard resolutions/aspect ratio is the most requested feature at the moment), but the implementation is not yet complete/final, and the code stayed with me from 18.10.1 to 18.10.2, while they removed it in 18.10.2.

As I had reinstalled multiple driver versions from scratch countless times to troubleshoot my issue, I did not think that the small driver 18.10.2 would make the difference, and did not do a fresh install for this minimally improved driver...

Once they officially roll out VSR support for non-standard aspect ratios, I will hold my breath as to whether the issue will return. I am hoping their implementation for VSR was very incomplete/in an early stage and that any resulting issues with Desktop Duplication will be solved by the time they will release it officially. It does seem to be the case that this 'experimental' feature was related to my problems.

Anyways, problem solved... for now... dramatic foreboding music

EDIT 2: For some reason, the VSR option was available to me again after a few restarts, and now indeed, the issue returns. The VSR option and the desktop duplication problem seem to be related, or at least the problem seems related to my gpu drivers.

Garwinski commented 5 years ago

I still get very bad framepacing/freesync issues with Windows Desktop Duplication. So I have been using winAPI in combination with DX hooking for a while now. I upgraded my CPU to a Ryzen 2600 so the cpu load that comes with using winAPI is not that big of a problem for me anymore (in comparison to on my FX9590, and I actually think that the gpu usage of using Desktop Duplication might have more of a negative effect on fps in gaming than winAPI. on a grab interval of 40ms, the usage could still reach 4-5% of my gpu. The cpu load of winAPI is less noticeable in most games ), but I cant for the life of me figure out what is causing this. Anyone else with the same problem?

I am on the newest Windows 10 version (17763.194) and I am using the newest drivers for my Fury X (18.12.2, released today).

zomfg commented 5 years ago
  1. crank log level up to 3 in experimental tab
  2. switch to Desktop Duplication
  3. quit Prismatik
  4. empty C:\Users\<you>\Prismatik\Logs (or whatever it is for you) folder
  5. launch Prismatik
  6. run whatever you have issues with for few seconds (so the log files aren't too heavy)
  7. quit Prismatik
  8. post last file from C:\Users\<you>\Prismatik\Logs

maybe there's a clue... I also use 21:9 (1440p non-freesync LG) with a Fury with same Win10 and AMD drivers, but control panel says "VSR not supported" :( so not sure how the duplication behaves with freesync/vsr combo.

Garwinski commented 5 years ago
1. crank log level up to 3 in experimental tab

2. switch to Desktop Duplication

3. quit Prismatik

4. empty `C:\Users\<you>\Prismatik\Logs` (or whatever it is for you) folder

5. launch Prismatik

6. run whatever you have issues with for few seconds (so the log files aren't too heavy)

7. quit Prismatik

8. post last file from `C:\Users\<you>\Prismatik\Logs`

maybe there's a clue... I also use 21:9 (1440p non-freesync LG) with a Fury with same Win10 and AMD drivers, but control panel says "VSR not supported" :( so not sure how the duplication behaves with freesync/vsr combo.

Thanks, I just did a run of 30 seconds in the timespy benchmark with Windows 8 Desktop Duplication enabled, dx hooking disabled, with log level of 3. The stuttering behaviour was there. Prismatik.0.log

zomfg commented 5 years ago

Looks normal from here... I ran TimeSpy too, looked ok even with 16ms grab interval. What interval do you use and how often do stutters happen? Try this build, but don't hold your breath

Garwinski commented 5 years ago

Looks normal from here... I ran TimeSpy too, looked ok even with 16ms grab interval. What interval do you use and how often do stutters happen? Try this build, but don't hold your breath

I use a grab interval of 40ms. But I also played with this setting, setting it the same as my refresh rate (the ms to get the same fps as the refresh rate of my monitor), or half my refresh rate, doensnt change anything.

What is that build? Never seen it. What does it do differently? I will try it.

zomfg commented 5 years ago

It's from #224

Garwinski commented 5 years ago

It's from #224

Ah, looks like some performance improvements?

What am I supposed to do with the files from the build you send me? I copied them into my Prismatik folder, but I get a bunch of errors about files missing, there are some files very similar named, only the 'd' is missing at the end.

zomfg commented 5 years ago

which missing files? try unzipping in its own folder and executing Prismatik.exe from there

Garwinski commented 5 years ago

which missing files? try unzipping in its own folder and executing Prismatik.exe from there

I searched for the error messages I got, it had to do with vc redist 2015, so I reinstalled those both x86 and x64), still the same problem (see screenshots).

annotation 2018-12-28 000224 annotation 2018-12-28 000241 annotation 2018-12-28 000253 annotation 2018-12-28 000307

zomfg commented 5 years ago

I cleaned the archive, maybe it'll help

Garwinski commented 5 years ago

I cleaned the archive, maybe it'll help

Now it works. Still the same problem though. Btw, nice touch to also display the fps with the grab frequency. To be able to change the color temperature of the lightpack is also a nice feature. Maybe I am going to use this build as my main Prismatik anyways.

EDIT: Your default settings for 'apply color temperature and gamma' give me just a tad more accurate color on my Lightpack than the 'vanilla' Psieg fork, thanks for that anyways.

zomfg commented 5 years ago

All those things and some more will probably be in the next official unofficial-release here, so you would end up with them at some point anyway :) Sucks for stutters though...maybe some time I'll get lucky and will be able to enable VRS

Garwinski commented 5 years ago

All those things and some more will probably be in the next official unofficial-release here, so you would end up with them at some point anyway :) Sucks for stutters though...maybe some time I'll get lucky and will be able to enable VRS

Yea, it is strange that you dont have VSR with a Fury and 21:9 screen. Maybe your 1440p screen requires non-existent/non-supported resolutions above? Would be strange though, my highest VSR resolution is 3840x1620p, so that would be an upgrade for you too. Maybe it only works if one can do 1.5 times the native resolution, and your 1.5 times resolution is not supported? But yea, give me no stutter over VSR (if that is the actual problem) any day of the week, I dont have any heatroom left on my Fury X on most games I play anyways to use VSR. (P.S., when I go through my troubleshooting, I also always do a run with VSR enabled/disabled and gpu scaling on/off (every combination) when I change something that might resolve my stutter problem, just to be thorough)

Btw, your default settings for 'apply color temperature and gamma' give me just a tad more accurate color on my Lightpack than the 'vanilla' Psieg fork, thanks for that anyways, I never was able to tweak the colors to be 100% accurate, with those settings you have more fine control over the colors of the Lightpack, so even if the 'stock' settings for this feature do not give better results for all, this option does give more wiggle room to tune the colors some more. Yea, hopefully they will be incorporated in the next release of the Psieg fork.

zomfg commented 5 years ago

Well in release notes it says

Virtual Super Resolution (11)... (11) Compatible with: AMD Radeon™ RX Series dGPU Products. Supports: Windows® 7/10.

and Fury being R9... I don't know what's going on there. Yeah 1440p probably doesn't help either, I tried setting to 1080p (without rebooting), but the option stays greyed out.

Performance boost aside, what you see is already in Psieg's fork. Also If you use Night Light it should work too now

Garwinski commented 5 years ago

Well in release notes it says

Virtual Super Resolution (11)... (11) Compatible with: AMD Radeon™ RX Series dGPU Products. Supports: Windows® 7/10.

and Fury being R9... I don't know what's going on there. Yeah 1440p probably doesn't help either, I tried setting to 1080p (without rebooting), but the option stays greyed out.

Performance boost aside, what you see is already in Psieg's fork. Also If you use Night Light it should work too now

Nighlight as in, Windows 10 Nightlight? Do I need to enable 'apply screen color modifications'?

EDIT: ah, yes, have to enable that, but it works indeed. Nice! I had some trouble with Prismatik and F.lux, nice to see that the native support for this feature in Windows 10 is supported now.

zomfg commented 5 years ago

yes and yes

Garwinski commented 5 years ago

Performance boost aside, what you see is already in Psieg's fork. Also If you use Night Light it should work too now

How do you mean this btw? Latest release from Psieg is from April as far as I can tell: https://github.com/psieg/Lightpack/releases

zomfg commented 5 years ago

I mean that push requests with features you saw have made their way into psieg's master branch since that release, so good chance you'll see them in the next one.

Krzychowy commented 5 years ago

Having a lot of issues with VRR as well and it seems nothing can be done about it. So I am assembling some low spec secondary PC to stream the picture to from my PC with OBS and install Prismatik there. I don't want to choose between the two, both VRR and Lightpacks are drastically improving my gaming.

Garwinski commented 5 years ago

Well in release notes it says

Virtual Super Resolution (11)... (11) Compatible with: AMD Radeon™ RX Series dGPU Products. Supports: Windows® 7/10.

and Fury being R9... I don't know what's going on there. Yeah 1440p probably doesn't help either, I tried setting to 1080p (without rebooting), but the option stays greyed out.

Performance boost aside, what you see is already in Psieg's fork. Also If you use Night Light it should work too now

Fixed Issues

Virtual Super Resolution may not show up as available on some 1440p Ultra-Wide Displays.

This is for driver 19.1.1, but you probably already saw that.

My problem is so strange. Since I reported this problem, I have upgraded to a new AM 4 mobo (Prime X370 pro), a Ryzen 2600, new DDR4 RAM (16GB 3000mhz C16 with custom timings to C14 without instability, tested with multiple full nights of testing with memtest 86+)and I now have had a Vega 56 for about a week, a new premium-ish displayport cable, but I still have this problem (also, of course, did a clean reinstall of Windows 10 as well after upgrading my pc, and clean reinstall of the drivers with DDU multiple times throughout my upgrades/when new drivers for gpu became available) One would maybe think that it could be software I am always running in the background, but I tested this problem with all background programs disabled/shut off, still the same problem.

I did have a problem a while ago, where when I played Gears of War 4, I would get stutter when the frames went below 75fps (my monitor refresh rate, its an LG 34UM68-p). Troubleshooting that problem, I found that sometimes, some screens have a sort of 'fake' 75hz if the case is that 75hz is only available with freesync enabled. With Freesync disabled, this screen can only go up to 60hz. However, this problem resolved itself after a while, be it from a windows update, gears of war 4 update, or a driver update, (I am not sure as I play the game only every other month or so) and I could play Gears of War 4 again buttery smooth even when the fps went below my max refresh rate.

Even with taking that into account, the problem described in this thread also occurs when I switch to 60hz. Whether it occurs with freesync disabled is hard to discern, as without freesync everything is stuttery anyways. The monitor is however the only 'original' part from since I first reported this problem (apart from my HDD's/SSD's). I of course tested the occurrence of this problem with manually installing the monitor drivers and just using the standard drivers that Windows 10 installs automatically, but does not have any impact on the problem. I also reinstalled Prismatik multiple times, with deleting all settings for Prismatik as well, so that I have to set my settings again, also didnt do the trick.

Maybe it has to do with this problem, which is reported as fixed in the new WHQL 19.1.1?

Some systems running multiple displays may experience mouse lag when at least one display is enabled but powered off.

I will try it now. In my limited knowledge of the way Prismatik captures, Prismatik uses the Desktop Duplication method to capture colors, so it could be related.

(PS: Any new compilation of your updated version available? I really like the new changes you made to Prismatik, and I see you are still adding to it, but I have no idea how to download your updated files for use on a Windows 10 pc)

zomfg commented 5 years ago

Try messing with this thing to see how it and your stuff behaves. It's just a built sample from here, all it does is desktop duplication like Prismatik and shows the actual frame. Don't run both at the same time so they don't interfere. Although it's not an identical process, maybe that'll help narrow something down. @Krzychowy maybe try it too

This is for driver 19.1.1, but you probably already saw that.

Yep! Still nothing with my Fury though :(

(PS: Any new compilation of your updated version available? I really like the new changes you made to Prismatik, and I see you are still adding to it, but I have no idea how to download your updated files for use on a Windows 10 pc)

@psieg released the full build here few days ago, so just grab the last one.

sblantipodi commented 5 years ago

@zomfg I have the same problem with Nvidia GSYNC. after Windows 10 1809 if I use Windows 8 Desktop Duplication GSYNC stops working, if I use WinAPI it works but with real performance penality. I opened an issue here: #244

thank you guys.

sblantipodi commented 5 years ago

@psieg I confirm that I tried the full build released some days ago 5.11.2.19 and GSYNC still not work. the only way to get it working is using WinAPI but with that setting even moving windows around create some stutter, minimizing windows for example is pretty stuttery with winapi.

is there a workaround for this?

zomfg commented 5 years ago

Try what I mentioned above, it won't solve anything, but maybe it'll help isolate something.

sblantipodi commented 5 years ago

@zomfg I'm sorry but what should I do? I downloaded the duplication sample exe but how can it help us isolating something? Please tell me exactly what I should do and I will do it. thanks :)

zomfg commented 5 years ago

I guess just run it as if it was Prismatik (it won't do anything to your LEDs though) to see if you have same issues with VRR. The goal is to see if something else using desktop duplication would cause those issues.

Krzychowy commented 5 years ago

@zomfg For me it is causing exact the same issue as DDupl in Prismatik, basically diasabling G-sync.

sblantipodi commented 5 years ago

@zomfg there is a similar app to prismatik called ambibox. I have the same problem even with that app.

Is this something that Nvidia should fix? Microsoft? Should we produce a workaround for it?

sblantipodi commented 5 years ago

...but at least one app works well... https://www.nvidia.it/coolstuff/demos#!/g-sync

GSYNC demo from nvidia works well even with prismatik set to desktop duplication...

Krzychowy commented 5 years ago

@sblantipodi

There are things that work. For example built-in benchmark for Assassin's Creed Origins works well for me, but gameplay is a disaster (becasue G-sync is functionally disabled). I am playing Grim Dawn now and it is having the same issue as well with DDupl, while WinAPI has more performance impact and is causing some slight frame pacing issues that are causing flickering with Adaptive Sync (I don't have G-sync module in my display)

Krzychowy commented 5 years ago

I have tested the issue with different computer which is running Windows 1803 (17134.471) instead of 1809 and has a vastly different specs (G4560/GTX1050 instead of 6900K/RTX2080Ti) and the issue is still the same, using Win8 Desktop Duplication method in Prismatik effectively disables G-sync.

Don't know how much point there is in testing 1709, but I will try some very early build and then the latest build. It may be a specific update for all Windows versions that is causing this, not necessarily 1809. I will try early 1709 build that I've used before updating to 1809.

Krzychowy commented 5 years ago

I've set up Windows 1709 quickly just to check, the exact build is 16299.15, so very early one. The issue is still exactly the same, both with Prismatik and ddsample provided by @zomfg

Krzychowy commented 5 years ago

I've also tried to stream the picture to a different PC and connect Lightpacks and Prismatik there, and capturing the game with x264 through OBS/NDI seems to work mostly fine (though with a noticeable delay), but capturing the screen with either OBS or NewTek NDI Tools causes exactly the same problems as Desktop Duplication in Prismatik, so disabling G-sync. This is easily identifiable not only but the perceived lack of smoothness, but for example V-sync is not disengaging when framerate drops below max refreshrate, which it should with G-sync, and if it is a double buffered V-sync, then you can see characteristic frametime spikes from 16.6 to 33.3 ms. So this are all symptoms of G-sync not working at all.

zomfg commented 5 years ago

Well, that answers that... As this is more general then just Prismatik, it could mean that it's hard (if not impossible) to fix. The not as bad news is you can look for workarounds that apply to anything related to screen capture. This one for example

Krzychowy commented 5 years ago

Anything you read about G-sync+screen capture leads to a conclusion that there is a massive conflict between the two. Streaming with G-sync ON is stuttering like crazy, also from what I've read recording through NVIDIA Shadowplay also disables G-sync by default. So possibly the graphics driver understands Desktop Duplication as recording and disables G-sync automatically. But then why WinAPI is working and most importantly why is it causing flickering for me when G-sync is enabled. As long as WinAPI would work in all games I don't mind more performance hit or switching between WinAPI for games and DDupl for desktop (otherwise it is laggy as hell), it is far better than inconvenience of setting up secondary PC and streaming a picture to it and installing Prismatik there, which is far from the ultimate solution anyway (delay, performance hit, freaking setting up second PC), despite all the effort and massive inefficiency. But it just flickers :P

sblantipodi commented 5 years ago

The thing that I don't understand is why before Christmas all was working well.

@zomfg that workarounds does not work. Gsync is disengaged even with framerate limiter.

Krzychowy commented 5 years ago

Frame limiter below max refresh rate only disengages V-sync. But in our case its not V-sync that is causing issues, it is likely a graphics driver disabling G-sync for recording as you cannot record with variable refresh rate. Besides, the issues here are exactly the opposite. They are talking about being able to record/stream smooth videos with G-sync enabled, which you can't with variable refresh rate (at least until VRR becomes a popular enough and someone figures that out), so G-sync automatically disengages when driver detects recording to allow smooth recording. We want G-sync to be engaged even while recording no matter if the capture is smooth or not, it wouldn't make a massive difference for us, mostly latency matters.

sblantipodi commented 5 years ago

@Krzychowy this does not explain why before Christmas all was working well. I tried the pre Christmas drivers and the problem still there.

Krzychowy commented 5 years ago

I would like to know how it was possible as well. But you have confirmed that driver version doesn't matter and I have confirmed that Windows version doesn't matter. Prismatik version also doesn't matter... So what is it then?

sblantipodi commented 5 years ago

@Krzychowy please keep us posted if you find anything useful. thanks!

zomfg commented 5 years ago

If you can find any software at all that does capture with similar performance to ddupl and is compatible with VRR... Maybe based on #235 ? But given that even nvidia's own Shadowplay isn't compatible I would not hold my breath..

@Garwinski can you try running ReLive capture?

Garwinski commented 5 years ago

Try messing with this thing to see how it and your stuff behaves. It's just a built sample from here, all it does is desktop duplication like Prismatik and shows the actual frame. Don't run both at the same time so they don't interfere. Although it's not an identical process, maybe that'll help narrow something down. @Krzychowy maybe try it too

This is for driver 19.1.1, but you probably already saw that.

Yep! Still nothing with my Fury though :(

(PS: Any new compilation of your updated version available? I really like the new changes you made to Prismatik, and I see you are still adding to it, but I have no idea how to download your updated files for use on a Windows 10 pc)

@psieg released the full build here few days ago, so just grab the last one.

I removed Prismatik, manually removed the Prismatik Folder in my user folder, manually removed the folder in program files, uninstalled drivers with DDU, installed the new 19.1.1 WHQL drivers, installed the newest Psieg release of Prismatik (thanks for the heads-up), configured it, but still get the stutter/no VRR with Desktop Duplication unfortunately.

I shut down Prismatik, and ran the Desktop Duplication thingy you linked to, and had stutter (tested it on Far Cry 5 Benchmark, Metro 2033 Redux Benchmark, 3DMark, ARMA 3 and Escape from Tarkov). When I closed the 'DDsample' application and then went back to the game(s), all was smooth again. So it does seem very much linked to desktop duplication and VRR.

Microsoft has been tinkering with how exclusive full screen works for a while now, as now often games are a sort of 'fake' full screen. People could still force 'true' fullscreen by disabling full screen optimizations, but that was not possible anymore after 1809, games practically always run the 'fake' full screen now, even if you disable those full screen optimizations (you can check this by for example changing volume, if it is overlayed on top of your game despite you having the game set to exclusive full screen, you are running the 'fake' fullscreen). I have a feeling this problem has to do with those changes. Because, like I said in my very first post, (borderless) windowed mode (when available) works well with Desktop Duplication method as far as I can tell. But that would be strange, as (broderless) windowed mode does not seem to suffer from the problem we are discussing here, why would a 'faked' fullscreen/borderless mode have a problem with Desktop Duplication?

If you can find any software at all that does capture with similar performance to ddupl and is compatible with VRR... Maybe based on #235 ? But given that even nvidia's own Shadowplay isn't compatible I would not hold my breath..

@Garwinski can you try running ReLive capture?

I'll do that and see if VRR still works then, I will also try it with the 'game bar/xbox capture' built into Windows. If Freesync would disable when using ReLive (or using the xbox game bar), I would imagine that that would be one of the top-problems being reported right now, but I dont see anything related to that. Anyways, I will test this later today.

Well, that answers that... As this is more general then just Prismatik, it could mean that it's hard (if not impossible) to fix. The not as bad news is you can look for workarounds that apply to anything related to screen capture. This one for example

The solution mentioned there is adding a frame limiter a few fps below your max refresh rate. I already had this for Far Cry 5, but made no change to the stutter (I dabbled with frame limits as far as 5 fps below refresh rate as I noticed some tearing sometimes popping up with the frame limiter only set to 1 or 2 fps below refresh rate. Still the same problem manifested itself. But yea, good idea to look into that direction. I am googling right now for any problems with VRR (be it Gsync or FreeSync) and any capture software.

(PS: Just to be thorough, I just tested if my remark that there is no problem in borderless windowed mode (when available in games) still holds true. Far Cry 5 has such an option, and indeed, with Desktop Duplication set in Prismatik, there are no problems in borderless windowed. When I switched to Fullscreen again, the problem was there again)

Garwinski commented 5 years ago

Well, that answers that... As this is more general then just Prismatik, it could mean that it's hard (if not impossible) to fix. The not as bad news is you can look for workarounds that apply to anything related to screen capture. This one for example

If you can find any software at all that does capture with similar performance to ddupl and is compatible with VRR... Maybe based on #235 ? But given that even nvidia's own Shadowplay isn't compatible I would not hold my breath..

@Garwinski can you try running ReLive capture?

I just tested it (with Prismatik not running of course). Relive is smooth, capturing footage with the Game Bar is not smooth. Maybe ReLive captures the footages 'straight out of the gpu driver' so to speak, and Game Bar uses a 'generic' solution for capturing that works on every gpu (be it Nvidia, AMD or Intel), like Desktop Duplication?

Krzychowy commented 5 years ago

Strange strange things are going on. Now for some unknown reason I have entered some kind of a middle ground, where DDupl is still not exactly smooth, but V-sync disengages properly and there is no flickering like with WinAPI. WinAPI also stopped working in AC: Origins entirely, which is good and natural behavior because it wasn't working there back when I played the game, actually it wasn't working in majority of games and always needed DX hooking, so I was using DDupl all the time.

DDupl still feels noticeably less smooth than with Prismatik OFF, but miles better than just regular framerate drops with V-sync ON. So I don't know, I have Half-Gsync now...

I just reset everything just like I did few times already, I don't know why it partially works now. AC: Origins runs well, Vanishing of Ethan Carter runs well, while Grim Dawn and What Remains of Edith Finch have some slight inconsistency, I don't know how to describe it, like if G-sync was working every second frame.

I will just write what I did now that I still remember, but it doesn't make sense why would it work any differently then before. It is just a list of things I already did before :D (though there are some changes now that seem unimportant)

  1. Reset-all in CRU
  2. Restart64 in CRU
  3. Reset monitor setting to factory default
  4. Clean install 417.71 drivers (not through DDU, just normal clean install, this time installed Driver and GeForce Experience instead of just driver, doubt it makes any difference, I didn't even launch it once)
  5. Reboot
  6. Turn FreeSync On in display OSD, and set up other monitor settings (not FreeSync related)
  7. Set up custom resolution with custom refresh rate in NVIDIA Control Panel (59.979 for me, plain 60.000 blinks with FreeSync On for some reason, and my display forces 75 Hz with FreeSync so I have to edit manually if I want just 60)
  8. Edit FreeSync range in CRU from 52-75 to 35-60, only this, don't touch refresh rate Points 7-8 were different than before, where I just used CRU for everything and edited default resolution/refresh rate instead of creating new one in NVCP
  9. Re-apply custom resolution from NVCP just in case CRU overwritten something
  10. Then some normal procedures, ensuring Prefer Maximum Performance mode in NVCP, ensuring Disable Fullscreen Optimizations is checked for every game, turning on V-sync and setting Maximum Pre-rendered Frames to 1 in NVCP for every tested game, also FPS lock 0.010Hz below exact refresh rate as per Low Lag V-sync article on Blurbusters. Then apply OC in Afterburner, launch Prismatik, launch the game

I do not know what changed things to make them work the way the do now, so partially instead of total disaster.

Some specs if needed:

LG 38UC99 6900K 2080 Ti 417.71 16 GB DDR4-3000 Windows 1809 Build 17763.193 3x Ambibox (Lightpack clone, recognized as Lightpack in Windows and Prismatik)

zomfg commented 5 years ago

Relive is smooth

but does VRR stay on? or we are mixing issues here? try OBS AMF combo

Garwinski commented 5 years ago

Relive is smooth

but does VRR stay on? or we are mixing issues here? try OBS AMF combo

As far as I can tell, VRR is on, due to the 100% smoothness of the games I tested it on, in the case of Far Cry 5 I cap my fps quite a bit bellow my refresh rate, so that would be inherently 'less smooth' without VRR, but when I tested it with Relive, the game stayed butter smooth, which leads me to believe FreeSync is still enganged. As far as I am aware, there is no overlay for FreeSync or anything to be 100% sure of VRR being engaged, apart from the obvious observable stuttery gameplay without it and the 100% smooth exprience with it. The stuttery gameplay with desktop duplication looks identical to gameplay when I disabled Freesync on my screen and disabled it in Radeon settings.

I dont have any fancy refresh meter or anything on my monitor to check if the refresh rate changes. What would be a sure way to check that Freesync is enabled or not, apart from comparing the stuttery gameplay with desktop duplication and freesync enabled, and the stuttery gameplay I get when I disable Freesync (which seems to be identical)? One could argue that you can use the Radeon overlay for that, which always says that it is enabled, which would be technically correct, as indeed I have it enabled in Radeon settings, but this selector/switch probably doesnt respond to any software interference with VRR.

I tried OBS, installed the OBS AMF plugin with hardware encoder enabled: 52aa09b7-004e-4ff3-9b0f-27e6f77c8f47 png Display Capture resulted in the same stuttery experience. I could not get game capture to work as I got a black screen. Can you see on the picture whether I am actually using the capture method you meant?

EDIT: clicked through some settings, forgot to try 'advanced' in the capture settings, and now I could actually select a specific AMF setting, which is probably what you wanted me to try in the first place: 2b340d5e-eff5-47e1-a960-2f988c57690c png

Still stuttery/looks the same as when Freesync is disabled. Also, still only did Display Capture, could not get game capture to work.

I tested ReLive again as well, stays smooth during capturing. I did not change any settings for ReLive though, and the output file seemed to be 30fps. Shouldnt mater for the problem I observe I think, as Prismatik doesnt have to create/render any hefty video file, and I capture at 40ms/25fps (did try to dabble with this setting to alleviate the problem, setting it to the same as my refresh rate, or exactly half, did not have an effect on the problem), so the stuttering could not simply come from increased load when capturing, and Task Manager reports at most 1% gpu usage by Prismatik when using Desktop Duplication anyways, cant imagine that actually recording is less taxing, as in, it is not a performance problem or anything that I observe, and really a software/Desktop Duplication (at least in the way Prismatik and most other recording software does it) problem.

zomfg commented 5 years ago

I'm not sure about OBS, I was hoping for something AMD related in the input section if there is any. This looks like where the result frames are sent to be encoded/compressed before going to a file/network. PlayClaw also has some AMF integration, but here again, I never used it.

For testing freesync maybe try finding that windmill demo from forever ago.

Garwinski commented 5 years ago

I'm not sure about OBS, I was hoping for something AMD related in the input section if there is any. This looks like where the result frames are sent to be encoded/compressed before going to a file/network. PlayClaw also has some AMF integration, but here again, I never used it.

For testing freesync maybe try finding that windmill demo from forever ago.

Yea, true, was looking for that as well, but only found output settings, so nothing about how the material is actually captured, just how it generates the video file.

Ah yea, that demo. I downloaded it just now, but I remembered correctly: It is pretty unstable and practically unusable, response is finicky when changing switches/selectors, freesync doesnt even work half of the time independent of Prismatik, etc. If I remember correctly, it think that this demo was also actually only meant for internal use within AMD, and it is very ancient now anyways.

You also have the Pendulum Demo from Nvidia, which you can also use to see freesync at work, but the application runs in borderless, which does not have the problem (or at least, far less. If the problem is also for Borderless windowed, it is barely noticable to me anyways, but I think I am pretty confident in that the problem is not present in (borderless) windowed. You will have to deal with the input lag though on (borderless) windowed mode, so I prefer fullscreen, and there are lots of games that dont have a option for borderless windowed anyways ) .

I prefer to use ingame benchmarks. I know some well enough now to spot whether VRR is working or not in the first few seconds. For example, the first graphics test scene for 3DMark's 'TimeSpy' has a camera view that shifts horizontally in front of a sort of display case in the first few seconds, and you can immediately see jittery movement with Desktop Duplication enabled (or with Freesync disabled), or a smooth panning of the camera without Desktop Duplication (and freesync enabled). Many other games I use to test also show the problem quite clearly of course, but with the TimeSpy benchmark you can spot the problem occurring pretty reliable in the first few seconds (say, 10 seconds, just to be sure that the first stutters are not just from the application increasing load on the gpu and your pc has to dial the clocks up which can result in some stutters in the very first few seconds) because of the very slow camera movement and the subtle animations of the decor around the display case (some leaves, some animated props, etc), and the lower framerate than I usually get in games (In that specific scene I hoover between 40 and 50 fps, which is still comfortably within my freesync range) which makes the stuttering very pronounced/obvious when its present.

sblantipodi commented 5 years ago

I have an Acer XB271HK GSYNC monitor, the monitor has a built in refresh rate counter that shows the current refresh of the monitor, I can easily understand that GSYNC is disengaged if fraps shows less FPS than what I see on the Acer refresh rate counter.

If you need to do some tries I'm here.

So to recap... Can we say that the issue happen only with full screen app and not in borderless window apps?

this evening I will try some games in borderless windows to see what happen.

Garwinski commented 5 years ago

I have an Acer XB271HK GSYNC monitor, the monitor has a built in refresh rate counter that shows the current refresh of the monitor, I can easily understand that GSYNC is disengaged if fraps shows less FPS than what I see on the Acer refresh rate counter.

If you need to do some tries I'm here.

So to recap... Can we say that the issue happen only with full screen app and not in borderless window apps?

this evening I will try some games in borderless windows to see what happen.

Would be nice! Yes, please test whether VRR is actually still working in Borderless windowed with Desktop Duplication enabled (which I think is the case, but again, cant be 100% as I dont have a sure way of testing it, apart from observing stutter) , and if VRR is actually disabled in full screen with Gsync enabled.

However, you have a Gsync screen with (I assume) a Nvidia card, it might be that the underlying workings of Gsync make it so that Desktop Duplication doesnt have the same effect as on a Freesync monitor with an AMD card, or Freesync monitor with a Nvidia card (hell really has frozen over didnt it, Nvidia supporting an open standard). Then again, you reported you also have the problem since Nvidia supported Freesync in its driver.

...but at least one app works well... https://www.nvidia.it/coolstuff/demos#!/g-sync

GSYNC demo from nvidia works well even with prismatik set to desktop duplication...

Yea, I believe that demo works in borderless windowed, at least it did for me just now, which might explain why it is working (could also be thatin your case the demo works very closely together with the Gsync module in the screen, where there is no interference from Windows software/components, if the problem actually lies somewhere in how Windows now handles fullscreen).

Looking forward to your findings this evening!