Can't open device

Hey, I'm Ubuntu and the IDE is unable to open the device. No ports are discovered. It worked a couple of weeks ago, but for some reason stopped working. I've added my user to the dialout group.

avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory

Anyone knows why I'm unable to connect to the Arduino?

Hi @fredk86.

Please add a reply here on this forum thread to tell us which Arduino board you are using.

Please be as specific as possible as some Arduino boards with similar names have significant differences and the forum helpers can only provide effective assistance if we are aware of which one is being used.

If you aren't sure how to describe which board you are using, you can provide the link to the online product listing you bought the board from and we'll proceed based on the information found there.

Try a another com port in ide2

it is an Arduino Uno.

no ports are shown. I can't choose another com port.

Thanks for the clarification.

I'm going to ask you to run the lsusb command from the command line and post the output.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Open a terminal.
  2. Connect the Arduino board to your computer with a USB cable.
  3. Type lsusb
  4. Press the Enter key
  5. Click and drag the mouse to select all the output in the terminal window.
  6. Press the Ctrl+Shift+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  7. Open a forum reply here by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the output is correctly formatted.
    Code block icon on toolbar
  9. Press the Ctrl+V keyboard shortcut.
    This will paste the output into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

Hey ptillisch,

Here you go:

fredk@fredk-TUXEDO-Polaris-AMD-Gen5:~$ lsusb
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 002: ID 046d:085e Logitech, Inc. BRIO Ultra HD Webcam
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0e8d:0608 MediaTek Inc. Wireless_Device
Bus 001 Device 003: ID 04f2:b642 Chicony Electronics Co., Ltd HD Webcam
Bus 001 Device 002: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse (M-BT58)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

OK, this tells us that the USB device is not recognized at the operating system level (as opposed to it being recognized by the operating system, but not by Arduino IDE).

In order to troubleshoot this further, we need to check on what is happening at a lower level. I'm going to ask you to run the dmesg command from the command line and post the output.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Open a terminal.
  2. Connect the Arduino board to your computer with the USB cable.
  3. Press and release the reset button on the Arduino board.
    The LED marked "L" on the board will start pulsing.
  4. Wait for the LED marked "L" on the board to stop pulsing.
  5. Type this command:
    sudo dmesg | tail --lines=60
    
  6. Press the Enter key
  7. If prompted for it, enter your Linux account password and press the Enter key.
  8. Click and drag the mouse to select all the output in the terminal window.
  9. Press the Ctrl+Shift+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  10. Open a forum reply here by clicking the "Reply" button.
  11. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the output is correctly formatted.
    Code block icon on toolbar
  12. Press the Ctrl+V keyboard shortcut.
    This will paste the output into the code block.
  13. Move the cursor outside of the code block markup before you add any additional text to your reply.
  14. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

[42906.051647] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[42906.051847] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[42973.707281] usb 7-1: current rate 16000 is different from the runtime rate 48000
[43142.742738] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[43142.742749] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[43144.207348] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[43144.207357] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[43195.659029] usb 7-1: current rate 16000 is different from the runtime rate 48000
[43363.259823] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[43363.259832] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[43364.445391] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[43364.445399] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[45367.013103] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[45367.013110] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[45367.945386] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[45367.945391] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53526.324384] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53526.324701] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53526.324955] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53535.059617] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53535.059958] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53535.060154] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[53617.812558] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[53617.812564] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53618.273250] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[53618.273260] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53619.765469] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[53619.765479] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53620.270806] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[53620.270816] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53620.843205] atkbd serio0: Unknown key pressed (translated set 2, code 0xf8 on isa0060/serio0).
[53620.843215] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[53621.024734] atkbd serio0: Unknown key released (translated set 2, code 0xf8 on isa0060/serio0).
[53621.024745] atkbd serio0: Use 'setkeycodes e078 <keycode>' to make it known.
[60450.631726] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[60450.631899] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[60450.632019] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[60478.886984] usb 1-2: new full-speed USB device number 6 using xhci_hcd
[60479.069724] usb 1-2: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[60479.069734] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[60479.069738] usb 1-2: Manufacturer: Arduino (www.arduino.cc)
[60479.069742] usb 1-2: SerialNumber: 74137363737351C0B061
[60479.139827] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[60488.629834] usb 1-2: USB disconnect, device number 6
[60904.117505] usb 1-2: new full-speed USB device number 7 using xhci_hcd
[60904.300836] usb 1-2: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[60904.300845] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[60904.300849] usb 1-2: Manufacturer: Arduino (www.arduino.cc)
[60904.300852] usb 1-2: SerialNumber: 74137363737351C0B061
[60904.355934] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[60904.855055] usb 1-2: USB disconnect, device number 7
[62081.072817] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[62081.073041] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[62081.073221] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
[62285.177622] usb 1-2: new full-speed USB device number 8 using xhci_hcd
[62285.360665] usb 1-2: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[62285.360674] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[62285.360679] usb 1-2: Manufacturer: Arduino (www.arduino.cc)
[62285.360682] usb 1-2: SerialNumber: 74137363737351C0B061
[62285.412344] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

The strange thing is that I got the Arduino connected a couple of weeks ago and uploaded a sketch. I ran an update and upgrade since then, perhaps that made the difference... :face_with_monocle:

This looks perfect. It is the same as what I get when plug my UNO R3 board into my Linux computer and then run dmesg. The difference is that when I run lsusb I see the USB device listed in its output:

Bus 003 Device 022: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)

We do sometimes receive reports of the board not producing a port where we find that the USB device is not listed by lsusb, but we can see the related activity in the dmesg logs. However, in those cases we could see from the logs that either the device creation failed, or that it was automatically disconnected immediately after. But I don't see anything like that in your dmesg logs.

If you try running lsusb again, just the same as you did before, do you still not see a USB device for the Uno R3?

I plugged the Arduino into a different USB port on the laptop and then it connected.

I can't tell you why that is. :face_with_monocle:

Thanks for the support! especially that you introduced me to the lsusb and dsmg commands!

You are welcome. I'm glad you were able to find a solution. Thanks for taking the time to post an update!

Regards,
Per