IDE calls avrdude with wrong programmer/port

Hi,

I’m trying to use Arduino 1.8.15 with an Arduino Mega (ATmega2560) and an ISP-Programmer on Linux.

Programmer works fine with standalone avrdude -P /dev/ttyACM0 -p m2560 -c avrisp2, so I set Tools→Programmer and Tools→Port accordingly. I verified that values were written correctly to ~/.arduino15/preferences.txt.

Unfortunately, when I hit ›Sketch→Upload Using Programmer‹ or ›Tools→Burn Bootloader‹ Arduino keeps to call avrdude with -Pusb and -cstk500v2 – which fails unsurprisingly.

What might I have missed?

Apparently "AVRISP Mk2" is a genuine Atmel Programmer that can only be talked to via USB port. AVRISP2 seem to mostly be clone programmers that are stk500v2 serial programmers plus a USB/Serial converter chip.

See if setting the programmer type to "Atmel STK500 board" works.

Use this code in your Linux terminal. I use it and it works great. I think you might have to reset your computer though but that only takes a minute.
sudo usermod -a -G dialout $USER