-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
X11 v-sync not working on Raspberry Pi with Avalonia (Screen Tearing Between Views) #18127
Comments
I have been unable to find updated information about the configuration of Avalonia X11 rendering engine options. If anyone can provide information on how to configure things like enabling/disabling GL, or v-sync related options it would be of great help for me towards debugging this. |
As far as I am aware, the only options you get are these: Avalonia/src/Avalonia.X11/X11Platform.cs Line 263 in dd2c92c
Which you use by passing to the setup methods to start Avalonia (most likely in your main method), like this: Avalonia/samples/XEmbedSample/Program.cs Lines 13 to 24 in dd2c92c
|
@kekekeks does X11 backend has v-sync timer? I don't see any special IRenderTimer implementations. |
Exactly the stuff I was looking for thanks 🙏! Further investigation pending, but I can confirm that (counterintuitively) forcing software rendering removes the worst tearing. |
V-Sync and tearing prevention is expected to be provided by OpenGL implementation, not by timing your frames. |
Try adding something like
here https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs#L22 |
Describe the bug
I'm experiencing heavy screen tearing in my Avalonia application running on a Raspberry Pi. The issue occurs when switching between views, where both views appear partially at the same time, causing a visible tear. Display can even get stuck in a rendered state between two views (usually teared around the horizontal centerline).
Interestingly,
glxgears
runs perfectly synchronized, but Avalonia does not, suggesting that Avalonia is not properly handling v-sync on my setup.I prefer to run without without DRM because screenshotting tools is needed. I have been unable to find documentation on which flags I could experiment with to fix this.
To Reproduce
App without DRM:
Expected behavior
No tearing
Avalonia version
11.2.2
OS
Linux
Additional context
No response
The text was updated successfully, but these errors were encountered: