Arduino IDE uploads code but still displays error (Board: Arduino Pro Micro)

So i've recently gotten into linux and have been trying different distros.

Currently on Manjaro 18.0.4 KDE.

i download arduino 1.8.9 and the nightly version.
gave my user permission on the port ttyACM0 using sudo usermod -aG group username command

and then proceeded to upload a blank code (just with empty setup and loop)
i click comiple (completed succesfully)
then i click upload ( having selected arduino leonardo under boards and ttyACM0 : Arduino Leonardo under port in the tools menu)

lights start flashing on my arduino promicro (which usually means that its flashing the code onto the board). but then the IDE spits out this error

Arduino: 1.8.9 (Linux), Board: "Arduino Leonardo"

Sketch uses 3770 bytes (13%) of program storage space. Maximum is 28672 bytes.
Global variables use 163 bytes (6%) of dynamic memory, leaving 2397 bytes for local variables. Maximum is 2560 bytes.

avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: verification error, first mismatch at byte 0x0000
0x0d != 0x0c
avrdude: verification error; content mismatch
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader

Then just for the heck of it i wrote a simple code to print "working" to the serial monitor every 250 milli seconds and uploaded it.

got the exact same error. but......
when i open the serial monitor "working" gets printed every 250 milli seconds or so.

so whats going on?

i googled this but nothing came up. just 100s of unrelated issues

(deleted)

forgot to add....

the same versions of arduino ide gave no error while upload when i was using ubuntu or windows. it is just in manjaro so far.

and also in manjaro uploading to a arduino nano ( with old 328p bootloader ) also works without any error

spycatcher2k:
If you have a pro-micro, why are you choosing Leonardo?

there is no option for choosing a pro micro in the boards menu under tools

in Windows and ubuntu i choose arduino leonardo in the boards menu and it works perfectly.
0 issues

Similar problem but I'm running KUBUNTU 18.04 .... sketch is uploaded ... (because the blink rate changes :smiley: ) but lots of errors in the message window. .... posted here so as not to pollute the board: http://ka2pbt.com/avrdude-errors.txt

avrdude: writing flash (4130 bytes):

Writing | ################avrdude: error: programmer did not respond to command: set addr
##############avrdude: error: programmer did not respond to command: set addr
#################### | 100% 0.59s

avrdude: 4130 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_574492/Blink.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_574492/Blink.ino.hex:
avrdude: input file /tmp/arduino_build_574492/Blink.ino.hex contains 4130 bytes
avrdude: reading on-chip flash data:

Reading | #avrdude: error: programmer did not respond to command: set addr
.
.
.

Oh my GODS .... after comparing windows avrdude output vs. linux avrdude output ... and other posts .... got it!

Seems even if you have the udev rule that tells ModemManger to ignore that Vendor ID ... ModenManager give you the finger and makes your life miserable anyway .... so no choice but to get medieval on ModemManager and delete it!

sudo dpkg -r modemmanager

root@argon:~# systemctl status ModemManager
● ModemManager.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead) since Sun 2019-08-25 19:34:03 EDT; 1min 1s ago
Main PID: 661 (code=exited, status=0/SUCCESS)

Aug 25 19:31:14 argon ModemManager[661]: (tty/ttyACM0): released by device '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2'
Aug 25 19:31:15 argon ModemManager[661]: Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2':
Aug 25 19:31:15 argon ModemManager[661]: [plugin manager] task 94,ttyACM0: error when checking support with plugin 'Cinterio
Aug 25 19:31:15 argon ModemManager[661]: [plugin manager] task 94,ttyACM0: failed: Operation was cancelled
Aug 25 19:31:15 argon ModemManager[661]: Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2':
Aug 25 19:34:03 argon systemd[1]: ModemManager.service: Current command vanished from the unit file, execution of the command list w
Aug 25 19:34:03 argon ModemManager[661]: Caught signal, shutting down...
Aug 25 19:34:03 argon systemd[1]: Stopping ModemManager.service...
Aug 25 19:34:03 argon ModemManager[661]: ModemManager is shut down
Aug 25 19:34:03 argon systemd[1]: Stopped ModemManager.service.

pabut:
sudo dpkg -r modemmanager

Made an account to thank you, I've now nuked modemmanager from orbit and everything is all good.

Thank you!

pabut:
sudo dpkg -r modemmanager

Thanks

I was having the same issue on my Linux Mint 19.3 laptop and this showed me what was causing it.

Instead of removing modemmanager (as I might want to play with modems at some point) I stopped it with

sudo systemctl stop ModemManager

and confirmed that this fixed the problem. So I then disabled it from auto-running on boot so that I don't have to stop it each time with

sudo systemctl disable ModemManager

But I can re-enable it if I do want it anytime for playing with modems.

Nice! This worked for me!

Pabut,
THANK YOU! I also made an account just to thank you. I was beating my head on this issue for way too long!

pabut:
sudo dpkg -r modemmanager

Same issue on Ubuntu 18.04.1, Arduino 1.8.13.

I kept getting these error messages, made debugging much harder, as I was not sure something was wrong with the upload.

Disabled ModemManager, worked great! Thank you so much!