Ubuntu 14.04: Communication broken after usb cable is unplugged-replugged

My configuration: * arduino uno (dry board: no shield, no wire, ...) * Ubuntu 14.04 * arduino IDE 1.6.1 with root privilege (sudo) * USB cable

When I start the IDE after reboot, The serial port used by the board is /dev/ttyACM0. I can upload my programs with no problem.

The problem is: When I unplug and replug the board, the serial port eventually changes to /dev/ttyACM0 (most often, but not always. Why !?) Whichever the new port is, uploading consistently fails until I reboot.

The message is:

ioctl("TIOCMSET"): Connection timed out
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

I have seen tons of posts about this issue on the internet (including on this forum). Most just cannot upload. This is not my case. I can upload ... until I unplug-replug the USB cable.

The port number will change if you just un plug and re plug. (It certainly does on Arch Linux)

Yes, I have seen the change in the port number from the begining. The problem is not there. BTW, after more trial-and-error, it happens that the problem can show up enven after rebooting. The problem is uneven. Sometimes ti works, sometimes not.