Constant stutters during all activities (gaming and desktop use)

           .-------------------------:                    corvo@CorvoPC-Cachy
          .+=========================.                    -------------------
         :++===++==================-       :++-           OS: CachyOS x86_64
        :*++====+++++=============-        .==:           Kernel: Linux 7.0.1-1-cachyos
       -*+++=====+***++==========:                        Uptime: 1 hour, 18 mins
      =*++++========------------:                         Packages: 7 (flatpak), 1362 (pacman)
     =*+++++=====-                     ...                Shell: fish 4.6.0
   .+*+++++=-===:                    .=+++=:              Display (LC27G5xT): 2560x1440 in 27", 144 Hz [External]
  :++++=====-==:                     -*****+              WM: niri 25.11 (Wayland)
 :++========-=.                      .=+**+.              Theme: adw-gtk3 [GTK3]
.+==========-.                          .                 Font: Noto Sans (10pt) [GTK3/4]
 :+++++++====-                                .--==-.     Cursor: steam
  :++==========.                             :+++++++:    Terminal: alacritty 0.17.0
   .-===========.                            =*****+*+    Terminal Font: monospace (12pt, Regular)
    .-===========:                           .+*****+:    CPU: AMD Ryzen 5 5600X (12) @ 4.65 GHz
      -=======++++:::::::::::::::::::::::::-:  .---:      GPU: NVIDIA GeForce RTX 4070 SUPER [Discrete]
       :======++++====+++******************=.             Memory: 5.59 GiB / 31.25 GiB (18%)
        :=====+++==========++++++++++++++*-               Swap: 192.00 KiB / 31.25 GiB (0%)
         .====++==============++++++++++*-                Disk (/): 326.48 GiB / 682.44 GiB (48%) - btrfs
          .===+==================+++++++:                 Disk (/mnt/data): 1.11 TiB / 1.91 TiB (58%) - fuseblk
           .-=======================+++:                  Disk (/mnt/games): 920.25 GiB / 1.23 TiB (73%) - ext4
             ..........................                   Local IP (wlan0): 192.168.10.111/24
                                                          Locale: en_US.UTF-8

I’m currently fighting this issue and don’t know what else to try. When gaming I get several stutters per minute, they last 200-500ms and it returns to normal. On games like megabonk that I get very stable framerates I can see the spikes clearly in mangohud. Hell, I can even see the freezes when writing this post.

I’ve tried:

  • disabling monitors down to a single one
  • setting nvidia power profile to p1
  • I’ve installed a package mentioned here Whole system stutterring - #7 by hinzy (and uninstalled it, not sure what op meant)

I can tell the issue comes from something with Niri, probably, as I don’t have these issues when using gamescope session

Update: It is caused by my tv, which is connected by an HDMI cable and is on the other room. I noticed that I was getting this message

xdg-desktop-portal-gnome[4405]: Monitor ‘Technical Concepts Ltd 55″’ has no configuration which is-current!

In sync with the stutters. So I went and turned the TV on and the stutters stopped. I now need a way to stop it from doing that

Still investigating this, I need some way to avoid the stutters that happen every time that message happens. I only use that display when using gamescope-session and it is in another room so it would be best to not have to have it on all the time.