Screen right shift

Hi,
I have a problem of screen right shift. after some time the main screen is shifted to right of some pixel (random value sometime few pixel some time more pixel). to restore the normal use I must reboot the device.
somebody can help me.
thanks to all for support.

What MCU/Processor/Board and compiler are you using?
Waveshare ESP32-S3-Touch-LCD-7 esp32-S3-WROOM1 8MB Flash and 8MB PSRAM.
I use VS with platformIO and arduino framework.

this is my plaftomIO.ini configuration:

[env:ESP-LCD]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
board = ESP-LCD
framework = arduino
upload_speed = 921600
monitor_speed = 115200
board_upload.flash_size = 8MB
board_build.f_flash = 80000000L
board_upload.maximum_size=8388608
build_flags = 
	-D BOARD_HAS_PSRAM
	-DARDUINO_USB_CDC_ON_BOOT=0     ; If using UART port
	;-DARDUINO_USB_CDC_ON_BOOT=1     ; If using USB port
	-DCORE_DEBUG_LEVEL=1            ; Set to `5` for full debug output, `0` for none
	-DLV_CONF_INCLUDE_SIMPLE
	-DLV_LVGL_H_INCLUDE_SIMPLE
	#-D SERIAL_RX_BUFFER_SIZE=256
	-I src
	-I include
	-I lib
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
lib_deps =
	https://github.com/esp-arduino-libs/ESP32_Display_Panel.git
    https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v0.1.0
    lvgl/lvgl@8.3.11
	bblanchon/ArduinoJson @ ^7.3.0
	adafruit/Adafruit_VL6180X @ ^1.4.4
	#mmarkin/GeoIP @ ^1.3.2
	ui

and this is ESP_LCD board

{
    "build": {
      "arduino": {
        "ldscript": "esp32s3_out.ld",
        "partitions": "default_8MB.csv",
        "memory_type": "qio_opi"
      },
      "core": "esp32",
      "extra_flags": [
        "-DBOARD_HAS_PSRAM",
        "-DARDUINO_USB_MODE=1",
        "-DARDUINO_RUNNING_CORE=1",
        "-DARDUINO_EVENT_RUNNING_CORE=1"
      ],
      "f_cpu": "240000000L",
      "f_flash": "80000000L",
      "flash_mode": "qio",
      "psram_type": "opi",
      "hwids": [["0x303A", "0x1001"]],
      "mcu": "esp32s3",
      "variant": "esp32s3"
    },
    "connectivity": ["wifi", "bluetooth"],
    "debug": {
      "default_tool": "esp-builtin",
      "onboard_tools": ["esp-builtin"],
      "openocd_target": "esp32s3.cfg"
    },
    "frameworks": ["arduino", "espidf"],
    "name": "ESP-LCD (8M QIO Flash & OPI PSRAM)",
    "upload": {
      "flash_size": "8MB",
      "maximum_ram_size": 327680,
      "maximum_size": 8388608,
      "require_upload_port": true,
      "speed": 921600
    },
    "url": "https://www.espressif.com",
    "vendor": "ESP-LCD"
  }

and i run the graphics in new task

    BaseType_t ret = xTaskCreatePinnedToCore(lvgl_port_task, "lvgl", LVGL_PORT_TASK_STACK_SIZE, NULL,
                     LVGL_PORT_TASK_PRIORITY, &lvgl_task_handle, core_id);

attach the lv and panel configuration file
lv_conf.h (36.7 KB)
ESP_Panel_Board_Custom.h (22.0 KB)
ESP_Panel_Board_Supported.h (6.6 KB)

ESP_Panel_Conf.h (3.9 KB)
lvgl_port_v8.h (6.7 KB)

I have seen similar problems with others before, caused by writing flash, but he doesn’t know how to solve them either.

thanks for replay
i modified this line
#define LVGL_PORT_BUFFER_SIZE (LVGL_PORT_DISP_WIDTH * 20)
to
#define LVGL_PORT_BUFFER_SIZE (LVGL_PORT_DISP_WIDTH * 40) //20)

and now the right shift is less frequently or absent