Ubuntu 20.10 updated and /dev/ttyACM0 vanished

pictographer

Well-known member
A recent update to Ubuntu 20.10 on my desktop PC seems to have removed /dev/ttyACM0. This was working fine in Ubuntu 20.10 before the update.

I tried updating to the latest UDEV rules.
I tried rebooting.
I tried removing the ModemManager.

lsusb does detect a teensy.

dmesg reports
Code:
[  420.800149] usb 5-1: USB disconnect, device number 2
[  442.890413] usb 5-1: new full-speed USB device number 3 using xhci_hcd
[  443.061008] usb 5-1: New USB device found, idVendor=16c0, idProduct=0482, bcdDevice= 2.73
[  443.061014] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  443.061017] usb 5-1: Product: Keyboard/Mouse/Joystick
[  443.061020] usb 5-1: Manufacturer: Teensyduino
[  443.061022] usb 5-1: SerialNumber: 1901560
[  443.086676] input: Teensyduino Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:10.0/usb5/5-1/5-1:1.0/0003:16C0:0482.000B/input/input23
[  443.146928] hid-generic 0003:16C0:0482.000B: input,hidraw0: USB HID v1.11 Keyboard [Teensyduino Keyboard/Mouse/Joystick] on usb-0000:00:10.0-1/input0
[  443.156522] input: Teensyduino Keyboard/Mouse/Joystick Mouse as /devices/pci0000:00/0000:00:10.0/usb5/5-1/5-1:1.1/0003:16C0:0482.000C/input/input24
[  443.156740] hid-generic 0003:16C0:0482.000C: input,hidraw1: USB HID v1.11 Mouse [Teensyduino Keyboard/Mouse/Joystick] on usb-0000:00:10.0-1/input1
[  443.165464] hid-generic 0003:16C0:0482.000D: hidraw2: USB HID v1.11 Device [Teensyduino Keyboard/Mouse/Joystick] on usb-0000:00:10.0-1/input2
[  443.174558] input: Teensyduino Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:10.0/usb5/5-1/5-1:1.3/0003:16C0:0482.000E/input/input25
[  443.174731] hid-generic 0003:16C0:0482.000E: input,hidraw3: USB HID v1.11 Joystick [Teensyduino Keyboard/Mouse/Joystick] on usb-0000:00:10.0-1/input3
[  443.183579] input: Teensyduino Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:10.0/usb5/5-1/5-1:1.4/0003:16C0:0482.000F/input/input26
[  443.242743] hid-generic 0003:16C0:0482.000F: input,hidraw4: USB HID v1.11 Device [Teensyduino Keyboard/Mouse/Joystick] on usb-0000:00:10.0-1/input4

Currently have Arduino 1.8.13 / Teensyduino 1.53 installed. As you might expect, the serial monitor doesn't work anymore. It worked fine until yesterday.

Haven't found anything on the net that gives a way forward. Support for /dev/ttyACM* should be built in to Ubuntu.
 
Code:
corbett@nao:/dev$ cat !$
cat /var/log/apt/history.log

Start-Date: 2021-03-04  08:57:32
Commandline: /usr/bin/unattended-upgrade
Upgrade: wpasupplicant:amd64 (2:2.9-1ubuntu8.1, 2:2.9-1ubuntu8.2)
End-Date: 2021-03-04  08:57:37

Start-Date: 2021-03-05  08:57:09
Commandline: aptdaemon role='role-commit-packages' sender=':1.643'
Upgrade: update-manager-core:amd64 (1:20.10.4, 1:20.10.5), update-manager:amd64 (1:20.10.4, 1:20.10.5), google-chrome-stable:amd64 (88.0.4324.182-1, 89.0.4389.72-1), nodejs:amd64 (15.10.0-deb-1nodesource1, 15.11.0-deb-1nodesource1), element-desktop:amd64 (1.7.21, 1.7.22), python3-update-manager:amd64 (1:20.10.4, 1:20.10.5)
End-Date: 2021-03-05  08:58:17

Start-Date: 2021-03-06  09:42:23
Commandline: packagekit role='update-packages'
Upgrade: google-chrome-stable:amd64 (89.0.4389.72-1, 89.0.4389.82-1), libxnvctrl0:amd64 (440.82-0ubuntu1, 460.39-0ubuntu0.20.10.1)
End-Date: 2021-03-06  09:42:50

Start-Date: 2021-03-06  12:39:46
Commandline: apt-get purge modemmanager
Requested-By: corbett (1000)
Purge: modemmanager:amd64 ()
End-Date: 2021-03-06  12:39:49
 
Code:
corbett@nao:/dev$ uname -a
Linux nao 5.8.0-44-generic #50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
 
The teensy still functions as a keyboard device, but USB-serial still isn't working. Still no /dev/ttyACM0. Tried various things.
Code:
sudo modprobe cdc-acm
sudo modprobe usbcore
sudo modprobe ohci-hcd
sudo modprobe ehci-hcd
modinfo cdc-acm
modinfo usbserial

I have no idea what to reinstall or reconfigure to get USB serial functionality back.
Oddly, when I unplugged the Teensy, the OS put up a shutdown notifier, which I cancelled. I'll try rebooting again.

I tried inserting an FTDI USB-to-Serial board and /dev/ttyUSB0 appeared.

The only way forward I see at this point is to reinstall the OS. Teensy without USB serial is pretty crippling.

Better suggestions?
 
Progress! I tried a different Teensy that hadn't been updated lately and that uses USB Serial. /dev/ttyACM0 appeared as usual.

I'm guessing that somehow the Arduino IDE settings got confused between two projects and as a result, my initial Teensy simply wasn't configured as a USB Serial device.

For reference, here are some other things I tried.

The teensy still functions as a keyboard device, but USB-serial still isn't working. Still no /dev/ttyACM0. Tried various things.
Code:
sudo modprobe cdc-acm
sudo modprobe usbcore
sudo modprobe ohci-hcd
sudo modprobe ehci-hcd
modinfo cdc-acm
modinfo usbserial
I have no idea what to reinstall or reconfigure to get USB serial functionality back.
Oddly, when I unplugged the Teensy, the OS put up a shutdown notifier, which I cancelled. I'll try rebooting again.

The only way forward I see at this point is to reinstall the OS. Teensy without USB serial is pretty crippling.
 
I could be wrong, but my guess is your USB option you built with may not include Serial?
That is looks like you are using Product ID 0x482 Which I think is the USB Type: Keyboard + Mouse + Joystick

This one I do not believe creates a /dev/ttyACMx object.

As it creates a Serial Emulation object instead. If you run Arduino IDE and open up Serial monitor does it see it?
Again I am not a blg linux user, so don't remember the input device it creates for this. It is one of the hidraw objects
as I found out when updating recently to 20.04 and had issues with the Serial Emulation.
 
Again my strong guess is you choose the USB type of: Keyboard + Mouse + Joystick
But what you wanted was: Serial + Keyboard + Mouse + Joystick
 
Thanks, Kurt. I think you're probably right.

My first symptom was that the Arduino Serial Monitor failed to open with an error. Unfortunately, I didn't write down the error at the time.


When multiple projects are open, I think the Arduino IDE doesn't do a good job of keeping all the settings straight between them.

Here's the error message after I carefully selected Serial + Keyboard + Mouse + Joystick
Code:
/usr/local/bin/arduino-1.8.13/hardware/teensy/../tools/teensy_post_compile -file=desklight.ino -path=/tmp/arduino_build_607909 -tools=/usr/local/bin/arduino-1.8.13/hardware/teensy/../tools -board=TEENSYLC -reboot -port=/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.1/2-1.1.1 -portlabel=(null) -portprotocol=(null) 
Board at /sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.1/2-1.1.1 is not available
 
Last edited:
Now that /dev/ttyACM0 is back, I can select it in the Arduino IDE Port menu and things are back to working.

Well, working with a workaround. I don't think the Arduino IDE serial monitor should have failed the way it did. At very least, an error message suggesting the fix is needed.
 
Last edited:
Might be worth mentioning the udev rules were updated (for upcoming 1.54) to address multiple issues seen on newer Linux distros.

This is the latest. The number in the filename also changed from "49" to "00", which probably doesn't matter on desktops or normal laptops, but does help on slow hardware like Raspberry Pi & Jetson Nano.

https://www.pjrc.com/teensy/00-teensy.rules
 
Teensy Loader 1.54-beta7 was also updated to use GTK3. Previously we linked to GTK2.

Ubuntu 20.04.2 has a broken GTK2 system (but oddly, 20.04.1 and original 20.04 work fine) which cause a 25-30 delay in startup of the software. I believe GTK2 is fixed in 20.10. But the clear message is nothing Ubuntu ships uses GTK2 anymore, so the libraries they provide for compatibility aren't getting tested much (or at all) and are falling into an unmaintained state.
 
Back
Top