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

In rdpLRANDR.c why set refresh rate to 50Hz? #270

Open
wqlxx opened this issue Dec 18, 2023 · 7 comments
Open

In rdpLRANDR.c why set refresh rate to 50Hz? #270

wqlxx opened this issue Dec 18, 2023 · 7 comments

Comments

@wqlxx
Copy link

wqlxx commented Dec 18, 2023

In rdpLRANDR.c I found the refresh rate is 50Hz. And I can get 50Hz from xrandr command.

Screen 0: minimum 64 x 64, current 1280 x 1024, maximum 8192 x 8192
rdp0 connected 1280x1024+0+0 0mm x 0mm
1280x1024 50.00*+

But when I test glxgears command with __GL_SYNC_TO_VBLANK=1 or vblank_mode=1. The frame rate is not 50Hz.

Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
46715 frames in 5.0 seconds = 9342.961 FPS

@metalefty
Copy link
Member

It is a pseudo refresh rate. I believe it doesn't affect actual behaviour. There's no answer why it is 50Hz but it can be set to whatever.

@Nexarian
Copy link
Contributor

The real answer: I was playing with the value to see if it would help performance, I don't think it changed anything, and because it didn't matter it likely got merged into a commit long ago without much thought.

@wqlxx
Copy link
Author

wqlxx commented Dec 19, 2023

It is a pseudo refresh rate. I believe it doesn't affect actual behaviour. There's no answer why it is 50Hz but it can be set to whatever.

@metalefty Yes, I set it to 30Hz or 120Hz, nNo change at all.

@wqlxx
Copy link
Author

wqlxx commented Dec 19, 2023

The real answer: I was playing with the value to see if it would help performance, I don't think it changed anything, and because it didn't matter it likely got merged into a commit long ago without much thought.

@Nexarian Do you have any good advice? I hope to use vsync to control the frame ratre in glxgears or other APP with swapinterval.

@metalefty
Copy link
Member

metalefty commented Dec 19, 2023

What is your purpose? As I said, It can be set whatever but it doesn't affect actual behaviour. It is a PSEUDO value, just ignore it.

@metalefty
Copy link
Member

See also: neutrinolabs/xrdp#2546 (comment)

@wqlxx
Copy link
Author

wqlxx commented Dec 19, 2023

What is your purpose? As I said, It can be set whatever but it doesn't affect actual behaviour. It is a PSEUDO value, just ignore it.

I hope to reduce GPU usage through control rdp0 (virtual monitor's name) refresh rate. In my test , I used windows mstsc to connect XRDP in ubuntu, and the glxgears or glmark2 run in high FPS, because the vsync/vblank seems to be invalid.

I found something about refresh rate in libxrandr, and xrdp can change refresh rate in xrandr. But it seems to do nothing to help glx/egl to use glxswapintervalEXT function in MESA.

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

3 participants