itsmikethetech / Virtual-Display-Driver

Add virtual monitors to your windows 10/11 device! Works with VR, OBS, Sunshine, and/or any desktop sharing software.
1.94k stars 89 forks source link

Framerate issues #85

Open PranavSakthivel opened 1 month ago

PranavSakthivel commented 1 month ago

Hi, I’m using the latest versions of Sunshine, Moonlight, and I have this display driver set up with no other displays plugged in on the host machine. The host machine reports a solid 144fps on the games I play. Moonlight debug options do not show any frames dropped and says its rendering 144 hz. The host machine has an RTX 3080, 5800X3D, 32gb of ram and the client is an M2 MacBook Air plugged into a 3440x1440 144hz (same as the virtual display). Both sides have gigabit internet, I’m using WireGuard to connect to the remote host pc.

The framerate over stream works at a constant 144 for 30 seconds or so, then looks like it varies anywhere from 60-144fps and looks choppy for the next 5 min. I have tried changing bitrate settings with no luck. I’m happy to provide any more info if it helps. Thanks

Jim29er commented 1 month ago

I have a setup similar to yours I think, but I just started using this VDD last week. As such, I don't have a lot of experience with it yet.

But, your comment here is raising my eyebrows - should this virtual display driver have any impact on Sunshine streaming performance? I'd think its only real purpose is to let our remote GPU think a capable display is connected, but not actually have any sort of bearing on performance. Perhaps I'm missing something in my understanding.

Have you ever used a matching physical display on the remote host, and with that, did Sunshine/Moonlight not have the same issues?

PranavSakthivel commented 1 month ago

With a physical 1080p60fps display and a 1080p 60fps stream it played at a locked 60 - but I don't have a matching display to test. The framerate counter on the host PC seems to be locked at 144fps, so that's the only info I have. I've tried changing various sunshine/moonlight settings to no effect, reinstalling both programs as well. I'm not sure where to troubleshoot this - maybe this is the wrong place, but I did see some earlier issues with people with performance issues so I was curious to see anything similar reported here.

Jim29er commented 1 month ago

Okay thanks! I have a physical 144Hz display connected to my Sunshine host; today I disconnected that so it's headless, and I can do some testing. If I experience any weirdness, I can then compare again with the physical display connected.

Jim29er commented 1 month ago

Just a quick update on my testing...I've used three different Windows computers running Moonlight, connecting to my Sunshine host (RTX 4080 Super) with only the IDD display, with a mixture of 120Hz and 144Hz resolutions. I haven't seen any problems so far, nor does the experience feel any different from when I was using the physical display connection on the host. I haven't tried a macOS client yet, though; I can likely get to that tomorrow.

I'm also using 1Gb fiber Internet on both sides, although I think the difference for me is the WireGuard client is on the Sunshine host, connecting to a pfSense firewall at my house. I've tested things over that VPN connection, as well as over the Ethernet LAN where that Sunshine host is located.

Jim29er commented 1 month ago

Another update on this, after testing with my M2 MBP. First I used a firmware-hacked Cable Matters USB-C to HDMI 2.1 adapter to connect to my Samsung G70B at UHD 120Hz, and then tested Moonlight at 120FPS against my headless Sunshine host (this was over the Ethernet LAN). I did indeed notice visual stuttering a short while into the session, but I then left it running and it cleared up. I then switched to using a USB-C to DisplayPort adapter for 2560x1440@144Hz, and then tested Moonlight at 144FPS. That was smooth as butter the whole time. I did verify with the Moonlight stats overlay that everything was matching.

I would like to point out, that rather than playing a game to test the streaming, another method is to use the https://testufo.com site in a browser. What you do there, is choose "...video game motion" in the dropdown, the frame pacing to "perfect," the frame rate to your display's refresh rate, the versus to disabled, and then go into full screen mode in the top right of the scrolling video. This way you can exercise the streaming without taxing the GPU, have the Moonlight stats overlay active, and leave it running for longer periods. Just my two cents!