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

Need help: VDD is running at 120hz, but when streaming through Moonlight/Sunshine games run at around 30fps (even though it reports 120fps) #268

Open
5haunJN opened this issue Jan 19, 2025 · 11 comments

Comments

@5haunJN
Copy link

5haunJN commented Jan 19, 2025

I've installed VDD and set a Moonlight profile via Monitor Profile Switcher and set Sunshine to run the command when connecting to the PC with Moonlight. The stream itself looks fine, but when a game is running the stream goes down to under 30hz, but the game reports running at capped 120fps. I'm not sure if I'm doing something wrong and made sure to test sunshine with only my Monitor to see if it was a Sunshine issue, but games run fine via no VDD.

Here's my config file:

<?xml version="1.0" encoding="UTF-8"?>
<vdd_settings>
    <monitors>
        <count>1</count>
    </monitors>
    <gpu>
        <friendlyname>NVIDIA GeForce RTX 3080</friendlyname>
    </gpu>
	<global>
		<!--These are global refreshrates, any you add in here, will be replicated to all resolutions-->
		<g_refresh_rate>60</g_refresh_rate>
		<g_refresh_rate>90</g_refresh_rate>
		<g_refresh_rate>120</g_refresh_rate>
	</global>
    <resolutions>
        <resolution>
            <width>3840</width>
            <height>2160</height>
            <refresh_rate>120</refresh_rate>
        </resolution>
    
        
    </resolutions>
    <options>
		<CustomEdid>false</CustomEdid> <!-- Custom Edid should be named "user_edid.bin"! This does not support emulating resolutions!-->
		<PreventSpoof>false</PreventSpoof> <!--Enable this to prevent manufacturer spoofing when using custom edid. Please only do so if you need to!-->
		<EdidCeaOverride>false</EdidCeaOverride> <!--Enable this to override or add hard coded cea-extension block to custom Edid support allowing you to enable HDR-->
		<HardwareCursor>true</HardwareCursor>
		<SDR10bit>false</SDR10bit>
		<HDRPlus>false</HDRPlus> <!-- If you have SDR10 bit enabled, HDRPlus wont work - there’s a conflict because the display system cannot simultaneously handle both high dynamic range 12-bit and standard dynamic range 10-bit settings. -->
		<logging>false</logging>
        <!-- DEBUG LOGGING FOR EXPERTS ONLY!-->
        <debuglogging>false</debuglogging> 
        <!-- DEBUG LOGS CAN GENERATE 1000+ LINES-->
		<!-- Warning: Leaving logging on too long can lead to excessive filesize. Especially DebugLogging, which should only be used for short periods to log errors. -->
		<!-- Logging: Useful to troubleshoot and determine which GPUs are being used, and if displays are working as intended.-->
		<!-- Debug Logging: Logs local system information with every driver function/event/process. Useful for GitHub Help Tickets.-->
	</options>
</vdd_settings>

@Nonary
Copy link

Nonary commented Jan 20, 2025

Don't run games in exclusive full screen mode, they must be in Borderless Windowed if you are streaming above 1080p.

Also make sure the windowed mode optimization feature is enabled in settings (Windows 11 22H2+ exclusive setting)

@5haunJN
Copy link
Author

5haunJN commented Jan 20, 2025

Don't run games in exclusive full screen mode, they must be in Borderless Windowed if you are streaming above 1080p.

Also make sure the windowed mode optimization feature is enabled in settings (Windows 11 22H2+ exclusive setting)

The games I’ve tested were running on borderless windowed and it seems the windowed mode optimisation feature was already enabled. HAGS is also turned off if that was necessary.

EDIT: It seems to happen in some games. The first two games I’ve tested were Tales of Graces F Remastered and Final Fantasy 7 Remake and they seem to have the issue and the other two games, Witcher 3 and Penny’s Big Breakaway seem to run fine without issue (all games running at 4k, borderless windowed and tried with 120fps and 60fps cap)

EDIT 2: Tested one of the affected games and it seems when running Windowed, the issue is gone, but after switching to borderless, it'll lag. There are no overlay on, but it is running at locked 60fps.
Here is a video showing the issue I'm currently having: https://youtu.be/eQYhyykq4Do
Also when preparing to record it, when it was 4k windowed, it was also lagging, mainly because the 4k windows was pretty much full screen.

@what9000
Copy link

I may be running into this issue as well. I'm currently trying to isolate the cause, but it seems to be anything not windowed. I have tried VDD+sunshine, Apollo+sudoVDA, both seem to experience massive slowdowns in borderless windowed and fullscreen. I have tried two hosts (both Amd CPU, nvidia GPU, win11 23H2) and three different clients (3120x1440@90hz, 2560x1600@144hz, 2176x1812@120hz) with identical results.

If I just sit at the desktop and run testufo's frame dropping test, it appears bulletproof. there don't appear to be any skipped or lost frames on the desktop at all. if I run a game, it will run at full frame rates and then crater to maybe 50 or 60% of that value, then slowly climb back up. This is using a framerate cap and vsync: off in nvidia control panel. If I turn on vsync or use vsync: fast, the frames no longer drop (but frame pacing is very bad).

Using RTSS, setting frame pacing: async and disabling passive limiter, I get better frame pacing than using NVCP,,but still not nearly as good as a dummy plug. I will try specialk later this week and see if it is any different, but it seems like there is something causing a framerate mismatch if I am doing anything besides desktop work.

@Nonary
Copy link

Nonary commented Jan 23, 2025

I may be running into this issue as well. I'm currently trying to isolate the cause, but it seems to be anything not windowed. I have tried VDD+sunshine, Apollo+sudoVDA, both seem to experience massive slowdowns in borderless windowed and fullscreen. I have tried two hosts (both Amd CPU, nvidia GPU, win11 23H2) and three different clients (3120x1440@90hz, 2560x1600@144hz, 2176x1812@120hz) with identical results.

If I just sit at the desktop and run testufo's frame dropping test, it appears bulletproof. there don't appear to be any skipped or lost frames on the desktop at all. if I run a game, it will run at full frame rates and then crater to maybe 50 or 60% of that value, then slowly climb back up. This is using a framerate cap and vsync: off in nvidia control panel. If I turn on vsync or use vsync: fast, the frames no longer drop (but frame pacing is very bad).

Using RTSS, setting frame pacing: async and disabling passive limiter, I get better frame pacing than using NVCP,,but still not nearly as good as a dummy plug. I will try specialk later this week and see if it is any different, but it seems like there is something causing a framerate mismatch if I am doing anything besides desktop work.

Yeah, VDD doesn't appear to work smoothly at higher resolutions (4k) if the game runs in exclusive full screen mode.

You can either reduce streaming resolution to 1080p (not perfect but much better)

Or use windows 11 to force borderless windowed mode, or specialK to enforce the swap chain if that doesn't work.

Otherwise a physical dummy plug will be needed, at least from my experiences with it.

NOTE: some games may still run full screen even though configured as borderless or vice versa. You can confirm using SpecialK and checking the swap chain.

@what9000
Copy link

I believe I have the borderless window mode enabled (enable fullscreen optimizations) on win11, but I will check. I can give specialk's swap chain enforcement a shot and see if it's any different.

Does platform have any effect on this? There seem to be a few reports of framerate issues on VDD setups, and a larger amount of them seem to be AMD Cpu/Nvidia GPU configurations. I didn't know if it was coincidental or if there is something being done differently.

@5haunJN
Copy link
Author

5haunJN commented Jan 23, 2025

I believe I have the borderless window mode enabled (enable fullscreen optimizations) on win11, but I will check. I can give specialk's swap chain enforcement a shot and see if it's any different.

Does platform have any effect on this? There seem to be a few reports of framerate issues on VDD setups, and a larger amount of them seem to be AMD Cpu/Nvidia GPU configurations. I didn't know if it was coincidental or if there is something being done differently.

I do have the feature activated. The SpecialK Feature does sound interesting, need to test that as well. Also I don't believe the CPU/GPU Configuration is the issue, I'm on a Intel i7 14th Gen CPU and on a RTX 3080 (maybe has something to do with RTX Cards?)

@what9000
Copy link

I have also read that overlays being active also fixed the framerate issues for some people. They reported that either running a game fully windowed on the desktop or running something like the steam overlay helped. I may retry the RTSS overlay but with all frame limiting/vsync being carried out on NVCP.

@what9000
Copy link

So I tried a few things, nothing seemed to make a difference... not even running the stream at 720p. SpecialK was set up to force a frame limit, force vsync on, vsync off, force windowed mode to behave as borderless windowed while in windowed mode in the game. the flip presentation model was selected, and I also tried enabling the second presentation model. Of note, when there is a slowdown, the frame buffer climbs from 1 to 2-3, and specialK's frame time graph starts to get very erratic.

Is there something else I should be doing in specialK, or did I do this entirely wrong?

@Nonary
Copy link

Nonary commented Jan 24, 2025

So I tried a few things, nothing seemed to make a difference... not even running the stream at 720p. SpecialK was set up to force a frame limit, force vsync on, vsync off, force windowed mode to behave as borderless windowed while in windowed mode in the game. the flip presentation model was selected, and I also tried enabling the second presentation model. Of note, when there is a slowdown, the frame buffer climbs from 1 to 2-3, and specialK's frame time graph starts to get very erratic.

Is there something else I should be doing in specialK, or did I do this entirely wrong?

I don’t remember the exact wording, it said something among the lines of hardware-verified swap chain/vsync

Another way to confirm it is correct is to enable Auto HDR and if games are working with that, then it is likely in the correct swap-chain mode.

@what9000
Copy link

Would that be something that I'd disable in windows and enable in specialk, or use simultaneously? I do get successful autohdr hooking, just not successful frame stability on VDD. I saw three toggle options under a swap chain or presentation model tab; the first was flip presentation, the second was a different presentation model, and the third was what looked like an enforcer for vsync off. All of them had an integer box to the right that toggled their behavior, but I didn't dig too deep into it.

@achang131
Copy link

Ran into similar issue but with RPG Maker VX games to be specific. Low FPS if any kind of virtual display driver is installed/active. Almost appear to be the GPU is not rending the image I would get 10 fps while using a 4090 streaming via sunshine/moonlight. Uninstall the driver and go back to dummy plug resolved the issue.

Funny thing is that when you leave the game on then turn on/install the driver the game would work flawlessly.

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

No branches or pull requests

4 participants