Framerate/ Refresh Rate mismatch causes microstuttering on Linux and maybe Windows.
OzzyHelix opened this issue · 15 comments
SteamVR/VRChat/Beat Saber are the only ones I've tested
Description
I discovered that when messing with the sidequest desktop app if I changed the refresh rate of the headset and its apps to not match what ALVR streamer is set to it will cause micro stuttering like this. I think forcing the android/meta app to sync with the set refresh rate of the ALVR streamer will help make the client run better but you might have a idea on how to fix this then me.
2024-10-31_19-37-01.mp4
I was able to fix it by change the refresh settings in the side quest desktop app to match my ALVR settings and the micro stuttering is reduced if not gone in my case.
General Troubleshooting
- I carefully followed the instructions in the README and successfully completed the setup wizard
- I read the ALVR GitHub Wiki
Environment
LIBVA_DRIVER_NAME=radeonsi
VDPAU_DRIVER=radeonsi
Hardware
Note: for Linux, an upload to the hw-probe
database is preferred: hw-probe -all -upload
https://linux-hardware.org/?probe=a061c15130
CPU:
AMD Ryzen 9 7900X3D
GPU:
AMD RX 7800 XT
GPU Driver Version:
Mesa 24.3.0 vulkan-radeon 24.2.7
Audio:
pipewire
Compiled with libpipewire 1.2.7
Linked with libpipewire 1.2.7
Installation
ALVR Version:
20.11.1
ALVR Settings File:
session.json
SteamVR Version:
SteamVR beta 2.9.2
Install Type:
Arch AUR alvr-bin
OS Name and Version (winver
on Windows or grep PRETTY_NAME /etc/os-release
on most Linux distributions):
CachyOS
It happens if I force it to a refresh rate that doesn't match my ALVR streamer settings. I believe it can happen even if I haven't messed with SideQuest.
I don't think there is synchronization of framerates and refresh rates between the streamer and the headset, and this mismatch is causing the framerates to jump. For example, the Quest 3 runs at 120Hz by default, and you can't change that without using an app like SideQuest. It could be that the app on the headset is running at a refresh rate that doesn't match the ALVR streamer's refresh rate, causing it to flash or jump between refresh rates at a very high speed, resulting in a micro-stuttering effect.
The only way to fix something like this is by enabling client sync or providing options to adjust the client refresh rate on the headset. However, this needs to be researched further.
ALVR choses the framerate you set in the ALVR dashboard. If you use sidequest it will mess up and you will get stuttering. if the framerate doesn't reset back to the setting in the dashboard, try to restart the headset
I think there might be fault in how it works because when I set the refresh rate to 90hz in sidequest to match the ALVR dashboard it makes existing stutters go away
I am going to close the issue I still think refresh rate mismatches can happen even without messing with sidequest but as of right now I can't prove that on my end. I just wanted to help people and thought maybe the reason my thing was micro stuttering like that was because of a refresh rate mismatch and something wasn't being checked correctly but sure enough resetting the headset had the same effect as doing that. I feel like a fool and will stop posting bug reports
Well you're right. Meta has a feature of framerate scaling for throttling. Currently we are not handling that case. So if your headset ends up throttling then using sidequest for force the framerate would remove the stutter. We are planning on a fix but unfortunately this is delayed a lot. We are moving towards the v21 stable release, but this fix cannot land until v22, so most probably it will take a year or more.
would including my temp fix in the wiki be a good idea? the thing is I don't know if it will help Windows users all that much my testing on Windows was inconclusive
I am going to close the issue I still think refresh rate mismatches can happen even without messing with sidequest but as of right now I can't prove that on my end. I just wanted to help people and thought maybe the reason my thing was micro stuttering like that was because of a refresh rate mismatch and something wasn't being checked correctly but sure enough resetting the headset had the same effect as doing that. I feel like a fool and will stop posting bug reports
Nah bug report like this are completely fine you'll never be considered a fool.
I just thought I was making noise about nothing again and feel like a fool for that
In fact this is a perfect example on how bug reports should be written
would including my temp fix in the wiki be a good idea? the thing is I don't know if it will help Windows users all that much my testing on Windows was inconclusive
I'm conflicted on this. because setting the framerate on sidequest would break all other framerates until you restart the headset. this should be stated very clearly, maybe even in bold. I can accept a PR for the wiki
This isn't noise, it may not have gotten all the details right but its definitely not noise
this is noise, for example
#2494
It wouldve been better to join the discord server or at a bare minimum some text.
would including my temp fix in the wiki be a good idea? the thing is I don't know if it will help Windows users all that much my testing on Windows was inconclusive
I'm conflicted on this. because setting the framerate on sidequest would break all other framerates until you restart the headset. this should be stated very clearly, maybe even in bold. I can accept a PR for the wiki
I am conflicted myself the thing I am doing is using sidequest to set the framerates to match the streamer overriding framerate scaling for throttling feature at least that is what I think is happening
I am also having a frametime issue and I believe this is related. I am using windows 11, quest 2. I have this constant staircase latency with (client system (not alvr latency)), when this rises fps jumps between 80/40/26.5, once this latency falls ALVR indicates smooth 40fps, until this latency rises again. I have ALVR set to 80hz and im forcing the game to a 40fps cap with RTSS, also scanline sync at 80 in RTSS as that seems to help a little. Im using this for msfs2024, there is no hitting 80 or even 72hz, so half rate is required for smoothness. I have tried Optimized game latency ON and OFF, usb connection vs. wireless , codec changes, etc.
This photo is with a game 40fps cap
This is with no fps cap (computer running ~45-50 fps avg here), you can still see the staircase latency, and of course the constant jumping between 40 and 80 fps.
This is 72hz mode with a 36fps cap, also confirmed with sidequest 72hz mode on quest side after a fresh reboot.
Running steam Home at 80hz and 80fps still has the staircase latency but not the frametime jumps
I am also having a frametime issue and I believe this is related. I am using windows 11, quest 2. I have this constant staircase latency with (client system (not alvr latency)), when this rises fps jumps between 80/40/26.5, once this latency falls ALVR indicates smooth 40fps, until this latency rises again. I have ALVR set to 80hz and im forcing the game to a 40fps cap with RTSS, also scanline sync at 80 in RTSS as that seems to help a little. Im using this for msfs2024, there is no hitting 80 or even 72hz, so half rate is required for smoothness. I have tried Optimized game latency ON and OFF, usb connection vs. wireless , codec changes, etc.
This photo is with a game 40fps cap
This is with no fps cap (computer running ~45-50 fps avg here), you can still see the staircase latency, and of course the constant jumping between 40 and 80 fps.
This is 72hz mode with a 36fps cap, also confirmed with sidequest 72hz mode on quest side after a fresh reboot.
Running steam Home at 80hz and 80fps still has the staircase latency but not the frametime jumps
I would recommend using sidequest to change the fps to match ALVR
the thing is I discovered this issue on Linux I have no idea if changing the fps affects Windows or not