RGBMatrix at 128px width blanks/freezes when WiFi is active (rp2040/Pico W, CircuitPython 10.3.0)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- embedded-iot
調査の方向性
Start with the attached standalone reproduction and compare its behavior with the reported real-application case on a Pico W, using 64px and 128px RGBMatrix widths with WiFi active. Then trace the RGBMatrix refresh and RP2040 WiFi/network interrupt paths; the issue does not name source files or tests. Done means identifying and fixing the cause so the 128px display remains stable during WiFi polling.
索引モデルが issue の本文から書いたものです。
説明
CircuitPython version
10.3.0, adafruit-circuitpython-raspberry_pi_pico_w-en_US-10.3.0.uf2 (built 2026-08-31)
Code/REPL
Full app is ~1074 lines and not publishable as-is, but the change that flips the bug on/off is exactly this:
# works fine, indefinitely:
WIDTH, HEIGHT = 64, 32
matrix = rgbmatrix.RGBMatrix(width=WIDTH, height=HEIGHT, bit_depth=6, ...)
# reliably blanks within under a minute of live operation:
WIDTH, HEIGHT = 128, 32
matrix = rgbmatrix.RGBMatrix(width=WIDTH, height=HEIGHT, bit_depth=4, ...) # bit_depth
# lowered from 6 only because 6/5 fail to allocate the doubled framebuffer at all
Everything else (WiFi connect, HTTP polling loop, displayio Group/TileGrid/Label usage, auto_refresh=True) is identical between the two runs.
I also tried to build a small standalone repro that doesn't depend on my private application (attached below, test_128_wifi_blanking_repro.py). Across 4 escalating versions — plain wifi.radio.ping(), real adafruit_requests.get() over a SocketPool, added continuously-scrolling text + a full-repaint chasing border ring redrawn every frame, then added gc.collect() after every fetch — none of them reproduced the bug, even after 15+ minutes of continuous observation per version. Only the real application (much more varied endpoint/response-size mix, more frequent displayio.Group child add/remove churn) reproduces it, and does so within under a minute every time I've tried.
Behavior
At width=64 (single HUB75 panel), the display runs indefinitely with zero issues, live WiFi polling included.
At width=128 (two identical 64x32 HUB75 panels chained, single RGBMatrix instance spanning both), with WiFi connected and doing periodic HTTP polling, the display reliably goes fully dark/frozen within under a minute of boot. Critically: this is not a Python-level crash. Confirmed via Get-NetTCPConnection on the host the Pico polls that the Pico's outbound TCP connection was still opening fresh sockets (port number still incrementing) well after the display had already gone dark — the WiFi stack and the main program loop were still running normally. There's no traceback, and the CircuitPython serial console's auto-reload state never changes (i.e. it isn't hitting an unhandled exception path). The RGBMatrix output itself appears to freeze/blank while everything else keeps going.
With WiFi disabled entirely (wifi.radio.connect() never called), the identical width=128 rendering loop runs perfectly stable for many minutes — this isolates the trigger to WiFi activity combined with the wider RGBMatrix's higher PIO/DMA refresh load, not rendering or power alone.
Things ruled out (each tested independently on the real application)
- RGBMatrix buffer memory pressure — confirmed via a real
MemoryErroratbit_depth=6, fixed by dropping tobit_depth=4, which allocates fine; the blanking still occurs atbit_depth=4once WiFi is active. - Scroll/refresh timing (tried several
bit_depth/scroll-speed combinations). - Power supply sag — capping
matrix.brightnessto 0.6 and 0.5 made no difference. - EMI from the second panel's own PSU near the Pico's antenna — relocating the board a foot away made no difference.
- CIRCUITPY filesystem/heap fragmentation from repeated soft-reloads — fresh BOOTSEL/UF2 reflashes between attempts made no difference.
- Init order — connecting WiFi before vs. after
RGBMatrix()construction made no difference. - Reducing WiFi request frequency — added real caching to cut actual HTTP traffic by roughly an order of magnitude; still blanked, just as reliably. This is consistent with "crashes at random intervals" rather than a frequency-dependent effect.
- A synthetic repro adding
gc.collect()after every network fetch (in case a GC pause was stalling the CPU while RGBMatrix's PIO/DMA refresh was mid-scan-out) — no change, still stable in the synthetic repro (i.e. this alone doesn't explain the difference from the real app either).
Suspected mechanism (not confirmed, offered as a lead)
CircuitPython 9.2.9's release notes document a related, believed-already-fixed bug: "Fix network crashes on Pico W; fixes regression since 9.2.5" (PR #10615, backported as #10617): "#10027 (added in 9.2.5) considerably improved network performance on Pi Pico by using dynamic storage allocation in LWIP. However, it turns out LWIP can do heap operations during interrupts. Thus the operations need to be guarded in critical sections. Otherwise there are storage-related crashes at random intervals."
This board runs 10.3.0, well after that fix landed, so that specific bug should already be fixed. But RGBMatrix at 128px width generates substantially more frequent/longer PIO/DMA interrupts than whatever load the original fix was verified against, and the symptom description ("random intervals") matches closely. Working theory: a similar-class interrupt-timing race is being re-triggered by RGBMatrix's own interrupt pattern specifically at the wider width, not yet identified/fixed for this particular trigger.
Attached: standalone repro attempt (does not reproduce, included for completeness)
See https://gist.github.com/CaptD0nuts/374bd6a7a6d89d5d9ad5e0b46e1b669c — documents 4 escalating attempts, all stable. Happy to share more detail about the real application's structure if that would help narrow this down further, or to run additional diagnostics on the real hardware.
- 主要言語
- C
- スター
- 4.6k
- フォーク
- 1.4k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 155
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
adafruit/circuitpython のほかの issue
-
board breaks api
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adafruit/circuitpython#11099 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
storage usb zephyr
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
adafruit/circuitpython#11531 ·
メンテナーはふだん 1 日以内に返信
-
silabs
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
adafruit/circuitpython#11507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Feature/API request: portable camera capture across ESP-IDF, Zephyr, and parallel interfaces対応中かも @tannewt が今日担当しました。 オープンcircuitpython api displayio enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
adafruit/circuitpython#11505 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
adafruit/circuitpython#11472 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
adafruit/circuitpython の issue をすべて見る
似ている issue
-
#242 leftovers: dated narrative and shas in the social-features test plan対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
EchoTools/nevr-runtime#264 ·
メンテナーはふだん 1 日以内に返信
-
area/docdb kind/bug priority/medium status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yugabyte/yugabyte-db#34873 ·
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mypaint/libmypaint#209 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信