ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
918 stars 45 forks source link

SteamVR gets impossibly long frame times. #216

Closed mathew2214 closed 5 years ago

mathew2214 commented 5 years ago

Your system information

Please describe your issue in as much detail as possible:

during gameplay, steamVR will think i have frame times in the trillions of milliseconds, but the display still goes mostly smoothly, and i still have a playable framerate.

Steps for reproducing this issue:

  1. open steamVR
  2. enable "display GPU performance graph in headset"
  3. launch a game. VRbug
Zamundaaa commented 5 years ago

I can confirm. This happens to me, too. Mostly when SteamVR Home performs poorly (lately, that's actually most time I'm in it...) though. I think I've never seen this when a game performs well. So this only occurs when Reprojection is on.

mathew2214 commented 5 years ago

is there a way to force reprojection off?

Alexander-Prime commented 5 years ago

@mathew2214 Pressing Shift + A in the HMD mirror window will toggle reprojection. You'll need to do this each time you start SteamVR.

I'm seeing a similar graph to this, but the pink frames are dropped and the experience is not smooth. When I turn reprojection off, after a minute the dropped frames stop, and performance stays reasonable (depending on software) even at 144hz. If I toggle it back on the framedrops start again after the first reprojected frame.

SlickMcRunFast commented 5 years ago

@mathew2214 Pressing Shift + A in the HMD mirror window will toggle reprojection. You'll need to do this each time you start SteamVR.

Turns my GPU into a ticking clock with the coil whine. Bad performance either way. ubuntu 19.04, nvidia 2070 super 430.34.

reproj_on reproj_off

Zamundaaa commented 5 years ago

This is really, really horrible now. I tried Blade and Sorcery now with the new proton 4.11-1, it's finally working aannd basically every 20th or so frame is really badly delayed, and when it's actually reprojecting normally because of lacking performance then it's every 10th or so frame. It's definitely a regular pattern, and definitely happens double as often with reprojection. I also tested this in Job Simulator, Arizona Sunshine (where I have even seen overflow numbers, negative frame times!) and Space Pirate Trainer. Always almost the exact same behaviour. Really bad performance (because the frames are actually taking really long...) everywhere, and in some games the impossible frame times displayed. Somewhat acceptable in SPT after a minute or so, but that may just be me getting used to it, the frame timing graph looks the same. This issue does not occur in The Talos Principle, a linux-native game (also not in the default environment). There the framerate is always stable and beyond very seldomly frames dropping it runs perfectly.

Zamundaaa commented 5 years ago

I've tested some more stuff: SteamVR Home does not exhibit this behaviour of regular lag spikes, and neither do The Lab (now finally working well with Proton 4.11) or Sairento VR. Pavlov does not either, but it does show the impossible frame times and runs really horribly, worse than the frame timing suggests.

SlickMcRunFast commented 5 years ago

Does steam vr home use proton? It's not native?

Zamundaaa commented 5 years ago

It is native (I'm 95% certain on that) but I am sure that I have seen the regular lag spikes once in SteamVR Home. That doesn't seem to be the case (anymore). Still runs horribly though.

Zamundaaa commented 5 years ago

Superhot VR also has these regular lag spikes. So basically every knuckles controller supporting game (Sairento does support them, but only through legacy bindings) except Pavlov has them. And we are apparently indeed tracking two seperate issues here - the regular lag spikes and the impossible frame timings do not seem to be too much related - Once I disable async reprojection Pavlov runs great! It drops some frames sometimes on spawn but that's the games fault and not SteamVRs. And it's not too bad. Disabling async reprojection is though not a solution for the other games that do have the lag spikes. Just to give all the information, I am on the ACO mesa now, and there is no difference at all for this issue.

tizzir commented 5 years ago

I've also been experiencing this interval-based frame drop issue, notably in H3VR and Super Hot VR.

Strangely, if I start the games without any controllers turned on, I don't see the same sort of issues in the frame timing graph. But once I start the controllers the frame-time spikes occur, and continue even after turning the controllers off again. To me, this seems to strengthen the hypothesis that this has something to do with the new input code.

Perhaps we should make a separate issue for this, as it's not directly related to the originally-posted issue or even its title?

(Running Nvidia graphics, Intel processor, Arch Linux)

Zamundaaa commented 5 years ago

I can confirm that. As soon as a controller gets turned on (index or vive) the lag spikes appear. What I find really weird here is though that the regular spikes do not occur in Pavlov. Perhaps they are polling something a little differently. Yes we should probably make it a seperate issue. Perhaps over at Proton may be better suited, as it seems to be only affecting Proton games?

tizzir commented 5 years ago

Created Proton issue #2949. If anyone has time, take a look and make sure I got the details right and didn't miss anything. :wink:

Zamundaaa commented 5 years ago

Okay maybe there is a link between the issues after all... Screenshot_20190805_212633 With Async Reprojection ON in Pavlov VR it has the behaviour of impossible frametimes OP reported, coupled with really janky frametimes. If I disable Async Reprojection, the regular missed frames appear (the picture). In between the frame drops it seems to run perfectly though. Once I then turn on one of the controllers it disappears. After that the framerate of Pavlov is like always without Async Reprojection, butter smooth.

lostgoat commented 5 years ago

Hi everyone, thanks for the data. This issue should be fixed in 1.7.2.

Zamundaaa commented 5 years ago

This is not fixed. The recurring frame drops are, and it's great being able to play most of my games again. The original issue though seems to still be there. Pavlov VR's frametime graph is mostly pink, with some empty space and orange lines in between, and it's horrible. I can't even disable Async Reprojection anymore as the shift+a doesn't seem to work anymore, and enabling webhelper for the debug commands window crashes SteamVR and Steam (#217).

lostgoat commented 5 years ago

@Zamundaaa you can disable async reprojection on linux by adding the following to your steamvr settings (usually located at ~/.steam/steam/config/steamvr.vrsettings):

   "steamvr" : {
      "enableLinuxVulkanAsync" : true
   }

If Pavlov is reporting frame times in the trillions of ms for you, please re-open the issue and attach a system report.

If you are experiencing stuttering with some "normal" frame times (e.g. 100ms-6000ms), please open a new issue with a system report.

Also, on linux you can also open the debug commands website by pointing your browser at the following url when steamvr is running: http://localhost:8998/dashboard/debugcommands.html

Zamundaaa commented 5 years ago

Thanks for answering so fast. I apparently can't repoen the issue as it's not mine. Pavlov is in the trillions of ms, sometimes positive, sometimes negative. Setting enableLinuxVulkanAsync to false makes it run smooth again. Here's a system report if it helps: https://gist.github.com/Zamundaaa/ba7f688e1b5c55a56f4615e4151e1822

lostgoat commented 5 years ago

@Zamundaaa I've updated the issue templates with some instructions on collecting performance data. Lets move the discussion to a new issue if it isn't too much trouble, that way we can start with the extra perf data.

Zamundaaa commented 5 years ago

Here you go: #226