Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fullscreen(scanout/vrr): both cursor and primary layer stutter and may lock up #1170

Open
Vixea opened this issue Jan 24, 2025 · 16 comments
Open

Comments

@Vixea
Copy link

Vixea commented Jan 24, 2025

A follow up to what I understood should've or was likely to have been fixed(at least with more powerful dgpu display engines?) by #1020
Anyway the description of the problem from what I understand:
When in fullscreen or scanout the display engine in the GPU can be overwhelmed causing dropped, stutters, (whatever you wanna call it) frames. If it can't be reproduced on a desktop system I would recommend trying an all amd laptop(one igpu and dgpu) which is what I'm currently reproducing it with

@Drakulix
Copy link
Member

Yeah, it would be great if I had all the hardware in the world to test on. /s

Jokes aside, so you are experience stuttering on an AMD system with an iGPU and dGPU for a fullscreen title?

Can you tell me some more:

  • What framerate/resolution are you targetting?
  • VRR?
  • Are there additional displays?
  • What gpu is the display connected to, which gpu is the game running on?
  • Anything suspicious in cosmic-comp or kernel logs?
  • Can you get a dump of drm_info, while your game is running (e.g. via ssh), so we can easily confirm that direct scanout is actually in use?

Thanks for the bug report. :)

@Vixea
Copy link
Author

Vixea commented Jan 24, 2025

1920*1200 at 165 Hz
Auto
No
Maybe I'm seeing a whole lot of repeating(what looks like the) amdgpu driver initing - https://pastebin.com/cEzWkEm9

https://pastebin.com/ZvfZGd0R

@Vixea
Copy link
Author

Vixea commented Jan 24, 2025

https://pastebin.com/fT1DHPhn
Mild concern noticed this after quickly entering fullscreen on a video and checking the logs

@Vixea
Copy link
Author

Vixea commented Jan 28, 2025

@Drakulix friendly ping, sorry if you're busy

@Vixea
Copy link
Author

Vixea commented Feb 5, 2025

Yep it's a scan out issue no problem with the disable scan out env var, nope just didn't reproduce it with the game however watching a video did it so nope nevermind

@Drakulix
Copy link
Member

Drakulix commented Feb 5, 2025

I am not sure what to tell you, the kernel logs look like this might be an amdgpu bug.

The drm_info log (and your tests with disabling scanout) should that direct scanout is in fact active. The log also confirms that VRR is active, but I am not sure, if that has any impact on the issue you are seeing.

I recommend to turn of scanout via the environment variable and possibly open a mesa/amdgpu issue.

@Vixea
Copy link
Author

Vixea commented Feb 7, 2025

Update: kernel issue fixed, after updating to 6.13.1-arch(yes I know about the bug) it turns out the psr issue wasn't the issue. VRR is with it disabled I have no issues or at least decreased to the point of not being noticeable.

@Vixea
Copy link
Author

Vixea commented Feb 7, 2025

So basically another VRR issue on the list of many VRR issues, now why it behaves that way your guess is as good as main you'll think it'll be a constant stutter at minimum fresh rate not a complete halting of rendering.

@Vixea Vixea changed the title Fullscreen(scanout): display engine can still be overwelmed Fullscreen(scanout/vrr): both cursor and primary layer stutter and may lock up Feb 7, 2025
@Drakulix
Copy link
Member

Drakulix commented Feb 7, 2025

So basically another VRR issue on the list of many VRR issues, now why it behaves that way your guess is as good as main you'll think it'll be a constant stutter at minimum fresh rate not a complete halting of rendering.

Okay so, just to confirm this: This issue only happens with VRR enabled and overlay planes in use, correct? Disabling either fixes it?

@onlyreportingissues
Copy link

onlyreportingissues commented Feb 7, 2025

So basically another VRR issue on the list of many VRR issues, now why it behaves that way your guess is as good as main you'll think it'll be a constant stutter at minimum fresh rate not a complete halting of rendering.

Okay so, just to confirm this: This issue only happens with VRR enabled and overlay planes in use, correct? Disabling either fixes it?

Fullscreen videos seem also a little laggy. Watched a movie recently and fullscreen windowed was less laggy than watching it in fullscreen.

(Using adaptive VRR)


OS: Fedora Linux 41 (Workstation Edition) x86_64
Kernel: Linux 6.14.0-0.0.next.20250207.318.vanilla.fc41.x86_64
Display (PL2745Q): 2560x1440 @ 100 Hz in 27" [External]
CPU: AMD Ryzen 5 5600 (12) @ 4.69 GHz
GPU: AMD Radeon RX 6600 [Discrete]

cosmic-comp 63995c4
(Fedora Copr - user ryanabx)

firefox-135.0-1.fc41.x86_64

@Vixea
Copy link
Author

Vixea commented Feb 7, 2025

So basically another VRR issue on the list of many VRR issues, now why it behaves that way your guess is as good as main you'll think it'll be a constant stutter at minimum fresh rate not a complete halting of rendering.

Okay so, just to confirm this: This issue only happens with VRR enabled and overlay planes in use, correct? Disabling either fixes it?

How would I disable overlay planes? Do you mean the cursor?
And yes it only seems to happen with VRR, I would need to check the possible overlay issue later(once that question is answered)

@Vixea
Copy link
Author

Vixea commented Feb 19, 2025

Or does entering fullscreen enable/use the overlay plane?
If that's the case then yes only happens with overlay and VRR enabled

@Drakulix
Copy link
Member

How would I disable overlay planes?

COSMIC_DISABLE_OVERLAY_SCANOUT=1

Or does entering fullscreen enable/use the overlay plane?

No, on adaptive VRR this turns on VRR and it makes it way more likely that cosmic-comp is using direct scanout on the primary plane. (Which can also be disabled with COSMIC_DISABLE_DIRECT_SCANOUT=1, which will also disable overlay plane scanout and basically force composition for anything but cursors.)

@Vixea
Copy link
Author

Vixea commented Feb 22, 2025

Tried disabled scan out, no issue both auto and always
Tried only overlay I noticed issues both with auto and always

@Vixea
Copy link
Author

Vixea commented Feb 22, 2025

I also noticed that you can reproduce it easily if you fullscreen with a dark/black image also work with white idk if that matter it's just noticed that it was very noticeable in a blank loading screen of the game I was testing but not the menu

@Vixea
Copy link
Author

Vixea commented Feb 22, 2025

I noticed that automatic seems to cause updates even if not in fullscreen is the expected?(As in I notice the screen freezing for microseconds)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants