FrogTheFrog / moondeck-buddy

A server-side part of the MoonDeck plugin for the SteamDeck.
GNU Lesser General Public License v3.0
151 stars 9 forks source link

Would it be possible to add a "force refresh rate" option to MoonDeck? #60

Closed philhzss closed 11 months ago

philhzss commented 11 months ago

Hey frog, My PC's display is 144hz, and I've found that locking it to 60hz when streaming to my Deck (either docked into my 60hz TV, or on the Deck's 60hz screen itself) makes for a much smoother gaming experience.

Usually this is quite easy with games that support "native" full screen, I just select a resolution with 60hz and it forces it to run at 60hz. However I have a few games that only support borderless window, or that don't let you select a specific refresh rate (example Just Cause 3), so the game always runs at 144hz, which causes stutters on the Deck when streaming.

I've found the solution is simply to go into my PC's display settings, and set the display to 60hz:

image

Do you know if there would be a way to automatically set this to 60hz when starting MoonDeckStream, and then set it back to 144hz when done?

Thanks a lot!!

FrogTheFrog commented 11 months ago

I would highly recommend to disable resolution change feature in MoonDeck (the "pass to buddy") option and instead use qres or something similar with Sunshine's do/undo commands: https://docs.lizardbyte.dev/projects/sunshine/en/nightly/about/guides/app_examples.html#changing-resolution-and-refresh-rate-windows

FYI, Sunshine will implement the resolution change feature themselves sometime in the future and I will strip MoonDeck's res-change feature in the end.

Another option is to use frame rate limiter (I use this option, since higher refresh rate means less input latency). Since you're using Nvidia, you can use this tool of mine with do/undo commands: https://github.com/FrogTheFrog/frl-toggle

You could also disable gsync with this tool as it sometimes causes random issues (like FPS being locked to 58): https://github.com/FrogTheFrog/gsync-toggle

FrogTheFrog commented 11 months ago

Example for gsync: do: C:\Users\frog\AppData\Local\Programs\MoonDeckBuddy\bin\gsynctoggle.exe 0 undo: C:\Users\frog\AppData\Local\Programs\MoonDeckBuddy\bin\gsynctoggle.exe 1

philhzss commented 11 months ago

That works!! (I was already using your gsynctoggle, now using frtoggle too) Thank you so much!!!