Direct scanout is not turning on?

Hello, how can I enable “direct scanout”? I’m running a game natively in full-screen mode, with blocked 3D compositing, disabled HDR and disabled V-Sync. From what I understand, direct scanout should enable automatically when an application is in full-screen. Yet still, I have a red frame when I click the “showcompositing” button in kwin debbuging console.

Please, someone respond; similar threads were already opened before:

Hello and welcome,

It should be enabled by default unless disabled by the user or some options.

Wait so this is about whether or not compositing is automatically disabled for a fullscreen window?
This does not really seem to be the same as “Direct scanout” which is more like a method for forwarding frames to the screen - not just ‘compositing’.
It can be disabled using something like the following env var;

KWIN_DRM_NO_DIRECT_SCANOUT=1

If you do not have any such option then Direct Scanout should be enabled.

Such an option haa been used for troubleshooting/workarounds as here;

https://bugs.kde.org/show_bug.cgi?id=521843:

Whenever a notification animation starts or finishes on the secondary display, a red border briefly appears around the fullscreen application on the primary display, indicating that direct scanout is temporarily disabled.

As far as I understand, the red border always indicates that direct scanout is not active. Is that wrong? Or may it be that direct scanout not really needed for lowest latency anyway?

Thank you for prompt reply

Wait so this is about whether or not compositing is automatically disabled for a fullscreen window?

No, those are just the settings that I tested because direct scanout does not work. See the first image that I uploaded to check the settings. Like said, red frame is still visible even though the game is running in full-screen mode.

KWIN_DRM_NO_DIRECT_SCANOUT=1

I do not have this command in my environment file.

ps, thank you for the tutorial, I will read it later! I do have an amdgpu.

Ah. It just is not what that red border means more generally - but it could make sense that its an indicator for our case here.
I will just take that bugreports word for it that the two things directly correlate.

In the future please do not post screenshots of text - it is much preferable to share the text itself instead.

That said there are some options there that could be related.

KWIN_DRM_NO_AMS stands out to me as it will try to force kwin to use a legacy API. With Direct Scanout being a ‘newer’ (some time since Plasma 6) feature it might not work well with that.

I know that this sounds like a bad advice, but perform a fresh install and report your results.

I may try, but it pretty much is a fresh install (3rd OS just for testing purposes). I would really like to know if others get direct scanout working with CS2 or if it is a general problem with Plasma/Kwin and the game. It is also free, maybe you can have a try?

Already did, and it works now. That’s why I’m telling you to try with a fresh install, again.