You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering how the compositor detects/configures the refresh rate of the display.
I am writing my own window manager with swc and I noticed when testing it that my display was only running at 60hz when on X11 it runs at the full 170hz. I checked with the example wm and it is still the case.
I wasn't able to find a function call or anything to check/set the refresh rate, so I figured I'd ask :)
The text was updated successfully, but these errors were encountered:
i have come to update this after doing some more research, but this can also be closed and i will open another issue if that is better.
the obvious solution is to wlr-output-management-unstable-v1 which would allow the use of tools like wlr-randr (and i will look into this on my own and submit a pr if i manage to do anything, but i have not done something like that before and it seems like a big task so i do not know if i will be successfull), but i think a solution that could get good results with much less work would be to have the compositor select the output with the highest refresh rate on creation.
taking a look at libswc/output.c @ lines:92-100, we can see that the preferred output mode is set to the last preferred mode found (lines 95 and 96), and if none are preferred we use the first one found.
this could be changed to select the mode with the highest refresh that still has preferred == true, and if no preferred modes are found, we take the one with the highest refresh. this could all be implemented by simply sorting the array (perhaps with the std qsort function to keep the code short and simple?)
i did try this solution on my local machine, but the compositor (i just used example/wm to test) wasn't even able to find/load my drivers, and never started (definitely a mistake on my part), so i figured i would suggest it here, as i am still unfamiliar with the codebase and someone else may take a look and have an idea.
I am wondering how the compositor detects/configures the refresh rate of the display.
I am writing my own window manager with swc and I noticed when testing it that my display was only running at 60hz when on X11 it runs at the full 170hz. I checked with the example wm and it is still the case.
I wasn't able to find a function call or anything to check/set the refresh rate, so I figured I'd ask :)
The text was updated successfully, but these errors were encountered: