Skip to content

fix: epd2in13_V4 displayPartial ghosting due to missing 0x26 buffer update#416

Open
AdriBalla wants to merge 1 commit intowaveshareteam:masterfrom
AdriBalla:fix/epd2in13-v4-partial-refresh-ghosting
Open

fix: epd2in13_V4 displayPartial ghosting due to missing 0x26 buffer update#416
AdriBalla wants to merge 1 commit intowaveshareteam:masterfrom
AdriBalla:fix/epd2in13-v4-partial-refresh-ghosting

Conversation

@AdriBalla
Copy link

@AdriBalla AdriBalla commented Mar 6, 2026

Problem

When using displayPartial() on the epd2in13_V4 (Waveshare 2.13 v4), visible ghosting and noise artifacts appear on every partial refresh. Previously displayed content "bleeds through" the new image, making the display unreadable over time.

This also occurs on the first partial refresh following a full refresh via display() or display_fast().

Root Cause

displayPartial() only writes to the 0x24 RAM buffer (new image) but never updates the 0x26 buffer (previous image reference). The display controller uses 0x26 as a reference to determine which pixels have changed and need to be flipped. Without a valid reference, the controller applies the partial waveform incorrectly, causing the ghosting artifacts.

Similarly, display() and display_fast() only write to 0x24, leaving 0x26 out of sync after a full refresh.

Fix

  • Declare _prev_buffer in __init__ to track the last displayed image
  • In display() and display_fast(): write image to both 0x24 and 0x26
  • In displayPartial(): write _prev_buffer to 0x26 before writing the
    new image to 0x24, then update _prev_buffer
  • In displayPartBaseImage() and Clear(): keep _prev_buffer in sync

Testing

Tested on Raspberry Pi Zero W with epd2in13_V4 (Waveshare 2.13 v4 HAT):

  • Partial refresh every second over several minutes: no ghosting
  • Clear followed by displayPartial: no ghosting
  • display (full refresh) followed by displayPartial: no ghosting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant