Can't upload in linux

I’ve got the 1.6.9.1 zip library installed with the arduino ide 1.6.9 x64, and I do see the sparky’s device in the ports list listed as a leonardo, but I cannot program it. I can program a regular leonardo though. here’s what I get in the IDE:

Sketch uses 4,592 bytes (16%) of program storage space. Maximum is 28,672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2,411 bytes for local variables. Maximum is 2,560 bytes.
avrdude: ser_open(): can't open device "/dev/ttyACM1": Device or resource busy
avrdude: ser_send(): write error: Bad file descriptor

and in syslog:

Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.312440] usb 6-1: USB disconnect, device number 3 Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.616240] usb 6-1: new full-speed USB device number 4 using uhci_hcd Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.798224] usb 6-1: New USB device found, idVendor=27c2, idProduct=0003 Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.798236] usb 6-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0 Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.798243] usb 6-1: Product: Sparki Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.798250] usb 6-1: Manufacturer: ArcBotics LLC Jun 1 21:18:20 ARLaptop02 kernel: [ 7823.800179] cdc_acm 6-1:1.0: ttyACM1: USB ACM device Jun 1 21:18:20 ARLaptop02 mtp-probe: checking bus 6, device 4: "/sys/devices/pci0000:00/0000:00:1d.0/usb6/6-1" Jun 1 21:18:20 ARLaptop02 mtp-probe: bus: 6, device: 4 was not an MTP device Jun 1 21:18:28 ARLaptop02 kernel: [ 7831.496373] usb 6-1: USB disconnect, device number 4 Jun 1 21:18:28 ARLaptop02 ModemManager[591]: <info> (tty/ttyACM1): released by modem /sys/devices/pci0000:00/0000:00:1d.0/usb6/6-1 Jun 1 21:18:29 ARLaptop02 kernel: [ 7831.952149] usb 6-1: new full-speed USB device number 5 using uhci_hcd Jun 1 21:18:29 ARLaptop02 kernel: [ 7832.132196] usb 6-1: New USB device found, idVendor=2341, idProduct=8036 Jun 1 21:18:29 ARLaptop02 kernel: [ 7832.132208] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jun 1 21:18:29 ARLaptop02 kernel: [ 7832.132215] usb 6-1: Product: Arduino Leonardo Jun 1 21:18:29 ARLaptop02 kernel: [ 7832.132221] usb 6-1: Manufacturer: Arduino LLC Jun 1 21:18:29 ARLaptop02 kernel: [ 7832.134324] cdc_acm 6-1:1.0: ttyACM2: USB ACM device Jun 1 21:18:29 ARLaptop02 mtp-probe: checking bus 6, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/usb6/6-1" Jun 1 21:18:29 ARLaptop02 mtp-probe: bus: 6, device: 5 was not an MTP device Jun 1 21:18:30 ARLaptop02 ModemManager[591]: <warn> (Plugin Manager) (Cinterion) [ttyACM1] error when checking support: '(Cinterion) Missing port probe for port (tty/ttyACM1)' Jun 1 21:18:30 ARLaptop02 ModemManager[591]: <warn> (Plugin Manager) (Nokia) [ttyACM1] error when checking support: '(Nokia) Missing port probe for port (tty/ttyACM1)' Jun 1 21:18:30 ARLaptop02 ModemManager[591]: <warn> (Plugin Manager) (Iridium) [ttyACM1] error when checking support: '(Iridium) Missing port probe for port (tty/ttyACM1)' Jun 1 21:18:30 ARLaptop02 ModemManager[591]: <warn> (Plugin Manager) (Generic) [ttyACM1] error when checking support: '(Generic) Missing port probe for port (tty/ttyACM1)' Jun 1 21:18:30 ARLaptop02 ModemManager[591]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1d.0/usb6/6-1': not supported by any plugin

sparki does go into programming mode (red led pulses slowly) but does not program. also note it goes to ACM2 when it comes out of programming mode, every attempt increases one.

looks like it’s seen as a leonardo in run mode and a sparki in programming mode and that’s confusing the IDE. same sparki works fine with with the same arduino+zip library on windows. any idea how to fix this?

You should check the other thread on uploading to Linux.

It may be that you are missing the first part of the solution by lb_robotique. At least I had ~similar troubles if I removed that solution.