To my understanding partial updates in GxEPD2 are only allowed if the screen is at least once fully refreshed/updated. This feature prevents to use effectively EPDs with MCU that are able to deep-sleep: once they wake-up, we lose the frame buffer content and need to perform a full update.
Taking ESP32 as an example, the frame buffer would be to big to be store to RTC_DATA_ATTR but a different approach can be taken:
a) store all the displayed variable to RTC_DATA_ATTR retained variable before going to deep-sleep
b) once woken up redraw the display into the GxEPD2 frame buffer from the retained variables. This recreate the state before the deep sleep: It draws the same bitmaps to the GxEPD2 frame buffer.
c) Now a function should be added to GxEPD2, to allow it to consider the recreated frame buffer as already synced with the EPD. The e-paper doesn't need updating, it shows the same content already from the previous update.
d) Now it's possible to use the partial update functions to only update the portion of the screen that has changed (like a time value, or a temperature and so on), avoiding a complete refresh and hence display flickering.
Similar feature has been solved and integrated into Inkplate Arduino Library, would it be possible to add this also for GxEPD2? I think that it would be a great addition to develop very high quality open source products with EPDs! Thank you!
Sources for Inkplate modifications: