protonscr

vrcompositor stutter with plasmashell when focusing windows

steamvrclosed
ValveSoftware/SteamVR-for-Linux#155 · opened 2018-11-12 by ChristophHaag · updated 2021-02-24 · 5 comments · github
CChristophHaag 2018-11-12 github

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:

  1. Run plasmashell with any window manager. I tried kwin, openbox and xfwm4.
  2. Run SteamVR, open the advanced frame time settings, enable details.
  3. Click on some random windows on the desktop.

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.

CChristophHaag 2018-11-13 github

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

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.

PPlagman 2018-11-13 github

Seems like it's more of a general X.Org/DRI thing then?

CChristophHaag 2018-11-15 github

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?

CChristophHaag 2018-11-16 github

Actually it looks like plasmashell is not the culprit, now I can reproduce it with or without plasmashell running. Perhaps it was a coincidence.

CChristophHaag 2021-02-24 github

Closing because it is not a SteamVR bug.

Nothing extracted yet.