Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
5
votes
0
answers
348
views
What does it mean to "cancel" a command in the linux kernel and how can one do so?
### Context I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by `lsusb` as `ID 33fa:0010 USB2.0-BT`, but is not detected by KDE/Plasma's bluetooth daemon. I dug deeper and found an [Ubuntu bug report][1] with the exact same problem and diagnosis as me. As of t...
### Context
I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by
lsusb
as ID 33fa:0010 USB2.0-BT
, but is not detected by KDE/Plasma's bluetooth daemon.
I dug deeper and found an Ubuntu bug report with the exact same problem and diagnosis as me. As of today, the last post links to an AskUbuntu post with a vexingly vague answer:
> I patch my kernel source to cancel command hci_read_local_ext_features
in the hci_init2[]
and hci_init3[]
in file hci_sync.c
. It worked.
So, I downloaded and unpacked the 6.15.7 kernel source from cdn.kernel.org , opened the corresponding file in Keta... and was lost like a lamb.
Question: What does it mean to "cancel" a command in the linux kernel and how can one do so?
Please, do tell me if my question is too vague or whether more information should be provided.
Seth Martin
(51 rep)
Jul 26, 2025, 02:21 AM
• Last activity: Jul 27, 2025, 01:45 AM
0
votes
0
answers
21
views
Linux and diy connection to DAC
I’ve wanted to connect a raspberry pi to a DAC for a while. I just bought a fosi k5 DAC which has USB, optical and coax inputs. But what’s the protocol that USB would stream the data in? How do you just start sending data down a USB? I imagine pulsing the gpio pins is probably not that difficult, bu...
I’ve wanted to connect a raspberry pi to a DAC for a while. I just bought a fosi k5 DAC which has USB, optical and coax inputs. But what’s the protocol that USB would stream the data in? How do you just start sending data down a USB?
I imagine pulsing the gpio pins is probably not that difficult, but I’d rather just USB.
1toneboy
(465 rep)
Jul 26, 2025, 03:55 AM
• Last activity: Jul 26, 2025, 12:11 PM
12
votes
1
answers
1003
views
How to force drives to be on a predictable device name
I have a computer, running Debian 12, that is equipped with 2 RDX (from dead Tandberg / Overland company) cartridge drives. One is an internal SATA, and one is an external USB. They are cartridge drives. That means that they can be without a cartridge inserted. Maybe because of that, the drives are...
I have a computer, running Debian 12, that is equipped with 2 RDX (from dead Tandberg / Overland company) cartridge drives. One is an internal SATA, and one is an external USB.
They are cartridge drives. That means that they can be without a cartridge inserted. Maybe because of that, the drives are not always assigned to the same device node.
For example, if both have a cartridge, the SATA one is on sdb, and the second on sdc. If the SATA is empty and I reboot, the drive will be sdb and the SATA on sdc. The device have been swapped. I want to be sure they will always be at the same device, regardless of the fact they have a drive inserted or not.
I guess I need to write a custom udev rule, but I am not sure on how to do so. I already have a udev rule to make it execute some action on drive cartridge insertion:
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ATTRS{vendor}=="TANDBERG", ACTION=="add", RUN+="/bin/systemctl start rdx_mount@%k.service"
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="scsi", ATTRS{vendor}=="TANDBERG", ACTION=="add", RUN+="/bin/systemctl start rdx_mount@%k.service"
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ATTRS{vendor}=="TANDBERG", ACTION=="remove", RUN+="/bin/systemctl stop rdx_mount@%k.service"
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="scsi", ATTRS{vendor}=="TANDBERG", ACTION=="remove", RUN+="/bin/systemctl stop rdx_mount@%k.service"
Keeping these rules working, how can I force each drive on a predictable device?
iXô
(327 rep)
Jul 19, 2025, 07:40 PM
• Last activity: Jul 25, 2025, 12:59 PM
2
votes
3
answers
4486
views
Arduino: avrdude: ser_open(): can't open device "/dev/ttyACM1": Input/output error
I use arduino ide on arch linux with arduino uno connected via USB. I am sure that I choosed right port and board in ide menu. when I run `ls -l /dev/ttyACM*` I get: ``` crw-rw---- 1 root uucp 166, 0 14. dub 12.44 /dev/ttyACM0 crw-rw-rw- 1 root uucp 166, 1 14. dub 12.54 /dev/ttyACM1 ``` bu...
I use arduino ide on arch linux with arduino uno connected via USB.
I am sure that I choosed right port and board in ide menu.
when I run
ls -l /dev/ttyACM*
I get:
crw-rw---- 1 root uucp 166, 0 14. dub 12.44 /dev/ttyACM0
crw-rw-rw- 1 root uucp 166, 1 14. dub 12.54 /dev/ttyACM1
but when I click upload I get this error:
Sketch uses 440 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: Version 6.3, compiled on Jul 7 2020 at 19:38:43
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "//etc/avrdude.conf"
User configuration file is "/home/john/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM1
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "/dev/ttyACM1": Input/output error
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected
Error remains on newest linux kernel and LTS.
---
My device is Lenovo thinkpad X390: Linux 5.11.14-arch1-1
---
When I plug arduino to usb and then run sudo dmesg
I get this messages:
[ 1605.378324] usb 1-4: new full-speed USB device number 14 using xhci_hcd
[ 1605.520509] usb 1-4: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[ 1605.520517] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1605.520521] usb 1-4: Manufacturer: Arduino (www.arduino.cc)
[ 1605.520523] usb 1-4: SerialNumber: 7583434383935150E152
[ 1605.523881] cdc_acm 1-4:1.0: ttyACM1: USB ACM device
[ 1630.618749] usb 1-9: reset full-speed USB device number 10 using xhci_hcd
[ 1630.792727] audit: type=1130 audit(1618567069.016:82): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1632.601215] audit: type=1100 audit(1618567070.822:83): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:authentication grantors=? acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=failed'
[ 1635.720577] audit: type=1100 audit(1618567073.942:84): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.721507] audit: type=1101 audit(1618567073.942:85): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.722751] audit: type=1110 audit(1618567073.946:86): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.727018] audit: type=1105 audit(1618567073.949:87): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
---
How can I fix this ?
Thank you for help
**PS:** If you need any more information, comment below and I will add it soon as possible.
Jan Černý
(1723 rep)
Apr 14, 2021, 11:16 AM
• Last activity: Jul 24, 2025, 06:28 PM
1
votes
1
answers
2873
views
Why is my external SSD not recognized?
Okay so. I am running Manjaro on my [Lenovo Ideapad 300-15IBR][1] and I bought an external SSD. When I plug it in to the laptop, it works; I can read and write files on it, on USB 3.0 and USB 2.0. Problem is when I try to boot from it. It is not recognized in BIOS nor Boot Menu when I plug it in USB...
Okay so. I am running Manjaro on my Lenovo Ideapad 300-15IBR and I bought an external SSD.
When I plug it in to the laptop, it works; I can read and write files on it, on USB 3.0 and USB 2.0.
Problem is when I try to boot from it. It is not recognized in BIOS nor Boot Menu when I plug it in USB 3.0, but it works in 2.0 BIOS recognize it.
Any idea what could be the problem?
Thank you
**EDIT**
Command:
cat /proc/cpuinfo | sudo grep "model name" && sudo lshw | sudo grep -A5 "Moth" && sudo lshw | sudo grep product | sudo head -n1
Output":
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
description: Motherboard
product: Paris G 5A6
vendor: LENOVO
physical id: 0
version: NO DPK
serial: PF0HH105
product: 80M3 (LENOVO_MT_80M3_BU_idea_FM_Lenovo ideapad 300-15IBR)
SSD is Western Digital's My-Passport of 256GB.
**UPDATE 2**
I made it work. I just used another USB cable for it and it was present in BIOS and Boot Menu. But now I am facing another problem.
I have Parrot OS on this external SSD. It boots up. Presents Parrot's loading screen and then I get 3 messages
[5.797031] scsi 2:0:0:1: Wrong diagnostic page: asked for 1 got 0
[5.797374] scsi 2:0:0:1: Failed to get diagnostic page 0x1
[5.797424] scsi 2:0:0:1: Failed to bind enclosure -19
After this I get only black screen and nothing else.
Mileta Dulovic
(111 rep)
Aug 6, 2019, 07:51 PM
• Last activity: Jul 22, 2025, 08:10 AM
0
votes
1
answers
2898
views
QMK Bootloader not found
I'm trying to flash my DZ60RGB V2 keyboard on Arch Linux. I installed [qmk][1] package setup qmk_toolbox using qmk setup command. In the process it warned me about missing udev rules which I added when setting up ⚠ Missing or outdated udev rules for 'atmel-dfu' boards. Run 'sudo cp /home/s1n7ax/qmk_...
I'm trying to flash my DZ60RGB V2 keyboard on Arch Linux. I installed qmk package setup qmk_toolbox using qmk setup command.
In the process it warned me about missing udev rules which I added when setting up
⚠ Missing or outdated udev rules for 'atmel-dfu' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'kiibohd' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'stm32' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'bootloadhid' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'usbasploader' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'massdrop' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'caterina' boards. Run 'sudo cp /home/s1n7ax/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
After that compiled default keymap successfully and flashed while in the Bootloader mode.
$ qmk compile -kb dztech/dz60rgb/v2 -km default
$ qmk flash -kb dztech/dz60rgb/v2 -km default
QMK Firmware 0.13.34
Making dztech/dz60rgb/v2 with keymap default and target flash
avr-gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
text data bss dec hex filename
0 26626 0 26626 6802 .build/dztech_dz60rgb_v2_default.hex
Copying dztech_dz60rgb_v2_default.hex to qmk_firmware folder [OK]
Checking file size of dztech_dz60rgb_v2_default.hex [OK]
* The firmware size is fine - 26626/28672 (92%, 2046 bytes free)
Bootloader not found. Trying again every 0.5s (Ctrl+C to cancel).....^Cmake[1] : *** [tmk_core/avr.mk:331: flash] Interrupt
I also tried to erase through dfu-programmer which failed again.
$ dfu-programmer atmega32u4 erase
dfu-programmer: no device present.
I tried using sudo but the result was the same. I tried the same thing on Ubuntu 21.04 which result in the same error. How ever via identifies the keyboard as DZ60RGB V2 and I can make key changes fine.
Edit:
lsusb identifies the keyboard as followr
Bus 001 Device 010: ID 445a:1121 DZTECH DZ60RGB
When it is connected in Bootloader mode, the device is is shown as follows.
Bus 001 Device 011: ID 03eb:2045 Atmel Corp. LUFA Mass Storage Demo Application
s1n7ax
(437 rep)
Aug 12, 2021, 04:17 AM
• Last activity: Jul 21, 2025, 11:00 PM
12
votes
3
answers
9204
views
USB ports keep resetting on Linux
**Problem** USB Ports (2.0) keep resetting causing connected peripherals to stop working after some time. **Hardware** Motherboard: ASUS J1800I-C CPU: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz RAM: 4GB Number of units: > 100 devices working as payment kiosks, all showing same issue. **Connected USB de...
**Problem**
USB Ports (2.0) keep resetting causing connected peripherals to stop working after some time.
**Hardware**
Motherboard: ASUS J1800I-C
CPU: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz
RAM: 4GB
Number of units: > 100 devices working as payment kiosks, all showing same issue.
**Connected USB devices (lsusb)**
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 013: ID 0dd4:015d Custom Engineering SPA Bus 001 Device 012: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard Bus 001 Device 011: ID 23d8:0285 Bus 001 Device 010: ID 1ff7:0013 CVT Electronics.Co.,Ltd CVTouch Screen (HID) Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. 4-port hub Bus 001 Device 002: ID 0e8f:0022 GreenAsia Inc. multimedia keyboard controller Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
**OSs reproducing the problem:**
Ubuntu 14.04-server (64bit)
Ubuntu 16.04-server (64bit)
Ubuntu 18.04-server (64bit)
Tried the above OSs with both UEFI & BIOS boot.
**OSs NOT producing any problem with the same hardware:
** Ubuntu 14.04 (server&desktop) (32bit)
Ubuntu 16.04-server (32bit)
Windows 7
**What is happening ?**
On startup, all goes well and USB devices are working for 15~60 minutes. After this time, one or more ports will start resetting with errors coming in dmesg:
I tried to disable autosuspend for USB ports by adding linux kernel cmdline: usbcore.autosuspend=-1 among many other options and they all failed.
I also tried to change multiple BIOS options related to USB, nothing helped.
**Useful Facts:**
- All USB 2.0 4-ports are causing the problem.
- The board has single USB 3.0 port which seems unaffected by the problem.
- Using powered USB hub connected to the USB3 port, then connecting all USB devices to it seems to solve the problem.
- Using 32bit version of the same OS seems to solve the USB problem. Tested some kiosks with 32bit installation for 3 days uptime and there were no single dmesg warning or error.
**Question:**
How can I solve this problem on my 64bit Ubuntu 16.04 ?
Converting to 32bit is an unrealistic solution for me as it requires the reinstallation of over 100 devices. Besides, some of my equipment comes with 64bit proprietary SDK.
**Update 1:**
Archlinux 64bit seems to work fine with the same hardware.
USB Ports (2.0) keep resetting causing connected peripherals to stop working after some time.
**Hardware**
Motherboard: ASUS J1800I-C
CPU: Intel(R) Celeron(R) CPU J1800 @ 2.41GHz
RAM: 4GB
Number of units: > 100 devices working as payment kiosks, all showing same issue.
**Connected USB devices (lsusb)**
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 013: ID 0dd4:015d Custom Engineering SPA Bus 001 Device 012: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard Bus 001 Device 011: ID 23d8:0285 Bus 001 Device 010: ID 1ff7:0013 CVT Electronics.Co.,Ltd CVTouch Screen (HID) Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. 4-port hub Bus 001 Device 002: ID 0e8f:0022 GreenAsia Inc. multimedia keyboard controller Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
**OSs reproducing the problem:**
Ubuntu 14.04-server (64bit)
Ubuntu 16.04-server (64bit)
Ubuntu 18.04-server (64bit)
Tried the above OSs with both UEFI & BIOS boot.
**OSs NOT producing any problem with the same hardware:
** Ubuntu 14.04 (server&desktop) (32bit)
Ubuntu 16.04-server (32bit)
Windows 7
**What is happening ?**
On startup, all goes well and USB devices are working for 15~60 minutes. After this time, one or more ports will start resetting with errors coming in dmesg:
[ 1484.129248] perf interrupt took too long (2520 > 2500), lowering kernel.perf_event_max_sample_rate to 50000 [ 2645.972003] usb 1-4-port1: cannot reset (err = -71) [ 2646.236044] usb 1-4.1: reset full-speed USB device number 4 using xhci_hcd [ 2646.324439] usb 1-4.1: ep 0x1 - rounding interval to 64 microframes, ep desc says 80 microframes [ 2647.558156] usb 1-4.1: reset full-speed USB device number 4 using xhci_hcd [ 2647.646546] usb 1-4.1: ep 0x1 - rounding interval to 64 microframes, ep desc says 80 microframes [ 3942.619669] usb 1-4-port1: cannot reset (err = -71) [ 3942.619742] usb 1-4-port1: cannot reset (err = -71) [ 3942.619821] usb 1-4-port1: cannot reset (err = -71) [ 3942.619861] usb 1-4-port1: cannot reset (err = -71) [ 3942.619901] usb 1-4-port1: cannot reset (err = -71) [ 3942.619905] usb 1-4-port1: Cannot enable. Maybe the USB cable is bad? [ 3942.690031] usb 1-4.1: reset full-speed USB device number 4 using xhci_hcd [ 3942.690038] usb 1-4.1: hub failed to enable device, error -22 [ 3942.762176] usb 1-4.1: reset full-speed USB device number 4 using xhci_hcd [ 3943.170800] usb 1-4.1: device not accepting address 4, error -22 [ 3943.242967] usb 1-4.1: reset full-speed USB device number 4 using xhci_hcd [ 3943.651734] usb 1-4.1: device not accepting address 4, error -22 [ 3943.653063] usb 1-4.1: USB disconnect, device number 4 [ 3943.751603] usb 1-4.1: new full-speed USB device number 8 using xhci_hcd [ 3943.840892] usb 1-4.1: New USB device found, idVendor=1ff7, idProduct=0013 [ 3943.840899] usb 1-4.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3943.841068] usb 1-4.1: ep 0x1 - rounding interval to 64 microframes, ep desc says 80 microframes [ 3943.850194] input: HID 1ff7:0013 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1:1.0/0003:1FF7:0013.0005/input/input11 [ 3943.850467] hid-multitouch 0003:1FF7:0013.0005: input,hiddev0,hidraw3: USB HID v1.11 Mouse [HID 1ff7:0013] on usb-0000:00:14.0-4.1/input0 [ 4215.269989] usb 1-4-port1: cannot reset (err = -71) [ 4215.270192] usb 1-4-port1: cannot reset (err = -71) [ 4215.270264] usb 1-4-port1: cannot reset (err = -71) [ 4215.270343] usb 1-4-port1: cannot reset (err = -71) [ 4215.270383] usb 1-4-port1: cannot reset (err = -71) [ 4215.270386] usb 1-4-port1: Cannot enable. Maybe the USB cable is bad? [ 4215.342214] usb 1-4.1: reset full-speed USB device number 8 using xhci_hcd [ 4215.342221] usb 1-4.1: hub failed to enable device, error -22 [ 4215.358192] hub 1-4:1.0: hub_ext_port_status failed (err = -71) [ 4215.358263] usb 1-4-port1: cannot reset (err = -71) [ 4215.622566] usb 1-4.1: reset full-speed USB device number 8 using xhci_hcd [ 4215.755250] usb usb1-port4: disabled by hub (EMI?), re-enabling... [ 4215.755273] usb 1-4: USB disconnect, device number 3 [ 4215.755277] usb 1-4.1: USB disconnect, device number 0 [ 4216.031181] usb 1-4.1: device not accepting address 8, error -22 [ 4216.064588] usb 1-4.2: USB disconnect, device number 5 [ 4216.065324] usb 1-4.3: USB disconnect, device number 6 [ 4216.065632] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 [ 4216.065647] option 1-4.3:1.0: device disconnected [ 4216.065760] huawei_cdc_ncm 1-4.3:1.1 wwx001e101f0000: unregister 'huawei_cdc_ncm' usb-0000:00:14.0-4.3, Huawei CDC NCM device [ 4216.079590] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [ 4216.079611] option 1-4.3:1.2: device disconnected [ 4216.079752] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 [ 4216.079768] option 1-4.3:1.3: device disconnected [ 4216.148026] usb 1-4.4: USB disconnect, device number 7 [ 4216.148183] usblp2: removed [ 4216.387741] usb 1-4: new high-speed USB device number 9 using xhci_hcd [ 4216.517658] usb 1-4: New USB device found, idVendor=05e3, idProduct=0610 [ 4216.517666] usb 1-4: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 4216.517670] usb 1-4: Product: USB2.0 Hub [ 4216.518341] hub 1-4:1.0: USB hub found [ 4216.518643] hub 1-4:1.0: 4 ports detected [ 4216.792385] usb 1-4.1: new full-speed USB device number 10 using xhci_hcd [ 4216.885849] usb 1-4.1: New USB device found, idVendor=1ff7, idProduct=0013 [ 4216.885855] usb 1-4.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 4216.886042] usb 1-4.1: ep 0x1 - rounding interval to 64 microframes, ep desc says 80 microframes [ 4216.895096] input: HID 1ff7:0013 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1:1.0/0003:1FF7:0013.0006/input/input13 [ 4216.951230] hid-multitouch 0003:1FF7:0013.0006: input,hiddev0,hidraw2: USB HID v1.11 Mouse [HID 1ff7:0013] on usb-0000:00:14.0-4.1/input0**Things I tried and did NOT solve the problem:**
I tried to disable autosuspend for USB ports by adding linux kernel cmdline: usbcore.autosuspend=-1 among many other options and they all failed.
I also tried to change multiple BIOS options related to USB, nothing helped.
**Useful Facts:**
- All USB 2.0 4-ports are causing the problem.
- The board has single USB 3.0 port which seems unaffected by the problem.
- Using powered USB hub connected to the USB3 port, then connecting all USB devices to it seems to solve the problem.
- Using 32bit version of the same OS seems to solve the USB problem. Tested some kiosks with 32bit installation for 3 days uptime and there were no single dmesg warning or error.
**Question:**
How can I solve this problem on my 64bit Ubuntu 16.04 ?
Converting to 32bit is an unrealistic solution for me as it requires the reinstallation of over 100 devices. Besides, some of my equipment comes with 64bit proprietary SDK.
**Update 1:**
Archlinux 64bit seems to work fine with the same hardware.
Hasan
(221 rep)
Apr 3, 2018, 08:27 AM
• Last activity: Jul 18, 2025, 05:08 PM
0
votes
1
answers
2289
views
QEMU/KVM: USB3 passthrough to FreeBSD
I'm making my first steps in FreeBSD, so please excuse any possible "linuxism". My goal is to run FreeBSD 10.2 inside virtual machine with QEMU/KVM and allow USB3 network card passthrough from the host to make it the only available WAN interface. To start QEMU/KVM I run the following: kvm -m 4096 \...
I'm making my first steps in FreeBSD, so please excuse any possible "linuxism".
My goal is to run FreeBSD 10.2 inside virtual machine with QEMU/KVM and allow USB3 network card passthrough from the host to make it the only available WAN interface.
To start QEMU/KVM I run the following:
kvm -m 4096 \
-snapshot \
-hda /path/to/the/image \
-device nec-usb-xhci,id=xhci,addr=0x5 \
-device usb-host,bus=xhci.0,vendorid=0x0b95,productid=0x1790 \
-net none
This is running fine, if I'm trying to start Ubuntu 16.04. The interface is up, shows up in
lsusb
and the address is assigned by DHCP.
I'm also able to run the very same FreeBSD image with VirtualBox: the card is recognised (as it's supported by FreeBSD) and I see:
pciconf -lv
#skipped
xhci0@pci0:0:12:0: class=0x0c0330 card=0x00000000 chip=0x1e318086 rev=0x00 hdr=0x00
vendor = 'Intel Corporation'
device = '7 Series/C210 Series Chipset Family USB xHCI Host Controller'
class = serial bus
subclass = USB
When running QEMU monitor, info usb
returns (no surprise) the same entry for the network card, both for Ubuntu and FreeBSD.
The only way of adding XHCI controller in QEMU I found is to specify nec-usb-xhci, so far this is the only difference between VirtualBox and QEMU I see.
Is there a way to make this USB3 passthrough to FreeBSD possible with QEMU?
Piohen
(101 rep)
Jul 11, 2016, 02:02 PM
• Last activity: Jul 17, 2025, 11:05 AM
0
votes
1
answers
2834
views
Can’t see files on an USB stick attached to a Raspberry PI 2
I have formated an USB stick from my Raspberry in `VFAT` and use it with Syncthing which works fine (dropping files from Windows 10, store them on the stick and access them on an Android Tablet). But when on my RPI and trying to store files from it to the USB stick, I don’t see any file or directory...
I have formated an USB stick from my Raspberry in
VFAT
and use it with Syncthing which works fine (dropping files from Windows 10, store them on the stick and access them on an Android Tablet).
But when on my RPI and trying to store files from it to the USB stick, I don’t see any file or directory.
Just prints System Volume Information
.
What have I done wrong?
Roland
(11 rep)
Jul 24, 2016, 01:25 PM
• Last activity: Jul 16, 2025, 09:04 AM
0
votes
1
answers
2693
views
I can't boot from USB in grub
I'm new to using Linux and I tried googling an answer but I didn't understand the instructions. I installed Lubuntu but I must've messed up somewhere because my computer goes directly to GRUB. After pressing tab and trying a bunch of commands, I was finally about to load the BIOS thing in order to h...
I'm new to using Linux and I tried googling an answer but I didn't understand the instructions. I installed Lubuntu but I must've messed up somewhere because my computer goes directly to GRUB.
After pressing tab and trying a bunch of commands, I was finally about to load the BIOS thing in order to have it boot USB first. For some reason, I can't boot the USB and nothing happens when I click F12 and choose SanDisk from the boot menu. The ISO is for CloudReady if that helps. I read online about booting from within GRUB but it tells me I have to do something with the kernel first. I think the file is startup.nsh since that's the only file I could find while checking each hd. It would be much appreciated if someone could help me with easy instructions since I've searched for hours and tried everything I could find but I didn't understand how to do it properly.
Sorry if I wasn't clear so I'll try to list what I did.
- I have an old Gateway computer sx2110g with Windows 10 installed. Windows was slow so I wanted to try a version of Linux.
- I tried installing Lubuntu but I must've messed up because my computer only boots in GRUB.
- After looking online i found that typing
fwsetup
on Grub let's me restart into the BIOS.
- I wanted to install a different OS so I set "removable device" to boot first.
- When I restart it only says "_boot loader not found_" then immediately goes to Grub.
- I tried f12 to manually choose the USB drive but the same thing happens and it immediately goes to Grub.
My question is that if there's a way to boot a USB from within Grub since that's the only thing that's opening for me on the computer. I tried these instructions:
https://szymonkrajewski.pl/how-to-boot-system-from-usb-using-grub/
I was able to figure out which drive is the USB by typing "ls" and searching each drive but I don't know how to boot startup.nsh
.
Jak
(1 rep)
May 7, 2021, 04:53 AM
• Last activity: Jul 15, 2025, 10:08 PM
30
votes
5
answers
39718
views
Unable to use USB dongle based on USB-serial converter chip
I have a USB Zigbee dongle, but I'm unable to connect to it. It briefly shows up in `/dev/ttyUSB0`, but then quickly disappears. I see the following output in the console: ```console $ dmesg --follow ... [ 738.365561] usb 1-10: new full-speed USB device number 8 using xhci_hcd [ 738.607730] usb 1-10...
I have a USB Zigbee dongle, but I'm unable to connect to it. It briefly shows up in
/dev/ttyUSB0
, but then quickly disappears. I see the following output in the console:
$ dmesg --follow
...
[ 738.365561] usb 1-10: new full-speed USB device number 8 using xhci_hcd
[ 738.607730] usb 1-10: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 738.607737] usb 1-10: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 738.607739] usb 1-10: Product: USB Serial
[ 738.619446] ch341 1-10:1.0: ch341-uart converter detected
[ 738.633501] usb 1-10: ch341-uart converter now attached to ttyUSB0
[ 738.732348] audit: type=1130 audit(1632606446.974:2212): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=brltty-device@sys-devices-pci0000:00-0000:00:01.3-0000:03:00.0-usb1-1\x2d10 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 738.768081] audit: type=1130 audit(1632606447.007:2213): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=brltty@-sys-devices-pci0000:00-0000:00:01.3-0000:03:00.0-usb1-1\x2d10 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 738.776433] usb 1-10: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 738.783508] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 738.783521] ch341 1-10:1.0: device disconnected
[ 739.955783] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input35
...
flaviut
(974 rep)
Sep 25, 2021, 10:01 PM
• Last activity: Jul 15, 2025, 05:54 PM
1
votes
1
answers
4898
views
How to install DisplayLink driver on LinuxMint 17.3
I have a USB 3.0 docking station connected with my laptop having LinuxMint 17.3. I can't manage to install DisplayLink driver on it. I could make it work with Ubuntu 15.04, but with LinuxMint it wan't recognize external monitor, even though there is no error message during the install procedure. I t...
I have a USB 3.0 docking station connected with my laptop having LinuxMint 17.3. I can't manage to install DisplayLink driver on it. I could make it work with Ubuntu 15.04, but with LinuxMint it wan't recognize external monitor, even though there is no error message during the install procedure.
I tried to follow some proposal on DisplayLink forum , and I tried to modify installation file so SYSTEMINITDAEMON had systemd or upstart values, but none of these worked.
Since I already found some posts reported it worked for LinuxMint 17.2, I guess it's possible, but I couldn't find exact instructions if something else should be changed in installation script.
zoran jeremic
(111 rep)
Jan 22, 2016, 07:48 PM
• Last activity: Jul 14, 2025, 11:12 PM
1
votes
1
answers
3560
views
USB key not mounting at boot to unlock LUKS system
I am running Debian Jessie. I have 2 hard drives with my various partitions spread across both (not RAID). Both of them are separately LUKS encrypted, and LVMs sit upon both of those. My `/boot` partition is the only partition not included on the two hard drives; instead, it is located on an unencry...
I am running Debian Jessie. I have 2 hard drives with my various partitions spread across both (not RAID). Both of them are separately LUKS encrypted, and LVMs sit upon both of those. My
/boot
partition is the only partition not included on the two hard drives; instead, it is located on an unencrypted USB stick. On the /boot
partition is myKeyfile.key
which should unlock both of the hard drives [but doesn't]. My goal is to have fully inaccessible/useless disks whenever the system boots without the USB stick.
Here is what I have done to accomplish this. I used this answer on StackOverflow as a guide.
----------
/etc/default/cryptdisks
-
# Mountpoints to mount, before cryptsetup is invoked at initscripts. Takes
# mountpoints which are configured in /etc/fstab/ as arguments. Separate
# mountpoints by space.
# original: CRYPTDISKS_MOUNT=""
CRYPTDISKS_MOUNT=/boot
According to the comment, I just have to make sure I have the proper mountpoint name as described in fstab
. For completeness, here is the relevant line:
/etc/fstab
-
#
UUID= /boot ext4 defaults 0 2
----------
/etc/crypttab
-
sda1_crypt UUID= /boot/myKeyfile.key luks,keyscript=/bin/passphrase-from-usb
sda2_crypt UUID= /boot/myKeyfile.key luks,keyscript=/bin/passphrase-from-usb
I could specify the UUID of the USB drive (instead of /boot/myKeyfile.key
), but then I'm not sure how I would specify that myKeyfile.key
is the file I'm interested in.
/etc/initramfs-tools/hooks/passphrase-from-usb
-
#!/bin/sh
PREREQ=""
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
. "${CONFDIR}/initramfs.conf"
. /usr/share/initramfs-tools/hook-functions
copy_exec /bin/passphrase-from-usb /bin
/bin/passphrase-from-usb
-
#!/bin/sh
set -e
if ! [ -e "$CRYPTTAB_KEY" ]; then
echo "Waiting for USB stick to be recognized..." >&2
sleep 5
fi
if [ -e "$CRYPTTAB_KEY" ]; then
echo "Unlocking the disk $CRYPTTAB_SOURCE ($CRYPTTAB_NAME) from USB key" >&2
echo "Using $CRYPTTAB_KEY as the key source" >&2
dd if="$CRYPTTAB_KEY" bs=1 count=256 2>/dev/null
exit
else
echo "Can't find $CRYPTTAB_KEY; USB stick not present." >&2
fi
/lib/cryptsetup/askpass "Manually unlock the disk ($CRYPTTAB_NAME)\nEnter passphrase: "
----------
----------
This is what I am greeted with upon booting:
Loading, please wait...
Volume group "vg-root" not found
Skipping volume group vg-root
Unable to find LVM volume vg-root/lv-root
Volume group "vg-other" not found
Skipping volume group vg-other
Unable to find LVM volume vg-other/lv-swap
Waiting for USB stick to be recognized...
[ 3.159979] sd 7:0:0:0: [sdd] No Caching mode page found
[ 3.160152] sd 7:0:0:0: [sdd] Assuming drive cache: write through
Can't find /boot/myKeyfile.key; USB stick not present.
Manually unlock the disk (sda1_crypt)
Enter passphrase:
After I enter the passphrase, the same exchange happens for the second disk, sdb1_crypt
.
----------
I'm doing something wrong, but I'm not sure what. Since CRYPTDISKS_MOUNT
"specifies the mountpoints that are mounted before cryptdisks is invoked", I thought adding /boot
to it would make /boot
available before the unlocking procedure began. However, it does not appear to be mounted when /bin/passphrase-from-usb
runs.
I am sure that myKeyfile.key
is added as a LUKS key to both drives, and I have updated the initramfs
via update-initramfs -u
.
natedogg
(11 rep)
Oct 18, 2015, 09:49 PM
• Last activity: Jul 12, 2025, 11:02 PM
1
votes
2
answers
3000
views
New SSD USB drive: fdisk doesn't change partitions and mkfs doesn't change format
I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2 In the past I have used this exact product, but the 128GB version, formatted as FAT32 on my OSX machine, and the drive worked with no issues on the Pi. I'm using it...
I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2
In the past I have used this exact product, but the 128GB version, formatted as FAT32 on my OSX machine, and the drive worked with no issues on the Pi. I'm using it store the Bitcoin blockchain. Now that the blockchain is too big I'm trying to replace the drive with a 512GB drive, and I am having no luck getting this thing to work!
I first tried the OSX FAT32 format, but that didn't work. So I'm trying to format it with the Pi itself.
Starting off with
fdisk /dev/sda
as sudo su
with USB drive unmounted:
/dev/sda1 2 1000215215 1000215214 477G b W95 FAT32
Then I go through the process of [d]elete, [n]ew, [w]rite:
/dev/sda1 2048 1000215215 1000213168 477G 83 Linux
but even after a partprobe
AND a reboot, fdisk -l
still reports no change:
/dev/sda1 2 1000215215 1000215214 477G b W95 FAT32
... am I doing anything wrong up to this point? I also went forward with mfks.ext4 /dev/sda1
and still don't see anything changing (I can post those logs too...) And when I run fsck
it is a TOTAL BLOODBATH -- which is even more confusing! How can a freshly formatted, brand new file-system have so many errors? Stuff like this (selected examples out of hundreds):
Inode 138789 has a extra size (30700) which is invalid
Inode 138825 has a bad extended attribute block 17929510.
Inode 138877 has compression flag set on filesystem without compression support.
Inode 139153 has a extra size (6956) which is invalid
Finally, when I attach the drive my OSX machine I can format it and use it and it works FINE. So I think the drive is not defective.
pinhead
(73 rep)
Jan 17, 2017, 06:59 PM
• Last activity: Jul 10, 2025, 12:05 AM
20
votes
4
answers
27619
views
How to auto mount / permanently mount external devices on NixOS
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using `ntfs-3g` in `/mnt`. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that. In NixOS, how should one set up a...
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using
ntfs-3g
in /mnt
. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that.
In NixOS, how should one set up automounting of external partitions, preferably using configuration.nix
?
stefkin
(338 rep)
Jun 30, 2015, 06:50 PM
• Last activity: Jul 7, 2025, 01:56 PM
1
votes
0
answers
37
views
USB graphics tablet not registered, nothing reported by dmesg
I'm setting up a new laptop (an ASUS ProArt PX13 HN7306) with Arch Linux, to replace an ailing one (a nine-year old Dell Latitude). Everything has gone okay so far, except I cannot seem to figure out how to get the graphics tablet (a One By Wacom CTL-472) to work as it did on the old machine. The co...
I'm setting up a new laptop (an ASUS ProArt PX13 HN7306) with Arch Linux, to replace an ailing one (a nine-year old Dell Latitude). Everything has gone okay so far, except I cannot seem to figure out how to get the graphics tablet (a One By Wacom CTL-472) to work as it did on the old machine.
The computer doesn't seem to register the presence of the device at all when it is plugged in — the little indicator light on the tablet does not turn on, which presumably means that the tablet isn't getting powered. Neither
lsusb
nor dmesg
notice the device: it doesn't show up in the lsusb
listing, and dmesg
produces no additional output when it is plugged in/unplugged.
I would have been convinced it is a problem with the physical connector or devices if not for that
- the same tablet still works on the old machine, and
- the same physical USB port on the new machine is perfectly happy with e.g. an optical mouse, or storage devices.
What next steps could I take to possibly find out what the problem is here?
----------
In case it happens to contain any illuminating information, here is the dmesg
output from plugging in the mouse, and then removing after a few seconds, on both machines. On the old computer:
[ 128.707470] usb 1-3: new low-speed USB device number 5 using xhci_hcd
[ 129.099679] usb 1-3: New USB device found, idVendor=0000, idProduct=3825, bcdDevice= 1.00
[ 129.099706] usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 129.099718] usb 1-3: Product: USB OPTICAL MOUSE
[ 129.105914] input: USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:0000:3825.0003/input/input21
[ 129.106414] hid-generic 0003:0000:3825.0003: input,hidraw2: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:14.0-3/input0
[ 181.931837] usb 1-3: USB disconnect, device number 5
And on the new one:
[ 32.138174] usb 3-2: new low-speed USB device number 4 using xhci_hcd
[ 32.281060] usb 3-2: New USB device found, idVendor=0000, idProduct=3825, bcdDevice= 1.00
[ 32.281081] usb 3-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 32.281085] usb 3-2: Product: USB OPTICAL MOUSE
[ 32.299938] input: USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:08.3/0000:c7:00.0/usb3/3-2/3-2:1.0/0003:0000:3825.000A/input/input45
[ 32.300568] hid-generic 0003:0000:3825.000A: input,hidraw8: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:c7:00.0-2/input0
[ 54.571092] usb 3-2: USB disconnect, device number 4
Doing the same with the graphics tablet on the old computer, we see this:
[ 241.966795] usb 1-3: new full-speed USB device number 6 using xhci_hcd
[ 242.095536] usb 1-3: New USB device found, idVendor=056a, idProduct=037a, bcdDevice= 1.00
[ 242.095571] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 242.095583] usb 1-3: Product: CTL-472
[ 242.095593] usb 1-3: Manufacturer: Wacom Co.,Ltd.
[ 242.095602] usb 1-3: SerialNumber: 2EA00L1065465
[ 242.104736] input: Wacom Co.,Ltd. CTL-472 Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:056A:037A.0004/input/input22
[ 242.105236] hid-generic 0003:056A:037A.0004: input,hiddev96,hidraw2: USB HID v1.10 Mouse [Wacom Co.,Ltd. CTL-472] on usb-0000:00:14.0-3/input0
[ 242.107365] hid-generic 0003:056A:037A.0005: hiddev97,hidraw3: USB HID v1.10 Device [Wacom Co.,Ltd. CTL-472] on usb-0000:00:14.0-3/input1
[ 242.185292] wacom 0003:056A:037A.0004: hidraw2: USB HID v1.10 Mouse [Wacom Co.,Ltd. CTL-472] on usb-0000:00:14.0-3/input0
[ 242.185350] input: Wacom One by Wacom S Pen as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:056A:037A.0004/input/input24
[ 247.945002] usb 1-3: USB disconnect, device number 6
And on the new one there is nothing at all.
jl2
(111 rep)
Jul 5, 2025, 06:18 PM
0
votes
1
answers
58
views
How to write a folder on usb drive after I put .iso image on it?
I want to create a bootable USB and to put drivers folder beside my .iso image. Firstly, I wrote zeroes on my USB drive using this command: ```sudo dd if=/dev/zero of=/dev/sda bs=4096 conv=fsync oflag=direct status=progress```, got this output: ``` 1907201+0 records in 1907200+0 records out 78118912...
I want to create a bootable USB and to put drivers folder beside my .iso image. Firstly, I wrote zeroes on my USB drive using this command:
dd if=/dev/zero of=/dev/sda bs=4096 conv=fsync oflag=direct status=progress
, got this output:
1907201+0 records in
1907200+0 records out
7811891200 bytes (7.8 GB, 7.3 GiB) copied, 2188.11 s, 3.6 MB/s
then I unmounted and formatted it:
sudo umount /dev/sda
sudo mkfs.vfat /dev/sda
Then I created a partition on it using
, and got this output in
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 7.3G 0 disk
└─sda1 8:1 1 7.3G 0 part
Then I wrote an .iso file into my USB using dd bs=4M if=/home/alex/Downloads/Win10_22H2_EnglishInternational_x64v1.iso of=/dev/sda conv=fsync oflag=direct status=progress
command and got this output:
1462+1 records in
1462+1 records out
6135633920 bytes (6.1 GB, 5.7 GiB) copied, 1396.19 s, 4.4 MB/s
As I understood later,
command overwrites partition table, so now my partition is gone. I'm still need to put a folder with drivers on to my USB drive beside .iso
image. I don't know how to do it, because I can't copy my folder into USB drive, or create a new folder inside it. My partition
is disappeared, and when I try to mount
itself, it says "source write-protected, mounted read-only"
. I heard I can use
for this kind of things, but is there any other way? I don't know what to do now and where is the problem. Would be thankful for your help.
Bernadette
(13 rep)
Jul 2, 2025, 06:53 AM
• Last activity: Jul 2, 2025, 10:50 AM
5
votes
1
answers
2287
views
linux udev rule to load gadget module for client driver
I'm having a hard time automating loading a gadget module and bringing up the usb0 device as a eth interface. The interface in question is g_ether for a embedded Linux device and connecting to a PC. I imagine there is a way to see the event from the plugin and run a script with udev. When I plug my...
I'm having a hard time automating loading a gadget module and bringing up the usb0 device as a eth interface. The interface in question is g_ether for a embedded Linux device and connecting to a PC.
I imagine there is a way to see the event from the plugin and run a script with udev. When I plug my device into a PC, I don't see any events. I tried different variations of udevadm monitor and I'm not sure how to find out what I can use as a udev rule to modprobe a gadget module.
Part of the reason I'm trying to load the otg module is because we are mostly using g_ether. I want to use avahi-autoipd but its getting an IP address before its plugged in. If I use allow-hotplug in the network interface it never automatically brings the interface up when its plugged in. So in theory, I want to plug in the device to a PC, run avahi-autoipd on the new network interface to retrieve an IP, and dhcpd to give one to the host.
Since someone else starting helping me in the stackoverflow (reposting here) I've got some more info.
/sys/bus/usb/devices$ ls
1-0:1.0 2-0:1.0 3-0:1.0 3-1 3-1:1.0 usb1 usb2 usb3
[ 4297.515400] g_ether gadget: high speed config #2: RNDIS
[ 4300.379021] g_ether gadget: high speed config #1: CDC Ethernet (ECM)
sys/bus/usb/devices$ ls
1-0:1.0 2-0:1.0 3-0:1.0 3-1 3-1:1.0 usb1 usb2 usb3
I've tried running
udevadm monitor --environment
udevadm monitor --environment --udev
udevadm monitor
udevadm monitor --kernel
udevadm monitor --kernel --udev
unplugging and plugging the device in doesn't show anything. The manpage says it "
Listens to the kernel uevents and events sent out by a udev rule" and I have no rules on my device. So I'm assuming that's probably why nothing prints out ever, even if I try to do some things with other hardware?
I'm running an embedded Linux distribution. I imagine I might not have everything a desktop has?
Its come to my attention I might have an issue with my g_ether module? These outputs never change.
cat /sys/class/net/usb0/carrier
cat: read error: Invalid argument
cat /sys/class/net/usb0/operstate
down
Kevin
(151 rep)
Apr 18, 2014, 09:14 PM
• Last activity: Jul 1, 2025, 10:02 PM
0
votes
0
answers
65
views
usbreset does not reset negotiated speed
I have Ubuntu 24+ (6.11.0-26-generic) installed on a PC with a Asus Prime Z690-P D4 motherboard, Intel CPU and so on. I have a WD MyBook 24 TB HDD USB which is always connected to the motherboard, by using the USB-C port. But I only power it on, by using the AC adapter, when I want to use it. The pr...
I have Ubuntu 24+ (6.11.0-26-generic) installed on a PC with a Asus Prime Z690-P D4 motherboard, Intel CPU and so on.
I have a WD MyBook 24 TB HDD USB which is always connected to the motherboard, by using the USB-C port. But I only power it on, by using the AC adapter, when I want to use it.
The problem starts here. Most of times, after plugging in the AC adapter, the WD USB/SATA converter negotiates a 480 Mbit/s speed. Calling the usbreset command does not make it to go to 5 Gbit/s.
In order to get the correct speed, I need to manually detach one end of the USB connector and attach it again.
Is there any other command which gets the job done?
I do not have this issue on another PC with a Asus WS motherboard (Intel 8th core gen), running Debian 12+.
Thanks in advance.
The console log:
REDACTED@REDACTED:~$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 001: Dev 008, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 002: Dev 002, If 0, Class=Vendor Specific Class, Driver=[none], 12M
|__ Port 002: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 012: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 002: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 013: Dev 005, If 0, Class=Hub, Driver=hub/4p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
REDACTED@REDACTED:~$ usbreset
Usage:
usbreset PPPP:VVVV - reset by product and vendor id
usbreset BBB/DDD - reset by bus and device number
usbreset "Product" - reset by product name
Devices:
Number 001/007 ID 045e:07f8 Wired Keyboard 600
Number 001/004 ID 1a40:0101 USB 2.0 Hub
Number 001/008 ID 1058:25ed My Book 25ED
Number 001/006 ID 1c4f:0051 Usb Mouse
Number 001/005 ID 058f:6254
Number 001/003 ID 062a:4101 2.4G Keyboard Mouse
Number 001/002 ID 0b05:19af AURA LED Controller
REDACTED@REDACTED:~$ sudo usbreset 001/008
Resetting My Book 25ED ... ok
REDACTED@REDACTED:~$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 001: Dev 008, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 002: Dev 002, If 0, Class=Vendor Specific Class, Driver=[none], 12M
|__ Port 002: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 012: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 002: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 013: Dev 005, If 0, Class=Hub, Driver=hub/4p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
REDACTED@REDACTED:~$ sudo usbreset
Usage:
usbreset PPPP:VVVV - reset by product and vendor id
usbreset BBB/DDD - reset by bus and device number
usbreset "Product" - reset by product name
Devices:
Number 001/007 ID 045e:07f8 Wired Keyboard 600
Number 001/004 ID 1a40:0101 USB 2.0 Hub
Number 001/008 ID 1058:25ed My Book 25ED
Number 001/006 ID 1c4f:0051 Usb Mouse
Number 001/005 ID 058f:6254
Number 001/003 ID 062a:4101 2.4G Keyboard Mouse
Number 001/002 ID 0b05:19af AURA LED Controller
REDACTED@REDACTED:~$ sudo usbreset 001/008
Resetting My Book 25ED ... ok
REDACTED@REDACTED:~$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 001: Dev 008, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 002: Dev 002, If 0, Class=Vendor Specific Class, Driver=[none], 12M
|__ Port 002: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 012: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 002: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 007, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 013: Dev 005, If 0, Class=Hub, Driver=hub/4p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
+++++++++++++++ detached USB cable and attached it again ++++++++++++++++++++++++++++++
REDACTED@REDACTED:~$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 002: Dev 002, If 0, Class=Vendor Specific Class, Driver=[none], 12M
|__ Port 002: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 011: Dev 003, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 012: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 002: Dev 009, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 010, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 003: Dev 010, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 013: Dev 005, If 0, Class=Hub, Driver=hub/4p, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
|__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
us3r
(3 rep)
Jun 30, 2025, 05:19 PM
2
votes
3
answers
2323
views
Send command to USB device (FingerPrint Scanner) with no driver for Linux
I am trying to create an application with remote controlling a [Fingerprint sensor][1] (Guide included on link) for enrolling and identifying fingerprints on are Raspberry PI 3 Model. There is a SDK_DEMO for this particular functionality on Windows only, which you can find in the Guile I mentioned a...
I am trying to create an application with remote controlling a Fingerprint sensor (Guide included on link) for enrolling and identifying fingerprints on are Raspberry PI 3 Model.
There is a SDK_DEMO for this particular functionality on Windows only, which you can find in the Guile I mentioned above.
- SDK_DEMO is written in C++ on Visual studio so I can't manipulate the code to run it on Raspberry Pi 3.
From the SDK_DEMO source code I figured out which command I need to send to execute tasks.
The Commands
CMD_NONE = 0x00,
CMD_OPEN = 0x01,
CMD_CLOSE = 0x02,
CMD_USB_INTERNAL_CHECK = 0x03,
CMD_CHANGE_BAUDRATE = 0x04,
CMD_MODULE_INFO = 0x06,
CMD_CMOS_LED = 0x12,
CMD_ENROLL_COUNT = 0x20,
CMD_CHECK_ENROLLED = 0x21,
CMD_ENROLL_START = 0x22,
CMD_ENROLL = 0x23,
CMD_ENROLL1 = 0x23,
CMD_ENROLL2 = 0x24,
CMD_ENROLL3 = 0x25,
CMD_IS_PRESS_FINGER = 0x26,
CMD_DELETE = 0x40,
CMD_DELETE_ALL = 0x41,
CMD_VERIFY = 0x50,
CMD_IDENTIFY = 0x51,
CMD_VERIFY_TEMPLATE = 0x52,
CMD_IDENTIFY_TEMPLATE = 0x53,
CMD_CAPTURE = 0x60,
CMD_GET_IMAGE = 0x62,
CMD_GET_RAWIMAGE = 0x63,
CMD_GET_TEMPLATE = 0x70,
CMD_ADD_TEMPLATE = 0x71,
CMD_GET_DATABASE_START = 0x72,
CMD_GET_DATABASE_END = 0x73,
CMD_FW_UPDATE = 0x80,
CMD_ISO_UPDATE = 0x81,
CMD_FAKE_DETECTOR = 0x91,
CMD_SET_SECURITY_LEVEL = 0xF0,
CMD_GET_SECURITY_LEVEL = 0xF1,
ACK_OK = 0x30,
NACK_INFO = 0x31,
SKD_DEMO recognised the FingerPrint sensor as Mass Storage and somehow was running the commands like that.
In Ubuntu though when I plug in the usb device I don't get any Mass storage mounting and on
I have be searching about this and tried to
echo "0x12" >> /dev/bus/usb/001/008
But I got a write error for invalid argument.
Here are the terminal commands for the echo attempt:
Is there a way I can send raw commands with this format and executing actions without needing to write a driver for this USB device on Linux?
lsusb
I get this:


Konstantinos Tsirakos
(21 rep)
Oct 19, 2018, 12:03 PM
• Last activity: Jun 30, 2025, 05:02 AM
Showing page 1 of 20 total questions