-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
output: fix tearing with direct scanout and hardware cursor #10020
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
base: main
Are you sure you want to change the base?
Conversation
6ba9c42
to
531d79a
Compare
DS doesn't work with SW cursors. Might work with invisible SW cursors if the code allows it. |
is there still any blocking for this PR? I've been using this patch for weeks and it's okay. |
I don't think its finished, gotta look over it still |
@ikalco rebase? |
2d30319
to
002af6d
Compare
rebase possible? ty ikalco |
002af6d
to
d1457e6
Compare
I tried this on top of Hyprland dd33128 and it didn't seem to work properly. (This is the first time I have tested this PR.) When I started a fullscreen game |
Yeah, just had some time to test too. Results came like this:
|
…AnGeD dUrInG AsYnC fLiP" on crtc_x
d1457e6
to
c4f9aa4
Compare
@fxzzi btw if you test the new commits out, I changed the activelyTearing and directScanoutTo to be simpler for the edit: |
likely, tho i've also noticed some strange behaviour on my friends AMD based PC (not tested this PR there yet). On certain games for him (Minecraft 1.8.9, Paradox games like crusader kings 3, hearts of iron 4, etc), if he changes workspace and back to the game, his fps is locked to a low number (like 30 or so) for about 10-15 seconds. Also happens when notifications show on screen etc. I tested a few combinations with him:
I use the exact same setup with my nvidia GPU and don't experience this bug
I'm checking for tearing in a few games.
EDIT: also maybe an nvidia related issue. Sometimes games feel stuttery and it magically fixes by going to a different TTY and back. idk y
vrr seems to be broken tho even if the cursor is invisible. Noticed this on ghost of tsushima. Controller works fine with VRR, but using my mouse causes my monitor OSD to stay at 170 |
…sn't work in the same commit as a tearing flip in current kernel
c4f9aa4
to
4c3b65d
Compare
ok so the main issue is that the kernel doesn't really like anything changing, including the hw cursor position, while doing a tearing page flip I'll try asking around about tearing and hw cursor, hopefully there are some better workarounds or a kernel mechanism I missed, but this is the best we got for now
not sure if this is the expected the behavior but it's up to the kernel since all we have are switches for tearing and vrr
its probably related to the workaround limiting frames
this is probably related to |
thanks for the explanation, seems the kernel has more to do with ds tearing and vrr than I expected.
yeah, I know, just thought I'd share anyway since it seems to be an issue in relation to them. my apologies :) |
I'm using an AMD gpu with Mesa git and Kernel 6.15.3. I have these tearing related settings:
With the latest commits this PR doesn't cause stuttering or glitches, but still behaves a bit weirdly. When starting a game, tearing gets activated and scanout as well. However direct scanout keeps flipping between on and off unless I constantly move the mouse around. Also moving the mouse out of the game's monitor causes direct scanout to get stuck as off and it won't turn on when the cursor is back on the same monitor. Also it turns permanently off when the game hides the cursor (I was testing an FPS game). |
Describe your PR, what does it fix/add?
related #9858 and #9890
this pr tries to fix tearing when its combined with other stuff (ds, hw cursor, maybe more? idk)
also draft cause seems to me some other old mechanisms (pre aq) may still be interfering with new ones
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Is it ready for merging, or does it need work?
draft