-
Notifications
You must be signed in to change notification settings - Fork 305
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
Lower FPS than expected through WSLg #38
Comments
For me, GUI apps locked at 60 fps instead (I have 144hz and 72hz monitors). |
@happy2046 could share your /mnt/wslg/weston.log. |
For me, my I'm not the issue creator, but this is my weston.log. |
also my log: #131 (comment) |
@spronovo https://www.testufo.com/refreshrate reports my wslg chrome is at 60hz but thre real fps is not,its about 45fps from PresentMon. I have tried both gtx750(wddm 3.0 driver from windows update) and rx470 on my computer(only enable one card when testing). user@DESKTOP-RJGF24Q:~$ glxinfo -B OpenGL version string: 3.1 Mesa 21.0.1 OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.0.1 user@DESKTOP-RJGF24Q:~$ dmesg |grep dxg |
Thanks @happy2046. We investigated these reports further, understand the problem and are working on a fix. The way to think about frame rate for WSLg is that applications in Linux present to the Weston/Wayland compositor at a rate which is decoupled from the rate that Weston present to the Windows compositor. You essentially have two compositors chained, so things will look a little funky when you use a tools like PresentMon to observe it... GPUView will give you a much better picture (but a lot trickier to use). An application inside of WSL for example can render at 400fps, but the Weston compositor will only notify the Windows compositor of the frame it can effectively consume. There is no point for Weston sending each of those 400 application frames over to Windows if the Windows compositor is only going to be consuming and displaying 60 of them... we would be wasting precious resources without changing the outcome visible on the screen. A tool like gperfmon will only be able to show you the frame that actually reaches the Windows compositor, GPUView will show you both. We want to ensure that Weston sends enough frame to max out your monitor refresh. There is an issue currently where there is an unfortunate 9ms delay that gets added in (complicated story :-)), so effectively you're getting about 1/25ms ~= 40 fps instead of the target 60 to the Windows side as you have noted and has can be seen in PresentMon. We also recently added config options that will allow you to unlock the frame rate from 60 to run at higher rate on higher refresh monitor (e.g. 144hz). This won't be auto-magically setup based on your monitor quite just yet and will require manual config for the time being, but will allow users to better match their monitor... but to fully achieve these rate we have to fix the bug above first. Once this reaches a public WSLg update we'll publish some more instructions for folks on how to try this out. |
@spronovo Hi! Could you please tell me how soon the fix will be in the new build? As I see, you fixed the performance issue of the rdp backend in your working repository |
WSLg 1.0.22 was just released externally. You can pick it up by doing the following from an elevated command prompt:
By default WSLG will now emit 60fps to the Windows host... but if you are running on a higher rate monitor you can adjust that by adding an entry like below in
|
I also wrote a small wiki entry to give a bit more background on this. https://github.com/microsoft/wslg/wiki/Controlling-WSLg-frame-rate |
Is the update available now for everyone? I ran EDIT: Managed to get it updated using msi installer. |
@spronovo https://www.testufo.com/refreshrate still saying it's 60hz
My config in "c:\ProgramData\Microsoft\WSL.wslgconfig"
|
@Peredery i'm not entirely sure. I've tried both Chrome and Edge, I'm not sure what they use for vsync source. I do get an error in the page indicating they can't get vsync on Linux... so my suspicion is that they emulate vsync with a timer, but i'm not sure. Unfortunately i don't have a lot of time to dig into this one at the moment, i'll dig more when i get a chance. Are you getting the same error as below? Are you seeing this working on a native Linux system? Are you seeing 144hz for other applications? For example using Geek3D and PresentMon to measure FPS from DWM on the host you should see something like below. I'm running on a 100hz monitor. The application is rendering and presenting ~600fps inside of WSL... and 100fps is forwarded to Windows so they can be made visible on the screen (effectively saturating what the monitor can display). On older build you would have seen ~40fps being forwarded to Windows. |
This is very odd. 1.0.22 should indeed be pushed to everyone on the Insider pool... even weirder is that before 1.0.22 we had been pushing 1.0.19 for weeks... yet your system is still on 1.0.17. I'm not sure what happened there. Did you get some error from wsl --update? It looks like manually installing the msi fixed it for you. Could you try going to
Try |
TLDR: If I didn't get any error and I believe it did download some update when I first tried I just tried to remove wslg again ( I also tried to use 1.0.17 installer, then keep wsl running, run 1.0.22 installer, after it finishes do So since that "broke" I also just tried my idea, installed 1.0.17 using msi, kept distro running, ran Confusing part is that windows thinks 1.0.22 is installed but its not actually. I tried doing the msi installer log thing and it does write in the log I still think that something else happened initially and it didn't update after full reboot when I first tried it (maybe windows update conflicted since I ran the windows update after the first |
I had a problem using smartgit that its right click context windows used to stop appearing & then no more gui windows opened unless i had to shutdown wsl... |
the gui apps seems to be at fixed 30fps(or 32fps like windows rdp default ).
is there something like DWMFRAMEINTERVAL on windows rdp server to change the fps?
The text was updated successfully, but these errors were encountered: