Sound issues (maybe ALSA related?)

I've been struggling with sound stuttering for a while with my system in general. I have to run pw-metadata -n settings 0 clock.force-quantum 1024 every time I boot, which helps enough to use the system, but doesn't solve the issue. Related - I was playing Clone Hero as an app installed from the AUR to an Arch distrobox. The sound issues aren't worse, but they're more noticeable and distracting considering it's a rhythm game. In order to try to help the problem, I downloaded the Clone Hero tar and tried running it directly on Bazzite. The sound issues remained the same, except a new issue cropped up where the game will sometimes completely stop audio playback. The game itself isn't frozen, because it's still rendering the note highway and I can interact with the game (pause, pick a new song, etc). Clone Hero shows up as an ALSA audio stream, so this might be related somehow? It's the only application I use that loses all audio, but all applications exhibit the stuttering. I can pull any logs to help, just let me know. For reference, I never had this issue on Arch, Tumbleweed, Silverblue, or Windows. 😦 Specs: bazzite:stable Ryzen 7 5800X RX 6800 XT Asus Prime X570-Pro Using analog audio, which I believe is the Realtek S1220A codec.
31 Replies
1/4 Life
1/4 Life•4mo ago
is this bazzite or bazzite-deck?
Frozen
Frozen•4mo ago
Oh, good question. Standard bazzite:stable
1/4 Life
1/4 Life•4mo ago
So we change almost nothing about pipewire/wireplumber on those builds, but we do ship system76-scheduler which sets nice values perhaps it's somehow related on your setup can you try systemctl disable com.system76.Scheduler.service and then reboot and see if you still get the sutters? we can deal w/ the alsa one separate if you do, other things we can try note that the reboot is needed to ensure none of your current nice values have been touched
Frozen
Frozen•4mo ago
makes sense. rebooting. scheduler is disabled, verified by systemctl status, still getting some stutters, but it seems to be better, and I didn't have to run the force-quantum command. trying to reproduce the Clone Hero thing. 1) system76 scheduler on, force pipewire quantum to 1024, moderately frequent stutters 2) system76 schedule off, no force quantum, roughly the same amount of stutter 3) scheduler off, force quantum to 1024, much less frequent stutters. still present occasionally
1/4 Life
1/4 Life•4mo ago
hmm, not related to system76 then from the sound of it I have an idea, I'll ping you when next build is out
Frozen
Frozen•4mo ago
well, it got better when I turned the scheduler off because I got the same amount of stutters without forcing the quantum, whereas when the scheduler is on, I have to force quantum for the sound to be bearable at all.
1/4 Life
1/4 Life•4mo ago
Yeah, but that doesn't explain why it's different from stock fedora Likely just a factor
Frozen
Frozen•4mo ago
oh, true. and I'm not scared to rebase to testing if it will help in any way.
1/4 Life
1/4 Life•4mo ago
Appreciate that, I'm building on testing now so hopefully no hiccups
Frozen
Frozen•4mo ago
interesting, about to reboot and test.
No description
Frozen
Frozen•4mo ago
alrighty, haven't reproduced the full clone hero audio loss yet. stutters are much improved, but still there a bit. still have to force quantum to 1024 and run Clone Hero with PULSE_LATENCY_MSEC=30. but it's definitely improved. @Kyle Gospo So with the system76 scheduler on, pipewire quantum forced to 1024, pulse latency set to 30 msecs, and TuneD profile set to latency-performance, I get almost no stutters. Maybe one every 2 or 3 minutes, which is fine. It's still weird I don't have this issue on other distros, but I like Bazzite enough to deal, for now. I lied, full audio drop has happened twice in the past hour now. D:
1/4 Life
1/4 Life•4mo ago
no clue what's up at this point, desktop image has no audio changes from stock fedora outside of s76 I will double check to confirm that
Frozen
Frozen•4mo ago
I've got a second hard drive, I'll install stock Fedora and test. I didn't have this problem on Silverblue, but that was also back on 36 or 37. It's been a while. Thread necro, but I figured it out. I reformatted back to Arch and everything was absolutely fine. Then I started trying to rebuild the bazzite experience (minus atomicity, obviously). After installing linux-fsync-nobara-bin kernel from the AUR, I started experiencing the exact same audio issue. So it seems to be a problem with either fsync or some other flag in the nobara/bazzite compilation process. Reverting back to vanilla Arch kernel fixed it. Might do some digging into the kernel differences when I have more time this weekend. @Kyle Gospo in case you were curious.
- Hexality -
- Hexality -•2mo ago
:clueless: so this may also be the reason I occasionally also get those audio stutters uh?
baldsealion
baldsealion•2mo ago
I get audio stutters suddenly - I’m using kodi and it’s really noticeable when there is music in the background - more so than speech. It is constant. Any tips? Was working fine for about 3 weeks prior Never mind it was isolated to just kodi - using stremio now with plugins actually happens on steam too, stutters like mad, but moonlight streaming is fine... i guess it just hates not streaming audio for me 😄
1/4 Life
1/4 Life•2mo ago
Might be something odd-ball with system76-scheduler on your setup?
baldsealion
baldsealion•2mo ago
i tried the disablement of that
1/4 Life
1/4 Life•2mo ago
try systemctl disable com.system76.Scheduler and then reboot hmm, ok, not that hold on cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver what's the output of that?
baldsealion
baldsealion•2mo ago
No such file or directory heh
1/4 Life
1/4 Life•2mo ago
wat what CPU you using?
baldsealion
baldsealion•2mo ago
12600k but it’s virtualized, perhaps I should try pinning the cpus
1/4 Life
1/4 Life•2mo ago
ah that might explain it I was looking to see if you were using pstate or acpi-cpufreq if i had to guess, you're currently locked to the powersave governor, because tuned thinks you're using p-state try this:
baldsealion
baldsealion•2mo ago
It’s using qemu backend with unraid and I have certain CPU selected (6 cores and it doesn’t seem to be constrained at all) but have not tried pinning
1/4 Life
1/4 Life•2mo ago
tuned-adm profile virtual-guest try that
baldsealion
baldsealion•2mo ago
Well one thing is for sure if I try to slide power from balance to performance it won’t budge heh Ok
1/4 Life
1/4 Life•2mo ago
if that works, sudo nano /etc/tuned/ppd.conf and change balanced=balanced to balanced=virtual-guest so it defaults to that
baldsealion
baldsealion•2mo ago
Nah unfortunately - it’s probably something wonky on backend but I’m scratching my head as to what changed haha
baldsealion
baldsealion•2mo ago
1/4 Life
1/4 Life•2mo ago
weird 😦
baldsealion
baldsealion•2mo ago
I can stream same game from moonlight and all good heh. It’s alright I’ll keep digging or rebuild. Ya know you can’t just build Linux once and be done (not blaming bazzite for issue though, i bet it's something silly with unraid) @Kyle Gospo i'm experimenting with pulse audio settings now -- i see reference to daemon.conf but i don't see this file, do I need to create it?
1/4 Life
1/4 Life•2mo ago
if you're looking in /etc it may be in /usr/share or /usr/lib and yes you can make it