Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] Audio crackling on Linux when audio buffering is enabled (#11358) #13310

Open
Evilhotdog opened this issue Jan 28, 2023 · 20 comments

Comments

@Evilhotdog
Copy link

Evilhotdog commented Jan 28, 2023

Quick summary

When booting up any program I tried, there is consistent audio crackling

Details

Audio crackling appears both on PS3 system software and Persona 5. It's a lot more noticeable on the system software startup screen

Switching to Faudio from cubeb did not work, nor did disabling audio buffering or enabling time stretching. Enabling SPU loop detection or limiting the preferred SPU threads, as I've seen recommended, did not work.

Attach a log file

RPCS3.log

Attach capture files for visual issues

No response

System configuration

Arch Linux

CPU: AMD Ryzen 5 3600X
GPU: AMD Radeon RX 5600
Mesa version: 22.3.3-3
Kernel: 6.1.8
Audio system: Pipewire 0.3.64 (also non functional on Pulseaudio)

Other details

No response

@Nekotekina
Copy link
Member

Is it system default to use PipeWire? Can you try Pulse instead?

@Evilhotdog
Copy link
Author

System default is no audio. Tried with Pulseaudio and there was no change.

@Triticum0
Copy link

I had the same issue on Manjaro, not sure if Anileo had the same issue as they have a manjaro test system. Note I was using an app image not sure if that has anything to do with it.

@Evilhotdog
Copy link
Author

I'm using the Flatpak. I'd also had a similar issue on the AUR package in the past I think

@AniLeo
Copy link
Member

AniLeo commented Jan 29, 2023

The flatpak is not maintained by us. Try the AppImage.

@Evilhotdog
Copy link
Author

I'll try that out when I get home

@kd-11
Copy link
Contributor

kd-11 commented Jan 30, 2023

Fixed by enabling timestretch, but that indicates to me that we have a timing issue.

@Evilhotdog
Copy link
Author

Huh. That didn't do it for me when I tried

@paperbenni
Copy link

Fixed by enabling timestretch, but that indicates to me that we have a timing issue.

timestretch fixed it for me, using pipewire and the AUR package

@Evilhotdog
Copy link
Author

Okay, sorry for slow reply. I thought I had already replied to this.

Switching to the AppImage solved crackling on the PS3 system software, but it is still noticeable on Persona 5.

This time, it is fixed by timestretch

@Evilhotdog
Copy link
Author

I just realised, if there's a timing issue, this should probably remain open

@AniLeo
Copy link
Member

AniLeo commented Aug 6, 2023

This should be a regression caused by "Audio Buffering" being enabled, if you disable it does it work fine even without the workaround you mentioned with time stretching?

@Yahfz
Copy link
Contributor

Yahfz commented Aug 6, 2023

Regressed by #11358

@AniLeo AniLeo changed the title Audio crackling on Arch Linux on both cubeb and Faudio [Regression] Audio crackling on Linux when audio buffering is enabled (#11358) Aug 6, 2023
@MastaG
Copy link

MastaG commented Aug 7, 2023

Same problem for me on Fedora 38 (todays git)
Not to be offtopic, but most Linux-related issues have been fixed for me now.
With a fresh build and removing ~/.config/rpcs3 and ~/.cache/rpcs3, I can now succesfully start and close rpcs3 without segfaulting :)
Also the vsh now compiles and runs without issues.

The one problem remaining seems to be the audio crackling and audio cutting out randomly.
Like when playing Dante's Inferno for example:

  • The intro videos dont play audio
  • The audio at the title screens is crackling
  • When you wait a minute, it shows you various parts of hell.. without any audio..

@Megamouse
Copy link
Contributor

Please try again

@MastaG
Copy link

MastaG commented Nov 8, 2023

Hi @Megamouse I see the official AppImage is now built with clang, thanks for this.
It should make a lot of Linux users happy 👍
This was also the workaround for me to fix the audio issues, I just forgot to report it here.
So technically the audio issue is still present, but it only occurs when compiling rpcs3 using GCC.

@MSuih
Copy link
Member

MSuih commented Nov 8, 2023

It might be resolved by updating GCC to 13.2. We decided to switch compiler for CI as that GCC version is complicated to acquire for Ubuntu LTS.

@RipleyTom
Copy link
Contributor

Reopening as the issue is unrelated to gcc/clang.

@RipleyTom RipleyTom reopened this Nov 8, 2023
@NerosTie
Copy link

NerosTie commented Nov 8, 2023

(the missing audio in Demon's Souls (for example the first screen when you press the "OK" button and the sound effect in the main menu when the title appears) is fixed with the last appimage, I noticed)

@SheMelody
Copy link

SheMelody commented Apr 17, 2024

I confirm the issue, I can reproduce this on fully updated Arch Linux using pipewire-audio / pipewire-pulse with both cubeb and faudio. Crackling happens when buffering is enabled, while audio skips if buffering is disabled. Was perfectly fine the last time I tried RPCS3, which was around 2 years ago.

Edit: Seems like only music is affected by audio skipping when buffering is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests