Kwin stuck on 60 fps

Hello everyone,

Kwin seems to be stuck on 60 fps which causes lag during animations. I have a laptop with a GTX 1650 4GB, and its drivers are picked up fine as I can run benchmarks and even play games just fine. But it's Kwin that seems to be the problem.

I actually had the same issue with my desktop, and it was only (indirectly) fixed by buying a high refresh rate monitor (144hz), now Kwin is stuck at 144 which is plenty but still very strange.

Obviously, my laptop is 60hz. I have tried setting certain environment variables:

  • KWIN_COMPOSITE
  • I have set maxfps on .kwinrc and nothing.

I have TripleBufferOn

System:
  Kernel: 5.15.12-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=113673ed-5df1-43fd-8db4-c2db9f724f03 rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    systemd.unified_cgroup_hierarchy=1
    resume=UUID=29954f21-5583-407d-82bc-ce5dd6c30d3f loglevel=3
  Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
    vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82L5 v: IdeaPad 5 Pro 16ACH6
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 Pro 16ACH6
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN
    serial: <superuser required> UEFI: LENOVO v: GSCN27WW date: 08/23/2021
Battery:
  ID-1: BAT0 charge: 65.1 Wh (86.8%) condition: 75.0/75.0 Wh (100.0%)
    volts: 16.5 min: 15.4 model: LGC L20L4PE1 type: Li-ion serial: <filter>
    status: Discharging
CPU:
  Info: model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  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: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1864 high: 2917 min/max: 1200/3200 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 2240 2: 1397
    3: 1640 4: 1395 5: 1958 6: 1396 7: 1395 8: 2194 9: 2419 10: 1593 11: 2792
    12: 1635 13: 1759 14: 2917 15: 1394 16: 1706 bogomips: 102208
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 495.46 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
    chip-ID: 10de:1f9d class-ID: 0302
  Device-2: AMD Cezanne vendor: Lenovo driver: amdgpu v: kernel
    bus-ID: 05:00.0 chip-ID: 1002:1638 class-ID: 0300
  Device-3: IMC Networks Integrated Camera type: USB driver: uvcvideo
    bus-ID: 3-4:3 chip-ID: 13d3:56fb class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org 1.21.1.2 compositor: kwin_x11 driver:
    loaded: modesetting,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1600 s-dpi: 96 s-size: 677x423mm (26.7x16.7")
    s-diag: 798mm (31.4")
  Monitor-1: eDP-1-1 res: 2560x1600 hz: 60 dpi: 189
    size: 344x215mm (13.5x8.5") diag: 406mm (16")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: AMD vendor: Lenovo driver: snd_hda_intel v: kernel
    bus-ID: 05:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
    vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x bus-ID: 05:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.12-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
  Device-1: MEDIATEK vendor: Lenovo driver: mt7921e v: kernel port: N/A
    bus-ID: 03:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
Bluetooth:
  Device-1: Foxconn / Hon Hai Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 3-3:2 chip-ID: 0489:e0cd class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 21.31 GiB (4.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS512GDE9X084N
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 41010C22
    temp: 39.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 461.82 GiB size: 461.82 GiB (100.00%)
    used: 21.31 GiB (4.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
    used: 562 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 461.82 GiB size: 461.82 GiB (100.00%)
    used: 21.31 GiB (4.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 461.82 GiB size: 461.82 GiB (100.00%)
    used: 21.31 GiB (4.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 461.82 GiB size: 461.82 GiB (100.00%)
    used: 21.31 GiB (4.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 14.86 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 13.57 GiB used: 1024 KiB (0.0%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 20.0 C mobo: N/A
  Fan Speeds (RPM): N/A
  GPU: device: nvidia screen: :0.0 temp: 46 C device: amdgpu temp: 43.0 C
Info:
  Processes: 439 Uptime: 5m wakeups: 432 Memory: 13.57 GiB
  used: 2.78 GiB (20.5%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1274 lib: 304 Shell: fish
  v: 3.3.1 default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.11

I have encountered situations (rare) where only on a reinstall could I elevate my refresh rate.

1 Like

I've attempted this, even with different versions of garuda. The dragonised and then the multimedia distro. I have researched it and it seems like a very specific Kwin x Nvidia issue.

And thank you for replying in new years day I hope you have a good evening :slight_smile:

1 Like

So, it works on Gnome or Xfce and is a kwin specific problem?

You could try a different version of kwin, such as the git or kwinft versions I guess.

I have tried LowLatency version, however I couldn't quite get kwinft to work. But either way there seemed to be no performance difference.

When I use the "show FPS" effect it is stuck at 60.