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

Automatically detect refresh rate #102

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cschep
Copy link

@cschep cschep commented Apr 12, 2024

This builds on the work of #98 but adds a menu for the user to choose their refresh rate dynamically. I'm not sure this is the perfect approach but I figured I'd start the discussion with code. It seems to work pretty well on my setup which is an M1 Pro MBP connected to an LG 1440p gaming monitor.

Update: @cristianrgreco asked about automatically detecting the refresh rate which turned out to be super easy and takes away the need for a menu simplifying everything. Sweet!

Thanks for considering @dmarcotte !

@cschep
Copy link
Author

cschep commented Apr 12, 2024

I'm already seeing some weirdness with resizing Finder windows.. Perhaps why there wasn't a shared rate before.

@cristianrgreco
Copy link

Nice! Is there a way to get the refresh rate automatically from the display properties? That way it'd work out of the box for all users

@codenyte
Copy link

Nice! Is there a way to get the refresh rate automatically from the display properties? That way it'd work out of the box for all users

I like this idea. How would it work with VRR? Would it sync the refresh rate with the current refresh rate of the display, or constantly use the highest available refresh rate of the display?

@cristianrgreco
Copy link

My understanding of VRR is that it changes the RR rate between 0 and X depending on movement. So because this app is active when there is movement I guess we can always set it to X?

@codenyte
Copy link

Right, that sounds good

@cschep cschep changed the title Refresh rate menu Automatically detect refresh rate Apr 13, 2024
@cschep
Copy link
Author

cschep commented Apr 13, 2024

I updated the code to auto detect refresh and use the fastest one. If I have my laptop open and my 144hz display it uses 144hz for everything. If I have my laptop only it gets set to 100hz.

Can anyone pull down and try running and see how it feels? Or I could provide a .app if that's helpful.

@jotka
Copy link

jotka commented Jun 27, 2024

@cschep can you post the build here? I will be more than happy to test.

@AskseL
Copy link

AskseL commented Aug 2, 2024

@cschep can you upload the compiled build into your releases for people like me, who doesnt want to install xcode and compile by itself ?

@tilliwilli
Copy link

tilliwilli commented Sep 27, 2024

@cschep I just wanted to test out your branch and after the first launch I was worried why it felt so laggy, even worse than before. Then I checked your code and realized that you mistakingy took the "maxRefreshInterval" instead of the "minRefreshInterval". The refresh interval is the inverse of the refresh rate, so you want the lowest one.

I guess the screen you tested that with does not support variable refresh rate, so both values are the same (low/quick) for you, but if you simply check the MacBook built-in display (assuming a M# MacBook Pro with ProMotion), you see that that display apparently goes down to 24Hz (and up to 120Hz as advertised).
Since my external display supports variable refresh rate between 48Hz and 120Hz as well, I was stuck with a 48Hz refresh rate with your code instead of the expected 120Hz ;)

@offeex
Copy link

offeex commented Oct 9, 2024

is it ever going to be closed?

@seriousm4x
Copy link

Here is a zip with the patch for the people who don't want to build it themselves.
Easy Move+Resize.app refresh rate fix.zip

@zhheo
Copy link

zhheo commented Dec 24, 2024

Still lags in monitors that support variable refresh rates

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

Successfully merging this pull request may close these issues.

9 participants