SUMMARY I have two displays running at different refresh rates (60hz and 165hz). In games such as FFXIV and Cities Skylines, I've noticed when I press the mouse and the cursor disappears, when the cursor reappears there is a stutter/large frame rate drop that occurs. Clicking on UI elements that don't cause the cursor to disappear has no stuttering issues. STEPS TO REPRODUCE 1. Use two displays with different refresh rates. 2. Open FFXIV 3. Click and hold the mouse to move the camera around and release the mouse. OBSERVED RESULT Stuttering when the mouse is released and the cursor reappears. EXPECTED RESULT No stuttering SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.5.2 KDE Frameworks Version: 6.19.0 Qt Version: 6.10.0 Kernel Version: 6.17.7-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor Memory: 32 GiB of RAM (30.5 GiB usable) Graphics Processor 1: AMD Radeon RX 7900 XTX Graphics Processor 2: AMD Ryzen 7 7800X3D 8-Core Processor ADDITIONAL INFORMATION Here is a video of the problem: https://youtu.be/siSVaXroBWM I didn't have this issue in plasma 6.4, or possibility even 6.5.0, but I'm not positive. Here's a few things that fix it in FFXIV. 1. Use a single monitor 2. Enable the software cursor in in-game settings 3. Play in Windowed Mode 4. Use Gamescope 5. Use Sway Let me know if more information is needed. Thank you.
I am having the exact same problem in other games that grabs the cursor like FFXIV. I have tested in Guild Wars 2 and World of Warcraft and the same stutters happen in those as well. Also using arch with the latest release of everything. Also using a multi-monitor setup, but with the same refresh-rate on both. Gpu AMD RX 7900XTX Cpu AMD Ryzen 7 5800X3D
I think this is related to direct scanout - direct scanout stops working with MAILBOX and FIFO present modes for a moment when mouse cursor appears and soon later it works again, I can see that "compositing" red text appears for a moment - e.g. press ESC in game to open menu which shows cursor [still regression 6.4.5 -> 6.5.0-git] https://bugs.kde.org/show_bug.cgi?id=510967#c8 https://www.youtube.com/watch?v=GY_5oT8MFNY
This issue still persists unfortunately. Same situation. In FFXIV if the mouse setting is set to hardware, there will be a massive fps dip for a moment when the cursor comes back after clicking (if you're, perhaps, trying to move the camera). Like OP, I also have a dual monitor setup where my main has 165hz and my second monitor has 60hz. I haven't exactly noticed this issue in any other game (I've been playing games mostly with controller lately) so, FFXIV for now, is the one I know that is having this issue. One solution is to set the mouse setting to "software" which causes a tiny delay in movement with the mouse, but otherwise the game runs normally smooth. Hardware mode gives us that frame dip issue. I'd like to use hardware mouse as there's no delay at all with moving the mouse around. OS: CachyOS x86_64 Kernel: Linux 6.18.0-3-cachyos DE: KDE Plasma 6.5.4 WM: KWin (Wayland) CPU: 12th Gen Intel(R) Core(TM) i5-12600K (16) @ 5.00 GHz GPU: AMD Radeon RX 6800 XT
On KDE Plasma Wayland (KWin 6.5.4) with AMD GPU, games that grab/release the mouse cursor (e.g. World of Warcraft WOTLK / Classic) show severe frametime stalls when right-clicking to control the camera. This does not occur on NVIDIA hardware. Environment (affected system) OS: Archy KDE Plasma: 6.5.4 Session: Wayland GPU: AMD RX 7900 XTX Driver: amdgpu + Mesa Monitor: 165 Hz Mouse: 1000 Hz polling Game runtime: Wine / Proton GE (DXVK) Game: World of Warcraft WOTLK (legacy client) Symptoms Right-clicking to rotate camera causes a visible hitch / microstutter MangoHud FPS briefly drops to 0 exactly when the mouse button is pressed or released What fixes the issue KWIN_DRM_NO_DIRECT_SCANOUT=1 → Completely resolves the stutter and FPS→0 drops Gamescope → Also resolves it, but causes alt-tab issues and occasional mouse/camera desync Partial workaround Disabling in-game hardware cursor (adds mouse latency) Control test (no issue) Tested on a laptop with NVIDIA GPU using the same game and runtime: CPU: Intel i7 (12th gen) GPU: RTX 3070 Ti OS: Archy Session: KDE Wayland Mouse: 1000 Hz polling Same Wine/Proton GE runner → No stutter, no FPS drops, no Gamescope or env vars needed Likely cause Appears related to KWin Direct Scanout being invalidated by cursor visibility / pointer grab changes, causing a brief present stall. Disabling Direct Scanout globally avoids the issue.
KWIN_DRM_NO_DIRECT_SCANOUT=1 workaround doesn't work for me. I still see fps drops to 0 when release mouse button. Did I miss something? Tried adding it to /etc/environment and ~/.config/plasma-workspace/env/ KWin debug console shows "compositing" red text and it not flashing, just static text
(In reply to william.drumright from comment #4) > On KDE Plasma Wayland (KWin 6.5.4) with AMD GPU, games that grab/release the > mouse cursor (e.g. World of Warcraft WOTLK / Classic) show severe frametime > stalls when right-clicking to control the camera. > > This does not occur on NVIDIA hardware. > > Environment (affected system) > OS: Archy > KDE Plasma: 6.5.4 > Session: Wayland > GPU: AMD RX 7900 XTX > Driver: amdgpu + Mesa > Monitor: 165 Hz > Mouse: 1000 Hz polling > Game runtime: Wine / Proton GE (DXVK) > Game: World of Warcraft WOTLK (legacy client) > > Symptoms > Right-clicking to rotate camera causes a visible hitch / microstutter > MangoHud FPS briefly drops to 0 exactly when the mouse button is pressed or > released > > What fixes the issue > KWIN_DRM_NO_DIRECT_SCANOUT=1 > → Completely resolves the stutter and FPS→0 drops > > Gamescope > → Also resolves it, but causes alt-tab issues and occasional mouse/camera > desync > > Partial workaround > Disabling in-game hardware cursor (adds mouse latency) > > > Control test (no issue) > Tested on a laptop with NVIDIA GPU using the same game and runtime: > CPU: Intel i7 (12th gen) > GPU: RTX 3070 Ti > OS: Archy > Session: KDE Wayland > Mouse: 1000 Hz polling > Same Wine/Proton GE runner > → No stutter, no FPS drops, no Gamescope or env vars needed > > > Likely cause > Appears related to KWin Direct Scanout being invalidated by cursor > visibility / pointer grab changes, causing a brief present stall. Disabling > Direct Scanout globally avoids the issue. Where are you adding `KWIN_DRM_NO_DIRECT_SCANOUT=1` to?
(In reply to captainskelly0 from comment #6) > (In reply to william.drumright from comment #4) > > On KDE Plasma Wayland (KWin 6.5.4) with AMD GPU, games that grab/release the > > mouse cursor (e.g. World of Warcraft WOTLK / Classic) show severe frametime > > stalls when right-clicking to control the camera. > > > > This does not occur on NVIDIA hardware. > > > > Environment (affected system) > > OS: Archy > > KDE Plasma: 6.5.4 > > Session: Wayland > > GPU: AMD RX 7900 XTX > > Driver: amdgpu + Mesa > > Monitor: 165 Hz > > Mouse: 1000 Hz polling > > Game runtime: Wine / Proton GE (DXVK) > > Game: World of Warcraft WOTLK (legacy client) > > > > Symptoms > > Right-clicking to rotate camera causes a visible hitch / microstutter > > MangoHud FPS briefly drops to 0 exactly when the mouse button is pressed or > > released > > > > What fixes the issue > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > > → Completely resolves the stutter and FPS→0 drops > > > > Gamescope > > → Also resolves it, but causes alt-tab issues and occasional mouse/camera > > desync > > > > Partial workaround > > Disabling in-game hardware cursor (adds mouse latency) > > > > > > Control test (no issue) > > Tested on a laptop with NVIDIA GPU using the same game and runtime: > > CPU: Intel i7 (12th gen) > > GPU: RTX 3070 Ti > > OS: Archy > > Session: KDE Wayland > > Mouse: 1000 Hz polling > > Same Wine/Proton GE runner > > → No stutter, no FPS drops, no Gamescope or env vars needed > > > > > > Likely cause > > Appears related to KWin Direct Scanout being invalidated by cursor > > visibility / pointer grab changes, causing a brief present stall. Disabling > > Direct Scanout globally avoids the issue. > > Where are you adding `KWIN_DRM_NO_DIRECT_SCANOUT=1` to? I may have spoken too soon. While enabling the KWIN_DRM did smooth out the FPS stutter, moving to a busy part of the game causes the mouse to have really bad latency. Going back to GameScope may be the best option until this bug gets addressed upstream. If you want to test it yourself: Create an environment directory and file: mkdir -p ~/.config/environment.d nano ~/.config/environment.d/kwin.conf Add this line to the file: KWIN_DRM_NO_DIRECT_SCANOUT=1 Log out and back in
(In reply to william.drumright from comment #7) > (In reply to captainskelly0 from comment #6) > > (In reply to william.drumright from comment #4) > > > On KDE Plasma Wayland (KWin 6.5.4) with AMD GPU, games that grab/release the > > > mouse cursor (e.g. World of Warcraft WOTLK / Classic) show severe frametime > > > stalls when right-clicking to control the camera. > > > > > > This does not occur on NVIDIA hardware. > > > > > > Environment (affected system) > > > OS: Archy > > > KDE Plasma: 6.5.4 > > > Session: Wayland > > > GPU: AMD RX 7900 XTX > > > Driver: amdgpu + Mesa > > > Monitor: 165 Hz > > > Mouse: 1000 Hz polling > > > Game runtime: Wine / Proton GE (DXVK) > > > Game: World of Warcraft WOTLK (legacy client) > > > > > > Symptoms > > > Right-clicking to rotate camera causes a visible hitch / microstutter > > > MangoHud FPS briefly drops to 0 exactly when the mouse button is pressed or > > > released > > > > > > What fixes the issue > > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > > > → Completely resolves the stutter and FPS→0 drops > > > > > > Gamescope > > > → Also resolves it, but causes alt-tab issues and occasional mouse/camera > > > desync > > > > > > Partial workaround > > > Disabling in-game hardware cursor (adds mouse latency) > > > > > > > > > Control test (no issue) > > > Tested on a laptop with NVIDIA GPU using the same game and runtime: > > > CPU: Intel i7 (12th gen) > > > GPU: RTX 3070 Ti > > > OS: Archy > > > Session: KDE Wayland > > > Mouse: 1000 Hz polling > > > Same Wine/Proton GE runner > > > → No stutter, no FPS drops, no Gamescope or env vars needed > > > > > > > > > Likely cause > > > Appears related to KWin Direct Scanout being invalidated by cursor > > > visibility / pointer grab changes, causing a brief present stall. Disabling > > > Direct Scanout globally avoids the issue. > > > > Where are you adding `KWIN_DRM_NO_DIRECT_SCANOUT=1` to? > > I may have spoken too soon. While enabling the KWIN_DRM did smooth out the > FPS stutter, moving to a busy part of the game causes the mouse to have > really bad latency. Going back to GameScope may be the best option until > this bug gets addressed upstream. > > If you want to test it yourself: > > Create an environment directory and file: > mkdir -p ~/.config/environment.d > nano ~/.config/environment.d/kwin.conf > > Add this line to the file: > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > > Log out and back in Still didn't work for me. I use KDE Wayland/Proton GE 10.26/RX 6900 XT if it matters. Currenlty the best workaroud I found is to keep Battle.net Launcher running in system tray. It blocks direct scanout because of this https://bugs.kde.org/show_bug.cgi?id=513203
(In reply to william.drumright from comment #7) > (In reply to captainskelly0 from comment #6) > > (In reply to william.drumright from comment #4) > > > On KDE Plasma Wayland (KWin 6.5.4) with AMD GPU, games that grab/release the > > > mouse cursor (e.g. World of Warcraft WOTLK / Classic) show severe frametime > > > stalls when right-clicking to control the camera. > > > > > > This does not occur on NVIDIA hardware. > > > > > > Environment (affected system) > > > OS: Archy > > > KDE Plasma: 6.5.4 > > > Session: Wayland > > > GPU: AMD RX 7900 XTX > > > Driver: amdgpu + Mesa > > > Monitor: 165 Hz > > > Mouse: 1000 Hz polling > > > Game runtime: Wine / Proton GE (DXVK) > > > Game: World of Warcraft WOTLK (legacy client) > > > > > > Symptoms > > > Right-clicking to rotate camera causes a visible hitch / microstutter > > > MangoHud FPS briefly drops to 0 exactly when the mouse button is pressed or > > > released > > > > > > What fixes the issue > > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > > > → Completely resolves the stutter and FPS→0 drops > > > > > > Gamescope > > > → Also resolves it, but causes alt-tab issues and occasional mouse/camera > > > desync > > > > > > Partial workaround > > > Disabling in-game hardware cursor (adds mouse latency) > > > > > > > > > Control test (no issue) > > > Tested on a laptop with NVIDIA GPU using the same game and runtime: > > > CPU: Intel i7 (12th gen) > > > GPU: RTX 3070 Ti > > > OS: Archy > > > Session: KDE Wayland > > > Mouse: 1000 Hz polling > > > Same Wine/Proton GE runner > > > → No stutter, no FPS drops, no Gamescope or env vars needed > > > > > > > > > Likely cause > > > Appears related to KWin Direct Scanout being invalidated by cursor > > > visibility / pointer grab changes, causing a brief present stall. Disabling > > > Direct Scanout globally avoids the issue. > > > > Where are you adding `KWIN_DRM_NO_DIRECT_SCANOUT=1` to? > > I may have spoken too soon. While enabling the KWIN_DRM did smooth out the > FPS stutter, moving to a busy part of the game causes the mouse to have > really bad latency. Going back to GameScope may be the best option until > this bug gets addressed upstream. > > If you want to test it yourself: > > Create an environment directory and file: > mkdir -p ~/.config/environment.d > nano ~/.config/environment.d/kwin.conf > > Add this line to the file: > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > > Log out and back in Yeah I tried it myself and it removed most of the stutter but it’s still kinda there. So it’s helped but not completely. Using software mouse in the meantime till this gets fixed. So annoying!
Try this! I'm not sure if its placebo but it seems to me it works better than KWIN_DRM_NO_DIRECT_SCANOUT=1 Open your environment file: sudo nano /etc/environment Add this line: KWIN_DRM_NO_AMS=1 Save and Reboot. This forces KWin to use a legacy DRM API that often handles input interrupts more smoothly.
(In reply to william.drumright from comment #10) > Try this! I'm not sure if its placebo but it seems to me it works better > than KWIN_DRM_NO_DIRECT_SCANOUT=1 > > Open your environment file: sudo nano /etc/environment > > Add this line: > KWIN_DRM_NO_AMS=1 > > Save and Reboot. This forces KWin to use a legacy DRM API that often handles > input interrupts more smoothly. KWIN_DRM_NO_AMS=1 causes crash on my system beacause of this: https://bugs.kde.org/show_bug.cgi?id=512968#c6
I hope this issue gets looked into soon, this is just so annoying. Still just using the software mouse but I'd really love this to be fixed :/