Arduino Error Linux /dev/ttyACM0 : Input/output Error

How to solve Arduino error avrdude: ser_open(): can’t open device?

Arduino error avrdude: ser_open(): can’t open device “/dev/ttyACM0” : Input/output error – This is an article to solve an Arduino error where the Arduino port cannot be used to upload program code to the Arduino Board.

Here, I use a Linux OS based on Debian, Arduino version 1.8.13. In this case, I using an Arduino Uno with the ATMEL Mega16u2 converter chip.

Arduino Input/output Error

The strange thing is, if I use Arduino Uno with CH340 chip as a USB to TTL converter, it will be detected on the /dev/ttyUSB” port and upload the program without any problems.

However, if I use an arduino board with a USB to TTL ATMEL Mega16u2, the port name is /dev/ttyACM*, then there will be an error:

avrdude: ser_open(): can’t open device “/dev/ttyACM0” : Input/output error

avrdude done. Thank you.

the selected serial port does not exist or your board is not connected

After looking for the cause of this error and successfully solving it, the problem is not with the Arduino IDE software, but on the OS I use.

How to Fix Input/output Error

To be able to fix it is to modify the grub file that is on the linux system itself. The steps are:

  • Open the group file using a text editor via terminal. I use gedit text editor
sudo gedit /etc/default/grub
  • Look for the line containing the word GRUB_CMDLINE_LINUX_DEFAULT=””
  • Then enter the word usbcore.autosuspend=-1 to ” “. and becoming GRUB_CMDLINE_LINUX_DEFAULT=”usbcore.autosuspend=-1”

    If by default your linux is GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, and then becoming to GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash usbcore.autosuspend=-1″

    after that save the file.
  • Update grub with command:
sudo update-grub
  • Reboot

After that, reconnect the Arduino board to the computer, reopen the Arduino IDE, re-upload it and upload the code will successfully.

Hopefully this Arduino Input/output Error article can help you in learning the Arduino Environment. If this Arduino error article is useful, please share it using the share button below.

Scroll to Top