Soft flicker "VRR?" when moving mouse cursor in games | HW cursor disables VRR

Hi all,

So, after the latest NVIDIA driver updates NVIDIA on wayland is more or less usable as well in games. I am running wayland since BETA dropped (currently my NVIDIA drivers are from the prod not BETA). And I am able to enjoy my games on wayland like never before.

However I have seen one funny issue, which is in games that have a mouse cursor when the mouse is moved, the display is like “soft flickering” its like gamma is going UP and DOWN.

I read somewhere that this is related to VRR implementation on wayland or something like that, that VRR is applied on everything and when moving the mouse it tries to sync to the mouse causing the issues. When disabling VRR in KDE, I dont see this behavior.

Did somebody seen similar issue or does somebody know some workaround for this other than just to disable VRR?

System:
Kernel: 6.9.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=a7bf0470-4a53-4449-a9e6-74cd0c7ed817 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3 nvidia-drm.modeset=1
ibt=off
Desktop: KDE Plasma v: 6.1.1 tk: Qt v: N/A info: frameworks v: 6.3.0
wm: kwin_wayland vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Desktop Mobo: ASUSTeK model: ROG STRIX X570-E GAMING v: Rev X.0x
serial: <superuser required> part-nu: SKU uuid: <superuser required>
UEFI: American Megatrends v: 5003 date: 10/07/2023
CPU:
Info: model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
model-id: 0x21 (33) stepping: 0 microcode: 0xA20102B
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 32 MiB desc: 1x32 MiB
Speed (MHz): avg: 3921 high: 4908 min/max: 2200/5084 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 3904 2: 4264
3: 3800 4: 3628 5: 3701 6: 3833 7: 3646 8: 3800 9: 3935 10: 4908 11: 3837
12: 3934 13: 3799 14: 3857 15: 3863 16: 4030 bogomips: 121598
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA GA102 [GeForce RTX 3080] vendor: eVga.com. driver: nvidia
v: 555.58 alternate: nouveau,nvidia_drm non-free: 550.xx+ status: current
(as of 2024-06; EOL~2026-12-xx) arch: Ampere code: GAxxx
process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 4 speed: 16 GT/s
lanes: 16 ports: active: none off: DP-3 empty: DP-1,DP-2,HDMI-A-1
bus-ID: 0b:00.0 chip-ID: 10de:2206 class-ID: 0300
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
compositor: kwin_wayland driver: X: loaded: nvidia gpu: nvidia display-ID: 0
Monitor-1: DP-3 res: 3440x1440 size: N/A modes: N/A
API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia wayland: drv: nvidia
x11: drv: zink inactive: device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 555.58
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
memory: 9.77 GiB display-ID: :1.0
API: Vulkan v: 1.3.279 layers: 11 device: 0 type: discrete-gpu
name: NVIDIA GeForce RTX 3080 driver: nvidia v: 555.58 device-ID: 10de:2206
surfaces: xcb,xlib,wayland
Audio:
Device-1: NVIDIA GA102 High Definition Audio vendor: eVga.com.
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 0b:00.1 chip-ID: 10de:1aef class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 0d:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: VIA USB Audio Device driver: hid-generic,snd-usb-audio,usbhid
type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 5-1:2
chip-ID: 040d:340a class-ID: 0300
API: ALSA v: k6.9.7-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.2.0 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
speed: 5 GT/s lanes: 1 bus-ID: 05:00.0 chip-ID: 8086:2723 class-ID: 0280
IF: wlp5s0 state: down mac: <filter>
Device-2: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel
pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 06:00.0
chip-ID: 10ec:8125 class-ID: 0200
IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-3: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 07:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp7s0 state: down mac: <filter>
Info: services: NetworkManager,systemd-timesyncd
Bluetooth:
Device-1: Intel AX200 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6:7 chip-ID: 8087:0029
class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
lmp-v: 11 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
Local Storage: total: 1.59 TiB used: 1.03 TiB (64.7%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 500GB
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: 2B2QEXE7 temp: 33.9 C
scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Samsung model: SSD 970 EVO 1TB
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: 2B2QEXE7 temp: 41.9 C
scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 EVO 250GB
size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
Partition:
ID-1: / raw-size: 198.21 GiB size: 198.21 GiB (100.00%)
used: 101.29 GiB (51.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 584 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 198.21 GiB size: 198.21 GiB (100.00%)
used: 101.29 GiB (51.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 198.21 GiB size: 198.21 GiB (100.00%)
used: 101.29 GiB (51.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 198.21 GiB size: 198.21 GiB (100.00%)
used: 101.29 GiB (51.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 31.25 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 16 dev: /dev/zram0
ID-2: swap-2 type: partition size: 34.38 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/sda3 maj-min: 8:3
Sensors:
System Temperatures: cpu: 45.0 C mobo: 41.0 C
Fan Speeds (rpm): fan-1: 0 fan-2: 1421 fan-3: 1205 fan-4: 1158 fan-5: 0
fan-6: 0
Info:
Memory: total: 32 GiB available: 31.25 GiB used: 7.28 GiB (23.3%)
Processes: 410 Power: uptime: 1h 56m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 12.46 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
tool: systemctl
Packages: pm: pacman pkgs: 1990 libs: 570 tools: octopi,paru Compilers:
clang: 17.0.6 gcc: 14.1.1 Shell: garuda-inxi default: fish v: 3.7.1
running-in: konsole inxi: 3.3.35
Garuda (2.6.26-1):
System install date:     2023-11-20
Last full system update: 2024-06-29
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       No/Undetected
Failed units:

For Example in games that don’t have mouse cursor like Helldivers in game this is not seen, but in Menu where a mouse pops up its visible. And for games like RTS where mouse cursors are constantly present its visible.

Regards,
S.

I’ve had the same problem with my monitor and just recently found a way to fix it, I have an AMD GPU though so it might be different in your case, anyway this is what I did on KDE with MangoHud and Goverlay:

  • In the “System Settings” search for “Display Configuration” and set “Adaptive sync” to “Automatic”, this makes it so VRR is only active on full screen applications like games
  • In Goverlay under the “Performance” tab look for the “VSYNC” section and set both vulkan and opengl to “Adaptive”
  • Depending on the game you have to figure if VSync should be set on or off, (e.g. Warframe needed VSync on while in Path of Exile it didn’t seem to make a difference)
  • I found that having a frame limit either in game or through MangoHud is going to break the VRR and bring back the flickering

Hey,

Thanks for your suggestion. I am glad to hear you were able for you to fix it.

Personally I don’t use MangoHUD nor Goverlay. Adaptive sync is set to automatic in KDE. And usually I disable VSync in each game as I do see a need for it when I have a monitor with Freesync (AW3423DWF). Frame limit is either not set or set in game to the Freq of the monitor. When trying disabling or enabling Vsync per game I didn’t see any difference.

I will try it out anyway what you suggested using MangoHUD + Goverlay and see if it does any difference.

Thanks!

Regards,
S.

@Akezhar

I tried your solution but sadly no difference.

I was googling a bit and found this
https://www.reddit.com/r/linux_gaming/comments/1c5lphd/comment/kzv6iqj/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

If this is true it sucks, and even bigger reason to get an AMD GPU.

Regards,
S.

Alright, looks like I was able to fix this at least the “HW cursor breaks/Disables VRR in games”.

I did set KWIN_FORCE_SW_CURSOR=1 in the /etc/environment and rebooted.

#Forces SW cursor, Currently HW cursor breaks e.g disables VRR
KWIN_FORCE_SW_CURSOR=1

After performing the above, when moving the cursor in games, the VRR is not breaking. This is confirmed by looking at the OSD. When HW cursor is used and moved the VRR breaks, Monitor refresh rate bumps up immediately to MAX and back to MIN. When SW cursor is forced this behavior is gone and Soft flicker doesn’t occur when moving the cursor in GAME.

NOTE:
KWIN_FORCE_SW_CURSOR=1

  • its being said that this can cause laggy cursor, however I don’t see any performance loss on cursor movement, its fluid.

KDE + VRR always

  • the above doesn’t solve the problem when VRR is enabled always, on desktop flickering still occurs. VRR should be set to automatic! There is really no reason to run VRR on desktop.

Flickering on load screens

  • the above may not solve flickering in certain games during load screens. Even if mouse cursor is not present, I can see VRR breaks for some reason. I think this could be a limitation, where the system is not sure and disables enables VRR. I have seen this on Windows as well in the past.

Flickering out of VRR range

  • this is a funny one, cause, sometimes your FPS can go out of range of the VRR that is your monitor capable. This can be over or under the range. The advice here is to CAP the FPS to or under your refresh rate of your monitor. I have seen this on Windows as well in the past.

References:
https://community.kde.org/KWin/Environment_Variables

https://www.reddit.com/r/linux_gaming/comments/1dmviru/choppy_vrradaptive_sync_on_wayland/
https://www.reddit.com/r/linux_gaming/comments/sohlnp/wayland_moving_mouse_breaks_freesync/
https://www.reddit.com/r/linux_gaming/comments/1b9foom/workaround_for_cursor_movement_cutting_our_vrr_on/

Overall, I think the Implementation of VRR in wayland is not yet fully perfect. It has some kinks, the most obvious are with when using HW cursor…

Regards,
S.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.