Screen flicker, but only in RDP session

I upgraded F39 to F40, KDE spin, and experienced no other issue than that since the upgrade inside a (Remmina) RDP session, often - but not always - some rectangular regions of the screen start flickering. This most notably happens when (in the RDP session on a Windows server) I switch between VSCode and the Git shell. Some of the regions can be small, others can be larger; it’s random.

This never happened in F39 (so could be a Wayland thing).

When I put something on top of the flickering region of the screen or something similar to it, the flicker goes away. I can’t even make a video of it, because immediately when I start recording, the flicker goes away.

FTR, this didn’t help: Flickering on Fedora 40 NVIDIA driver 550.78 - #3 by msmafra. (Also, the flicker doesn’t look like in that movie.)

# dnf list installed 'akmod-nvidia*'
Installed Packages
akmod-nvidia.x86_64        3:555.58.02-1.fc40        @rpmfusion-nonfree-updates

# grep '^GRUB_CMDLINE_LINUX' grub
GRUB_CMDLINE_LINUX="resume=/dev/mapper/VG_DATA-swap rd.lvm.lv=VG_SYSTEM/system rd.lvm.lv=VG_DATA/swap rhgb quiet initcall_blacklist=simpledrm_platform_driver_init nvidia-drm.modeset=1 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau"

# lsmod | grep -P '(nvidia|nouveau)'
nvidia_drm            135168  197
nvidia_modeset       1617920  85 nvidia_drm
nvidia_uvm           6815744  2
nvidia              61018112  1596 nvidia_uvm,nvidia_modeset
video                  81920  2 asus_wmi,nvidia_modeset

# lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GP107 [GeForce GTX 1050]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:63 memory:fb000000-fbffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:e000(size=128) memory:fc000000-fc07ffff

# grep '^model name' /proc/cpuinfo 
model name      : AMD Ryzen 5 3600 6-Core Processor


# inxi -Fzxx
[...snip...]
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050] vendor: ASUSTeK driver: nvidia
    v: 555.58.02 arch: Pascal pcie: speed: 8 GT/s lanes: 16 ports: active: none
    off: DP-1,HDMI-A-1 empty: DVI-D-1 bus-ID: 06:00.0 chip-ID: 10de:1c81
  Display: server: X.Org v: 24.1.2 with: Xwayland v: 24.1.2
    compositor: kwin_wayland driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1200 s-dpi: 96
  Monitor-1: DP-1 note: disabled pos: primary,left model: Dell U2415
    res: 1920x1200 dpi: 94 diag: 611mm (24.1")
  Monitor-2: HDMI-A-1 note: disabled pos: right model: Dell U2415
    res: 1920x1200 dpi: 94 diag: 611mm (24.1")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 2 drv: swrast
    gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: zink
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 555.58.02
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 1050/PCIe/SSE2
  API: Vulkan v: 1.3.283 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: N/A device-ID: 10de:1c81 device: 1 type: cpu driver: N/A
    device-ID: 10005:0000
[...snip...]

I’m not sure what other information is relevant.

Does anyone know a solution for this?