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:
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
Hello,
On 04.12.23 10:55, Yann Seznec wrote:> 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.
I am unsure, if Raspberry Pi OS is based on Debian or is actually using the Debian sources.
You can look that up in /etc/apt/sources.list or a file in /etc/apt/sources.list.d/
If it contains a line like
deb http://ftp.de.debian.org/debian/ stable main contrib non-free
or
deb http://ftp.de.debian.org/debian/ bookworm main contrib non-free
then it is using Debian sources. If that is the case, then add a similar line to get the packages for the next version:
deb http://ftp.de.debian.org/debian/ testing main contrib non-free
That will enable the packages in Debian testing, but will overwrite a lot of packages with an update.
To enable testing only for Puredata, have a look at apt-pinning: https://wiki.debian.org/AptConfiguration
Hth, Thomas
On 12/4/23 13:00, Thomas Mayer wrote:
Hello,
On 04.12.23 10:55, Yann Seznec wrote:> 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.
i'm not sure i understand the question here.
you can always get the version of Pd by just running 'pd -version' (if you still have the "puredata-core" package installed, run '/usr/bin/pd -version' to not accidentally run your self-compiled one.
in any case, which version of Pd is shipped with Raspberry Pi OS depends of course on the version of Raspberry Pi OS itself.
the latest and greatest Raspberry Pi OS is based on Debian/bookworm, and therefore comes with Pd-0.53-1 (see https://packages.debian.org/bookworm/puredata)
I am unsure, if Raspberry Pi OS is based on Debian or is actually using the Debian sources
traditionally they (Raspberry Pi OS) provide their own binaries. iirc this is because they are really targetting armv6 (without FPU), as found in the Pi Zero, which is not supported by Debian's armhf flavour (which requires an FPU). (or maybe it's some other CPU feature, not the FPU; in any case: something along these lines).
i'm not sure about the situation for RPiOS/64bit. as i don't have an RPi/64bit booted, i've checked http://archive.raspbian.org/multiarch/, which seems to only come with a small subset of packages, so it's possible that they indeed switched to the official Debian repository)
.
You can look that up in /etc/apt/sources.list or a file in /etc/apt/sources.list.d/
If it contains a line like
deb http://ftp.de.debian.org/debian/ stable main contrib non-free
typically you would use http://deb.debian.org/debian/ instead of a country-specific URL (unless you have specific reasons not to, like an aversion against CDNs like CloudFlare or Fastly; or a specific mirror is really close to you).
fnsae IOhannes