On Sat, Dec 10, 2022 at 02:00:06AM +0100, Marek Marczykowski-Górecki wrote:
On Fri, Dec 09, 2022 at 01:40:15PM +0100, Marek Marczykowski-Górecki wrote:
On Fri, Dec 09, 2022 at 09:10:19AM +0100, Takashi Iwai wrote:
On Fri, 09 Dec 2022 02:27:30 +0100, Marek Marczykowski-Górecki wrote:
Hi,
Under Xen PV dom0, with Linux >= 5.17, sound stops working after few hours. pavucontrol still shows meter bars moving, but the speakers remain silent. At least on some occasions I see the following message in dmesg:
[ 2142.484553] snd_hda_intel 0000:00:1f.3: Unstable LPIB (18144 >= 6396); disabling LPIB delay counting
Hit the issue again, this message did not appear in the log (or at least not yet).
(...)
In anyway, please check the behavior with 6.1-rc8 + the commit cc26516374065a34e10c9a8bf3e940e42cd96e2a ALSA: memalloc: Allocate more contiguous pages for fallback case from for-next of my sound git tree (which will be in 6.2-rc1).
This did not helped.
Looking at the mentioned commits, there is one specific aspect of Xen PV that may be relevant. It configures PAT differently than native Linux. Theoretically Linux adapts automatically and using proper API (like set_memory_wc()) should just work, but at least for i915 driver it causes issues (not fully tracked down yet). Details about that bug report include some more background: https://lore.kernel.org/intel-gfx/Y5Hst0bCxQDTN7lK@mail-itl/
Anyway, I have tested it on a Xen modified to setup PAT the same way as native Linux and the audio issue is still there.
If the problem persists, another thing to check is the hack below works.
Trying this one now.
And this one didn't either :/
When it stopped working, I did two things: 1. switched audio profiles ("configuration" tab in pavucontrol) several times; this on its own did not helped 2. reloaded sound related modules, but did not loaded them all back (see attached list before and after).
After this, it worked again for a few minutes. Not sure if/which the above actions were relevant, tho...
Another observation: when it stops working, it's never during a playback. It's always that at some point starting an audio stream results in a silence.
-- 8< -- --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1808,9 +1808,16 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci, if (err < 0) return err;
+#if 0 /* use the non-cached pages in non-snoop mode */ if (!azx_snoop(chip)) azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC_SG; +#else
- if (!azx_snoop(chip))
azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_SG;
- else
azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV;
+#endif
if (chip->driver_type == AZX_DRIVER_NVIDIA) { dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");