我正在设置我的家庭云服务器,在购买合适的多盘位硬盘盒和一些磁盘来组建 RAID 之前,先测试一下所有东西。我想用一个便宜的 USB 3.0 转 SATA 适配器,以及我现有的 2TB 西数紫盘。磁盘在我的主电脑上可以正常工作,只需将其插入 SATA 端口即可。但如果我将 USB 适配器插入 USB 3.0 端口,则无法使用 lsblk 命令检测到磁盘。如果我将其插入 USB 2.0 端口,则可以正确检测到磁盘。在我的 Windows 电脑上也是如此。适配器有 12V 输入,因为磁盘是 3.5 英寸的,系统运行的是最新的 Ubuntu 服务器。谁能帮忙?
我使用 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。
我有一个基于 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 接收器与系统通信。
我想换一个不同品牌的有线套装。新键盘将连接到电脑上的 USB 端口,鼠标将连接到键盘,因为键盘配备了两个 USB 端口。
我猜想,由于现有和新设备都是即插即用的,我唯一需要做的就是断开现有设备并连接新设备,一切就会按预期工作。这是正确的吗?还是当我重新打开系统并检测到这个新硬件时,系统会遇到任何问题?
谢谢。
不久前,我按照内核文档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 没有阻止该操作。
所以我使用闪存驱动器加载 Ubuntu,我点击了“更新 Ubuntu”按钮,它已经加载了很长时间。安装后又等了 3 个小时(之前我不得不等 3 个小时才能下载它)等待它更新。
我的闪存驱动器上有 Ubuntu(3.0),所以我不认为它会损坏 SSD,但我该如何以最小的风险停止更新?
这是一台新设备,我正在一个闪存驱动器上下载 Ubuntu,另一个驱动器上下载 Rufus。我点击了包含完整 Ubuntu 的闪存驱动器上的更新按钮,它一直停留在更新屏幕上。
我正在使用 24.04 LTS
我正在尝试使用 USB 棒安装 Linux Mint。我目前使用的是 ubuntu 20.04,我从https://etcher.balena.io/#download-etcher下载了一个 .zip 文件。解压后,我看到如下内容:
但是那里什么都不能运行,没有 .sh 文件,什么都没有。你们知道如何运行它吗?
我正在尝试将一些音乐文件从文件服务器复制到我的三星手机的内部存储卡。
当我插入手机时,我可以通过 Nautilus 中的 MTP 访问存储卡。但是,当我尝试复制任何文件时,我只是得到“不支持操作”。
它似乎仍然能够创建新文件夹,但不能创建文件。
我很确定这之前已经与其他 Ubuntu-Android 组合一起工作过。这里似乎有什么问题?
三星 Galaxy A52s (Android 14) 和 Ubuntu 22.04 LTS。
我在使用充当 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 希望链接有效