Check out this video I did a while back on using M5Stack devices on linux https://www.youtube.com/watch?v=ZZdTl0400uM you need to make sure to add the device to the dialout group, I can't remember the exact line of code but it's in the video if you watch it