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

(Not an issue), Could you make something similar to frl-toggle but for changing the refresh rate? #5

Closed
philhzss opened this issue Oct 3, 2024 · 24 comments

Comments

@philhzss
Copy link

philhzss commented Oct 3, 2024

Hey Frog,

I was wondering. My PC display is at 144hz. I have various presets w/different refresh rates in Moondeck, because my TV supports 120hz, yet some games run better at 60hz etc. I use frl-toggle and gsync-toggle and it works great, but sometimes (especially games that only have "borderless window" for fullscreen), I'm "stuck" with 144hz even if I'm trying to play at 60?

I don't know if this makes sense.
You know how for some games, when you select fullscreen, they give you the resolutions with the refresh rates in the menu (1920x1080@60,1920x1080@120) etc. This works, because I can simply choose 60 or 120hz and I'm all set. But if the game only has borderless window, it seems to run at 144hz always (matching my PCs monitor), and then it's frame-limited to whatever I selected in Moondeck, which is fine, but creates some stuttering in some games. I find it all works much smoother when the refresh rate matches the fps.

So would there be some simple app similar to frl-toggle, where as a do/undo command, I could set my PC's refresh rate to whatever fps I'm selecting in Moondeck?

Thank you!!

@FrogTheFrog
Copy link
Owner

Please try this Sunshine build for Windows with built-in functionality for controlling display mode:
FrogTheFrog/Sunshine#2

Be sure to disable "pass to Buddy" in MoonDeck or any other scripts in Sunshine that might change the resolution first!

@philhzss
Copy link
Author

philhzss commented Oct 3, 2024

Ok thanks a lot I'll try that in a few days when I'm back home. By disabling "pass to buddy" though does that mean the custom settings in Moondeck (resolution and bitrate and fps) won't be usable anymore?

@FrogTheFrog
Copy link
Owner

No, it means Buddy itself will not try to change the resolution on the host. Settings can still be passed to moonlight which then passes it to Sunshine.

@philhzss
Copy link
Author

philhzss commented Oct 3, 2024

Oh ok I see. Looming forward to trying it I'll let you know in a few days. Thanks again
This is a build you made yourself, it's a fork of Sunshine I see, do you think this is something they're considering adding to the official release eventually?

@FrogTheFrog
Copy link
Owner

Yeah, it's already aligned that the whole merging process will start once a new Sunshine version is released as they are trying to get one out these days.

@philhzss
Copy link
Author

philhzss commented Oct 8, 2024

Please try this Sunshine build for Windows with built-in functionality for controlling display mode: FrogTheFrog/Sunshine#2

Be sure to disable "pass to Buddy" in MoonDeck or any other scripts in Sunshine that might change the resolution first!

Hey FrogTheFrog, sorry this is a silly question but is there a precompiled binary for your commit or I have to build it myself? I see on the checks page there is a "Build Windows" section, but sorry I'm unfamiliar with this side of Github, can I download the windows version from there?
Thanks

@FrogTheFrog
Copy link
Owner

Copy-pasta from other comment:

345427239-a1b2488f-1e7a-4063-a863-91a347a160a7
345427442-5af11e28-ae40-4cfb-84fa-23c5dbb35a70
345427761-fdae3535-fddd-4f62-818d-848b501f8c99

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

Please try this Sunshine build for Windows with built-in functionality for controlling display mode: FrogTheFrog/Sunshine#2

Thanks for the instructions, I had missed that.
This is genius, and works perfectly. Thank you

Could it also be used to have HDR even though my PC monitor doesn't have it? Or do I still need to use something like VDD
Thanks a lot!!

@philhzss philhzss closed this as completed Oct 9, 2024
@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

I only ask about HDR because I'm having a bit of trouble with VDD, sometimes it stays stuck on the external display only and my PC is unusable on its own screen until I restart a stream and run DisplaySwitch.exe /internal. I find a bit finicky

(Nothing to do with you though, just wondering if you also have a PC with a non-HDR monitor, and have figured out an easy way to stream to your HDR Steam Deck (or TV)

@FrogTheFrog
Copy link
Owner

I do have HDMI dongle that I've bought for a couple of euros and am very happy with it.

That aside with this build you should not use DisplaySwitch.exe or any other scripts. Everything is built-in, just need to select the correct option from drop-down box. It also tries to restore your previous setup indefinitely (as long as Sunshine is running), so even if the screen cannot be restored at the moment (it's sleeping according to Windows), once the screen is awake again it should be restored.

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

Yes, so far it has restored everything perfectly when I quit, it works really well. I turned off VDD so the only do/undo commands I have now is frl-toggle and gsync toggle, or are you saying that even those shouldn't be needed anymore?

Just wondering about your HDMI dongle, does it create a 2nd monitor (that you can accidentally drag windows onto)? That's the main thing bothering me with VDD, I kept losing windows onto the 2nd invisible monitor. I might just do like you and buy a HDMI dongle if that allows me to use HDR

Thank you!

@FrogTheFrog
Copy link
Owner

Yes, so far it has restored everything perfectly when I quit, it works really well. I turned off VDD so the only do/undo commands I have now is frl-toggle and gsync toggle, or are you saying that even those shouldn't be needed anymore?

Still needed.

Just wondering about your HDMI dongle, does it create a 2nd monitor (that you can accidentally drag windows onto)? That's the main thing bothering me with VDD, I kept losing windows onto the 2nd invisible monitor. I might just do like you and buy a HDMI dongle if that allows me to use HDR

I just go to WIndows and disable the dongle/VDD, then let Sunshine enable it and only it when I'm streaming.

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

I'm having a problem now, I streamed last night, ended the stream properly, went to bed. This morning, my display is flickering every ~5 seconds, like this:
Video

I tried restarting a stream to the PC, then ending it again, I tried restarting the PC, it keeps doing it. It only stops when I force quit Sunshine? But if I relaunch Sunshine, it starts again.

I found this in the Sunshine log, its appearing every 5 seconds:

[2024-10-09 10:14:25.505]: Info: Failed to change display modes using Windows recommended modes, trying to set modes more strictly!
[2024-10-09 10:14:25.533]: Error: [code: 1610, message: The configuration data for this product is corrupt. Contact your support personnel] failed to set display mode!
[2024-10-09 10:14:25.674]: Error: Failed to set display mode(-s) completely!
[2024-10-09 10:14:29.647]: Error: Unknown status
[2024-10-09 10:14:30.710]: Info: Trying to revert applied display device settings. API is available: true
[2024-10-09 10:14:30.711]: Info: Trying to change back the display modes to:
{
  "{c4c96d23-5760-536f-9458-10416feec38a}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 144
    },
    "resolution": {
      "height": 2160,
      "width": 3840
    }
  }
}
[2024-10-09 10:14:30.854]: Info: Failed to change display modes using Windows recommended modes, trying to set modes more strictly!
[2024-10-09 10:14:30.882]: Error: [code: 1610, message: The configuration data for this product is corrupt. Contact your support personnel] failed to set display mode!
[2024-10-09 10:14:31.012]: Error: Failed to set display mode(-s) completely!
[2024-10-09 10:14:36.050]: Info: Trying to revert applied display device settings. API is available: true
[2024-10-09 10:14:36.050]: Info: Trying to change back the display modes to:
{
  "{c4c96d23-5760-536f-9458-10416feec38a}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 144
    },
    "resolution": {
      "height": 2160,
      "width": 3840
    }
  }
}
[2024-10-09 10:14:36.206]: Info: Failed to change display modes using Windows recommended modes, trying to set modes more strictly!
[2024-10-09 10:14:36.231]: Error: [code: 1610, message: The configuration data for this product is corrupt. Contact your support personnel] failed to set display mode!
[2024-10-09 10:14:36.347]: Error: Failed to set display mode(-s) completely!

Here's the full log from this quick Sunshine session if it helps (did not stream, just quit and reopened Sunshine)

I'm not sure where it's getting the 4k resolution from... I had created custom resolutions in NVIDIA control panel, 4k60, 4k120, because my TV (that I stream to) is 4k120, but my PC monitor is 1440p 144hz. I tried disabling those resolutions but its still doing it.
Do you know why Sunshine is trying to set my screen to 4k even when there is no stream?

Thanks

@FrogTheFrog
Copy link
Owner

In the troubleshooting page there's a button to tell Sunshine to stop, I'll check the logs later

@FrogTheFrog
Copy link
Owner

Well the only way I can explain this, is you started streaming while the 4k display mode was enabled. Then, during the stream you or after PC has been restarted or smt, the 4k display mode was deleted from the system or cannot be set for whatever reason.

@FrogTheFrog
Copy link
Owner

Was the 4k mode still available when Sunshine started doing this?

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

The 4k mode was available yes, but... The custom resolution doesn't work on my display since it's 1440p. I don't remember how I even added the custom resolution there in the first place, because if I try to add a 4k resolution, when I press test, the NVIDIA control panel says test failed and doesn't let me save it.

The force stop button didn't do anything, I tried it earlier, but I thought that was just a force stop a current game/stream? So it wouldn't work because this is happening when not streaming. Is there a way to reset Sunshine, other than I guess uninstalling completely and reinstalling?

Maybe my hack of having an unsupported 4k custom resolution in control panel is not great, I guess I should find a better way of streaming in to without a to monitor

@FrogTheFrog
Copy link
Owner

The force stop button didn't do anything, I tried it earlier, but I thought that was just a force stop a current game/stream? So it wouldn't work because this is happening when not streaming. Is there a way to reset Sunshine, other than I guess uninstalling completely and reinstalling?

You're looking for Reset Display Device something something button. Probably the longest one.

@FrogTheFrog
Copy link
Owner

This one:
image

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

Oh. Yeah that stopped the screen flashing. I don't know how I missed the button, sorry. I guess the flickering distracted me. Thanks again for your help. I'll try to find a better way of streaming unsupported resolutions

@FrogTheFrog
Copy link
Owner

FrogTheFrog commented Oct 9, 2024

I would recommend getting this one:
https://www.amazon.co.uk/dp/B086T6BNL8

It has flashable EDID (unless it has changed since then), and I have a custom made EDID called SunshineHDR that someone made. Apparently it supports 4k, but I only use 2k. Still it's flashable, so you can go wild.

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

Ok thanks a lot, I'll try to find something similar here in Canada. When you use this, is there a second monitor like if you (accidentally) Drag a window to the edge of the screen, can you lose it into the other monitor or does it now show up like that?

@FrogTheFrog
Copy link
Owner

No, I have "disconnected" it in windows settings (same as vdd). Sunshine enables it for streaming and then disables it again

@philhzss
Copy link
Author

philhzss commented Oct 9, 2024

Oh, so that can be done straight from Sunshine, I hadn't noticed. I was using do undo commands.. maybe I can give vdd another chance then
Thank you

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

2 participants