USB device /dev/ttyACM0 throws I/O error on connect

When I try to access my USB device (a microcontroller which acts as a ttyACM device and just prints an ascii text string out) with minicom or another terminal program it throws an I/O error:

[j0b314:~]$ minicom -b 9600 -D /dev/ttyACM0
minicom: Fehler beim Öffnen der Datei »/dev/ttyACM0«: Eingabe-/Ausgabefehler

The kernel messages looks like this:

Apr 08 08:07:40 ferrero kernel: usb 8-1: reset full-speed USB device number 6 using uhci_hcd
Apr 08 08:07:40 ferrero kernel: usb 8-1: USB disconnect, device number 6
Apr 08 08:07:40 ferrero kernel: usb 8-1: new full-speed USB device number 7 using uhci_hcd
Apr 08 08:07:40 ferrero kernel: usb 8-1: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 0.00
Apr 08 08:07:40 ferrero kernel: usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 08 08:07:40 ferrero kernel: usb 8-1: Product: BLUEPILL_F103C8_128K CDC in FS Mode
Apr 08 08:07:40 ferrero kernel: usb 8-1: Manufacturer: Unknown
Apr 08 08:07:40 ferrero kernel: usb 8-1: SerialNumber: 6D9144804953
Apr 08 08:07:40 ferrero kernel: cdc_acm 8-1:1.0: ttyACM0: USB ACM device

After connecting with minicom the device gets resetted and reconnected:

Apr 08 08:15:57 ferrero kernel: usb 8-1: reset full-speed USB device number 7 using uhci_hcd
Apr 08 08:15:57 ferrero kernel: usb 8-1: USB disconnect, device number 7
Apr 08 08:15:57 ferrero kernel: usb 8-1: new full-speed USB device number 8 using uhci_hcd
Apr 08 08:15:57 ferrero kernel: usb 8-1: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 0.00
Apr 08 08:15:57 ferrero kernel: usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 08 08:15:57 ferrero kernel: usb 8-1: Product: BLUEPILL_F103C8_128K CDC in FS Mode
Apr 08 08:15:57 ferrero kernel: usb 8-1: Manufacturer: Unknown
Apr 08 08:15:57 ferrero kernel: usb 8-1: SerialNumber: 6D9144804953
Apr 08 08:15:57 ferrero kernel: cdc_acm 8-1:1.0: ttyACM0: USB ACM device

My kernel:

[j0b314:~]$ uname -a
Linux ferrero 5.10.23-1-MANJARO #1 SMP PREEMPT Thu Mar 11 18:47:18 UTC 2021 x86_64 GNU/Linux

My release:

[j0b314:~]$ cat /etc/lsb-release 
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.0
DISTRIB_CODENAME=Ornara
DISTRIB_DESCRIPTION="Manjaro Linux"

The device behaves correctly under an Windows 10 (a serial port is installed and you can connect with putty to it.

On an Ubuntu it also works out of the box. I also tested it with a 5.4 kernel but I had still no luck. It looks like the cdc_acm driver does not properly attach to the device.

Any thoughts?
Thanks!

1 Like

Always - sometimes even helpful ones :slight_smile:

Could be a privilege problem - who can access that device?

$ ls -lh /dev/ttyACM0

Did you try as root?

$ sudo minicom -b 9600 -D /dev/ttyACM0

Hi,

no rights problem. I am member of the uucp group:

[j0b314:~]$ ls -lh /dev/ttyACM0 
crw-rw-rw- 1 root uucp 166, 0 12. Apr 09:08 /dev/ttyACM0
[j0b314:~]$ sudo minicom -b 9600 -D /dev/ttyACM0 
[sudo] Passwort für j0b314: 
minicom: Fehler beim Öffnen der Datei »/dev/ttyACM0«: Eingabe-/Ausgabefehler
[j0b314:~]$

Having the same problem after yesterday update. Any solution or workaround would be appreciated.

1 Like

Had the same error.
Could track it down to the following error in journalctl:

cdc_acm 2-1.1:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed

Then i didn’t get further. Finally i could work around the problem by downgrading the kernel back to 5.11.10-1. This fixed it for me.

That is an option - but installing/using one of Manjaro’s supported kernels is preferable.

Sure, but i just downgraded the kernel back to the version before the last update, which was still in cache. So i thought this is still a supported kernel. Or am I wrong there?

Going offtopic, but downgrading a package results in a partial update and those are not supported.
If you downgrade a kernel, keep in mind you also have to downgrade all matching module/driver packages to get a working system.

I also have this problem after the update. Changing the core didn’t help. 5.4 doesn’t work either. The most recent kernel also failed.

Same here. So, how do I go to 5.11.10-1?

LE: Went back to 5.10.26 - all good.

This started happening to me after updating everything today. Changing kernels doesn’t help, I see the problem on 4.19.187-1-MANJARO as well. Perhaps there’s a change that has been ported to all of them recently.

I have a similar problem here…
FYI: I filed a bug report for the kernel.

1 Like

Link:
https://bugzilla.kernel.org/show_bug.cgi?id=212751

2 Likes

After another day of testing I have found that the problem also manifests for FTDI D2XX based applications which target ttyUSB nodes. It may be unrelated but the same binary fails on kernel 5.4.112 while it works fine on 5.4.108. There is nothing in the kernel logs and I haven’t dug deeper yet.

Downgrading to 5.4.108 from pacman cache also helped me access my TI TM4C microcontroller which exposes itself as a ttyACM device.

FYI: patch is already in usb-next.

If you need is fast, read the bugzilla entry and recompile the kernel.

Works at least for me :slight_smile:

1 Like

The fix has been signed off and incorporated into Linux 5.4.115 and 5.10.33 releases. It should be available in Manjaro repo pretty soon.

3 Likes