Screen "resize flicker" when fullscreen games lose focus

Hi friends,

this is a minor issue but it annoys me a lot. In several full screen games, I have this weird resize animation when the game regains focus from the second monitor. I use chat software on my second monitor and when I go back to gaming I have this weird animation. Video sample here: https://streamable.com/ewpv9x

The problem does not seem to happen in Hyprland, only in KDE. The problem does NOT happen if I switch to windowed mode, but the game doesn’t seem to take into account the border decorations and the bottom part of the window is cropped. Changing the game to windowed mode and then back to full screen often solves the problem until the game is launched again. Very weird.

I’ve searched about this issue a lot but never been able to solve it. I launch all my games through Steam and I have this problem on several of the games. Magic Arena is just the one I can more reliably reproduce the problem.

I do own an Nvidia card, which I know can be problematic. I believe all drivers are installed, lsmod seems to return the correct output:

lsmod | grep nvidia

nvidia_drm            118784  55
nvidia_uvm           3481600  8
nvidia_modeset       1585152  63 nvidia_drm
video                  77824  1 nvidia_modeset
nvidia              62402560  1392 nvidia_uvm,nvidia_modeset

I have KDE installed and using X11. Issue also happens with Wayland. Again, in Hyprland the issue doesn’t seem to happen.

inxi -G output:

Graphics:
  Device-1: NVIDIA GA102 [GeForce RTX 3080 Lite Hash Rate] driver: nvidia
    v: 545.29.06
  Device-2: Razer USA Gaming Webcam [Kiyo] driver: snd-usb-audio,uvcvideo
    type: USB
  Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: 2560x1440~144Hz
    2: 2560x1440~144Hz
  API: EGL v: 1.5 drivers: nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
  API: Vulkan v: 1.3.274 drivers: nvidia surfaces: xcb,xlib

Thanks in advance!

In the realm of hardware choices, it’s undeniable that Nvidia may exhibit occasional quirks for various reasons. Your best approach is to experiment with different driver versions to see if any resolve the issues. If none prove effective, it might be worth considering selling your current Nvidia card and making the switch to an AMD GPU.

When I initially transitioned from Windows to Linux as a gamer, I was adamant about sticking with Nvidia, considering it superior and essential. However, my perspective has since evolved. I now prioritize a seamless Linux experience with compatible hardware, even if it means accepting a potential 10-20 fps drop in gaming performance. AMD GPUs have made significant strides, and the days of absolute necessity for Nvidia GPUs are behind us. In the contemporary landscape, AMD is a viable and reliable choice.

I appreciate the sentiment that Nvidia is not the best choice for Linux, I bought this card when I was using Windows. If I was buying a new card today I would make a different decision, that’s for sure. Right now I’m not looking to replace it.

I tried launching the game in Hyprland instead of KDE and the problem doesn’t seem to happen. Maybe some KDE setting is causing this?

Have you tested disabling the compositor before starting the game? You can find it in the KDE settings menu, or press Shift+Alt+F12 to toggle it on and off.

Sorry for the late reply. Disabling the compositor has changed the behavior a bit. Now it doesn’t resize the gaming window, it just shows my bottom panel for a bit.