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

vsync not working correctly on xorg #16

Closed
aufkrawall opened this issue Feb 28, 2018 · 19 comments
Closed

vsync not working correctly on xorg #16

aufkrawall opened this issue Feb 28, 2018 · 19 comments
Assignees
Labels
assigned The issue is assigned to engineer

Comments

@aufkrawall
Copy link

In an Xorg session, try out any application which is suitable to spot tearing (e.g. vkquake, set host_maxfps to a value well above display refreshrate) and enable vsync in it.
There is a small stripe of tearing very close to the top of the screen, which is not there with any OGL application and RadeonSI.

Side note: RadV has a similar issue, but only in windowed mode. amdvlk has it both in windowed and fullscreen.

@jinjianrong jinjianrong added the assigned The issue is assigned to engineer label Mar 1, 2018
@davidmaoamd
Copy link

AMDVLK uses copy to present even for fullscreen application.
That is why we would have different behavior compared to Radv in the fullscreen case.
I would suspect it is the issue in the X server side, but not AMDVLK.
Anyway, thanks for reporting this.
I think the next step might be to file bugzilla in the freedesktop.

@aufkrawall
Copy link
Author

Thanks for your response, I created a bug entry in the xf86-video-amdgpu section of Xorg freedesktop tracker:
https://bugs.freedesktop.org/show_bug.cgi?id=105316

@aufkrawall
Copy link
Author

Michel Dänzer informed me that tearing in windowed mode on Xorg can in no way get reliably prevented without a compositor.
However, he shared some ideas why amdvlk behavior in fullscreen is different to radeonsi and radv, so I hope maybe something specific is possible regarding fullscreen vsync (please read the short freedesktop tracker conversation).

@davidmaoamd
Copy link

As I mentioned before, for some reason, AMDVLK did not enable page flip for fullscreen application for now.
But we will try to enable it in the near future.
Thanks.

@aufkrawall
Copy link
Author

Thanks for the clarification, I'll gladly test it as soon it goes live.

@JacobHeAMD
Copy link
Contributor

For testing, you can set useFlipHint true in xgl/icd/settings.cfg.

@aufkrawall
Copy link
Author

Can I set this also with precompiled binaries?

@JacobHeAMD
Copy link
Contributor

It's not necessary to rebuild the binary, just add following line into /etc/amd/amdPalSettings.cfg
UseFlipHint,1

@aufkrawall
Copy link
Author

Thank you, seems to work like a charm. :)

@aufkrawall
Copy link
Author

Btw.: Is there a reason why this is not enabled by default?
I think the expectation is to completely eliminate tearing when turning on vsync in the application, without having to configure the driver first.

@ghost
Copy link

ghost commented Dec 4, 2018

normally "TearFree" should do it...

Is there a reason why this is not enabled by default?

is still good or not? because most of them take it with Take tearing for example to have no input delays etc ..

@aufkrawall
Copy link
Author

TearFree is not enabled by default for single display configurations.
If lag is an issue, why enable vsync in the first place?

@ghost
Copy link

ghost commented Dec 5, 2018

depends on the game in my opinion for example i would never vsync on shooter or racing games.

@aufkrawall
Copy link
Author

@JacobHeAMD Could you please provide an update why this is not enabled by default? I don't experience any drawbacks with that option set.

@Oschowa
Copy link

Oschowa commented Apr 21, 2019

I also think it might be good to enable this by default, until i found this report i almost gave up on amdvlk because i thought the tearing was unfixable.

@Oschowa
Copy link

Oschowa commented Apr 21, 2019

At least please document this setting in the readme.

@aufkrawall
Copy link
Author

Hm, UseFlipHint,1 screws up frametime variance in Hitman 2 DXVK + vsync, perceived smoothness on Xorg is really terrible vs. TearFree.

Please implement proper vsync in amdvlk, and of course also FreeSync at this occasion. 👎 It's both available in RADV.
I'd reopen this ticket, but I can't.

@aufkrawall
Copy link
Author

Just in case: Please test vsync with either amdgpu.dc=0 (if you are on Polaris or older) or use the modesetting Xorg DDX driver, as there is this issue screwing up vsync in at least many Wine games with amdgpu.dc=1 + xf86-video-amdgpu-git:
https://bugs.freedesktop.org/show_bug.cgi?id=110659

@aufkrawall
Copy link
Author

I've opened a new ticket for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned The issue is assigned to engineer
Projects
None yet
Development

No branches or pull requests

5 participants