Hello Joseph and everyone,

Thanks for the very helpful feedback. I have copied your setup as closely as possible, and the situation seems much improved. I did two things:

- install the 32 bit RPi OS 11 Bullseye Full Version on my Raspberry Pi 4. I believe I may have been installing the 64 bit version previously.
- compiled Pure Data from source in order to get v 0.54.1 as you described.

So far in my first tests I have been able to run a granular patch without any crashes. I also no longer need to specify the audio device in the startup command. Pd will still occasionally print the same error "restart alsa output alsa xrun recovery apparently failed”, but it doesn’t seem to matter. Most of the time it seems to only print it once on launch.

Changing the OS and the Pd build at the same time was not a good way to determine exactly what the problem was, of course! So I have not yet found an explanation but this is a promising way forward. It feels likely that the 64 bit OS was the problem. If I figure out any more details I will post them here. 

As a side note, perhaps someone more knowledgeable than me could update the version of Pd that is currently accessible from apt-get? I didn't mind compiling from source but it is pretty handy to be able to just do apt-get when setting up a new Pi.

Merci beaucoup, 

Yann



Message: 1
Date: Fri, 1 Dec 2023 16:23:59 +0100
From: Linux ROUEN Normandie <linux.rouen@free.fr>
To: pd-list@lists.iem.at
Subject: Re: [PD] alsa crashing on recent Pi OS
Message-ID: <0a824a13-e31d-4cde-8346-2caa5cfc6d5a@free.fr>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hello Yann,

On my side I'm running an up-to-date RPi OS 11 32-bit Bullseye (Full
version) since ~ 2 years on an overclocked RPi 400 (RPi 4 @ 2.4 GHz with
an embedded keyboard + 4 GB RAM).
I'm building Pd from its source currently latest v.0.54.1 ('apt-get
install puredata' gives you an old version of Pd), and my MIDI/Audio
patches are running smoothly with an external cheap USB Audio adapter.
When I will have access to my RPi 400 I will run your patches and will
report.

Screen capture done on Linux Mint 21.2 - Choose this RPi OS Full (or
Lite) for your tests:


I haven't tested RPi OS 12 64-bit Bookworm (Full) yet on my RPi 400.
Like you I have red there are a lot of changes and especially with the
Audio
<https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/>.

Best,
Joseph Gastelais
--------------------

Le 01/12/2023 ? 09:03, Yann Seznec a ?crit?:
Hi again,

I?m wondering if anyone else is having the same issue as me. I?m
trying to run Pd patches on Raspberry Pi, and I (perhaps naively)
thought that I would use the latest Pi OS.

I seem to be having far more issues than I had in the past, namely
with alsa crashing. It seems like virtually any patch I run will
sooner or later crash and print hundreds of lines of this error:
restartalsa output alsa xrun recovery apparently failed

Someone on the Pd Forums
<https://forum.pdpatchrepo.info/topic/14536/alsa-crashing-on-pi/7>?suggested
that this could be an issue with the latest Pi OS switching to
PipeWire, which seems to make some sense. But before I attempt any
fixes, I wanted to see if anyone else was running into this problem or
might have some suggestions.

Alternatively, can anyone suggest to me a version of the raspberry pi
operating system that works well for Pd? Perhaps it will be easiest
for me to track down an old OS image and just stick to that.

Here are a few more details of what I?m trying, which is ending up
with this issue:

- Using both a Raspberry Pi 3 and 4
- Installing the latest Pi OS using the official Pi imager. I believe
this was slightly different versions for the Pi 3 and Pi 4, but the
end result was the same anyway.
- I am using the ?lite? version so it?s all command line.
- installing Pd from the repo (apt-get install puredata). I am not
certain what version this is?I think 0.50?
- Trying to run a small granular patch like this
<https://github.com/yannseznec/humanCall>?or a sampler/looper patch
like this <https://github.com/yannseznec/soundDestroyer>
- I have tried running with a higher block size (up to 1024) thinking
that maybe the patches were too intense. This didn?t seem to help.
- This is perhaps unrelated, but I did notice that I needed to specify
the audio output in the command I?m using to launch the patch. I?m
pretty certain this wasn?t necessary in patches I have run on a Pi
before.

I always get the errors described above. I recognise that this is
somewhat anecdotal, but I am really certain that I was able to run
much more complicated patches on a Pi several years ago without issue,
so this all feels very new to me.

Many thanks,

Yann

_______________________________________________
Pd-list@lists.iem.at  mailing list
UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list