Hello everyone,
I just made the full switch from Windows to Arch Linux, and I went with Hyprland for my window manager, because it's trendy and flashy and all that. I've been getting up and running with my usual games and apps, and with YARG I've been experiencing audio that seems to lag and stutter. The game seems to be running at full speed otherwise. I've run the game with and without Gamescope (if that matters for anything) via the AppImage and from the AUR and the issue persists. Does anyone know what might be going on? I can post a list of relevant installed packages and any logs if need be. Thanks!
#(Linux) Choppy Audio on Hyprland / PipeWire
1 messages · Page 1 of 1 (latest)
I was previously having no sound at all, but I was reading through some issues on the github repo and someone said that installing pipewire-alsa fixes that, and it did, but like I said, it's not the same as it was on windows. Everything else I've tried so far seems to be working, though.
I've also just learned that it does not transmit audio through a discord screen share, while everything else I've tried does.
I've done a little bit more digging. seems like it might be something to do with the sample rate / alsa. YARG likes to run at 44.1khz, whereas my headphones are 48khz, but I haven't found a good way to force either alsa or YARG to run at 48khz or for YARG to just not use ALSA altogether
sooo I'm still not totally sure how to fix this lol
Still having the same problem. I think I was able to change the “quant” amount through either alsa or wireplumber (can’t remember rn) and that would change the rate of the choppiness, but I couldn’t change the sample rate. I also tried removing pipewire-alsa outright but that just broke the audio entirely
experienced something very fascinating just a moment ago. had the game running and copied my songs from one drive to another, thinking something about the file system of the drive with the game and the one with the songs being different was causing the issues. I don't think that was the problem, but as I was copying them over, the audio smoothed out to the point where I couldn't tell if it was stuttering anymore. it went back to being bad after the copy ended, but still, an interesting finding.
Hey ! Just wanted to see if you ever resolved this as I think I'm having the same issue 🙃
I didn’t run into something satisfying. I grabbed the latest nightly at the time, threw it into proton, and it worked with much less fuss than the native Linux build
I’d still love to hear an actual fix / explanation but for the time being the game is playable. I’m still 99% sure it’s something to do with the game using pulseaudio vs pipewire, but I’m not an expert in Linux audio lol
Rad, yeah I'm sure I'll need proton for other stuff so I'll give it a whirl thanks
Just make sure you don’t use the launcher, because that doesn’t work with wine / proton rn
Yeah, I'm pretty confident about that too since I couldn't get any audio to run until I installed pulse
But yeah. It picked up both a Wii guitar and a CRKD guitar just fine
Pipewire-pulse, right?
Or whatever it’s called
That's been the easiest bit thh! I was expecting it to be a pita to get any peripherals working bc I can't even get Linux to see a Webcam, but no my instruments plug and play just fine!
You'd think but no! Even with all the pulse-pipewire stuff set up (afaik) correctly yarg would have none of it until I installed original pulse instead
Once it had worked once I could get it working again using pipewire, but just with the jankiness from misaligned buffering or whatever it is
libpulse or the main pulseaudio package? Not that I’m entirely sure it matters
The main pulse audio package, libpulse didn't help
Yeah I don't think it's gonna help us trouble shoot it any, but maybe it will help if anyone decides to update the game to work natively on Linux in future
Can I dm you later if I get work out how to get yarg running through wine/pulse without launcher by myself?
Yeah totally
Sorry for the late reply
i was having similar issues with Ubuntu, and other minor things , i ended up giving up on my yarg linux build 🙁
Yeah unfortunately this seems to be the way . Hopefully someone will eventually be inspired to reprogram the Linux build so doesn't use pulse
The audio library YARG uses uses ALSA, so it should work with anything that has ALSA compatibility
It should, but it doesn't 🙃
I couldn't get sound to work at all til I install pulse, and it was still super buggy even then
likewise. there are probably other programs on my computer using alsa in the backend, but the only one I've run into audio issues with is yarg (sadly). if there's like diagnostic info or something that would be helpful to have let me know
Update, even running through through proton l still have the sound issues so I don't even know anymore 🙃🙃🙃
I don't think it was mentioned in this thread, so I'll relay that it could be a sample rate thing. YARG always uses 44.1KHz and apparently sometimes OS/sound server resampling doesn't go well if your output device is running at 48KHz or whatever...
Hmmm, do you know what to do about that?
some audio devices allow different output sample rates, so if you can switch it to 44.1KHz it might help..as for how to do that I've no idea, I quit using desktop linux around the time pulseaudio was first becoming a thing lol
I'll see how that goes, thanks
Oh right, for clarification the problem that might be fixed with the sample rate thing is what I'm getting with the emulator (and no that didn't help 🙃)
The native Linux version I just get the no sound error unless I install pulse
This might be fixed in latest nightly
Unfortunatly, I dont think so, still getting choppy audio on arch linux with hyprland using pipewire
@serene dragon can you run these commands and tell me the output:
pw-metadata -n settings
and
find ~/.config/pipewire/ /etc/pipewire/ -type f 2>/dev/null
update: id:0 key:'log.level' value:'2' type:''
update: id:0 key:'clock.rate' value:'48000' type:''
update: id:0 key:'clock.allowed-rates' value:'[ 48000 ]' type:''
update: id:0 key:'clock.quantum' value:'1024' type:''
update: id:0 key:'clock.min-quantum' value:'32' type:''
update: id:0 key:'clock.max-quantum' value:'2048' type:''
update: id:0 key:'clock.force-quantum' value:'0' type:''
update: id:0 key:'clock.force-rate' value:'0' type:''```
And no output on the second
ok well your settings look like defaults, same as mine so I guess that's not the issue 
you could perhaps try this thing too: https://github.com/FeralInteractive/gamemode
Might at least tell us if its just a thread scheduling thing instead of pipewire thing
Nope, changes nothing
I had already assumed so, but just to be sure i tested latest stable as well, but same choppy audio issue there. At least proton works just fine for now
Thank you for testing! Are you on cachyOS?
I'll probably have to install and arch distro and see if I can reproduce the issue
Its a regular arch install, not cachy. Although if i would ever do a reinstall, i would probably chose cachy over custom lol
do you get choppy audio + the audio is played like 50% speed? or just choppy audio at normal speed running on arch (no proton)
@serene dragon when you get a chance can you run pacman -Qs "-alsa" for me?
I'm running cachyOS and able to repro the choppiness, I think I might be onto a solution
Full speed, just choppy. That command doesnt work, says unknown option -- a, however pacman -Qs alsa gives me
Low-latency audio/video router and processor - ALSA card profiles
local/alsa-lib 1.2.15.3-2
An alternative implementation of Linux sound support
local/alsa-plugins 1:1.2.12-5
Additional ALSA plugins
local/alsa-topology-conf 1.2.5.1-4
ALSA topology configuration files
local/alsa-ucm-conf 1.2.15.3-1
ALSA Use Case Manager configuration (and topologies)
local/alsa-utils 1.2.15.2-2
Advanced Linux Sound Architecture - Utilities
local/lib32-alsa-lib 1.2.15.3-1
An alternative implementation of Linux sound support (32 bit)
local/lib32-alsa-plugins 1.2.12-1
Additional ALSA plugins (32-bit)
local/pipewire-alsa 1:1.6.5-1
Low-latency audio/video router and processor - ALSA configuration
local/vlc-plugin-alsa 3.0.22-4
Free and open source cross-platform multimedia player and framework - ALSA plugins``` if that helps
how choppy is it, like super choppy (helicopter sound) or occasional blips? I really appreciate you helping debug
occasional blips. Like, not ear hurting choppy, but definitely not nice. And for sure, no problem. Least i can do for how much enjoyment yarg gave me :D
basically a minor cut out every second or so? Hard to explain
have you tried turning on audio buffering? in sound settings may need press blue for advanced settings
Could start with 200 and see if that fixes it
interestingly enough, turning the audio playback buffer off seems to have fixed it
but 200 also works
interesting, ok! I had to set mine to 30 to get clean sound, 20 didn't do it 
I think in general linux users will need to use pipewire instead of pulseaudio (you already had it) and then adjust buffer settings
if it works with buffer off, that is the best case, leave it. If you get choppiness, turn on audio buffer, find the lowest value for playback buffer length that works
Actually, no, the use audio playback toggle seems to actually do nothing. If its still set to 15 but with it off, i get the choppy back
so turning it off still works for you? or no
Only when i also adjust the buffer length to 200 anyway, if its at the default 15, i get choppy audio
ok so to be clear:
toggle on + buffer length 15 = choppy
toggle off = no choppy?
No, buffer length 15 choppy, buffer length 200 (or 30 also works) not choppy, and the toggle doesnt change that at all
no matter what the toggle is set to
np!
if theres anything i can do in the future, just ping me. Otherwise setting that to 30 seems to fix it for now.
30 also worked for me, though with the toggle off it shouldn't do anything
so that's something for me to look at
btw use the lowest value buffer length that works, so 30 probably. 200 will be okay but will cause audible delay and sometimes song sync weirdness because it's quite high