Custom Leonardo Clone: Upload fails

Hey!

I've build a custom Leonardo clone and flashed the Arduino Leonardo bootloader to the m32u4. If I connect the device, dmesg shows:

[945775.729405] usb 8-2: new full speed USB device using uhci_hcd and address 100
[945775.910627] cdc_acm 8-2:1.0: This device cannot do calls on its own. It is not a modem.
[945775.910643] cdc_acm 8-2:1.0: ttyACM11: USB ACM device
[945775.918801] generic-usb 0003:2341:0034.0033: hidraw2: USB HID v1.01 Device [Arduino LLC Arduino Leonardo bootloader] on usb-0000:00:1d.2-2/input2

In the Arduino IDE, I select the corresponding ttyACMn port and hit Upload. It compiles and than shows "Uploading" for all eternity. If I dmesg after clicking "Upload", I see that the port is re-allocated.
For example, I select ttyACM0 for the board, hit Upload, dmesg shows that the port is now ttyACM1.

http://arduino.cc/en/Guide/ArduinoLeonardo#toc12:
However, because the Leonardo's serial port is virtual, it disappears when the boards resets, the Arduino software uses a different strategy for timing the upload than with the Uno and other boards. In particular, after initiating the auto-reset of the Leonardo (using the serial port selected in the Tools > Serial Port menu), the Arduino software waits for a new virtual (CDC) serial / COM port to appear - one that it assumes represents the Leonardo bootloader. It then performs the upload on this newly-appeared port.

Furthermore, it is suggested that

http://arduino.cc/en/Guide/ArduinoLeonardo#toc12:
These differences affect the way you use the physical reset button to perform an upload if the auto-reset isn't working. Press and hold the reset button on the Leonardo, then hit the upload button in the Arduino software. Only release the reset button after you see the message "Uploading..." appear in the software's status bar. When you do so, the bootloader will start, creating a new virtual (CDC) serial port on the computer. The software will see that port appear and perform the upload using it.

That does not work for me, but in fact what I realized that if I plug the Leonardo clone and select the port in the Arduino IDE, dmesg shows

[946468.972529] tty_port_close_start: count = -1
[946468.972611] tty_port_close_start: count = -1
[946468.972691] tty_port_close_start: count = -1
[946468.972774] tty_port_close_start: count = -1
[946468.972854] tty_port_close_start: count = -1
[946468.972932] tty_port_close_start: count = -1
[946468.973010] tty_port_close_start: count = -1
[946468.973090] tty_port_close_start: count = -1
[946468.973168] tty_port_close_start: count = -1
[946468.973246] tty_port_close_start: count = -1
[946468.973324] tty_port_close_start: count = -1
[946468.973401] tty_port_close_start: count = -1
[946468.973478] tty_port_close_start: count = -1
[946468.973556] tty_port_close_start: count = -1

So the autoreset is failing? Or what does that mean?

Thx for your help!

I tried the same board on another laptop (Ubuntu 10.10) and that one does not even create a /dev/ttyACMn. The board is detected as a full speed USB device and a HID device, but not as a USB ACM device and is thereby not selectable in the IDE. Is that a problem with cdc_acm?

I have heard about this problem somewhere else many people face this.

Which of my two problems are you refering to?