You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PING 10.69.0.xxx (10.69.0.xxx) 56(84) bytes of data.
64 bytes from 10.69.0.125: icmp_seq=1 ttl=255 time=16.1 ms
64 bytes from 10.69.0.125: icmp_seq=2 ttl=255 time=8.36 ms
64 bytes from 10.69.0.125: icmp_seq=3 ttl=255 time=13.5 ms
64 bytes from 10.69.0.125: icmp_seq=4 ttl=255 time=9.84 ms
64 bytes from 10.69.0.125: icmp_seq=5 ttl=255 time=15.1 ms
64 bytes from 10.69.0.125: icmp_seq=6 ttl=255 time=9.71 ms
64 bytes from 10.69.0.125: icmp_seq=7 ttl=255 time=7.07 ms
64 bytes from 10.69.0.125: icmp_seq=8 ttl=255 time=5.84 ms
64 bytes from 10.69.0.125: icmp_seq=9 ttl=255 time=9.49 ms
64 bytes from 10.69.0.125: icmp_seq=10 ttl=255 time=10.2 ms
--- 10.69.0.xxx ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 5.835/10.518/16.075/3.191 ms
That was with it off, this is with a movie playing:
PING 10.69.0.xxx (10.69.0.xxx) 56(84) bytes of data.
64 bytes from 10.69.0.125: icmp_seq=1 ttl=255 time=5.61 ms
64 bytes from 10.69.0.125: icmp_seq=2 ttl=255 time=10.7 ms
64 bytes from 10.69.0.125: icmp_seq=3 ttl=255 time=4.30 ms
64 bytes from 10.69.0.125: icmp_seq=4 ttl=255 time=8.60 ms
64 bytes from 10.69.0.125: icmp_seq=5 ttl=255 time=13.8 ms
64 bytes from 10.69.0.125: icmp_seq=6 ttl=255 time=11.8 ms
64 bytes from 10.69.0.125: icmp_seq=7 ttl=255 time=25.2 ms
64 bytes from 10.69.0.125: icmp_seq=8 ttl=255 time=18.7 ms
64 bytes from 10.69.0.125: icmp_seq=9 ttl=255 time=27.8 ms
64 bytes from 10.69.0.125: icmp_seq=10 ttl=255 time=45.5 ms
--- 10.69.0.xxx ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9013ms
rtt min/avg/max/mdev = 4.301/17.198/45.528/11.994 ms
There were several reports about this on discord. Since the ESP has only a single frame buffer the data must be piling on the sender side. I saw no such delays using DDP.
In theory - as ESPAsyncE131 is based on AsyncUDP - it's possible that UDP packets queue up on the esp32 side.
However this could only happen when
the sender is faster (framerate) than the receiving esp32 can handle
the udp/network input queue was already very full (congestion) when starting real-time mode
the esp32 is too busy with other tasks (WiFi ? RMT interrupts?) so the AsyncUDP task is staved of CPU time
"Use main segment only" might cause slowdowns in the "realtime receive" mode
priority inversion (lower prio task hogs on a resource need by a higher prio task)
I don't think that any of these were newly introduces in 16.0.0. In case that a classic ESP32 shows these problems, it could be something deep in the newer arduino-esp32/esp-idf frameworks because these were upgraded on classic ESP32.
@coderabbitai with respect to #5575 (comment) : what is the AsyncUDP packet queue size? Was the queue size changed between WLED 16.0.0 and WLED 0.15.4 ?
#!/bin/bash
# Search for AsyncUDP queue size references in WLED codebase
rg -rn "queue" --include="*.h" --include="*.cpp" -i | grep -i "udp\|async\|e131\|ddp" | head -60
# Search for any AsyncUDP config or queue size defines
rg -rn "ASYNC_UDP\|asyncudp\|AsyncUDP" --include="*.h" --include="*.cpp" -i | head -60
# Check platformio.ini or similar for framework versions
cat platformio.ini 2>/dev/null | head -80 || true
# Check for any queue size defines related to UDP
rg -rn "queue_size\|QUEUE_SIZE\|UDP_QUEUE\|udp_queue" --include="*.h" --include="*.cpp" --include="*.ini" -i | head -40
Length of output: 4915
🏁 Script executed:
#!/bin/bash
# Fix rg commands - use -g for glob patterns
rg -rn "queue" -g "*.h" -g "*.cpp" | grep -i "udp\|async\|e131\|ddp" | head -60
# Search for AsyncUDP references
rg -rn "AsyncUDP" -g "*.h" -g "*.cpp" | head -40
# Check git tags related to versions
git tag | grep -E "v?0\.15\.4|v?16\.0" | head -20
# Check platformio.ini for arduino-esp32 framework version
grep -i "platform\|framework\|arduino" platformio.ini | head -40
# Look for library dependencies - ESPAsyncE131, AsyncUDP versions
cat wled00/library.json 2>/dev/null || true
find . -name "library.json" | head -10 | xargs grep -l "AsyncUDP\|E131" 2>/dev/null | head -5
find . -name "*.ini" | xargs grep -l "AsyncUDP\|ESPAsyncE131\|e131" 2>/dev/null | head -5
# Check lib_deps in platformio.ini
grep -A 100 "lib_deps" platformio.ini | head -60
What CONFIG_LWIP_UDP_RECVMBOX_SIZE actually controls
In ESP-IDF/lwIP, CONFIG_LWIP_UDP_RECVMBOX_SIZE is the maximum number of received UDP packets that lwIP will queue (“mailbox”) per UDP netconn/socket (i.e., for the netconn / BSD sockets layers). If packets arrive faster than your app reads them, this queue can fill and packets will be dropped. Espressif’s Kconfig help text describes it as the max cached UDP packets per UDP socket. (docs.espressif.com)
Does it affect Arduino AsyncUDP?
Usually, no. Arduino-ESP32’s AsyncUDP uses lwIP’s raw UDP API (udp_pcb + udp_recv) and then forwards packets into its own FreeRTOS queue, so CONFIG_LWIP_UDP_RECVMBOX_SIZE (netconn mailbox) isn’t the knob that limits AsyncUDP buffering. (github.com)
The real AsyncUDP “packet queue size” (Arduino core)
In current arduino-esp32AsyncUDP.cpp, the internal queue is created as:
xQueueCreate(32, sizeof(lwip_event_packet_t *))
So the AsyncUDP packet event queue depth is 32 (unless your core version differs). (github.com)
How to change either one (practical notes)
In Arduino IDE with the precompiled core, changing sdkconfig/sdkconfig.h in the core tree generally won’t change these options in the binaries you’re using. (espressif-docs.readthedocs-hosted.com)
To increase buffering for AsyncUDP, you typically must patch/rebuild the Arduino core (change the 32 in AsyncUDP.cpp) or build Arduino as an ESP-IDF component and set options there. (github.com)
To increase buffering for BSD sockets / WiFiUDP-style code, you’d change CONFIG_LWIP_UDP_RECVMBOX_SIZE in an ESP-IDF build (trade-off: more RAM; potentially better throughput). (espressif-docs.readthedocs-hosted.com)
#!/bin/bash
# Check git tags for WLED versions
git tag | sort | tail -30
# Check esp32 platform version in platformio.ini
grep -A 5 "\[esp32\]" platformio.ini | head -30
# Get the esp32 platform/arduino-esp32 version
grep -i "espressif32\|arduino-esp32\|platform_esp32\|esp32_idf" platformio.ini | head -20
# Check what version was used in 0.15.x tag
git show v0.15.4:platformio.ini 2>/dev/null | grep -i "espressif32\|platform_esp32\|arduino-esp32" | head -20 || \
git show 0.15.4:platformio.ini 2>/dev/null | grep -i "espressif32\|platform_esp32\|arduino-esp32" | head -20
# Check what version is used in 16.0.0 tag
git show v16.0.0:platformio.ini 2>/dev/null | grep -i "espressif32\|platform_esp32\|arduino-esp32" | head -20 || \
git show 16.0.0:platformio.ini 2>/dev/null | grep -i "espressif32\|platform_esp32\|arduino-esp32" | head -20
Length of output: 1223
🌐 Web query:
arduino-esp32 AsyncUDP queue size history change xQueueCreate 32
💡 Result:
In espressif/arduino-esp32’s AsyncUDP library, the internal receive-task queue length has been hard-coded to 32 (_udp_queue = xQueueCreate(32, sizeof(...))) and, based on the repo history, it was already 32 when AsyncUDP was first added and remains 32 on master today. The more recent AsyncUDP changes (e.g., making the UDP task stack size configurable) did not change this queue length. [1] [2] [3]
Sources:
[1] Current master AsyncUDP.cpp showing xQueueCreate(32, ...)
[2] Initial AsyncUDP add (commit a59eafb, Jun 27, 2018) showing xQueueCreate(32, ...)
[3] Commit message for a59eafb indicating “Add initial AsyncUDP”
🏁 Script executed:
#!/bin/bash
# List all tags to find the right tag name
git tag | sort
# Check esp32 platform details for 0.15.4
git show v0.15.4:platformio.ini 2>/dev/null | grep -i "esp32_idf\|espressif32\|tasmota\|arduino-esp32\|idf" | head -30
# Check esp32 platform details for v16.0.0
git show v16.0.0:platformio.ini 2>/dev/null | grep -i "esp32_idf\|espressif32\|tasmota\|arduino-esp32\|idf" | head -30
# Also check the full esp32_idf section for both tags
git show v0.15.4:platformio.ini 2>/dev/null | grep -A 10 "esp32_idf_V" | head -40
git show v16.0.0:platformio.ini 2>/dev/null | grep -A 10 "esp32_idf_V" | head -40
Length of output: 0
🏁 Script executed:
#!/bin/bash
# List GitHub releases to find the right tag names
gh release list --repo wled/WLED --limit 20
# Get platformio.ini content at tag v0.15.4
gh api repos/wled/WLED/contents/platformio.ini?ref=v0.15.4 --jq '.content' | base64 -d | grep -i "esp32_idf\|espressif32\|tasmota\|arduino-esp32\|idf" | head -20
# Get platformio.ini content at tag v16.0.0
gh api repos/wled/WLED/contents/platformio.ini?ref=v16.0.0 --jq '.content' | base64 -d | grep -i "esp32_idf\|espressif32\|tasmota\|arduino-esp32\|idf" | head -20
# Get esp32_idf_V section details from both
echo "=== 0.15.4 ==="
gh api repos/wled/WLED/contents/platformio.ini?ref=v0.15.4 --jq '.content' | base64 -d | grep -A 5 "esp32_idf_V\b" | head -30
echo "=== 16.0.0 ==="
gh api repos/wled/WLED/contents/platformio.ini?ref=v16.0.0 --jq '.content' | base64 -d | grep -A 5 "esp32_idf_V\b" | head -30
Length of output: 3896
@softhack007 Here's what I found:
AsyncUDP packet queue size
The AsyncUDP implementation in arduino-esp32 does not use CONFIG_LWIP_UDP_RECVMBOX_SIZE (the lwIP netconn mailbox). Instead, it uses lwIP's raw UDP API and forwards packets into its own internal FreeRTOS queue, created as xQueueCreate(32, sizeof(lwip_event_packet_t *)).
So the AsyncUDP packet queue depth is 32 entries.
Was it changed between WLED 0.15.4 and 16.0.0?
The queue size itself was not changed — it has been hard-coded to 32 since AsyncUDP was first added to arduino-esp32 in 2018 and remains 32 today.
However, there was a significant underlying framework change between these two releases for the classic ESP32:
Release
Classic ESP32 framework
WLED v0.15.4
Aircoookie's fork of arduino-esp32 @ 1.0.6.4 (based on ESP-IDF 3.x)
WLED v16.0.0
Tasmota Arduino Core 2.0.18 (based on ESP-IDF 4.4.8)
This is a major ESP-IDF jump (3.x → 4.4.8) for classic ESP32. While the AsyncUDP queue depth is the same, the underlying lwIP stack, FreeRTOS task scheduler, and WiFi driver all changed substantially — any of which could affect the timing behavior you're investigating.
Practical implications
If the 32-slot AsyncUDP queue fills up (e.g. when the ESP32 is CPU-starved by RMT/WS2812 DMA or WiFi tasks), incoming E1.31 packets will be silently dropped at the lwIP→FreeRTOS handoff, but this behaviour would exist in both versions.
The new IDF 4.4.8 WiFi driver and lwIP stack may have different interrupt/task priority interactions with the rest of the WLED workload compared to IDF 3.x — this is worth investigating as a root cause.
Increasing the queue beyond 32 would require patching/rebuilding the arduino-esp32 core, which is not trivial with a pre-built Tasmota platform zip.
Can confirm this exact issue, cause and resolution. (Reverting back to 15.3).
I also use esp32 wled for xLights Christmas display using DDP. Should I expect the same lag on units running 16?
@netmindz — that's an excellent deduction and you're right. If the V4 build of 0.15 (which already uses IDF 4.x via Tasmota platform) works without the lag, then the IDF major version jump (3.x → 4.x) is effectively ruled out as the cause.
This narrows the root cause to one (or both) of:
WLED application-level code changes introduced between 0.15 and 16.0 — something in how realtime/E1.31/DDP receive, frame processing, or task scheduling was modified.
Tasmota platform version drift — from the platformio.ini comparison:
That's ~2 years of ESP-IDF 4.x point releases, sdkconfig changes, lwIP tuning, and WiFi driver updates within the same major IDF version. The IDF version bump within 4.x (e.g. 4.4.x → 5.x or changed sdkconfig defaults) could still be a contributor.
The most actionable next step would be to bisect the WLED application changes between 0.15 and 16.0 related to E1.31/realtime handling, since that's the variable most directly in the WLED team's control.
So the more focused question for WLED 16.0 vs 0.15 becomes: did any new lock acquisition paths get introduced in the E1.31/DDP realtime receive handler that would cause the async_udp task to spend more time blocked?
@coderabbitai please compare the relevant paths of the 0.15.x branch to the current code in main. List changes and assess if they are likely to contribute to the problems observed by our users.
@softhack007 were you able to reproduce this issue? Does normal WLED sync (DDP) use UDP as well?
@DedeHai looks like indeed we need to reproduce this on our development setups. I can't remember seeing any such DDP delays during develpment.
@withay@tomiko23lol please upload the cfg.json and presets.json files from your esp32 boards here. We'll need these files for trying to reproduce your issues.
#!/bin/bash# First, find relevant files that handle E1.31/DDP/realtime on both branchesecho"=== Files in wled00/ related to E1.31/DDP/realtime on main ==="
gh api repos/wled/WLED/contents/wled00?ref=main --jq '.[].name'| grep -iE "e131|ddp|realtime|udp|recv|notifier|sync"echo""echo"=== Files in wled00/ related to E1.31/DDP/realtime on 0.15.x ==="
gh api repos/wled/WLED/contents/wled00?ref=0.15.x --jq '.[].name'| grep -iE "e131|ddp|realtime|udp|recv|notifier|sync"echo""echo"=== All files in wled00/ on main ==="
gh api repos/wled/WLED/contents/wled00?ref=main --jq '.[].name'
Length of output: 1686
🏁 Script executed:
#!/bin/bash# Also look at what changed between 0.15.x and main in realtime handling using git diff via GitHub compare API
gh api "repos/wled/WLED/compare/0.15.x...main" --jq '.files[].filename'| grep -iE "e131|ddp|realtime|udp|notif|sync|wled\.cpp|json\.cpp|bus|strip"| head -40
Length of output: 549
🏁 Script executed:
#!/bin/bash# Find the right tag for 0.15.x
gh api repos/wled/WLED/tags --jq '.[].name'| grep -E "0\.15\.|v0\.15\."| head -10
# Also check branches
gh api repos/wled/WLED/branches --jq '.[].name'| grep -E "15\."| head -10
Length of output: 377
🏁 Script executed:
#!/bin/bash# Fetch e131.cpp from mainecho"=== e131.cpp (main) ==="
gh api repos/wled/WLED/contents/wled00/e131.cpp?ref=main --jq '.content'| base64 -d
echo""echo"=== udp.cpp (main) ==="
gh api repos/wled/WLED/contents/wled00/udp.cpp?ref=main --jq '.content'| base64 -d
Length of output: 63473
🏁 Script executed:
#!/bin/bashecho"=== e131.cpp from v0.15.4 ==="
gh api repos/wled/WLED/contents/wled00/e131.cpp?ref=v0.15.4 --jq '.content'| base64 -d
echo""echo"=== udp.cpp from v0.15.4 ==="
gh api repos/wled/WLED/contents/wled00/udp.cpp?ref=v0.15.4 --jq '.content'| base64 -d
Length of output: 60633
🏁 Script executed:
#!/bin/bash# Also check setRealtimePixelColor in FX_fcn.cpp on both branches (key difference from setPixelColor)echo"=== setRealtimePixelColor in main ==="
gh api repos/wled/WLED/contents/wled00/FX_fcn.cpp?ref=main --jq '.content'| base64 -d | grep -A 20 "setRealtimePixelColor"echo""echo"=== setRealtimePixelColor in v0.15.4 ==="
gh api repos/wled/WLED/contents/wled00/FX_fcn.cpp?ref=v0.15.4 --jq '.content'| base64 -d | grep -A 20 "setRealtimePixelColor"echo""# Check for strip.show() and strip.trigger() in FX_fcn.cpp on both branchesecho"=== strip.show() / trigger() context in FX_fcn.cpp main ==="
gh api repos/wled/WLED/contents/wled00/FX_fcn.cpp?ref=main --jq '.content'| base64 -d | grep -n "suspend\|resume\|mutex\|lock\|semaphore\|xSemaphore\|portMAX"| head -30
echo""echo"=== strip.show() / trigger() context in FX_fcn.cpp v0.15.4 ==="
gh api repos/wled/WLED/contents/wled00/FX_fcn.cpp?ref=v0.15.4 --jq '.content'| base64 -d | grep -n "suspend\|resume\|mutex\|lock\|semaphore\|xSemaphore\|portMAX"| head -30
Length of output: 4951
@softhack007 — here is the full comparison. I found several meaningful differences.
Summary of changes in the realtime receive path
1. setRealtimePixel() — gamma correction moved out (both branches)
v0.15.4 applied gamma correction per-pixel in the receive callback (running in the async_udp task context), then called seg.setPixelColor() or strip.setPixelColor() directly:
// v0.15.4voidsetRealtimePixel(uint16_t i, byte r, byte g, byte b, byte w) {
unsigned pix = i + arlsOffset;
if (pix < strip.getLengthTotal()) {
if (!arlsDisableGammaCorrection && gammaCorrectCol) {
r = gamma8(r); g = gamma8(g); b = gamma8(b); w = gamma8(w);
}
if (useMainSegmentOnly) {
Segment &seg = strip.getMainSegment();
if (pix < seg.length()) seg.setPixelColor(pix, r, g, b, w);
} else {
strip.setPixelColor(pix, r, g, b, w);
}
}
}
main replaced this with a thin wrapper that calls strip.setRealtimePixelColor() → seg.setPixelColorRaw() (for useMainSegmentOnly) or setPixelColor(). Gamma is now deferred to the show() paint phase:
Assessment: Per-pixel work in the async_udp task is now slightly less (no gamma). But show() now does that work instead. On its own, this is not a latency cause — but if show() has become slower (e.g. due to CCT, double-buffering, or new mapping), it indirectly affects frame delivery.
2. strip.show() → strip.trigger() for useMainSegmentOnly — most significant change⚠️
v0.15.4 always called strip.show() directly and immediately for every realtime protocol (E1.31, DDP, UDP, Hyperion, TPM2.NET):
Assessment: If strip.service() is throttled (due to MIN_FRAME_DELAY), suspended, or slower in the new architecture, triggered frames can be delayed or lost. This is the most plausible explanation for the ~1s delay with useMainSegmentOnly enabled — frames accumulate in the pixel buffer waiting for service() to fire.
4. realtimeOverride check simplified in DDP handler
This allowed pixel data to be processed even when realtimeOverride was active, if already in realtime mode with useMainSegmentOnly.
main:
if (!realtimeOverride) {
// write pixels
}
This is simpler but means some packets that were silently processed before are now silently dropped. This could cause partial-frame artifacts rather than stalling, but in edge cases might reduce throughput.
5. No new mutex/lock acquisitions in the async_udp receive chain
I found no new mutex, semaphore, or lock acquisitions introduced in the handleDDPPacket() / handleE131Packet() callbacks themselves. The receive path sets e131NewData = true and writes pixel data; no blocking primitive is taken on the hot path.
Probable root cause of the reported delays
Symptom
Most likely cause
~1s delay, otherwise responsive
strip.trigger() + deferred service() with useMainSegmentOnly enabled — frames pile up waiting for service() to fire
2000ms+ pings, WebUI completely unresponsive
portMAX_DELAY stall in lwIP tiT task (AsyncUDP queue full), triggered when async_udp is blocked — cause needs more investigation
The highest-value thing to test: try reproducing with useMainSegmentOnly explicitly disabled. If the delay disappears, the strip.trigger() deferral is the culprit. If the severe stall (@tomiko23lol's case) persists, there is a second independent issue where the async_udp drain is blocked.
This is the most plausible explanation for the ~1s delay with useMainSegmentOnly enabled — frames accumulate in the pixel buffer waiting for service() to fire.
@coderabbitai There is no queue involved in the service->show path, only pixel buffer arrays. This explanation might explain slow framerates, but it cannot cause esp32 unresponsiveness or lagging behind.
@softhack007 — you're absolutely right, and I appreciate the correction.
Pixel buffers are written in-place: each new packet overwrites the same memory locations, so no backlog can ever build up in that path. At worst, strip.trigger() deferral causes frame drops (newer data silently overwrites unshown data), which would manifest as lower effective FPS — but the displayed frame is always at most one service() cycle old. There is no mechanism for accumulated delay there.
So to revise:
The trigger() deferral can only explain reduced framerate (some frames are never shown), not a growing lag or network unresponsiveness.
The ~1 second accumulating delay and 2000ms+ ping / WebUI lockup both still lack a clear explanation from the application-side changes I found.
This brings the analysis back to the network/FreeRTOS layer. The portMAX_DELAY in AsyncUDP's _udp_task_post remains a potential path to full network stall — but as you noted earlier, that flaw pre-existed 16.0. The open question is whether something in the new Tasmota 2.0.18 platform (sdkconfig defaults, WiFi power-save settings, lwIP task priorities, or core affinity of async_udp vs loopTask) changed in a way that makes the queue-full condition now reachable under normal streaming load, whereas it wasn't before.
@withay@tomiko23lol please upload the cfg.json and presets.json files from your esp32 boards here. We'll need these files for trying to reproduce your issues.
@DedeHai@withay no luck yet with reproducing your delay, sorry.
I don't have HyperHDR, so i've grabbed the next windows APP at hand that sends DDP - WledVideoSync in my case. The App sends DDP pixel streams at 25 fps. I was using the cfg.json and presets.json from @withay.
Below is a plot of inter-frame times over ~10 seconds of streaming - measure by the receiving esp32 via millis() for each packet (directly inside the DDP handler).
There is considerable network jitter, but the mean delay is 40ms - exactly 25 FPS as expected. In case of buffer congestion on the esp32 side, i would expect a pattern where lots of frames arrive in short time, or a burst of packets - then nothing for long time - then another burst.
Other suspicions also not confirmed:
no signs of main loop stalling - more than 2000 loops/second while receiving.
no signs of WLED sync flood during streaming.
no problems with WebUI responsiveness during streaming.
== > next test (tomorrow) will be with one esp32 sending LEDs to another ESP32 via DDP network output.
@withay@tomiko23lol there is actually a known problem that only affects esp32 that were upgraded from 0.15.x to 16.0.
The new espressif framework (inside 16.0) has a newer Filesystem (LittleFS) driver. If you upgrade from 0.15.x and you don't erase your complete device first, the new firmware needs to handle an old filesystem - several users have already reported that WLED 16.0 generally gets very slow in this situation - almost non-responsive in some cases.
The "fix" was to perform a complete factory reset - a factory reset re-creates the Filesystem and brings it up to the new format expected by espressif's driver.
go to "Security & Update Setup" check "Factory reset:", click "save". Warning: All settings and presets will be erased.
After reset, you have to re-connect your device to WiFi and re-upload a backup of cfg.json and presets.json.
several users have confirmed no more delays or lagging after this procedure.
This is unrelated to DDP/HyperHDR streaming, but its worth a try.
Activity
softhack007 commentedon May 7, 2026
@withay can you measure the ping time from your PI to the WLED instance? Part of the delay may be network latency 🤔
withay commentedon May 7, 2026
No video playing:
PING 10.69.0.xxx (10.69.0.xxx) 56(84) bytes of data.
64 bytes from 10.69.0.125: icmp_seq=1 ttl=255 time=16.1 ms
64 bytes from 10.69.0.125: icmp_seq=2 ttl=255 time=8.36 ms
64 bytes from 10.69.0.125: icmp_seq=3 ttl=255 time=13.5 ms
64 bytes from 10.69.0.125: icmp_seq=4 ttl=255 time=9.84 ms
64 bytes from 10.69.0.125: icmp_seq=5 ttl=255 time=15.1 ms
64 bytes from 10.69.0.125: icmp_seq=6 ttl=255 time=9.71 ms
64 bytes from 10.69.0.125: icmp_seq=7 ttl=255 time=7.07 ms
64 bytes from 10.69.0.125: icmp_seq=8 ttl=255 time=5.84 ms
64 bytes from 10.69.0.125: icmp_seq=9 ttl=255 time=9.49 ms
64 bytes from 10.69.0.125: icmp_seq=10 ttl=255 time=10.2 ms
--- 10.69.0.xxx ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 5.835/10.518/16.075/3.191 ms
withay commentedon May 7, 2026
That was with it off, this is with a movie playing:
PING 10.69.0.xxx (10.69.0.xxx) 56(84) bytes of data.
64 bytes from 10.69.0.125: icmp_seq=1 ttl=255 time=5.61 ms
64 bytes from 10.69.0.125: icmp_seq=2 ttl=255 time=10.7 ms
64 bytes from 10.69.0.125: icmp_seq=3 ttl=255 time=4.30 ms
64 bytes from 10.69.0.125: icmp_seq=4 ttl=255 time=8.60 ms
64 bytes from 10.69.0.125: icmp_seq=5 ttl=255 time=13.8 ms
64 bytes from 10.69.0.125: icmp_seq=6 ttl=255 time=11.8 ms
64 bytes from 10.69.0.125: icmp_seq=7 ttl=255 time=25.2 ms
64 bytes from 10.69.0.125: icmp_seq=8 ttl=255 time=18.7 ms
64 bytes from 10.69.0.125: icmp_seq=9 ttl=255 time=27.8 ms
64 bytes from 10.69.0.125: icmp_seq=10 ttl=255 time=45.5 ms
--- 10.69.0.xxx ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9013ms
rtt min/avg/max/mdev = 4.301/17.198/45.528/11.994 ms
DedeHai commentedon May 7, 2026
There were several reports about this on discord. Since the ESP has only a single frame buffer the data must be piling on the sender side. I saw no such delays using DDP.
DedeHai commentedon May 7, 2026
The real question is where does the data get stuck and why
softhack007 commentedon May 7, 2026
In theory - as ESPAsyncE131 is based on AsyncUDP - it's possible that UDP packets queue up on the esp32 side.
However this could only happen when
I don't think that any of these were newly introduces in 16.0.0. In case that a classic ESP32 shows these problems, it could be something deep in the newer arduino-esp32/esp-idf frameworks because these were upgraded on classic ESP32.
softhack007 commentedon May 7, 2026
@coderabbitai with respect to #5575 (comment) : what is the AsyncUDP packet queue size? Was the queue size changed between WLED 16.0.0 and WLED 0.15.4 ?
coderabbitai commentedon May 7, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 4915
🏁 Script executed:
Length of output: 5716
🌐 Web query:
💡 Result:
What
CONFIG_LWIP_UDP_RECVMBOX_SIZEactually controlsIn ESP-IDF/lwIP,
CONFIG_LWIP_UDP_RECVMBOX_SIZEis the maximum number of received UDP packets that lwIP will queue (“mailbox”) per UDP netconn/socket (i.e., for the netconn / BSD sockets layers). If packets arrive faster than your app reads them, this queue can fill and packets will be dropped. Espressif’s Kconfig help text describes it as the max cached UDP packets per UDP socket. (docs.espressif.com)Does it affect Arduino
AsyncUDP?Usually, no. Arduino-ESP32’s
AsyncUDPuses lwIP’s raw UDP API (udp_pcb+udp_recv) and then forwards packets into its own FreeRTOS queue, soCONFIG_LWIP_UDP_RECVMBOX_SIZE(netconn mailbox) isn’t the knob that limitsAsyncUDPbuffering. (github.com)The real
AsyncUDP“packet queue size” (Arduino core)In current
arduino-esp32AsyncUDP.cpp, the internal queue is created as:xQueueCreate(32, sizeof(lwip_event_packet_t *))So the AsyncUDP packet event queue depth is 32 (unless your core version differs). (github.com)
How to change either one (practical notes)
sdkconfig/sdkconfig.hin the core tree generally won’t change these options in the binaries you’re using. (espressif-docs.readthedocs-hosted.com)32inAsyncUDP.cpp) or build Arduino as an ESP-IDF component and set options there. (github.com)WiFiUDP-style code, you’d changeCONFIG_LWIP_UDP_RECVMBOX_SIZEin an ESP-IDF build (trade-off: more RAM; potentially better throughput). (espressif-docs.readthedocs-hosted.com)Citations:
🏁 Script executed:
Length of output: 1223
🌐 Web query:
💡 Result:
In espressif/arduino-esp32’s AsyncUDP library, the internal receive-task queue length has been hard-coded to 32 (
_udp_queue = xQueueCreate(32, sizeof(...))) and, based on the repo history, it was already 32 when AsyncUDP was first added and remains 32 onmastertoday. The more recent AsyncUDP changes (e.g., making the UDP task stack size configurable) did not change this queue length. [1] [2] [3]Sources:
[1] Current
masterAsyncUDP.cpp showingxQueueCreate(32, ...)[2] Initial AsyncUDP add (commit
a59eafb, Jun 27, 2018) showingxQueueCreate(32, ...)[3] Commit message for
a59eafbindicating “Add initial AsyncUDP”🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 3896
@softhack007Here's what I found:AsyncUDP packet queue size
The
AsyncUDPimplementation inarduino-esp32does not useCONFIG_LWIP_UDP_RECVMBOX_SIZE(the lwIP netconn mailbox). Instead, it uses lwIP's raw UDP API and forwards packets into its own internal FreeRTOS queue, created asxQueueCreate(32, sizeof(lwip_event_packet_t *)).So the AsyncUDP packet queue depth is 32 entries.
Was it changed between WLED 0.15.4 and 16.0.0?
The queue size itself was not changed — it has been hard-coded to 32 since AsyncUDP was first added to arduino-esp32 in 2018 and remains 32 today.
However, there was a significant underlying framework change between these two releases for the classic ESP32:
arduino-esp32@ 1.0.6.4 (based on ESP-IDF 3.x)This is a major ESP-IDF jump (3.x → 4.4.8) for classic ESP32. While the AsyncUDP queue depth is the same, the underlying lwIP stack, FreeRTOS task scheduler, and WiFi driver all changed substantially — any of which could affect the timing behavior you're investigating.
Practical implications
djexplode6 commentedon May 20, 2026
Can confirm this exact issue, cause and resolution. (Reverting back to 15.3).
I also use esp32 wled for xLights Christmas display using DDP. Should I expect the same lag on units running 16?
netmindz commentedon May 20, 2026
@djexplode6 reverting back isn't a resolution 😉
Can you try the _V4 bin of 0.15 to see if that also has the issue or not please
djexplode6 commentedon May 21, 2026
The v4 bin runs fine as well.
netmindz commentedon May 21, 2026
@coderabbitai if the V4 build with 0.15 doesn't hand the issue that would exclude the major IDF version change
coderabbitai commentedon May 21, 2026
@netmindz— that's an excellent deduction and you're right. If the V4 build of 0.15 (which already uses IDF 4.x via Tasmota platform) works without the lag, then the IDF major version jump (3.x → 4.x) is effectively ruled out as the cause.This narrows the root cause to one (or both) of:
WLED application-level code changes introduced between 0.15 and 16.0 — something in how realtime/E1.31/DDP receive, frame processing, or task scheduling was modified.
Tasmota platform version drift — from the
platformio.inicomparison:platform-espressif32 @ 2022.12.02platform-espressif32 @ 2025.02.10That's ~2 years of ESP-IDF 4.x point releases, sdkconfig changes, lwIP tuning, and WiFi driver updates within the same major IDF version. The IDF version bump within 4.x (e.g. 4.4.x → 5.x or changed sdkconfig defaults) could still be a contributor.
The most actionable next step would be to bisect the WLED application changes between 0.15 and 16.0 related to E1.31/realtime handling, since that's the variable most directly in the WLED team's control.
14 remaining items
softhack007 commentedon May 27, 2026
@coderabbitai please compare the relevant paths of the
0.15.xbranch to the current code inmain. List changes and assess if they are likely to contribute to the problems observed by our users.softhack007 commentedon May 27, 2026
@DedeHai looks like indeed we need to reproduce this on our development setups. I can't remember seeing any such DDP delays during develpment.
@withay @tomiko23lol please upload the
cfg.jsonandpresets.jsonfiles from your esp32 boards here. We'll need these files for trying to reproduce your issues.coderabbitai commentedon May 27, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 1686
🏁 Script executed:
Length of output: 549
🏁 Script executed:
Length of output: 377
🏁 Script executed:
Length of output: 63473
🏁 Script executed:
Length of output: 60633
🏁 Script executed:
Length of output: 4951
@softhack007— here is the full comparison. I found several meaningful differences.Summary of changes in the realtime receive path
1.
setRealtimePixel()— gamma correction moved out (both branches)v0.15.4 applied gamma correction per-pixel in the receive callback (running in the
async_udptask context), then calledseg.setPixelColor()orstrip.setPixelColor()directly:main replaced this with a thin wrapper that calls
strip.setRealtimePixelColor()→seg.setPixelColorRaw()(foruseMainSegmentOnly) orsetPixelColor(). Gamma is now deferred to theshow()paint phase:Assessment: Per-pixel work in the
async_udptask is now slightly less (no gamma). Butshow()now does that work instead. On its own, this is not a latency cause — but ifshow()has become slower (e.g. due to CCT, double-buffering, or new mapping), it indirectly affects frame delivery.2.⚠️
strip.show()→strip.trigger()foruseMainSegmentOnly— most significant changev0.15.4 always called
strip.show()directly and immediately for every realtime protocol (E1.31, DDP, UDP, Hyperion, TPM2.NET):main replaces this with
strip.trigger()wheneveruseMainSegmentOnlyis enabled:strip.trigger()sets_triggered = trueand defers the actualshow()call tostrip.service().3.⚠️
service()loop architecture — coupled to point 2v0.15.4:
service()always calledshow()at the end, regardless of whether it was triggered:main:
service()only callsshow()whendoShow = _triggeredis true, AND only if theMIN_FRAME_DELAYguard passes:Assessment: If
strip.service()is throttled (due toMIN_FRAME_DELAY), suspended, or slower in the new architecture, triggered frames can be delayed or lost. This is the most plausible explanation for the ~1s delay withuseMainSegmentOnlyenabled — frames accumulate in the pixel buffer waiting forservice()to fire.4.
realtimeOverridecheck simplified in DDP handlerv0.15.4:
This allowed pixel data to be processed even when
realtimeOverridewas active, if already in realtime mode withuseMainSegmentOnly.main:
This is simpler but means some packets that were silently processed before are now silently dropped. This could cause partial-frame artifacts rather than stalling, but in edge cases might reduce throughput.
5. No new mutex/lock acquisitions in the
async_udpreceive chainI found no new mutex, semaphore, or lock acquisitions introduced in the
handleDDPPacket()/handleE131Packet()callbacks themselves. The receive path setse131NewData = trueand writes pixel data; no blocking primitive is taken on the hot path.Probable root cause of the reported delays
strip.trigger()+ deferredservice()withuseMainSegmentOnlyenabled — frames pile up waiting forservice()to fireportMAX_DELAYstall in lwIPtiTtask (AsyncUDP queue full), triggered whenasync_udpis blocked — cause needs more investigationThe highest-value thing to test: try reproducing with
useMainSegmentOnlyexplicitly disabled. If the delay disappears, thestrip.trigger()deferral is the culprit. If the severe stall (@tomiko23lol's case) persists, there is a second independent issue where theasync_udpdrain is blocked.softhack007 commentedon May 27, 2026
@coderabbitai There is no queue involved in the service->show path, only pixel buffer arrays. This explanation might explain slow framerates, but it cannot cause esp32 unresponsiveness or lagging behind.
coderabbitai commentedon May 27, 2026
@softhack007— you're absolutely right, and I appreciate the correction.Pixel buffers are written in-place: each new packet overwrites the same memory locations, so no backlog can ever build up in that path. At worst,
strip.trigger()deferral causes frame drops (newer data silently overwrites unshown data), which would manifest as lower effective FPS — but the displayed frame is always at most oneservice()cycle old. There is no mechanism for accumulated delay there.So to revise:
trigger()deferral can only explain reduced framerate (some frames are never shown), not a growing lag or network unresponsiveness.This brings the analysis back to the network/FreeRTOS layer. The
portMAX_DELAYinAsyncUDP's_udp_task_postremains a potential path to full network stall — but as you noted earlier, that flaw pre-existed 16.0. The open question is whether something in the new Tasmota 2.0.18 platform (sdkconfig defaults, WiFi power-save settings, lwIP task priorities, or core affinity ofasync_udpvsloopTask) changed in a way that makes the queue-full condition now reachable under normal streaming load, whereas it wasn't before.withay commentedon May 27, 2026
presets.json
cfg.json
softhack007 commentedon May 28, 2026
@DedeHai @withay no luck yet with reproducing your delay, sorry.
I don't have HyperHDR, so i've grabbed the next windows APP at hand that sends DDP - WledVideoSync in my case. The App sends DDP pixel streams at 25 fps. I was using the cfg.json and presets.json from @withay.
Below is a plot of inter-frame times over ~10 seconds of streaming - measure by the receiving esp32 via millis() for each packet (directly inside the DDP handler).
Other suspicions also not confirmed:
== > next test (tomorrow) will be with one esp32 sending LEDs to another ESP32 via DDP network output.
softhack007 commentedon May 28, 2026
@withay @tomiko23lol there is actually a known problem that only affects
esp32that were upgraded from 0.15.x to 16.0.The new espressif framework (inside 16.0) has a newer Filesystem (LittleFS) driver. If you upgrade from 0.15.x and you don't erase your complete device first, the new firmware needs to handle an old filesystem - several users have already reported that WLED 16.0 generally gets very slow in this situation - almost non-responsive in some cases.
The "fix" was to perform a complete factory reset - a factory reset re-creates the Filesystem and brings it up to the new format expected by espressif's driver.
several users have confirmed no more delays or lagging after this procedure.
This is unrelated to DDP/HyperHDR streaming, but its worth a try.
softhack007 commentedon Oct 23, 2026
there is a chance that #5932 may fix this problem.
withay commentedon Oct 23, 2026
Heh I think I'll wait until there's at least some confirmation. I haven't touched it since I rolled back and got it working again.