Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
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
0
votes
1
answers
41
views
USB mouse stopped working after plugging into a USB-C dock
So i bought an usb-c dock (jeswo), i plugged my usb mouse into that and it worked fine. I unplugged the dock, plugged into my steamdeck, played (worked fine) and then plugged back, my laptop did not recognize the mouse. (I tried every port on the dock and every port on my laptop). The led is working...
So i bought an usb-c dock (jeswo), i plugged my usb mouse into that and it worked fine.
I unplugged the dock, plugged into my steamdeck, played (worked fine) and then plugged back, my laptop did not recognize the mouse. (I tried every port on the dock and every port on my laptop).
The led is working, but no input whatsoever.
uname -r
6.6.90-1-MANJARO
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04f2:b604 Chicony Electronics Co., Ltd Integrated Camera (1280x720@30)
Bus 001 Device 004: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 016: ID 05e3:0618 Genesys Logic, Inc. Hub
Bus 001 Device 017: ID 05e3:0752 Genesys Logic, Inc. micros Reader
Bus 001 Device 018: ID 09da:9066 A4Tech Co., Ltd. F3 V-Track Gaming Mouse
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Synaptics TM3276-022 id=9 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
↳ ThinkPad Extra Buttons
Right after plugging in
sudo dmesg | tail -n 30
[ 8828.438612] usb 1-4.2: USB disconnect, device number 15
[ 8829.342636] usb 1-4: new high-speed USB device number 16 using xhci_hcd
[ 8829.484666] usb 1-4: New USB device found, idVendor=05e3, idProduct=0618, bcdDevice=87.54
[ 8829.484679] usb 1-4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 8829.484685] usb 1-4: Product: USB2.0 Hub
[ 8829.487760] hub 1-4:1.0: USB hub found
[ 8829.488026] hub 1-4:1.0: 4 ports detected
[ 8829.772224] usb 1-4.1: new high-speed USB device number 17 using xhci_hcd
[ 8829.865128] usb 1-4.1: New USB device found, idVendor=05e3, idProduct=0752, bcdDevice= 2.33
[ 8829.865137] usb 1-4.1: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[ 8829.865141] usb 1-4.1: Product: USB Storage
[ 8829.865144] usb 1-4.1: Manufacturer: Generic
[ 8829.866637] usb-storage 1-4.1:1.0: USB Mass Storage device detected
[ 8829.866824] scsi host0: usb-storage 1-4.1:1.0
[ 8829.941321] usb 1-4.2: new full-speed USB device number 18 using xhci_hcd
[ 8830.037359] usb 1-4.2: New USB device found, idVendor=09da, idProduct=9066, bcdDevice= 1.02
[ 8830.037367] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8830.037371] usb 1-4.2: Product: USB Device
[ 8830.037373] usb 1-4.2: Manufacturer: A4TECH
[ 8830.885752] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 0233 PQ: 0 ANSI: 0
[ 8830.886041] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 8830.886491] sd 0:0:0:0: [sda] Media removed, stopped polling
[ 8830.886886] sd 0:0:0:0: [sda] Attached SCSI removable disk
[10393.357050] perf: interrupt took too long (2501 > 2500), lowering kernel.perf_event_max_sample_rate to 79800
[10836.412493] usb 1-4.2: USB disconnect, device number 18
[10838.408776] usb 1-4.2: new full-speed USB device number 19 using xhci_hcd
[10838.503789] usb 1-4.2: New USB device found, idVendor=09da, idProduct=9066, bcdDevice= 1.02
[10838.503798] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[10838.503801] usb 1-4.2: Product: USB Device
[10838.503804] usb 1-4.2: Manufacturer: A4TECH
lsmod | grep hid
usbhid 86016 0
mac_hid 12288 0
usb-devices | grep -A 20 '09da'
P: Vendor=09da ProdID=9066 Rev=01.02
S: Manufacturer=A4TECH
S: Product=USB Device
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 12 Ivl=1ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=(none)
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
T: Bus=01 Lev=01 Prnt=19 Port=07 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=04f2 ProdID=b604 Rev=00.27
S: Manufacturer=Chicony Electronics Co.,Ltd.
S: Product=Integrated Camera
S: SerialNumber=0001
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=4ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
T: Bus=01 Lev=01 Prnt=03 Port=08 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
The mouse works just fine with the steamdeck and with other devices too.
I tried to use ChatGPT to solve the problem, but got into a loop and did not find any solution.
What info do you need?
AutisticAllosaurus
(65 rep)
Jun 2, 2025, 10:33 AM
• Last activity: Jun 22, 2025, 04:41 PM
2
votes
2
answers
2450
views
Why does my Windows 7 ISO file not boot when written to a USB stick?
I need to write a windows7 iso file on my usb stick. I had been used to this task. I usually either use the `dd` tool, or `unetbootin`. Surprisingly both don't work today. With `dd` I did the following : dd bs=4m if='windows7.iso' of=/dev/sdb My new supposedly bootable usb stick wont boot. Ok so I u...
I need to write a windows7 iso file on my usb stick.
I had been used to this task. I usually either use the
dd
tool, or unetbootin
. Surprisingly both don't work today.
With dd
I did the following :
dd bs=4m if='windows7.iso' of=/dev/sdb
My new supposedly bootable usb stick wont boot. Ok so I used unetbootin
. This time, I get the unetbootin
bootloader screen, but windows7 is not listed. Only the default choice is left.
In either way, I failed at creating my bootable stick. Few months ago, I could make this same USB stick boot with the very same ISO file. I also did the same tasks after formatting my stick withh this command:
mkfs.vfat -F 32 -I /dev/sdb
There were no difference as expected.
I am probably doing something wrong here, but I can't see where my mistake is.
Any idea on what is going on?
kaligne
(906 rep)
Apr 25, 2015, 05:30 PM
• Last activity: Jun 12, 2025, 10:47 PM
5
votes
1
answers
5368
views
How do you update the firmware on a USB device with a device firmware update (DFU) file from Linux?
I have a USB speaker (a [Jabra Speak 410][1]) which I need to update the firmware on. When I try to use `fwupdmgr` it sees the device, informs me of the _existing_ firmware version (1.9) but does not execute any updates: $ fwupdmgr get-devices Jabra SPEAK 410 USB DeviceId: 87caecc4e6db7e3c335deedfef...
I have a USB speaker (a Jabra Speak 410 ) which I need to update the firmware on. When I try to use
fwupdmgr
it sees the device, informs me of the _existing_ firmware version (1.9) but does not execute any updates:
$ fwupdmgr get-devices
Jabra SPEAK 410 USB
DeviceId: 87caecc4e6db7e3c335deedfef38666e7f279a03
Guid: 537f7800-8529-5656-b2fa-b0901fe91696
Guid: a607e767-5dfd-5f21-ac0f-c774dbd6fed5
Guid: 1764c519-4723-5514-baf9-3b42970de487
Plugin: dfu
Flags: updatable|registered
VendorId: USB:0x0B0E
Version: 1.9
Icon: drive-harddisk-usb
Created: 2018-09-12
$ fwupdmgr update
$
I verified that there is an update file available (version 1.12 ). When I download the update file (Jabra_SPEAK_410_USB-1-12-0.dfu
) and attempt to use it with fwupdmgr write
it doesn't seem to do anything.
Brian Redbeard
(3168 rep)
Sep 12, 2018, 07:54 PM
• Last activity: Jun 9, 2025, 10:32 AM
0
votes
0
answers
54
views
How do I debug USB device and determine what is causing errors?
I have two Ubuntu 22.04 systems. One is Intel the other Arm. I have them configured the same to interface to a QHYCCD camera. The device works flawlessly under Intel but is a mess under Arm. When attaching the device (USB3) the Intel systems recognizes it as a USB2 Cypress Westbridge device and a ud...
I have two Ubuntu 22.04 systems. One is Intel the other Arm.
I have them configured the same to interface to a QHYCCD camera.
The device works flawlessly under Intel but is a mess under Arm.
When attaching the device (USB3) the Intel systems recognizes it as a USB2 Cypress Westbridge device and a udev rule switches it to a USB3 QHYCCD camera.
This occurs on both Intel and Arm. On the Arm system for some reason it then drops back from a USB3 device to a USB2 device which renders it useless.
The dmesg output from both systems follows :
Arm system:
[ 3493.365288] usb 1-1.4: Product: WestBridge
[ 3493.365290] usb 1-1.4: Manufacturer: Cypress
[ 3493.365291] usb 1-1.4: SerialNumber: 0000000004BE
[ 3493.365668] usb 1-1.4: Unsupported device
[ 3493.507773] usb 1-1.4: USB disconnect, device number 37
[ 3493.664483] usb 2-1.4: new SuperSpeed USB device number 5 using xhci-hcd
[ 3493.684946] usb 2-1.4: LPM exit latency is zeroed, disabling LPM.
[ 3493.685658] usb 2-1.4: New USB device found, idVendor=1618, idProduct=0716
[ 3493.685661] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3493.685663] usb 2-1.4: Product: QHY715U3G20-20230106
[ 3493.685664] usb 2-1.4: Manufacturer: QHYCCD
[ 3493.689205] usb 2-1.4: Unsupported device
[ 3508.131437] usb 2-1.4: USB disconnect, device number 5
[ 3509.371808] usb 1-1.4: new high-speed USB device number 38 using xhci-hcd
[ 3510.907742] usb 1-1.4: new high-speed USB device number 39 using xhci-hcd
[ 3511.683398] usb 1-1.4: New USB device found, idVendor=1618, idProduct=0716
[ 3511.683401] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3511.683403] usb 1-1.4: Product: QHY715U3G20-20230106
[ 3511.683405] usb 1-1.4: Manufacturer: QHYCCD
[ 3511.683912] usb 1-1.4: Unsupported device
On the Arm system Bus 2 is USB3 and Bus 1 is USB2.
Intel System:
[ 672.660287] usb 3-2: new high-speed USB device number 15 using xhci_hcd
[ 672.789453] usb 3-2: New USB device found, idVendor=1618, idProduct=0715, bcdDevice= 1.00
[ 672.789477] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 672.789485] usb 3-2: Product: WestBridge
[ 672.789491] usb 3-2: Manufacturer: Cypress
[ 672.789495] usb 3-2: SerialNumber: 0000000004BE
[ 673.543763] usb 3-2: USB disconnect, device number 15
[ 673.806497] usb 4-2: new SuperSpeed USB device number 2 using xhci_hcd
[ 673.820635] usb 4-2: LPM exit latency is zeroed, disabling LPM.
[ 673.822660] usb 4-2: New USB device found, idVendor=1618, idProduct=0716, bcdDevice= 0.00
[ 673.822681] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 673.822689] usb 4-2: Product: QHY715U3G20-20230106
[ 673.822694] usb 4-2: Manufacturer: QHYCCD
On the Intel system bus 4 is USB3 and bus 3 is USB2.
On the Arm system there is an error "Unsupported device" reported (multiple times) and I am trying to determine where this is coming from or if this is red herring.
Do I have a missing kernel driver?
How do I approach this issue?
Update (further info as requested)
Here is a list of all the system I have tested this on:
Raspberry PI5
Distributor ID: Ubuntu
Description: Raspberry PI OS 64 bit
Release:
Codename: Bookworm
Kernel:
Raspberry PI5
Distributor ID: Ubuntu
Description: Armbian 25.2.4 noble
Release: 24.04
Codename: noble
Kernel: 6.12.22-current-bcm2711
Odroid N2
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Kernel: 4.9.337-38
Odroid N2
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble
Kernel: 6.6.77-130
Odroid N2
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Kernel: 6.12.22-current-meson64
Intel HP Laptop
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Kernel: 6.8.0-59-generic
The only systems the QHYCCD camera works properly on is the Intel laptop and the Raspberry PI with the official PI OS 64 bit.
WallyZ
(111 rep)
May 15, 2025, 05:18 AM
• Last activity: May 19, 2025, 01:25 AM
5
votes
1
answers
541
views
FreeBSD mixes names of similar USB to ethernet adapters
I have two Asix USB to ethernet adapters. The FreeBSD determines those as `ue1` and `ue2` adapters. The problem is, that on reboot, sometimes the interface `ue1` become `ue2` and viceversa, which pretty much screws my network configuration. The both adapters have the very similar MAC, and might be t...
I have two Asix USB to ethernet adapters. The FreeBSD determines those as
ue1
and ue2
adapters.
The problem is, that on reboot, sometimes the interface ue1
become ue2
and viceversa, which pretty much screws my network configuration.
The both adapters have the very similar MAC, and might be the issue when system tries to recognize it.
On the Linux systems, I previously sorted this out by setting static udev
rules by adapters mac address.
How I can achieve the similar in Freebsd? I know it is related to devd
but I'm not sure how to manage it, so the adapters get 'static' name.
usbconfig
ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
ugen0.5: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
usbconfig -d ugen0.5 dump_device_desc
ugen0.5: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001
iProduct = 0x0002
iSerialNumber = 0x0003
bNumConfigurations = 0x0001
ugen0.4: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (248mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x00ff
bDeviceSubClass = 0x00ff
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0b95
idProduct = 0x1790
bcdDevice = 0x0100
iManufacturer = 0x0001
iProduct = 0x0002
iSerialNumber = 0x0003
bNumConfigurations = 0x0001
fugitive
(1623 rep)
Jan 15, 2018, 02:26 PM
• Last activity: May 14, 2025, 10:41 AM
0
votes
1
answers
3301
views
Can't wipe partition table after messing with dd
Context: Today I was trying to figure out how to install NixOS live usb with a writeable filesystem (`dd`-ing the iso results in read-only iso9660 fs). I split my usb into two partitions, one empty and one formatted to ext4. I ran something like `dd if=(nixos image).iso of=/dev/sdb1`. Then I realize...
Context:
Today I was trying to figure out how to install NixOS live usb with a writeable filesystem (
The disk utility sees the second partition but is unable to remove it or to format the entire drive.
My windows machine doesn't see the pendrive at all.
I also have tried
dd
-ing the iso results in read-only iso9660 fs).
I split my usb into two partitions, one empty and one formatted to ext4. I ran something like dd if=(nixos image).iso of=/dev/sdb1
. Then I realized that it probably won't work so I opened gparted to delete everything and try something else.
This is where I noticed that something strange is happening: gparted said that my 32GB pendrive has only about 1,4GB (size of first partition). It seems that /dev/sdb
is the same thing as /dev/sdb1
now.


wipefs /dev/sdb
How can I bring my pendrive back to usable state?
**Update:**
The problem is gone after restarting (now i'm embarrassed that I didn't try this earlier). I can't find a way to reproduce it. One thing I forgot to mention is that I've also mounted the iso as a loop device but I later unmounted it. As you can see on the gnome-disks
screenshot a loop device was still there, but I'm not sure if it was pointing to the iso or to the first partition on pendrive. So perhaps the loop mount somehow interfered with accessing /dev/sdb
?
Just to clarify, I have tried zeroing the entire drive as well as just the first megabyte. This didn't work because /dev/sdb
was _not_ pointing to what it should(at least that's my interpretation).
anonymous-ish
(1 rep)
Jun 9, 2018, 09:00 PM
• Last activity: May 11, 2025, 07:03 AM
4
votes
1
answers
1990
views
lsusb shows USB devices that are not connected
I have the weird issue that lsusb shows USB devices that are not connected. We have a couple of devices connected via USB. To disconnect them from the system we disable the power to the USB port with a special hub-like device. Afterwards the devices are gone (you can see that on the device) but lsus...
I have the weird issue that lsusb shows USB devices that are not connected. We have a couple of devices connected via USB. To disconnect them from the system we disable the power to the USB port with a special hub-like device.
Afterwards the devices are gone (you can see that on the device) but lsusb still shows the old entries. What does this mean? Are there dangling and invalid handles to these devices left on the system/OS?
Stefan
(221 rep)
Jul 15, 2015, 12:10 PM
• Last activity: May 8, 2025, 09:04 AM
1
votes
1
answers
452
views
Use adb (android debug bridge) in systemd-nspawn container
I would like to use adb inside an systemd-nspawn container. Unfortunately I cannot access the phone inside the container (connected via USB). pi@debian-buster-64:~ $ export ADB_TRACE=usb pi@debian-buster-64:~ $ adb devices List of devices attached * daemon not running; starting now at tcp:5037 * dae...
I would like to use adb inside an systemd-nspawn container. Unfortunately I cannot access the phone inside the container (connected via USB).
pi@debian-buster-64:~ $ export ADB_TRACE=usb
pi@debian-buster-64:~ $ adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
pi@debian-buster-64:~ $
Here is the container setup /etc/systemd/nspawn/debian-buster-64.nspawn:
[Exec]
PrivateUsers=no
Capability=CAP_NET_ADMIN
[Files]
Bind=/home
Bind=/run/user:/run/host-user/
BindReadOnly=/etc/resolv.conf
[Network]
Private=no
VirtualEthernet=no
Here is the output from lsusb from inside the container:
pi@debian-buster-64:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 045e:07b2 Microsoft Corp. 2.4GHz Transceiver v8.0 used by mouse Wireless Desktop 900
Bus 001 Device 010: ID 18d1:4ee7 Google Inc.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Output of lsusb is identical to the output on the host and the phone (Google Inc.) is visible.
I want to use adb inside the container because the container is 64bit (host is only 32bit). Unfortunately, adb on 32bit has limitations. Access with adb works on the host (with said 32bit limitations). Any ideas how to get this working inside the container?
alex1452
(11 rep)
Dec 11, 2020, 04:49 AM
• Last activity: May 2, 2025, 12:03 PM
0
votes
1
answers
2903
views
Debian buster: package firmware-realtek installed, rtl8192eu wifi dongle USB adapter not showing up as network interface
I am trying to make a Wi-Fi USB adapter working, to no avail. The dongle is a TP-Link WN821N, which has a Realtek rtl8192eu chip. I cannot change it and will soon loose my wired connection due to choices of my employer. When inserted, I get the following output from `dmesg`: ``` [12881.857485] usb 1...
I am trying to make a Wi-Fi USB adapter working, to no avail. The dongle is a TP-Link WN821N, which has a Realtek rtl8192eu chip. I cannot change it and will soon loose my wired connection due to choices of my employer.
When inserted, I get the following output from
dmesg
:
[12881.857485] usb 1-1.6: new high-speed USB device number 7 using ehci-pci
[12881.970614] usb 1-1.6: New USB device found, idVendor=2357, idProduct=0107, bcdDevice= 2.00
[12881.970617] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12881.970618] usb 1-1.6: Product: 802.11n NIC
[12881.970619] usb 1-1.6: Manufacturer: Realtek
[12881.970620] usb 1-1.6: SerialNumber: 00e04c000001
and here is the relevant output of usb-devices
:
$ usb-devices|grep -C 4 Realtek
T: Bus=01 Lev=02 Prnt=02 Port=05 Cnt=03 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2357 ProdID=0107 Rev=02.00
S: Manufacturer=Realtek
S: Product=802.11n NIC
S: SerialNumber=00e04c000001
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
however there's no network interface coming up
$ lspci -knn |grep -i net -A2
00:19.0 Ethernet controller : Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
Subsystem: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:2008]
Kernel driver in use: e1000e
Kernel modules: e1000e
also, ip a
only shows the ethernet interface, and iw dev
has no output.
My uninformed guess is that the system cannot find a driver for this particular dongle. I do have the non-free firmware-realtek
package installed:
$ dpkg -l|grep realtek
ii firmware-realtek 20190114-2 all Binary firmware for Realtek wired/wifi/BT adapters
and there should be something related to rtl8192eu
inside:
$ dpkg -L firmware-realtek |grep rtl8192eu
/lib/firmware/rtl_bt/rtl8192eu_fw.bin
/lib/firmware/rtlwifi/rtl8192eu_nic.bin
/lib/firmware/rtlwifi/rtl8192eu_wowlan.bin
$ apt-cache show firmware-realtek|grep -i rtl8192eu
* Realtek RTL8192EU Bluetooth firmware (rtl_bt/rtl8192eu_fw.bin)
* Realtek RTl8192EU non-WoWLAN firmware (rtlwifi/rtl8192eu_nic.bin)
* Realtek RTl8192EU WoWLAN firmware (rtlwifi/rtl8192eu_wowlan.bin)
$ grep -r rtl8192eu /lib/modules/4.19.0-20-amd64/
Binary file /lib/modules/4.19.0-20-amd64/kernel/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko matches
however I do not have a module named rtl8192eu
:
$ sudo modprobe rtl8192eu
modprobe: FATAL: Module rtl8192eu not found in directory /lib/modules/4.19.0-20-amd64
and while I can load rtl8xxxu
instead, it still does not make any new interface appear,
both lspci
and ip a
keep showing only ethernet, and iw dev
shows nothing.
I am now faced with a hard choice: debug this, buy another dongle with my own money, or switch jobs.
- I strongly prefer a solution based on firmware-realtek
, or another maintained package, over compiling drivers from github.
- I am willing to upgrade to Debian 11 bullseye if needed, as I was planning to do that anyway.
- I wonder if there were some installation steps where I said that I will not ever need wifi.
Can you help?
ggll
(153 rep)
Jun 10, 2022, 01:23 PM
• Last activity: Apr 28, 2025, 06:04 PM
1
votes
1
answers
2577
views
Unable to playback captured audio using USB sound card
I am trying to capture and play audio using C program. For this I [got this tutorial.][1]. Here is the program which I am running:- /** * Jan Newmarch */ #define PERIOD_SIZE 1024 #define BUF_SIZE (PERIOD_SIZE * 2) #include #include #include void print_pcm_state(snd_pcm_t *handle, char *name) { switc...
I am trying to capture and play audio using C program. For this I [got this tutorial.]. Here is the program which I am running:-
/**
* Jan Newmarch
*/
#define PERIOD_SIZE 1024
#define BUF_SIZE (PERIOD_SIZE * 2)
#include
#include
#include
void print_pcm_state(snd_pcm_t *handle, char *name) {
switch (snd_pcm_state(handle)) {
case SND_PCM_STATE_OPEN:
printf("state open %s\n", name);
break;
case SND_PCM_STATE_SETUP:
printf("state setup %s\n", name);
break;
case SND_PCM_STATE_PREPARED:
printf("state prepare %s\n", name);
break;
case SND_PCM_STATE_RUNNING:
printf("state running %s\n", name);
break;
case SND_PCM_STATE_XRUN:
printf("state xrun %s\n", name);
break;
default:
printf("state other %s\n", name);
break;
}
}
int setparams(snd_pcm_t *handle, char *name) {
snd_pcm_hw_params_t *hw_params;
int err;
if ((err = snd_pcm_hw_params_malloc (&hw_params)) /etc/modprobe.d/alsa-base.conf
Here are the changes :-
I replace
options snd_usb_audio index=-2
options snd_hda_intel index=-1
with
options snd_usb_audio index=-1
options snd_hda_intel index=-2
And I replace
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-1
with
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-1
Now, when i run my code , I got this output:-
Rate for playback is 48000
period size now 1024
period size 1024
buffer size 2048
Rate for capture is 48000
cannot set channel count (Invalid argument)
So, can anyone tell me what else should I do to run my code using sound card.
Note:- I run command
aplay -l
and got this output:-
card 0: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC221 Analog [ALC221 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
tabish
(510 rep)
Apr 19, 2016, 09:07 AM
• Last activity: Apr 26, 2025, 09:02 AM
0
votes
1
answers
101
views
Questions on the 'evtest' command
I'm working on a project that aims to use a small (6-key keyboard) to control music played by `mpd` (and `mpc`) on a Raspberry Pi. Obviously I need to "capture" the keyboard inputs, and translate them into commands to `mpd`. I have no (zero) experience working with keyboards, but after some research...
I'm working on a project that aims to use a small (6-key keyboard) to control music played by
mpd
(and mpc
) on a Raspberry Pi. Obviously I need to "capture" the keyboard inputs, and translate them into commands to mpd
. I have no (zero) experience working with keyboards, but after some research and using [this Q&A as a starting point](https://unix.stackexchange.com/questions/428399/how-can-i-run-a-shell-script-on-input-device-event) I've now got a short working script that uses evtest
to monitor the keyboard output.
There is a statement on the [Debian website for the evtest
package](https://packages.debian.org/bookworm/evtest) that I want to ask about:
>evtest is now in maintenance mode and doesn't support all the features of the latest kernels; evemu-record from the evemu-tools package should be used instead.
I've also tried the evemu-record
command in my script; it seems to work very much the same as evtest
.
I have two questions: The first is whether or not the issues mentioned for evtest
are a real concern given the following:
* the target system is a headless Raspberry Pi ('bookworm', 64-bit)
* the keyboard has only 6 keys, and is connected via USB
I also have a question re this statement in man evtest
:
>If the --grab flag is given in capture mode, evtest keeps an EVIOCGRAB on the device. While this grab is active, other processes will not receive events from the kernel devices.
Does this mean that if my script is started @reboot
(cron
) the output of 6-key keyboard will never go to any other process? If so, this seems like "a good thing" to me, and a potential advantage over evemu-record
.
The second question is an "opinion question" I guess, but I'd like to know if there are real "compelling advantages" to writing this keyboard monitor in C
vs in bash
as I've done?
Seamus
(3772 rep)
Apr 14, 2025, 10:34 AM
• Last activity: Apr 14, 2025, 03:47 PM
2
votes
1
answers
4107
views
Udev does not always automatically bind the usbhid driver to my device
I have multiple sytems running Ubuntu 19.10. I have a USB HID device which can be detected by each of those systems and I am using the exact same udev rules file on all 3 of them (99-MyDevice.rules) : SUBSYSTEM=="usb",ATTRS{idVendor}=="XXXX",ATTRS{idProduct}=="YYYY",MODE="0660",GROUP="timothy",SYMLI...
I have multiple sytems running Ubuntu 19.10.
I have a USB HID device which can be detected by each of those systems
and I am using the exact same udev rules file on all 3 of them (99-MyDevice.rules) :
SUBSYSTEM=="usb",ATTRS{idVendor}=="XXXX",ATTRS{idProduct}=="YYYY",MODE="0660",GROUP="timothy",SYMLINK+="mydevice%n"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="timothy"
On all 3 sytems the device correctly shows up as /dev/mydevice...
Now when I execute
lsusb -t
it will output the following:
Port 4: Dev 3, If 1, Class=Human Interface Device, Driver=, 12M
Notice that the Driver
is empty, although sometimes, just every now and then,
it will actually load the driver (which is what I want) and output this:
Port 4: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
When the driver is loaded like this, the software can detect and use the device.
The problem is that the driver is almost never automatically loaded.
So far I've discovered two ways to load the driver manually (with mixed success):
**Method 1:**
I can manually assign/bind the driver using:
echo -n "4-3:1.0" > /sys/bus/usb/drivers/usbhid/bind
At which point lsusb -t
shows the driver is loaded
Port 4: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
And then I have to modify the acl
for /dev/mydevice... in order to use it.
Note that this method does not always work... feels like random at best.
**Method 2:**
Logically disconnect and reconnect the device to the computer.
(As opposed to physically disconnecting it). I do this by installing
VMWare and connecting the device to the guest system for a few seconds.
After the device is reconnected to the host, most of the times the driver is
bound automatically and the sofware can see/use the device.
(Note that using this method, I do not have to modify any acl
)
**Some notes:**
- If I use this device on a RaspberryPI with Raspbian I am not having this issue.
- I have multiple devices of the same type and the issue occurs for all of them.
- The issue does not occur on Windows
- The issue does not occur on Windows inside a VM on the Ubuntu systems
- The issue does not occur on MacOS
- As far as I remember it did not occur on older version of Ubuntu either (not entirely sure)
- The device itself is based on STM32F4.
Any idea how I can force the usbhid
driver to be bound every time?
**Update:**
It turns out that if, after physically connecting the device I run
the following command, the usbhid
driver is correctly bound every time.
sudo rmmod usbhid && sudo modprobe usbhid
Note that I really have to use rmmod
first,
simply running modprobe
does NOT solve the issue.
So:
1. Physically connect: Driver=, 12MB
2. Run the command above: Driver=usbhid, 12MB
According to this Source *the driver itself chooses what devices it supports.*
So I am guessing the command causes the usbhid
driver to re-evaluate
whether or not it can handle the device.
Now I still need to figure out how to automate it.
TimothyP
(121 rep)
Feb 19, 2020, 04:52 AM
• Last activity: Apr 14, 2025, 12:00 AM
1
votes
1
answers
68
views
Unable to send automated mail using udev and msmtp
I am trying to write a script to send an email whenever a usb device is connected to my computer (Arch Linux). The code I wrote is ``` #!/bin/bash if [[ ! -z "$1" ]]; then echo "USB inserted at $(date) for $1 and $2" >> /home/user/commands/logs.log cd ~ ip -4 addr | grep -oP '(? /home/user/commands/...
I am trying to write a script to send an email whenever a usb device is connected to my computer (Arch Linux). The code I wrote is
#!/bin/bash
if [[ ! -z "$1" ]]; then
echo "USB inserted at $(date) for $1 and $2" >> /home/user/commands/logs.log
cd ~
ip -4 addr | grep -oP '(? /home/user/commands/testing.txt
echo -e "Subject: Hello \n\nBody:usb inserted at $(ip -4 addr | grep -oP '(?<=inet\s)\d+(\.\d+){3}')\nthrough the mail" | msmtp mymail@gmail.com
fi
the script is supposed to send the ipv4 address to the mail. The usb insertion is being detected and the log file and testing txt file is being written.
But the mail is not being sent. I wrote the mail code separately through the terminal and it seems to be working. But inside the code, the mail is not getting run.
I have set the msmtp working. I have checked using terminal commands directly and it is working. But through the script it is not working.
All other commands are getting executed and I am getting the files.
This is my rules script
ACTION=="add",\
SUBSYSTEMS=="usb",\
ENV{DEVTYPE}=="usb_device",\
RUN+="/usr/local/bin/usbinserted.sh '%E{DEVTYPE}' '%E{DEVNAME}'"
JustaNobody
(31 rep)
Jan 26, 2024, 11:55 AM
• Last activity: Apr 7, 2025, 12:49 PM
0
votes
0
answers
874
views
USB drive is not recognized due to a failed partition formatting
I created a encrypted partition on my Kingston USB drive (`/dev/sda`) using VeraCrypt. I was trying to format the partition using GNOME Disk Utility after mounted the partition using VeraCrypt (`/dev/sda2` -> `/dev/mapper/veracrypt1` -> `/mnt/crypt`), but I got an error. Now, my USB drive is not rec...
I created a encrypted partition on my Kingston USB drive (
/dev/sda
) using VeraCrypt.
I was trying to format the partition using GNOME Disk Utility after mounted the partition using VeraCrypt (/dev/sda2
-> /dev/mapper/veracrypt1
-> /mnt/crypt
), but I got an error.
Now, my USB drive is not recognized by my computer (runs PopOS 22.04 LTS
and Windows 11
).
GNOME Disk Utility show a device /dev/sda
with no size.
Command df
, fdisk
, testdisk
, dd
, fsck
, e2fsck
can not find the medium /dev/sda
.
Command lsblk
found the device sda
, but size is 0:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 173M 0 loop /run/wine
sda 8:0 1 0B 0 disk
nvme0n1 259:0 0 1.9T 0 disk
├─nvme0n1p1 259:1 0 512M 0 part
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 100G 0 part
├─nvme0n1p4 259:4 0 100G 0 part
├─nvme0n1p5 259:5 0 193.1G 0 part /
├─nvme0n1p6 259:6 0 1.5T 0 part /mnt/evil
└─nvme0n1p7 259:7 0 8G 0 part
└─cryptswap 252:0 0 8G 0 crypt [SWAP]
Command sudo dmesg | tail
output this:
[16040.588575] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[16040.588585] usb 2-1: Product: USB DISK 53X
[16040.588587] usb 2-1: Manufacturer: Phison
[16040.589537] usb-storage 2-1:1.0: USB Mass Storage device detected
[16040.590135] scsi host0: usb-storage 2-1:1.0
[16041.608399] scsi 0:0:0:0: Direct-Access 13FE USB DISK 50X PMAP PQ: 0 ANSI: 4
[16041.608989] sd 0:0:0:0: Attached scsi generic sg0 type 0
[16041.609425] sd 0:0:0:0: [sda] Media removed, stopped polling
[16041.609972] sd 0:0:0:0: [sda] Attached SCSI removable disk
[16961.241573] workqueue: delayed_fput hogged CPU for >10000us 1024 times, consider switching to WQ_UNBOUND
Command lsusb
also found the device:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 011: ID 0b05:18c6 ASUSTek Computer, Inc. N-KEY Device
Bus 003 Device 009: ID 13d3:5492 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 007: ID 04f3:0c6e Elan Microelectronics Corp. ELAN:Fingerprint
Bus 003 Device 005: ID 0416:5020 Winbond Electronics Corp. USB Device
Bus 003 Device 003: ID 0c45:636d Microdia USB 2.0 Camera
Bus 003 Device 042: ID 05ac:024f Apple, Inc. Aluminium Keyboard (ANSI)
Bus 003 Device 041: ID 5131:2019 MSR
Bus 003 Device 040: ID 25a7:fa61 Areson Technology Corp Elecom Co., Ltd MR-K013 Multicard Reader
Bus 003 Device 039: ID 1a40:0801 Terminus Technology Inc. USB 2.0 Hub
Bus 003 Device 002: ID 214b:7250 Huasheng Electronics USB2.0 HUB
Bus 003 Device 012: ID 8087:0033 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 007: ID 13fe:5500 Kingston Technology Company Inc. Flash drive
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 007: ID 13fe:5500 Kingston Technology Company Inc. Flash drive
GUI tools like GParted
and DiskGenius
can not recognize the device.
What should I do now?
Ezra
(113 rep)
May 28, 2024, 08:05 AM
• Last activity: Apr 5, 2025, 09:51 AM
1
votes
1
answers
57
views
Disconnected block device remains in /sys, is not seen as detected when re-connect
System is Linux Mint 21 based. My USBstick was receiving some files and after message "Do not disconnect" had disappeared I unplugged it. This time though waiting whirl remained in Disks GUI and it remained seen in Nemo. I've tried some naive methods like `rm /dev/sdb` which did not help. Then I not...
System is Linux Mint 21 based.
My USBstick was receiving some files and after message "Do not disconnect" had disappeared I unplugged it. This time though waiting whirl remained in Disks GUI and it remained seen in Nemo. I've tried some naive methods like
rm /dev/sdb
which did not help. Then I noted when I plug it into USB again, nothing seems to happen. Then I've tried web search and found
1) https://www.reddit.com/r/linuxquestions/comments/vxn53j/how_to_undelete_a_device_file_for_example_devsr0/
And done
mknod /dev/sdb b 11 0
mknod /dev/sdb1 b 11 0
echo remove | sudo tee /sys/block/sdb/uevent
echo add | sudo tee /sys/block/sdb/uevent
echo remove | sudo tee /sys/block/sdb1/uevent
echo add | sudo tee /sys/block/sdb1/uevent
The result of the above (or just some timeouts), the device no longer seen neither in Disks nor Nemo.
But lsblk
shows sdb
and other web results do not help:
https://unix.stackexchange.com/questions/405249/disconnected-block-device-remains-in-dev-sync-commands-unkillable : echo 1 | sudo tee /sys/block/sdb/device/delete
> tee: /sys/block/sdb/device/delete: Permission denied
ll /sys/block/sdb/device/delete
ls: cannot access '/sys/block/sdb/device/delete': No such file or directory
journalctl
does not add relevant entries (only cron
) when I plug-unplug the device, there are entries in /sys
, e.g. /sys/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/host1/target1:0:0/1:0:0:0/block/sdb
.
What more can I try to get the USBstick working (checked it works in another PC) not to restart the PC? TIA
Edit:
Before trying out answers:
Problematic USBstick and another one do not work in the USB port where the problem appeared. When plugged in another port, Disks GUI does not show them, but lsblk
had shown additional sdc
, udisksctl mount
resulted in Error looking up object for device /dev/sdc1
, but sudo mount /dev/sdd1
has worked and the stick can be read and written to.
Edit 2
After trying following through the answer by @telcoM: deleting /dev/sdb(1)
and re-plugging the stick, then re-creating them mknod
with different numbers from the answer: Nothing seems to have changed.
Edit 3
I've noted PC wouldn't suspend (maybe because sync
hanged up - I run it to physically write all to manually mounted USB stick), then I've lost USB keyboard/mouse connection (connection is loose via a hub and they did not reconnect even in another USB port), so some time later I've restarted the computer. Still proper answer is welcome in case of future similar problems.
Martian2020
(1443 rep)
Mar 30, 2025, 02:01 PM
• Last activity: Mar 31, 2025, 04:27 AM
0
votes
0
answers
62
views
Umount + hdparm setting for an external hd
How can I keep my external hard drive connected to the USB port but in an unmounted state to preserve it? Is it possible to remount it at any time? I would like to keep it on for just an hour a day for writing and turn it off for the rest of the time. Can `hdparm` help? I don’t know how to use it.
How can I keep my external hard drive connected to the USB port but in an unmounted state to preserve it?
Is it possible to remount it at any time?
I would like to keep it on for just an hour a day for writing and turn it off for the rest of the time.
Can
hdparm
help? I don’t know how to use it.
Alessandro
(25 rep)
Mar 26, 2024, 09:55 AM
• Last activity: Mar 21, 2025, 10:45 PM
1
votes
1
answers
77
views
How can I force Linux to recognize a USB 3.x device as 5gbps?
I have a USB 3 NVMe enclosure attached to an Intel Celeron N5100 mini-PC. As shown by the output of `lsusb -t`, Linux recognizes the enclosure as a 10Gbps device. $lsusb -t | grep uas |__ Port 001: Dev 005, If 0, Class=Mass Storage, Driver=uas, 10000M Transfer rates are an impressive 800MB/s per sec...
I have a USB 3 NVMe enclosure attached to an Intel Celeron N5100 mini-PC. As shown by the output of
lsusb -t
, Linux recognizes the enclosure as a 10Gbps device.
$lsusb -t | grep uas
|__ Port 001: Dev 005, If 0, Class=Mass Storage, Driver=uas, 10000M
Transfer rates are an impressive 800MB/s per second at the start. However the transfer soon stalls. Various I/O errors appear in dmesg, which I can't reproduce right now as the errors lead to a system freeze.
I suspect the problem has something to do with the XHCI module recognizing the device as a 10gbps USB 3.2 class device rather than as a baseline 5gbps USB 3.1 device. The USB 3 enclosure worked without any problems on my old 2014 Intel Core i3 laptop (which sadly was stolen recently).
Is there any way to force Linux to assign the slower 5gpbs speed to the USB enclosure?
As a side note, the I/O errors don't appear when I connect the enclosure using a USB 2 cable, which forces Linux to recognize the device as USB 2. This, however, limits the transfer rate to an abysmal 40MB/s.
Aubergone
(25 rep)
Mar 12, 2025, 01:52 AM
• Last activity: Mar 12, 2025, 08:38 PM
0
votes
0
answers
63
views
USBipd crashing randomly - how to fix this?
I have a Raspberry Pi 3B with a radio dongle (Warema Stick) attached to it. This Raspberry Pi runs Raspberry Pi OS and I installed usbipd from the default package repository of Raspberry Pi OS. The radio dongle works fine for some time when I manually restart both the USBipd on the Pi 3 and the USBi...
I have a Raspberry Pi 3B with a radio dongle (Warema Stick) attached to it.
This Raspberry Pi runs Raspberry Pi OS and I installed usbipd from the default package repository of Raspberry Pi OS.
The radio dongle works fine for some time when I manually restart both the USBipd on the Pi 3 and the USBip client on my RPi4, but at some random time usbipd crashes and I have to restart usbipd and the client again....
dmesg -T
shows the following:
[Fr Feb 21 05:44:14 2025] usbip-host 1-1.4: recv a header, 0 [Fr Feb 21 05:44:14 2025] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected [Fr Feb 21 05:44:14 2025] usb 1-1.4: Detected FT232R [Fr Feb 21 05:44:14 2025] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0 [Fr Feb 21 05:44:17 2025] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [Fr Feb 21 05:44:17 2025] ftdi_sio 1-1.4:1.0: device disconnected [Fr Feb 21 05:44:17 2025] usbip-host 1-1.4: usbip-host: register new device (bus 1 dev 4) [Fr Feb 21 05:45:09 2025] usbip-host 1-1.4: stub up [Fr Feb 21 05:45:10 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:45:10 2025] usbip-host 1-1.4: endpoint 0 is stalled
[Fr Feb 21 05:45:10 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:45:56 2025] usbip-host 1-1.4: recv a header, 0 [Fr Feb 21 05:45:56 2025] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected [Fr Feb 21 05:45:56 2025] usb 1-1.4: Detected FT232R [Fr Feb 21 05:45:56 2025] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0 [Fr Feb 21 05:45:59 2025] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [Fr Feb 21 05:45:59 2025] ftdi_sio 1-1.4:1.0: device disconnected [Fr Feb 21 05:45:59 2025] usbip-host 1-1.4: usbip-host: register new device (bus 1 dev 4) [Fr Feb 21 05:46:33 2025] usbip-host 1-1.4: stub up
[Fr Feb 21 05:46:33 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:46:33 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:46:33 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:50:57 2025] usbip-host 1-1.4: recv a header, 0 [Fr Feb 21 05:50:57 2025] usbip-host 1-1.4: reset full-speed USB device number 4 using dwc_otg [Fr Feb 21 05:50:57 2025] usbip-host 1-1.4: device reset
[Fr Feb 21 05:51:03 2025] usbip-host 1-1.4: stub up [Fr Feb 21 05:51:04 2025] usbip-host 1-1.4: endpoint 0 is stalled [Fr Feb 21 05:51:04 2025] usbip-host 1-1.4: endpoint 0 is stalled
[Fr Feb 21 05:51:04 2025] usbip-host 1-1.4: endpoint 0 is stalled
[Fr Feb 21 05:51:27 2025] usbip-host 1-1.4: unlinked by a call to usb_unlink_urb()
[Fr Feb 21 05:51:27 2025] usbip-host 1-1.4: unlinked by a call to usb_unlink_urb()
[Sa Feb 22 06:39:29 2025] usbip-host 1-1.4: unlinked by a call to usb_unlink_urb()
Best regards
Aaron
Aa324
(1 rep)
Feb 23, 2025, 07:17 AM
0
votes
1
answers
96
views
Adding a usb keyboard driver to a custom Linux firmware
I have a router running a custom Linux as firmware. I can ssh in and install packages via the entware repository. I’ve attached a keyboard to the USB port and I’d like to read the keyboard input. The keyboard appears in lsusb but /dev/input does not exist. I’m assuming the input drivers were removed...
I have a router running a custom Linux as firmware. I can ssh in and install packages via the entware repository. I’ve attached a keyboard to the USB port and I’d like to read the keyboard input. The keyboard appears in lsusb but /dev/input does not exist.
I’m assuming the input drivers were removed as part of the customization. Can I add a generic Linux keyboard driver to my firmware? Can I just go to an existing Linux machine and copy the keyboard driver from /dev/input? If not, what else could I try?
Christopher Meyers
(101 rep)
Feb 15, 2025, 03:46 PM
• Last activity: Feb 15, 2025, 06:42 PM
Showing page 1 of 20 total questions