SteamVR-for-Linux
SteamVR-for-Linux copied to clipboard
Grain Sound / Audio Distortion with new Vive Pro
I changed recently from Vive to Vive Pro and now (didn't had it before) i have bad Sound Distortions. Voices in theLab are barely understandable. I have tested it in Windows10, there it works great, so its no defective HMD.
this is the output of pacmd list-sinks
* index: 8
name: <alsa_output.usb-HTC_VIVE_Pro_Mutimedia_Audio-00.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9049
volume: front-left: 29274 / 45% / -21,00 dB, front-right: 29274 / 45% / -21,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 15,54 ms
max request: 2 KiB
max rewind: 2 KiB
monitor source: 12
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 2
linked by: 2
configured latency: 11,61 ms; range is 0,50 .. 2000,00 ms
card: 4 <alsa_card.usb-HTC_VIVE_Pro_Mutimedia_Audio-00>
module: 32
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "VIVE Pro Mutimedia Audio"
alsa.long_card_name = "HTC VIVE Pro Mutimedia Audio at usb-0000:00:14.0-2.1.4.2, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:14.0-usb-0:2.1.4.2:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.1/2-2.1.4/2-2.1.4.2/2-2.1.4.2:1.0/sound/card2"
udev.id = "usb-HTC_VIVE_Pro_Mutimedia_Audio-00"
device.bus = "usb"
device.vendor.id = "0bb4"
device.vendor.name = "HTC (High Tech Computer Corp.)"
device.product.id = "030b"
device.product.name = "VIVE Pro Mutimedia Audio"
device.serial = "HTC_VIVE_Pro_Mutimedia_Audio"
device.string = "front:2"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "VIVE Pro Mutimedia Audio Analog Stereo"
alsa.mixer_name = "USB Mixer"
alsa.components = "USB0bb4:030b"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
ports:
analog-output-speaker: Lautsprecher (priority 10000, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-speakers"
active port: <analog-output-speaker>
i just recognized, that the sound just is clear and fine when steamvr is not started. listening to music over the headset is absolutely clear and fine, but in steamvr it is this bad, unclear sound. Every game, even in VR Home
I've noticed a similar issue with my OG Vive.
After a while (sometimes hours, sometimes days) the audio from the headphones will start to sound really crappy, almost like the headset dropped to the lowest possible quality settings.
The audio sounds the same if it comes from the USB sound device or HDMI.
The only fix I've found is to unplug the headset and link box completely, let them sit for a few minutes, and restart Steam and SteamVR. After that, audio quality is OK again for some time (hours, days).
Thanks, i will try this. For now i have problems to get steamvr-games run under linux for more than 5min at all :(
What games are you trying to play?
On my system (Ryzen 7 1700 + R9 Fury Nitro, AMDGPU + Mesa [RADV]), I have had zero problems with Steam games.
I've played nearly 250 hours of VRChat using Proton 3.16-6, -7, and now -8.
Beat Saber also works fine.
Some other games I've tried either require a large playspace or seem to hang, but at least those two seem to work great (mostly; VRChat is even buggy on Windows).
Nothing works. The fun thing is with the vive i can play beatsaber, arizona sunshine, pavlov , and much more, with the vive PRO it constantly freezes after a few minutes in game, sometimes even in the vr-home. i changed it back to vive 1 and it works again.
I've had some more issues/experience with the grain sound.
It seems to be related to audio sources appearing/disappearing in Pulse. I notice it tends to appear when a game opens/crashes (IE game crashes, kill it, re-open, grainy sound).
I've found that I can reduce the grain sound appearing if I do something like have a null sink loopback into the headset or an audio program play music or something into the headset when starting other applications.
I've also noticed that once or twice when I smacked my headset into my desk (ouch!), I would loose audio to the headset for a second and it would play through my speakers, then come back to my headset. That seems to me almost like the audio chip internally is coming disconnected, which raises the possibility of a hardware issue in my headset possibly causing my problem.
I can confirm the issue as described, really bad audio quality ("grainy") as soon as SteamVR starts, perfectly fine otherwise. It returns back to normal once I quit SteamVR, even without restarting the sound player I was testing with. On the Vive Pro, and definitely not a hardware issue in my case, as the same device works perfectly fine on Windows running on the same machine as Linux, no hardware changes.
Running pacmd list-sinks while SteamVR is running (and the audio is bad) reveals a difference in the configured latency setting (~12 ms vs 25 exactly), but I don't know enough about ALSA/PA to know if that means anything.
A fix would be appreciated :)
if you're looking for a workaround in the meantime, restarting pulseaudio with steamvr running is a bit of a dirty hack that gets the sound back to normal for me at least
Thanks for the tip, but this doesnt work for me at all. when i kill pulseaudio (so it can start new) the whole system freezes. this just happens when steamvr is running.
Same issue, seems to be tangentially related to https://github.com/ValveSoftware/SteamVR-for-Linux/issues/186
I've noticed that when I have a null sink outputting to my Vive, the grain issue almost never occurs. When I don't set it up, it sometimes does.
Try the following:
pactl load-module module-null-sink sink_name=testsink
pacmd update-sink-proplist testsink device.description=testsink
pactl load-module module-loopback source=testsink.monitor
Then use Pavucontrol to redirect the new "Loopback from Monitor of Null Output" source to your headset. (In my case, the Vive is called USB Audio Device Analog Stereo).
Then try starting SteamVR.
I've found that when I do this setup, I rarely, if ever have had issues with audio distortion. When I don't, it seems to happen fairly often when a game starts/exits.
To un-do this setup, run
pactl unload-module module-loopback
pactl unload-module module-null-sink
I'm getting a new issue now:
Audio seems to "drift" in space. When I first plug in the headset and start SteamVR, everything is fine. If I load into a game, the audio is usually mostly fine. After a bit in the game, the audio seems to "drift" and progressively get worse. It isn't low-bitrate-ness like before, now it actually seems to be warping positional audio. Audio from sources directly in front of me is almost inaudible, and audio from the side of me is present, although very weirdly distorted. Audio sources that should be nearby sound quiet, audio sources that are far away sound closer. It is actually a somewhat painful effect.
The issue persists after closing SteamVR and playing audio via a different application. Music, for example, that should be "all around" me instead sounds like it is somewhat distant.
It is a very unpleasant feeling when it happens, almost painful in a way.
Oh gosh I can imagine that being very offputting. :0 Do you happen to have any logs from ~/.steam/logs?
I grabbed a system report. link
I disconnected my headset on Wednesday night, then let it sit until a few hours ago (around 2pm on Friday). I also rebooted my PC on Wednesday night.
I loaded into VRChat, and initially it worked, but then it slowly got more and more warped until I basically couldn't hear anything at all.
For a bit I switched to my speakers, then I heard a pop from my headphones (Deluxe Audio Strap, so they were just folded up). When I switched the audio back to the headphones a bit later to check if they were cooperating, I had the grainy terrible audio but it was no longer horrible and bad and painful like it was before the pop, just kinda grainy and distorted (as I had experienced before).
I had this issue with the audio distortion a few times before, but it was only occasional. It would usually occur after a very long play session. Now, several times, it has happened almost immediately. This is also the first time I have had the audio become grainy and distorted in the middle of playing; usually it happens when a game crashes (and the last audio source playing to the headset stops).
Previously, when I had these audio issues, I had chalked it up to a game/Proton bug, as restarting SteamVR and replugging the headset would make it go away. Now it seems to be much more persistent.
Further experience with the strange positional distortion issue:
It happens somewhat randomly after starting up SteamVR/a game. If I switch to another audio device for a while (eg onboard audio + headphones) and let the headset headphones sit for a while, they often seem to correct themselves. The audio will get so bad I basically can't hear anything because it is so distorted, then it will start to reverse and go back to normal. It's almost like they drift out of sync and then back into sync after a while. As far as I've experienced, once it starts to correct itself, it eventually goes back to normal and will stay that way until at least the next time I start SteamVR.
@Goofybud16 but the vive pro works for you in general under linux ? Because besides the grain sound mine freezes after some minutes.
Oof, thought I was alone with the freezes. Have them too, Vive Pro and 1080 Ti. It usually happens as soon as a game starts doing something that uses more performance, e.g. the main menu works fine, but entering a level causes the crash (in BeatSaber for example).
Any chance we could get some feedback from @kisak-Valve ?
I also have it here on my Vive Pro. It's not a volume/clipping thing though it sounds like it (I can turn it down in pavucontrol and it's still distorted), and remarkably it does sound OK before SteamVR launches. (as well as when used on Windows.) If SteamVR only partially launches and fails to continue, it will go back to normal! However, the null monitor technique didn't fix anything for me sadly.
Dell Inspiron Gaming 5767 (ryzen 2700x, rx580) running Debian Buster. Plugged in to onboard USB3 port.
“One thing to check: can you open the nvidia-settings control panel and find the 'Allow Flipping' option in OpenGL settings? Try unchecking it, and then see if you can still get it to lock up the machine. Note that you most likely will need to change it every reboot, as it doesn't apply your preferences until you start nvidia-settings again.”
Got this from a Valve employee. Going to be slammed with stuff to do the next three days, anyone have a chance to try it out?
Well, mine is AMD, so it's highly unlikely the NVIDIA settings panel has anything to do with it. ;) When running steamvr from the command line, I noticed this is the point at which the sound goes back to normal on quit:
Fri May 24 2019 13:34:10.327058 - Sending Quit event to process vrmonitor (25187)
Fri May 24 2019 13:34:11.515049 - [System] Transition from 'Exiting SteamVR...' to 'Exiting SteamVR...'.
Fri May 24 2019 13:34:11.515248 - [Audio] Audio shutdown!
Destroy() is failed!!
There's a lot more scrolling by on startup, but I suspect the end of this log chunk is where is goes bad, since it was right around this part of the log and there's an apparently-matching init:
Fri May 24 2019 13:36:11.216919 - VR_Init successful
Fri May 24 2019 13:36:11.218696 - New Connect message from /extra/ryan/SteamLibrary/steamapps/common/SteamVR/bin/linux64/vrdashboard (VRApplication_Overlay) (Args: ) 27504
Fri May 24 2019 13:36:11.223632 - CIPCPipe::ConnectPipe(VR_ServerPipe_27359) attempting bind to 51953
Fri May 24 2019 13:36:11.248278 - Setting app openvr.component.vrdashboard PID to 27504
Fri May 24 2019 13:36:11.248432 - VRDashboard watchdog enabled for pid:27504
Fri May 24 2019 13:36:11.342375 - Using existing HMD lighthouse.LHR-E961190A
Fri May 24 2019 13:36:11.342637 - New Connect message from /extra/ryan/SteamLibrary/steamapps/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper (VRApplication_WebHelper) (Args: ) 27511
Fri May 24 2019 13:36:11.342721 - Received success response from vrserver connect
Fri May 24 2019 13:36:11.342808 - Processing message VRMsg_Connect from vrdashboard (27504) took 0.125 seconds
Fri May 24 2019 13:36:11.478221 - Not looking for a good app key because Steam didn't start this app
Fri May 24 2019 13:36:11.478394 - App key after connect message:openvr.component.vrdashboard
Fri May 24 2019 13:36:12.493409 - Creating builtin app for /extra/ryan/SteamLibrary/steamapps/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper (VRApplication_WebHelper)
Fri May 24 2019 13:36:12.493570 - Setting app system.generated.vrwebhelper PID to 27511
Fri May 24 2019 13:36:12.675754 - Enabling legacy input for system.generated.vrwebhelper
Fri May 24 2019 13:36:12.677839 - system.generated.vrwebhelper (vive_pro) attempting to load default config from file:///extra/ryan/SteamLibrary/steamapps/common/SteamVR/resources/config/legacy_bindings_generic_hmd.json
Fri May 24 2019 13:36:12.677980 - Using existing HMD lighthouse.LHR-E961190A
Fri May 24 2019 13:36:12.678166 - Processing message VRMsg_Connect from vrwebhelper (27511) took 1.45 seconds
Fri May 24 2019 13:36:12.678296 - Received success response from vrserver connect
Fri May 24 2019 13:36:13.434303 - [System] Set VRMonitor PID to 27081
Fri May 24 2019 13:36:13.443936 - [Steam] Attempt to connect to Steam
Fri May 24 2019 13:36:13.445592 - Add Json firmware manifest from {htc}/firmware/manifest.vrfirmware
Fri May 24 2019 13:36:13.446442 - Add Json firmware manifest from {indexcontroller}/firmware/manifest.vrfirmware
Fri May 24 2019 13:36:13.447409 - Add Json firmware manifest from {indexhmd}/firmware/manifest.vrfirmware
Fri May 24 2019 13:36:13.448950 - Add Json firmware manifest from {lighthouse}/firmware/manifest.vrfirmware
Fri May 24 2019 13:36:13.450715 - [Bluetooth Controller] BaseStation Controller Init.
Fri May 24 2019 13:36:13.450893 - [Bluetooth Controller] Radio features: 0x00000001
Fri May 24 2019 13:36:13.453288 - [Bluetooth Controller] Setting system inactivity timeout to 60 minutes.
Fri May 24 2019 13:36:13.453723 - [Bluetooth Controller] Activate BaseStation Controller.
Fri May 24 2019 13:36:13.454728 - [Audio] Audio init
Initialize() is failed!!!
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
(And the state of the "HDMI Gain" setting doesn't appear to make a difference - wouldn't expect it to since it's using usb, not hdmi, but for completeness...)
I just wanted to follow up on my Vive and the weird audio distortion:
At this point, the built-in audio port is basically dead. I've tried different headphones, but it won't produce proper sound in or out of SteamVR. It's been this way for a while now. I've just resorted to using external headphones until the point that I can acquire a new VR headset. I suspect my issues were not caused by SteamVR, but instead by actual hardware failure in my Vive. It has recently been having other strange issues as well, such as odd tracking behavior that is similar to behavior some of my friends have experienced in their Vives before they completely stopped functioning.
Other than my hardware issues, though, SteamVR has been working great. With an external sound device (in my case, a mixer on the desk) audio has been working fine as long as I make sure that the sound outputs are running to the correct device.
I've had this happen quite often recently on the Index. It seems like a workaround is setting the sound source to another output and back, then it stops being distorted.
Edit: it may not have anything to do with the source being switched after all. I just set the "default device" in the KDE Plasma audio settings (which switches all running streams to the new default) to the mainboard output and back to the headset. Now all new applications started seem to be fine.
Enabling hardware acceleration in Discord or closing it solved the problem on my Index.
Edit: It seems hardware acceleration isn't what fixes Discord causing audio distortion. Toggling hardware acceleration fixes it after the auto restart ~~so ctrl+r might also fix it~~.
Similar issue for me, outputting game sounds to my speakers works fine, outputting any other program sounds to the Vive pro works fine, but somehow I can't play game sounds through the headset. I couldn't get this to work but changing sources or other methods mentioned here.
This started happening maybe in February, but I didn't use my headset in a while so I can't pinpoint an update that broke audio.
I just recently acquired a Vive Pro.
I found that when I direct sound to the "Vive Pro Multimedia Audio Analog Stereo" it sounds absolutely terrible.
If I direct it to the HDMI/Displayport audio device for the Vive Pro, it sounds just fine. Maybe something to do with the USB Audio device?
Same issue here. Maybe the USB switches back to USB2 mode and runs into bandwidth problems once SteamVR is running? That would explain the degraded audio quality.
Edit: new mainboard, now with free USB3 port. same issue :(
Maybe just a random effect, but of the three DisplayPorts my Radeon 480 has, only one gives non distorted sound once SteamVR starts.
Same problem here.
The audio is normal if I use the headset without steamvr, with steamvr it sounds robotic.
pulseaudio -k then pulseaudio -D solved the problem, but I need to do it every time it happens again.