Noise on power on

How to avoid the random noise screen on boot up? Every time I power up there is a random full screen noise that lasts for some milliseconds before everything is initialized.

I would say that is not an lvgl issue but down to how you initialise your display and the hardware. May be there’s a backlight control that you could set to 0 at start up? Also check the display datasheet for any power up sequence requirements.

Lvgl will expect the display to be initialised and ready to use before it starts writing stuff.

Unless the noise is after your display initialised and between lvgl starting up and it writing data to the screen? In which case others may have a view, or you could possible turn the backlight off until some point?

Thanks, delaying display brightness might be one solution. Display driver im using is GC9A01A with LVGL esp32 driver. Noise happens before the first screen is drawn. The sequence is this:
Backlight turns on, backlight turns off, backlight turns on with noise on screen, then first screen is drawn.

I have backlight pin controlled by lvgl.

Also, you could initialise the display buffer(s) with the values for black (probably 0!) before lvgl runs which will likely fix this as well.

After debugging some more I found out that the noise screen is there before calling lv_task_handler() for the first time. Up until the while(1) loop the screen is still random noise.

So even after initializing lv, the driver, and creating the screen gui, the display is still all noise.

Here is the GUI task:

static void guiTask(void *pvParameter) {

    (void) pvParameter;
    xGuiSemaphore = xSemaphoreCreateMutex();


    /* Initialize SPI or I2C bus used by the drivers */

    lv_color_t* buf1 = heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
    assert(buf1 != NULL);

    /* Use double buffered when not working with monochrome displays */

    lv_color_t* buf2 = heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
    assert(buf2 != NULL);

    static lv_disp_buf_t disp_buf;

    uint32_t size_in_px = DISP_BUF_SIZE;

    /* Initialize the working buffer depending on the selected display.
     * NOTE: buf2 == NULL when using monochrome displays. */
    lv_disp_buf_init(&disp_buf, buf1, buf2, size_in_px);

    lv_disp_drv_t disp_drv;
    disp_drv.flush_cb = disp_driver_flush;

    disp_drv.buffer = &disp_buf;

    /* Create and start a periodic timer interrupt to call lv_tick_inc */
    const esp_timer_create_args_t periodic_timer_args = {
        .callback = &lv_tick_task,
        .name = "periodic_gui"
    esp_timer_handle_t periodic_timer;
    ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
    ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, LV_TICK_PERIOD_MS * 1000));

    /* Create the demo application */

    while (1) {
        /* Delay 1 tick (assumes FreeRTOS tick is 10ms */
        vTaskDelay(pdMS_TO_TICKS(5000));  // noise screen is there for 5 seconds until lv_task_handler is called for the first time

        /* Try to take the semaphore, call lvgl related function on success */
        if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY)) {

    /* A task should NEVER return */

LVGL only draws the screen after the first call to lv_task_handler. If you do not have a way of filling the screen with black or white, I recommend keeping the display backlight off until the first frame has been rendered.