This is not limited to SteamVR. Here is a screenshot from glxgears with gallium hud, while focusing a few different windows:

The low-fps graph is my own downstream patch that shows how the fps are according to the single slowest frame in the interval. If every frame in the interval is rendered in 16ms, except one that takes 120 ms, then the low-fps for this interval is 1/120ms.
The frametime graph shows it more directly.
I went from thinking it's an issue with my code to thinking it's an issue SteamVR has on kwin, to now seeing that it can be reproduced with just KDE + glxgears, with no SteamVR involved.
Yes, it seems to be an issue that we should report somewhere upstream. I still want to look more into what causes it.
I also don't see why vrcompositor running in direct mode separately from X is affected. Perhaps it's synchronising with some part of SteamVR that is running on the X server?
Actually it looks like plasmashell is not the culprit, now I can reproduce it with or without plasmashell running. Perhaps it was a coincidence.
Closing because it is not a SteamVR bug.
Nothing extracted yet.
I experience it with mesa git 552642066f5 on radeonsi on Vega 64 + Linux 4.20-rc1 + xorg 1.20.0 git g6ef025a87, plasma-desktop 5.14.3. @kisak-valve reproduced it, I assume on a more stable stack.
To reproduce:
The result should look like this:
![]()
You should also be able to see a visible stutter in the HMD when clicking on an unfocused window, while looking into the HMD (slowly panning the head helps).
I looked into the code of kwin and I believe that when it calls
xcb_set_input_focus(), this lag happens.I can reproduce it on bare X + openbox + plasmashell, but I can not reproduce it on X + openbox without plasmashell, that's why I think it is in plasmashell. Perhaps it has something to do with the widget that shows all the open windows.
This might be an upstream issue in plasmashell or even in xorg. But since vrcompositor is running in a drm lease that should be decoupled from Xorg, a workaround would be to make sure, vrcompositor is not influenced by whatever happens on the x server where SteamVR runs.