I have the same problem.
a brand new M5STACK core, with Arduino1.8.5 + library M5Stack from github + driver Linux_3.x.x_4.x.x_VCP from silabs.com, I got error message:
Archiving built core (caching) in: /tmp/arduino_cache_375208/core/core_espressif_esp32_esp32_FlashMode_qio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,DebugLevel_none_41c73171d0dd7eab7864b998a89c78d5.a
Sketch uses 135724 bytes (10%) of program storage space. Maximum is 1310720 bytes.
Global variables use 10592 bytes (3%) of dynamic memory, leaving 284320 bytes for local variables. Maximum is 294912 bytes.
esptool.py v2.1
Connecting.....................................................
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
I'm total lost.
Dev under Debian9 x64.