Go Down

Topic: The Linux ttyACM0 drama - more details after a lot of experimenting (Read 121227 times) previous topic - next topic



thank you so much for the tip with the modemmanager. I've tried with several differernt linux installations, but didn't succeeded. But after having purged the modemmanager, it worked like charm!

BR, Chris


I also started experiencing a similar problem with my linux setup (i.e., serial port being grayed out in the IDE, making it impossible to upload sketches), after a couple of days of being able to upload to my arduino uno just fine.

I was up until 4am trying various solutions and suggestions I read about in other threads and boards to no avail, until I noticed that steps for flashing the firmware involved shortening two pins on the board. Simply performing this step (basically just step 5 of this post, or part of the steps from this page ) worked for me:

  • with the USB cable plugged in, locate the two pins closest to the USB port on the board.
  • briefly touch the two pins with a piece of wire.
  • after the LED stopped blinking, unplug the USB cable from the PC, and plug it back in.

After this point, the Serial Port was detected again in the IDE, and I was able to start using it like before.

I'm still new to this whole thing, so I have to admit I'm not entirely sure if this makes a whole lot of sense (why it stopped working in the first place, and why the above step fixes the problem). Just thought I'd share my experience in case it helps someone out there having a similar problem...


I know this post comes very late to the discussion, but I've spent days debugging problems with /dev/ttyACM0 under Linux (Ubuntu).  I updated my BIOS, tried different kernels, and of course I'd double checked that my user account had read/write access to the device (because it was in the dialout group).

The issue for me was modemmanager.  On my laptop, modemmanager was grabbing the /dev/ttyACM0 somehow and causing contention.  I got "device or resource busy" messages; I got timeouts.  I just got weird behavior in general, and almost always attempts to program failed.

Because it was so hard to find, I'm coming back here to update this thread, which was fairly prominent when I tried to hunt down the issue.  For me the fix was:

$ sudo apt-get --purge remove modemmanager

After that, things work as they should.

On another laptop, modemmanager almost never caused a problem.  Perhaps one in 25 times I had an issue.  But on the laptop I use from day to day it was more like 99 out of 100 times it failed.
Thanks a ton for this tip! I had exactly the same message as you.
I don't know what modemmanager does (I'm new to ubuntu but not new to arduino), but removing it was the way to go :)
Thanks again!


Just getting started with Arduino and hit this issue with Debian 8.6 on an older PC and a Genuino 101. To confirm, removing modemmanager worked for me too. Thanks Don.


Just for future reference:

you can avoid removing the packet and simply stop the service with the following command:

Code: [Select]
systemctl stop ModemManager.service

if this works, you can then disable the service using the same syntax:

Code: [Select]
systemctl [stop|start|enable|disable] ModemManager.service


Hello to everybody,
and thanks for all the tips and explanation. I tried anything you mentioned but unfortunately without success.

Here the software I'm using:
MATLAB Version: (R2016b)
Operating System: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Version 9.1 (R2016b)
Simulink Version 8.8 (R2016b)
Control System Toolbox Version 10.1 (R2016b)

What I try out so far:
- add add the tty and dialout to the user
- chmod 777 /dev/ttyACM0
- removed the modemanager

The arduino IDE works pretty well but if I try to connect my arduino uno with Matlab I still received the following error message:

Failed to open serial port /dev/ttyACM0 to communicate with board Uno.
Make sure there is no other MATLAB arduino object for this board. For troubleshooting, see Arduino Hardware Troubleshooting.

I didn't know what happened and I would be appreciate if you can support me with some additional ideas.

Thanks in advance


Linux Mint 17.3

I resurect this post because i have the problem of missing /dev/ttyACM0 and read lot of pages without solution.

But finally I perform these (seeming irrelevant) steps, probably  only the last 'restart' fix the port problem, but no way to check it.

(Arduino was tested OK on another PC)

1. Install old version of Arduino  1:1.0.5 (from Linux Mint repos)  (no change)
2. Install a USB mem and format  (Magic, or not)
Code: [Select]
sudo /etc/init.d/udev restart

and then the com port appears in the 'ports' list

Hope this help !



I'm necrobumping this thread too. I was working with Arduino IDE on my Arch Linux without problems, now afrer some time I'd like to work on some new project but I can't upload the sketch.

this is standard 'state' of the /dev/ttyACM0: crw-rw---- 1 root uucp
But when I started upload, avrdude (or whatever else) is disconnecting USB and in moment when it tries to write permissions are: rw------- 1 root root

So even if my user is in the uucp group in that moment the device is set for root:root

Code: [Select]

[  313.042695] usb 2-1.2: USB disconnect, device number 3
[  313.253085] usb 2-1.2: new full-speed USB device number 4 using ehci-pci
[  313.352387] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[  321.234517] usb 2-1.2: USB disconnect, device number 4
[  321.439445] usb 2-1.2: new full-speed USB device number 5 using ehci-pci
[  321.541392] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[  457.935108] usb 2-1.2: USB disconnect, device number 5
[  458.176629] usb 2-1.2: new full-speed USB device number 6 using ehci-pci
[  458.275465] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[  466.126812] usb 2-1.2: USB disconnect, device number 6
[  466.332977] usb 2-1.2: new full-speed USB device number 7 using ehci-pci
[  466.435061] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device

my kernel: 4.11.9-1-ARCH
Arduino IDE: 1.8.3

Code: [Select]
Bus 002 Device 007: ID 2341:8041 Arduino SA

Nor this udev rule doesn't solve this problem:
Code: [Select]
SUBSYSTEMS="usb", ATTRS{idVendor}== "2341", GROUP="uucp", MODE="0666"

Any hints?



Several things to check using the attached URL.

"$ systemctl status

That returns a tree of all the services that your system is running. Look through that list to see if there are any "serial-getty" services running. If there are you should remove them:

$ sudo systemctl stop serial-getty@ttyACM0
$ sudo systemctl disable serial-getty@ttyACM0

While you're there look through the list for another troublesome member: ModemManager. This is a program used to dial out to the internet through old-fashioned modems (you know, the kind that go beep beep beep squark squeek squark ) or USB DSL modems (that no one uses any more, we're all wireless now. Remember the old green "frog" modem from way back when…?). That has a habit of grabbing a serial port as soon as it appears and trying to configure a modem attached to it. While that's happening nothing else can access the serial port. It's especially a problem with boards like the Arduino Leonardno or chipKIT Lenny which create a new serial port when they enter programming mode. So unless you really need the functionality that ModemManager provides you should just remove it:"



What a pain this has been
I have been struggling for several days to get a Leonardo to upload in Ubuntu.
I have Ubuntu 12.10 on a Dell laptop which refused to boot up with Vista (no loss) and a PC which I built using a redendent motherboard and an Intel i7 CPU etc. - this has Ubuntu 16.04.
Both have Arduino IDE installed, 12.10 has 1.0.1 and 1.8.3 and the 16.04 PC just has 1.8.4
Arduino Uno's worked on both without having to change anything - the Dell has worked since 2012 and no trouble.
But neither would upload to a Leonado. Eventually I ran dmesg and spotted something like "is not a modem". This led down the trail of modemmanager or ModemManager depending on Ubuntu version.
An item in Linux.com had a bit on stopping/disabling/removing startup services, so warily disabled ModemManager in 16.04 - this then allowed the Leonardo to work, but the equivalent fix in 12.10 (might have been in Upstart) didn't - same old error "dev/tty/ACM* busy"
Then I found this lovely thread and donbinder's bit on "purge" and "remove" modemmanager. Worked a treat, very happy now.
I don't need modemmanager on the Dell and probably not on the 16.04 PC, but fortunately, stop and disable are carried over when it (16.04) is rebooted.
Many thanks to all


Hi, after some time I came back to this issue and I found I have problem just with ttyACM0 (Yun/Micro/etc. connected with microUSB cable) and ttyUSB0 (Uno connected with USB-B) is ok. But even this is interesting clue I can't figure it out.

I'm monitoring the rights on the tty devices:
Code: [Select]
watch -n 0.1 'ls -la /dev/ttyUSB* /dev/ttyACM*'

- when uploading to ttyUSB0 just the date/time is changing and everything is working
- when uploading to ttyACM0 device disappeared for a moment then a new one with wrong rights (and root:root) has been created, upload failed and then right are set properly by udev (with root:uucp)  ... and then another one cycle (disappear-wrong-correct)

My user is in the lock and uucp groups, I've tried to add some udev rules or disable them but without success ...

I'm for 99% sure this is something before udev rule is touching it.



  sudo apt-get --purge remove modemmanager

worked for me too on Ubuntu 16 with USB2 only ports.  Otherwise I got the same "device or resource busy" error  :)


I notice linux is using xhci - are you on a USB3 port? If your computer has any USB2-only ports try using those instead.
Aft much stuffing about, using a USB2 hub on a USB3 port did the trick for me. Thank you for restoring my sanity.

Go Up