Games & Videos stuttering only while game is focused

GLITCH FROM HELL

Encountering a really strange glitch, that is driving me completely nuts!

The Problem:
When playing a game while having a video playing on my second monitor I experience bad stuttering (even tho the FPS is great) in both the game and the video that is playing.
While the game is running and video playing, if I switch focus to video player all stuttering is completely gone in both the game and the video, once I switch focus back to game stuttering returns on both the game and the video!!!

Troubleshooting:
firefox, waterfox, chromium + multiple games = same result

Compton settings I tried:

  • disabled compton completely = made it worse
  • unredir-if-possible = true/false
  • mark-wmwin-focused = true/false
  • mark-wmwin-focused = true/false
  • mark-ovredir-focused = true/false
  • detect-transient = true/false
  • detect-client-leader = true/false
  • xrender-sync = true/false
  • xrender-sync-fence = true/false
  • refresh-rate = 60/0
  • vsync = true/false
  • disabled shadows
  • disabled fading

Nvidia settings I tried:

  • setting resolution/refresh rate to make sure its correct
  • force composition pipeline = on/off
  • force full composition pipeline = on/off
  • sync to Vblank = on/off
  • allow flipping = on/off
  • setting PowerMizer = auto/prefer maximum performance

i3 settings I tried:

  • popup_during_fullscreen smart = on/off
  • focus_follows_mouse = yes/no

Steam settings I tried:

  • tried both native & runtime steam
  • in-game overlay on/off

Others:

  • removed and reinstalled RAM
  • removed and reinstalled GPU
  • checked temperatures & made sure cooling fans on GPU work
  • verified all BIOS settings
  • reinstalled compton
  • ran games in borderless & fullscreen
  • killing polybar
  • killing xfsettingsd (had weird problems with this before, had to delete xorg.conf, caused weird conflict with nvidia… system would boot to blank screen)
  • I’m sure that I am forgetting other things I tried…

System specs:
Distro: Arch-Labs
WM: i3
Kernel: Linux 5.1.16.a-1-hardened
CPU: AMD FX-8350
GPU: Nvidia 760Gtx (4GB)
RAM: 16GB
SWAP: none
MONITORS: (2) 1920x1080 @60Hz

What gives! Seems like the issue is related to focus or mouse… If I pull the mouse out of the game window into the browser video all stuttering is gone, game runs smooth… This is driving me completely nuts!:triumph:
Any help is appreciated, thanks for taking the time and reading this.

maybe its the game

Web browsers on Linux don’t seem to hardware accelerate their video decoding and instead leave it to the CPU. Try watching a video with youtube-dl and MPV for example and see if it behaves differently.

As stated, tried multiple games. Including games that run on a potato… lol

Tried using VLC and had the same result, I’ll download mps-youtube and try later.

Never had issues with video playback while playing games before, same hardware same OS, almost completely identical setup.
Let me clarify: video game (monitor1) + browser video (monitor 2) stutters while video game is focused. If I focus the browser video while the video game is still running on the other monitor (fully visible) the stutter completely gone! When I focus the game again both the video and game stutters… The FPS never drops during all of this.

have you tried disabling compton entirely?

nvm made it worse

do you mean GTX 760?
The 7600 doesn’t have 4GB

Ops, that was a typo. Yes it’s a 760GTX :sweat_smile:
Fixed it

try a different WM maybe?

I can’t live without i3!
Here is the thing tho, I had Arch Labs with i3 wm installed. Played games with no issues. Decided to try out another distro and did not like it, so I hopped back, same installation procedure, same packages… but now I am faced with this odd glitch.

I was really happy that a new Nvidia driver showed up for update this morning, installed it and to my disappointment its still there (al tho seems less pronounced?.. need to do more testing to see if that’s the case).
When I get back home I will be doing more extensive tests, trying to nail what is causing this. I REFUSE TO GIVE UP!

Anyone have any suggestions what to try next? :desktop_computer::thinking:

i meant just for testing purposes, if it’s a problem with i3 it would be a good idea to submit a bug report