Re: pulseaudio / alc1220 sound clicks interruptions etc

From: Tomek CEDRO <tomek_at_cedro.info>
Date: Wed, 04 Jun 2025 23:09:38 UTC
On Wed, Jun 4, 2025 at 9:56 PM Olivier Certner <olce@freebsd.org> wrote:
> Previously, there were scheduler bugs causing annoying pops from time to time, but these were fixed around July/August 2022, and the fix was in 13.2 and onwards (if the problem occured with 13.0 or 13.1, you should normally have seen an improvement with later versions, not a degradation).
>
> I'm not aware of any scheduler bugs causing this kind of behavior, and would say they are currently unlikely.
>
> Testing an upgrade in case of such a problem is always a good idea in absence of a clear culprit.
>
> The common denominator of all your reports seems to be Intel Hybrid Architecture (Alder Lake and onwards), which the scheduler does not especially support now.  I'm currently working on this support (this is not going to be ready soon).
>
> Could you please try the following (preferably 1):
> 1. Disable E (Efficiency) cores from your BIOS if possible, reboot, test again and report.
> 2. Pin the application reading audio to a P (Performance) core with cpuset, test again and report.  To know which cores are performance ones, run 'cpucontrol -i 0x1a /dev/cpuctlXXX' on your cores and check that the first hexadecimal value starts with 4 (a 2 indicates an efficiency core).

Thanks Olivier, will do in a free moment. So far the only reasonable
fix I found is to split main PCI-E from 16x to 8x/8x in BIOS it seems
that GPU is sharing lanes with NVME SSD and there are some
timing/irq/buffering conflicts. This made my ALC1220 audio possible to
listen.. except there are still slight silent interruptions and/or
distortions on application/io activity (like milisecond lags for
loading etc).. still there are clicks on the USB audio o_O

These audio clicks are the easiest thing to notice as these are really
annoying and not easy to get rid of with USB audio card, but the cause
of the problem seems to be somewhere else, probably in these new Intel
chipsets/cpu support, the worst case that happens for me sometimes is
all USB controllers onboard hangs and I need to power off the machine.

Christos, I have set 24-bit 48kHz for now both for play and rec pcm
sysctls, this makes audio acceptable. Playing around with kern.sched,
kern.ipc.aio, vfs.aio, etc did not change anything really. This may
not be the HDA problem, especially that it is observed with ALC897 and
ALC1220 and similar CPU/Chipset architecture, just a symptom that can
be quickly noticed with an ear.

My guess is the new Intel stuff (cpu/chipset) drivers are the problem.
I have installed windoze just to verify if this is not a hardware
problem and everything works smoothly over there. Maybe I will survive
the problems at the benefit of make buildworld in ~8 minutes and most
applications / firmware builds ~10 seconds while average power
consumption total is ~100W (up to 355W loaded) while the old PC took
~200W idle :-)

Thank you guys :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info