Crazy artifacts/tearing after 2 panels in chain

Hi folks, having some issues chaining panels and running simple demos. For some reason, I start getting artifacts after the 2nd panel in the chain and it keeps getting worse the further down it goes.

I’m just running an example command for the text-scroller util: sudo ./text-scroller -f ../fonts/texgyre-27.bdf --led-cols=64 --led-rows=32 --led-slowdown-gpio=4 --led-chain=12 -y-11 "Large Font"

This is a Pi 4 (4gb) with an active-3 hat, 12x P5 32x64 panels on 1 chain. All panels are connected to the same 60A meanwell PSU.

What would cause this?

@dthacher thanks for your responses.

Annoyingly, it does seem to be an issue with the GPIO outputting the clock pulse too fast. For whatever reason I thought that --led-slowdown-gpio=4 was the max, but changing that to =5 fixes the issue for the first 8 panels. The last 4 still show the same tearing affect. Limiting the refresh rate doesn’t seem to make any difference.

The power supply is a solid 60A mean well and the total load is under 1A when it’s scrolling, so I don’t think that’s a concern. I’ll probe the chain with a scope tomorrow to check for parasitic capacitance/clock pulse getting clipped.

Based on the github repo I was expecting to be able to push 12x panels per chain (24.5k pixels / 74k pixels total) at a decent refresh rate: 32K pixels (like 128x256) is definitely pushing things and you'll get 100Hz or less depending on the performance options you choose. This puts the maximum reasonable resolution around 100K pixels (like 384x256) for 3 chains. I have another 2 sets of 12x panels that I would like to drive from this same Pi.

Modifying led-matrix.cc to allow for --led-gpio-slowdown=6 completely removes the artifacts, although I’m then stuck at ~60Hz refresh, which is too low. Considering that --led-gpio-slowdown=5 fixes the first 8 in the chain and runs at 500Hz, there is probably a happy medium in there somewhere.

I opened a github issue since it seems like the library could benefit from additional slowdown options when running long chains from a Pi 4