AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[usb](ubuntu)

Martin Hope
Francesco
Asked: 2025-04-26 22:38:32 +0800 CST

Sata 转 USB 适配器无法在 USB 3.0 端口上工作,但可以在 2.0 端口上工作

  • 5

我正在设置我的家庭云服务器,在购买合适的多盘位硬盘盒和一些磁盘来组建 RAID 之前,先测试一下所有东西。我想用一个便宜的 USB 3.0 转 SATA 适配器,以及我现有的 2TB 西数紫盘。磁盘在我的主电脑上可以正常工作,只需将其插入 SATA 端口即可。但如果我将 USB 适配器插入 USB 3.0 端口,则无法使用 lsblk 命令检测到磁盘。如果我将其插入 USB 2.0 端口,则可以正确检测到磁盘。在我的 Windows 电脑上也是如此。适配器有 12V 输入,因为磁盘是 3.5 英寸的,系统运行的是最新的 Ubuntu 服务器。谁能帮忙?

usb
  • 1 个回答
  • 36 Views
Martin Hope
PiQuark6046
Asked: 2025-04-17 05:30:18 +0800 CST

重新加载 xhci_pci 内核模块之前所有 USB 设备均不工作

  • 5

我使用 ThinkPad ThunderBolt 4 Smart Dock (40B0) 扩展了在 Ubuntu 24.10 系统上运行的 HP OMEN 16.1 英寸游戏本 (wf1037TX) 的连接容量。使用笔记本电脑一段时间后,所有 USB 设备(包括笔记本电脑的端口和扩展坞的端口)在重新加载xhci_pci内核模块 ( sudo modprobe -r xhci_pci && sudo modprobe xhci-pci) 或重启之前都无法工作。请问您能提供一些解决这个问题的建议吗?

结果lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 17ef:30ba Lenovo V1003
Bus 001 Device 003: ID 0408:548d Quanta Computer, Inc. HP True Vision FHD Camera
Bus 001 Device 004: ID 17ef:30b4 Lenovo ThinkPad Thunderbolt 4 Dock MCU Controller2
Bus 001 Device 005: ID 17ef:30b5 Lenovo 40B0
Bus 001 Device 006: ID 17ef:30b7 Lenovo USB2.0 Hub             
Bus 001 Device 007: ID 046d:0af7 Logitech, Inc. PRO X 2 LIGHTSPEED
Bus 001 Device 008: ID 17ef:30b9 Lenovo USB2.0 Hub             
Bus 001 Device 009: ID 8087:0036 Intel Corp. 
Bus 001 Device 010: ID 17ef:60ee Lenovo TrackPoint Keyboard II
Bus 001 Device 011: ID 046d:c548 Logitech, Inc. Logi Bolt Receiver
Bus 001 Device 012: ID 17ef:30bb Lenovo ThinkPad Thunderbolt 4 Dock USB Audio
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
Bus 004 Device 002: ID 8087:0b40 Intel Corp. USB3.0 Hub
Bus 004 Device 003: ID 17ef:30b6 Lenovo USB3.1 Hub             
Bus 004 Device 004: ID 17ef:30b8 Lenovo USB3.1 Hub             
Bus 004 Device 005: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

重要的内核日志:

Apr 16 21:41:06 kernel: nvme 0000:46:00.0: platform quirk: setting simple suspend
Apr 16 21:39:38 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:38 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:35 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:35 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:32 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:32 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:29 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:29 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:26 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:26 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:23 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:23 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:20 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:20 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:17 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:17 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:11 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:11 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:08 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:08 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:05 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:05 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:39:02 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:39:02 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:59 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:59 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:56 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:56 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:53 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:53 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:50 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:50 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:47 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:47 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:44 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:44 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:41 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:41 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:38 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:38 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:35 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:35 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:32 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:32 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:29 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:29 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:26 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:26 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2
Apr 16 21:38:23 kernel: usb 1-6: Failed to suspend device, error -32
Apr 16 21:38:23 kernel: xhci_hcd 0000:00:14.0: USB core suspending port 1-6 not in U0/U1/U2

结果uname -a:

Linux piqua-Laptop 6.11.0-21-generic #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 19 16:50:40 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

该底座固件的当前版本为 10.18。

usb
  • 1 个回答
  • 77 Views
Martin Hope
Alexander Amelkin
Asked: 2024-11-20 01:05:55 +0800 CST

为什么 udev 规则仅对系列外的随机串行 USB 设备节点起作用一次?

  • 6

我有一个基于 CH348 芯片的多端口 USB-UART 设备,运行来自https://github.com/WCHSoftGroup/ch9344ser_linux的内核外驱动程序

驱动程序创建 8 个字符的设备节点 ( /dev/ttyCH9344USB0.. /dev/ttyCH9344USB7)。该设备未在 USB 设备描述符中提供序列号,但我想从设备中读取一个 EEPROM,从中提取序列号并使用它来创建类似的符号链接/dev/ttyUSB.CH348.<serial_number>.<instance>。

我创建了一个简单的udev规则并将其放入/etc/udev/rules.d/99-usb-serial.rules:

ACTION=="add", KERNEL=="*ttyCH9344USB*", OPTIONS="log_level=debug", PROGRAM="/usr/local/bin/ch34x_serial %E{DEVNAME}", SYMLINK+="ttyUSB.CH348.$result"

该规则确实按预期工作,但只适用于 8 个节点中的一个随机节点。我实际上尝试了多种不同的匹配规则,无论我使用哪种方法(内核名称、USB 属性等),如果匹配,它只会匹配该系列中的一个随机实例。它可能会为实例 3、6、7 或任何其他实例创建一个符号链接,但只针对一个实例。

我检查了journalctl和udevadm monitor -p,发现加载驱动程序模块时恰好有 8 个不同的add事件发生udev。除了 KERNEL、DEVPATH、SEQNUM 和 MINOR 属性外,所有事件都相同,如下所示:

KERNEL[706136.962119] add      /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.2/1-1.1.3.2.1/1-1.1.3.2.1:1.0/tty/ttyCH9344USB0 (tty)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.2/1-1.1.3.2.1/1-1.1.3.2.1:1.0/tty/ttyCH9344USB0
SUBSYSTEM=tty
DEVNAME=/dev/ttyCH9344USB0
SEQNUM=26571
MAJOR=168
MINOR=0

我不明白为什么只有其中一个实际事件会触发规则,而如果我udevadm test针对 8 个设备节点中的任何一个运行,则该规则对所有节点都有效。

它看起来像是udev以某种方式缓存动作并丢弃“重复”的,虽然我不明白它是如何得出这个结论的。

我正在运行 Ubuntu 24.04 Serverudev版本255.4-1ubuntu8.4。

任何帮助都将不胜感激。谢谢。

usb
  • 1 个回答
  • 39 Views
Martin Hope
Stormlord
Asked: 2024-08-05 08:19:36 +0800 CST

在 Xubuntu 22.04.4 系统上使用新键盘和新鼠标

  • 6

目前我正在使用无线键盘/鼠标组,两者都通过小型 USB 接收器与系统通信。

我想换一个不同品牌的有线套装。新键盘将连接到电脑上的 USB 端口,鼠标将连接到键盘,因为键盘配备了两个 USB 端口。

我猜想,由于现有和新设备都是即插即用的,我唯一需要做的就是断开现有设备并连接新设备,一切就会按预期工作。这是正确的吗?还是当我重新打开系统并检测到这个新硬件时,系统会遇到任何问题?

谢谢。

usb
  • 1 个回答
  • 28 Views
Martin Hope
User485348
Asked: 2024-07-18 17:23:45 +0800 CST

无法以 root 身份写入 /sys/bus/usb/devices/.../power/wakeup

  • 5

不久前,我按照内核文档https://www.kernel.org/doc/html/v6.5/driver-api/usb/power-management.html#the-user-interface-for-dynamic-pm中的说明成功编辑了文件 /sys/bus/usb/devices/.../power/wakeup ,但现在却无法做到。

尽管我是 root,我还是收到了错误消息“写入锁定文件 /sys/bus/usb/devices/.../power/.wakeup.swp 时出错:权限被拒绝”。

我尝试使用不同的设备,但发生了同样的事情。

我没有在日志文件中看到相关的错误消息,并且 apparmor 没有阻止该操作。

usb
  • 1 个回答
  • 69 Views
Martin Hope
catdogdonkey
Asked: 2024-07-13 05:54:58 +0800 CST

有什么办法可以停止 Ubuntu 更新?

  • 4

所以我使用闪存驱动器加载 Ubuntu,我点击了“更新 Ubuntu”按钮,它已经加载了很长时间。安装后又等了 3 个小时(之前我不得不等 3 个小时才能下载它)等待它更新。

我的闪存驱动器上有 Ubuntu(3.0),所以我不认为它会损坏 SSD,但我该如何以最小的风险停止更新?

这是一台新设备,我正在一个闪存驱动器上下载 Ubuntu,另一个驱动器上下载 Rufus。我点击了包含完整 Ubuntu 的闪存驱动器上的更新按钮,它一直停留在更新屏幕上。

我正在使用 24.04 LTS

usb
  • 1 个回答
  • 85 Views
Martin Hope
carlos palma
Asked: 2024-07-12 23:30:46 +0800 CST

如何在 Ubuntu 20.04 上运行 Balena Etcher

  • 7

我正在尝试使用 USB 棒安装 Linux Mint。我目前使用的是 ubuntu 20.04,我从https://etcher.balena.io/#download-etcher下载了一个 .zip 文件。解压后,我看到如下内容: 在此处输入图片描述

但是那里什么都不能运行,没有 .sh 文件,什么都没有。你们知道如何运行它吗?

usb
  • 1 个回答
  • 37 Views
Martin Hope
juzzlin
Asked: 2024-02-17 17:19:19 +0800 CST

由于“操作不支持”,无法通过 MTP 将文件复制到 Android 手机

  • 5

我正在尝试将一些音乐文件从文件服务器复制到我的三星手机的内部存储卡。

当我插入手机时,我可以通过 Nautilus 中的 MTP 访问存储卡。但是,当我尝试复制任何文件时,我只是得到“不支持操作”。

它似乎仍然能够创建新文件夹,但不能创建文件。

我很确定这之前已经与其他 Ubuntu-Android 组合一起工作过。这里似乎有什么问题?

三星 Galaxy A52s (Android 14) 和 Ubuntu 22.04 LTS。

usb
  • 1 个回答
  • 126 Views
Martin Hope
FJDpaco
Asked: 2024-02-03 00:46:57 +0800 CST

“在 /media/fjdpaco/USB 棒上安装 dev/sda 时出错:安装 dev/sda 时出现未知错误”

  • 4

我有一台 Acer Aspire3 笔记本电脑,我正在尝试从 Ubuntu 中的文件应用程序打开 Memorex 8GB USB 记忆棒。鉴于我有重要的数据,我不想意外地破坏我不想在没有真正的人给我建议的情况下触摸任何东西。

这个U盘以前是可以用的,分区是这样的。

1

该部分后面是否有分区号sda?- 不

当我找到/dev/sda该文件时sda,我无法访问该文件,并且“属性”告诉我它有“0 字节”。我首先注意到今天发生了这种情况。它可能发生得更早,但我从未检查过。

usb
  • 1 个回答
  • 58 Views
Martin Hope
lalannou
Asked: 2024-01-10 00:40:40 +0800 CST

Hidraw udev 规则组有时会失败

  • 5

我在使用充当 hidraw 设备通过 USB 发送定期数据的传感器时遇到问题。我有一个 Udev 规则,它创建一个符号链接,供 docker 容器与 Azure IoT Edge 使用。

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="e025", SYMLINK+="temper" MODE="0660"

事情通常是,在一段时间(可能是几分钟或几小时)之后,它开始在屏幕上写入,并且 docker 无法再检测到它(程序发送错误)。

我已经尝试在 udev 规则中设置 GROUP="docker" 。我正在使用带有 LXDE 的 Ubuntu 20.04。

设备是 TemperHUM: https: //www.amazon.fr/Temp%C3%A9rature-Doluteur-Enregistreur-Thermo-hygrom%C3%A8tre-Surveillance/dp/B0B7SJL3C7/ref=sr_1_5 希望链接有效

usb
  • 1 个回答
  • 34 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve