-
Notifications
You must be signed in to change notification settings - Fork 622
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
ws2811_init failed: Out of memory #390
Comments
I'm fairly sure that rpi_ws281x doesn't use VRAM at all. The out-of-memory exception is probably due to a memory leak somewhere in either this library or some other related code. Judging by the error being on |
Hey guys,
There is actually a small amount of VRAM being used by the library. We
need to use it because the memory where we generate the output bit stream,
needs to be cache coherent with the hardware DMA/PWM/PCM/etc.. So you do
need to make sure you have some, but probably not much, video memory
available.
I completely agree with Philip though that the library probably isn't the
cause of the memory leak, though it may be something on top of it. You
should be able to use some system tools to determine which task is
consuming all of the memory. As for the video memory, it's confined to
whatever size you setup during boot.
Hope that helps,
Jeremy
…On Fri, Jan 17, 2020 at 1:42 PM Philip Howard ***@***.***> wrote:
I'm fairly sure that rpi_ws281x doesn't use VRAM at all. The out-of-memory
exception is probably due to a memory leak somewhere in either this library
or some other related code.
Judging by the error being on ws2811_init I'm guessing you're running a
script periodically (crontab?)? Since init should only be called once.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#390?email_source=notifications&email_token=ACB55GZ2EJNO5OFPCJTCVSDQ6IJZVA5CNFSM4KIIIZRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJI5DYQ#issuecomment-575787490>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACB55G72V5OF3WPKGNWIRLDQ6IJZVANCNFSM4KIIIZRA>
.
|
Thank you for the replies! I will further investigate where the memory leak comes from when I have more time. Meanwhile a nightly cronjob to reboot the Pi does the job. |
Hi, I have a similar issue. 5 minute increment cronjob changes output to neopixels on GPIO. In the log files I find this occurs after two days of running: @robertf26 did you come up with any leads? |
Do you call |
Sorry, not used to catching notifications on Github. Thanks for your comment. I'm using the Adafuit CircuitPython NeoPixel libraries. My python script imports: I don't issue any commands directly to ws2811, and I don't see any code for ws2811 in the repo. I looked for examples of
I did clone this repo [ws281x] but don't remember what step of my installation asked for that, or how I use it. My assumption is that the adafruit library must require it? I'm out of my depth here. Eventually I put a daily reboot order in my crontab as a hacky work around. The reboot happens in time to clear the memory leak. What would you suggest? |
Will you share with us the code to do this? |
Hi,
I've been driving a WS2812B strip (300LEDs) successfully with a Raspi 1B (512MB RAM) Raspbian Stretch without GUI for a few years with this software.
Recently I added new software to my Pi and noticed that I can send LED signals initially, but after long uptimes of the Pi (between a few hours and a few days) I get:
ws2811_init failed: Out of memory
In such a situation
free -m
looks like this:Only a reboot fixes this.
Now I have been trying to increase the RAM available to Raspbian by reducing the VRAM to a minimum of 16MB since I have no GUI. But somehow it seems that it made things worse.
Now I skimmed the source code and saw a reference to VideoCore and was wondering wether this program actually uses VRAM and that reducing such memory was counterproductive. It would be great if someone could answer as I barely understand C code.
Sadly I cannot upgrade my Pi as I have a kernel module which will only work with single core CPUs.
The text was updated successfully, but these errors were encountered: