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
    • 最新
    • 标签
主页 / unix / 问题

问题[usb](unix)

Martin Hope
RokeJulianLockhart
Asked: 2025-04-09 19:05:08 +0800 CST

如何确定 USB 端口的物理连接器类型?

  • 5
示例

lsusb -v返回如下条目:

Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 [unknown]
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0610 Hub
  bcdDevice           34.04
  iManufacturer           1 GenesysLogic
  iProduct                2 USB2.1 Hub
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 [unknown]
      bInterfaceProtocol      1 Single TT
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 [unknown]
      bInterfaceProtocol      2 TT per port
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0049
  bNumDeviceCaps          5
Couldn't get device capability descriptors
can't get hub descriptor, LIBUSB_ERROR_TIMEOUT (Resource temporarily unavailable)
cannot read device status, Resource temporarily unavailable (11)

usb-devices返回:

T:  Bus=08 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=10000 MxCh= 1
D:  Ver= 3.10 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=06.13
S:  Manufacturer=Linux 6.13.9-200.fc41.x86_64 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:c3:00.4
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256m

这两个命令似乎都没有告诉我端口的(物理)连接器类型。我grep -E搜索过-c和type等等,并用肉眼手动查看了输出结果。

usb
  • 1 个回答
  • 40 Views
Martin Hope
pedda
Asked: 2025-02-24 21:45:27 +0800 CST

在 2 个微型 SD 卡单元上进行 Rsync,组合为 luks 加密的 LVM,在 fscrypt 之上:Fscrypt 似乎会不时锁定,如何避免?

  • 6

希望有人能提供提示,如果 fscrypt 可以替代我备份主文件夹(位于不同的 PV 组中,luks 加密,ecryptfs 主文件夹)中容易出错的 ecyryptfs,那么可以帮我解决这个问题:

   +-----------------------------------+        +-----------------------------------+
   |          Source: Home             |        |         Destination: Backup       |
   |     (eCryptfs on Home Partition)  |        |     (fscrypt on Backup Partition) |
   +-----------------------------------+        +-----------------------------------+
                \|/               |                   ^         \|/
                 |                |___________________|          |
                 |              (rsync from Home to Backup)      | 
                 v                                               v
   +-----------------------------------+        +-----------------------------------+
   |   eCryptfs Layer (Home Folder)    |        | fscrypt Layer (BackupHome)        |
   +-----------------------------------+        +-----------------------------------+
   |       Home Partition              |        |       BackupHome Partition        |
   +-----------------------------------+        +-----------------------------------+   
   |   LVM Volume (Home)               |        |   LVM Volume (BackupHome)         |
   +-----------------------------------+        +-----------------------------------+ 
   |   LVM: PV Group (Main SSD)        |        |   LVM: PV Group (USB Stick)       |
   +-----------------------------------+        +-----------------------------------+   
   |   LUKS Encrypted (Main SSD)       |        |   LUKS Encrypted (µSD Slot 1)     |
   +-----------------------------------+        +-----------------------------------+ 
   |   Physical Layer (Main SSD)       |        |   LUKS Encrypted (µSD Slot 2)     |
   +-----------------------------------+        +-----------------------------------+
                 \|/                            |           Physical Layer          |
                  |                             +-----------------------------------+
                  |                                             \|/
   +-----------------------------------+        +-----------------------------------+
   | Physical Layer (4 TB SSD)         |        |   Physical Layer (USB Stick)      |
   | Dual Boot Windows/Linux (LVM)     |        |   Combined 2 x 1.5TB µSD with     |
   | LUKS LVM in part.6, part.5 /boot  |        |                                   |
   | (root, home, swap)in 3.1TB Volume |        |   LVM into 2.8TB Volume           |
   +-----------------------------------+        +-----------------------------------+

现在我想使用以下命令备份我的数据:

rsync -avvh --inplace --size-only --info=progress2 /home/userXXX/  /backupHome/userXXX/

我时不时会随机收到不同的错误消息,例如这些(日志下方的侧面信息):

[..]
testdaten/shrinkMpegxxDB.log
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=655/497427)
testdaten/yyy.zzz/
testdaten/scripts/
rsync: [receiver] open "/backupHome/userXXX/testdaten/shrinkMpegxxDB.log" failed: Required key not available (126)
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=0/497427)  

sent 9,04G bytes  received 42,04K bytes  121,37M bytes/sec
total size is 1,75T  speedup is 194,06
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]


[..]

rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/menus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/xxxx/.config/mpv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nautilus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nemo" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nomacs" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/procps" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/pulse" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/qimgv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/remmina" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/simple-scan" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/systemd" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/teamviewer" failed: Required key not available (126)

[..]

        103,23M   0%    2,26MB/s    0:00:43 (xfr#1034, ir-chk=1028/476659)
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 4096 bytes, did not move
[sender] expand file_list pointer array to 16384 bytes, did not move
[sender] expand file_list pointer array to 32768 bytes, did move
        103,23M   0%    2,24MB/s    0:00:44 (xfr#1034, ir-chk=2841/479500)
[..]
total: matches=0  hash_hits=0  false_alarms=0 data=103226155

sent 124,32M bytes  received 46,81M bytes  3,20M bytes/sec
total size is 1,75T  speedup is 10.254,91
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]

完整备份为 1.8 TB。加上传输的第一“块”数据(每次都因错误而中断),共计 747 GB。文件访问被禁止。我尝试使用 bash 命令,但同样失败,因此它与有关fscrypt。

每次我一次又一次地解锁房屋(每次取消后),它都会继续工作。因为 USB 棒变得非常热,所以我用冰箱里的一些冷却冰块给它降温:

fscrypt unlock /backupHome/userXXX

那么你的想法是什么?我对错误原因的建议是:

  • 设备过热(冷却并再次解锁后,一次传输 1TB 的数据)
  • 我是否在解锁 fscrypted backupHome 文件夹时意外犯了一个错误?
  • LUKS/LVM/2µSD 配置在 µSD 扩展 USB 模块中绑定在一起是否有问题?

我希望有人能帮忙!

[编辑] 根据@SteffenUlrich 和我自己的假设,这可能强烈指向硬件问题,因为

  • SD 可能与 ext4fs 兼容性不太好,主要仅支持 FAT/FAT32/exFat
  • 系统过热(因为冷却有助于完美地加载至少 1TB 的数据块。)(但这对我来说并没有得到证实,因为我无法正确评估其他错误来源,所以当天 dm-7 设备的日志显示了一些提示:
# journalctl -k | grep -Ei "excryptfs|error"
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1c.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1d.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: RAS: Correctable Errors collector initialized.
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: hp_wmi: query 0x4c returned error 0x6
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_TZ.ETMD], AE_NOT_FOUND (20230628/psargs-332)
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI Error: Aborting method \_SB.IETM._OSC due to previous error (AE_NOT_FOUND) (20230628/psparse-529)
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read

[.. many more ..]

Feb 20 09:41:52 HP-ENVY-Laptop-13-aq1176ng kernel: buffer_io_error: 6 callbacks suppressed

[.. many more ..]

Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on 

[.. many more ..]

Feb 23 14:43:21 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 16:19:36 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 20:43:48 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_read_folio: Error decrypting page; rc = [-4]
ecryptfs_read_folio: Error decrypting page; rc = [-4]

[.. man more ..]

usb
  • 1 个回答
  • 27 Views
Martin Hope
Janne Paalijarvi
Asked: 2025-02-02 18:17:55 +0800 CST

三星 SCX-3205 多功能设备打印(带杯)后无法扫描(带 sane)

  • 5

我有一台非常旧的三星 SCX-3205 打印机/复印机/扫描仪。它扫描良好,工作正常。但是,当我使用 CUPS 打印时,它会停止扫描。打印后第一次运行“scanimage -L”时,设备仍在那里,但下次运行时它就找不到它了。

我已经进行了 strace 检查了差异:

非工作情况:

ppoll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLOUT}], 3, {tv_sec=60, tv_nsec=0}, NULL, 8) = 1 ([{fd=6, revents=POLLIN}], left {tv_sec=59, tv_nsec=4341630})
ioctl(8, USBDEVFS_DISCARDURB, 0x55933dbfb0) = 0
timerfd_settime(6, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0
ppoll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLOUT}], 3, {tv_sec=60, tv_nsec=0}, NULL, 8) = 1 ([{fd=8, revents=POLLOUT}], left {tv_sec=59, tv_nsec=999980518})
ioctl(8, USBDEVFS_REAPURBNDELAY, 0x7fc9c97a50) = 0
timerfd_settime(6, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0
ioctl(8, USBDEVFS_REAPURBNDELAY, 0x7fc9c97a50) = -1 EAGAIN (Resource temporarily unavailable)
ioctl(8, USBDEVFS_CLEAR_HALT, 0x7fc9c97cb4) = 0
ioctl(8, USBDEVFS_CLEAR_HALT, 0x7fc9c97eb4) = 0
ioctl(8, USBDEVFS_CLEAR_HALT, 0x7fc9c97eb4) = 0
ioctl(8, USBDEVFS_RELEASEINTERFACE, 0x7fc9c97e5c) = 0

工作案例:

ppoll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLOUT}], 3, {tv_sec=60, tv_nsec=0}, NULL, 8) = 1 ([{fd=8, revents=POLLOUT}], left {tv_sec=59, tv_nsec=999981204})
ioctl(8, USBDEVFS_REAPURBNDELAY, 0x7ff3d45d80) = 0
timerfd_settime(6, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0
ioctl(8, USBDEVFS_REAPURBNDELAY, 0x7ff3d45d80) = -1 EAGAIN (Resource temporarily unavailable)
ioctl(8, USBDEVFS_CLEAR_HALT, 0x7ff3d461e4) = 0
ioctl(8, USBDEVFS_CLEAR_HALT, 0x7ff3d461e4) = 0
ioctl(8, USBDEVFS_RELEASEINTERFACE, 0x7ff3d4618c) = 0

因此,我可以看到,在失败的情况下,混合中存在额外的 ppoll(“fd=6, revents=POLLIN”)。FD 来自这里:

timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 6

我在 Raspberry Pi 4 Model B Rev 1.1 上运行 Alpine Linux 3.15.0。

usb
  • 1 个回答
  • 6 Views
Martin Hope
Vlastimil Burián
Asked: 2024-12-31 04:28:33 +0800 CST

如何修复或消除充斥在我日志中的 BadDLLP 警告(可纠正的 PCIe 总线错误)?

  • 5

首先,这个问题与为什么 journalctl 报告“PCIe 总线错误”BadTLP 和 BadDLLP?不是重复的,因为我没有问是什么导致了这个内核警告,而是直接问如何解决它,或者做一些变通的方法。

大约连续一个小时的时间里,我写入并读取了我新连接的 USB 磁盘设备 Crucial P3 PCIe 3.0 x4 NVMe M.2 2280 SSD,型号为 CT4000P3SSD8,容量为 4TB,我将其放入AXAGON EEM2-SG2 SuperSpeed+ USB-C M.2 磁盘外壳中,并将其连接到我的旧款 Dell Inspiron 15 Gaming 7577 笔记本电脑的Thunderbolt 3 USB-C 接口。

我立即注意到了这样的BadDLLP 警告(可纠正的 PCIe 总线错误)(时间被简短地删除了):

kernel: pcieport 0000:00:1c.0: AER: Correctable error message received from 0000:02:00.0
kernel: pcieport 0000:02:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
kernel: pcieport 0000:02:00.0:   device [8086:15da] error status/mask=00000080/00002000
kernel: pcieport 0000:02:00.0:    [ 7] BadDLLP

在大约一个小时内,内核生成了近 300,000 个此类警告/可纠正错误:

# journalctl --boot -1 --no-pager --no-hostname | grep BadDLLP | wc --lines

292727

我可以采取哪些相对安全的措施来减轻这些警告/可纠正的错误?


操作系统:Linux Mint 22(wilma),内核版本为 6.8.0-51-generic。

usb
  • 2 个回答
  • 55 Views
Martin Hope
TSG
Asked: 2024-12-17 08:52:01 +0800 CST

ESP32 是否支持 usbip

  • 6

我想制作一个非常小巧、低功耗的 USB over IP 服务器。我知道 Linux 有一个“usbip”包,但它可以在 ESP32 等微控制器上使用吗?

客户端运行的是 Linux,因此usbip客户端+服务器上的软件包应该可以轻松实现这一点。而且,客户端和服务器都将通过以太网连接。

usb
  • 2 个回答
  • 96 Views
Martin Hope
Noah Domingues
Asked: 2024-11-02 21:16:03 +0800 CST

如果安装程序已加载到 RAM,我可以在启动安装程序的驱动器上安装 Linux 吗?

  • 5

我想将 HoloISO(基于 SteamOS 的 Linux 发行版)完整安装到 USB 驱动器上。我从各种来源(包括这个问题)了解到,要将 Linux 安装到 USB 驱动器上,您需要两个 USB 驱动器 - 一个源驱动器,用于启动安装程序;以及一个目标驱动器,用于安装 - 因为驱动器无法安装到自身。引用此问题的答案:

您可以从磁盘安装,但安装不能对磁盘重新分区或覆盖包含安装映像的分区。

但是,我知道 HoloISO 允许您将安装程序完全加载到系统的 RAM 中 - 因此您可以在完全加载安装程序后断开源驱动器的连接。

因此,我的问题是:我可以从源驱动器启动,然后在将安装程序完全加载到 RAM 后断开驱动器,然后重新插入源驱动器并将发行版安装到驱动器(本质上将其重新用作目标驱动器)吗?这可能吗?

PS我在问题标题中说的是“Linux”而不是“HoloISO”,因为我想知道任何允许将安装程序加载到 RAM 中的 Linux 发行版。此外,我的问题与我上面链接的问题(我可以将从驱动器启动的发行版安装到同一个驱动器吗?)不是重复的,因为那个问题询问的是一般的 USB Linux 安装 - 我专门询问的是已完全加载到 RAM 中的安装程序。

usb
  • 1 个回答
  • 24 Views
Martin Hope
Matt Ellis
Asked: 2024-09-29 17:51:12 +0800 CST

在 udev 规则中使用 jmtpfs 安装摄像头

  • 5

jmtpfs当我将 GoPro 插入计算机时,我尝试使用它来安装它来传输文件。

我有一个可以在 udev 规则之外运行的脚本。但是,当在 udev 规则内运行时,该脚本会失败并断开我的 USB 设备。

这里给出了一个最小的工作示例:

脚本

#!/usr/bin/env bash
jmtpfs /media/GoPro > /tmp/gopro.log 2> /tmp/gopro.err

udev 规则

SUBSYSTEM=="usb", ATTR{idVendor}=="2672", ATTR{idProduct}=="004b", ACTION=="add", RUN+="/bin/bash -c /home/matt/Projects/GoProScraping/scripts/grab_go_pro_files.sh"

该文件的输出/tmp/gopro.err是:

Device 0 (VID=2672 and PID=004b) is UNKNOWN in libmtp v1.1.19.
Please report this VID/PID and the device model to the libmtp development team
fusermount: mount failed: Operation not permitted

的输出journalctl -f为:

Sep 29 09:45:31 nina kernel: usb 1-4: new high-speed USB device number 16 using xhci_hcd
Sep 29 09:45:31 nina kernel: usb 1-4: New USB device found, idVendor=2672, idProduct=004b, bcdDevice= 0.01
Sep 29 09:45:31 nina kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 29 09:45:31 nina kernel: usb 1-4: Product: GoPro MAX
Sep 29 09:45:31 nina kernel: usb 1-4: Manufacturer: GoPro
Sep 29 09:45:31 nina kernel: usb 1-4: SerialNumber: C3351325091705
Sep 29 09:45:31 nina sudo[1455]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/jmtpfs /media/GoPro
Sep 29 09:45:31 nina sudo[1455]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Sep 29 09:45:34 nina sudo[1455]: pam_unix(sudo:session): session closed for user root
Sep 29 09:45:34 nina kernel: usb 1-4: USB disconnect, device number 16
Sep 29 09:45:34 nina systemd-udevd[1453]: 1-4: Process '/bin/bash -c /home/matt/Projects/GoProScraping/scripts/grab_go_pro_files.sh' failed with exit code 1.

看起来我插入了 GoPro,udev 发现它已连接,然后出现权限错误,该错误导致 USB 断开连接,然后 udev 再次将其连接起来。

jmtpfs /media/GoPro但是,如果我尝试以 root 用户身份运行该命令:它会很好地安装并且我可以手动访问文件。

我以为 udev 规则以 root 身份运行,我遗漏了什么?

usb
  • 1 个回答
  • 17 Views
Martin Hope
lash
Asked: 2024-09-08 01:31:40 +0800 CST

联想 ideapad gaming 3 (15IHU6) 没有 USBC 显示端口

  • 7

Linux 上通过 USBC 的 Displayport 无法识别我在联想 Ideapad Gaming 3 15IHU6 上使用 archlinux,

我无法让显示器对 usbc 端口连接做出反应。

USBC-USBC被识别为“USB广告牌设备”

USBC-DP(mini) 被识别为“Displayport Alt 模式”

既不显示任何图像,也不在 X 中或外部。(我之前的笔记本电脑 - Tuxedo Computers 的一款)在启动时在所有连接的屏幕上显示控制台)。


正在使用的驱动程序:

nvidia_drm            126976  2
nvidia_uvm           6717440  0
nvidia_modeset       1650688  1 nvidia_drm
nvidia              72564736  2 nvidia_uvm,nvidia_modeset
video                  81920  4 ideapad_laptop,xe,i915,nvidia_modeset
ideapad_laptop         69632  0
platform_profile       12288  1 ideapad_laptop
rfkill                 40960  5 iwlmvm,bluetooth,ideapad_laptop,cfg80211
sparse_keymap          12288  2 intel_hid,ideapad_laptop
video                  81920  4 ideapad_laptop,xe,i915,nvidia_modeset
i8042                  57344  1 ideapad_laptop
wmi                    32768  3 video,wmi_bmof,ideapad_laptop

$ pacman -Ss nvidia | grep -i installed -A1
extra/egl-wayland 4:1.1.16-1 [installed]
    EGLStream-based Wayland external platform
--
extra/libvdpau 1.5-3 [installed]
    Nvidia VDPAU library
extra/libxnvctrl 560.35.03-1 [installed]
    NVIDIA NV-CONTROL X extension
--
extra/nvidia 560.35.03-3 [installed]
    NVIDIA drivers for linux
--
extra/nvidia-settings 560.35.03-1 [installed]
    Tool for configuring the NVIDIA graphics driver
extra/nvidia-utils 560.35.03-2 [installed]
    NVIDIA drivers utilities
--
extra/vulkan-nouveau 1:24.2.2-1 [installed]
    Open-source Vulkan driver for Nvidia GPUs
extra/xf86-video-nouveau 1.0.17-3 (xorg-drivers) [installed]
    Open Source 3D acceleration driver for nVidia cards


mkinitio.conf:
HOOKS=(base udev autodetect microcode modconf keyboard keymap consolefont block filesystems fsck)
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

设备:

$ sudo lshw -C display
  *-display                 
       description: VGA compatible controller
       product: TigerLake-LP GT2 [Iris Xe Graphics]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 03
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=1920x1080 resolution=1920,1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:610-60f iomemory:400-3ff irq:183 memory:6104000000-6104ffffff memory:4000000000-400fffffff ioport:5000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
  *-display
       description: 3D controller
       product: GA107M [GeForce RTX 3050 Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:600-5ff iomemory:610-60f irq:184 memory:54000000-54ffffff memory:6000000000-60ffffffff memory:6100000000-6101ffffff ioport:4000(size=128)

X设置:

$ xrandr
[...]
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 196mm
   3840x2160     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98    30.00  
   1920x1080     60.00    60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98* 
   1400x1050     59.95  
   1280x1024     60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x720      60.00    50.00    30.00    25.00    59.94    29.97    24.00    23.98  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)


$ cat /etc/X11/xorg.conf

Section "Device"
    Identifier     "Device0"
    Driver         "modesetting"
    VendorName     "Intel Corporation"
    BusID          "PCI:0:2:0"
EndSection


Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection
usb
  • 1 个回答
  • 107 Views
Martin Hope
cat pants
Asked: 2024-04-30 03:20:03 +0800 CST

lsusb 挂起

  • 5

操作系统是 Debian 12。我拔掉了所有 USB 设备。通过 ssh 连接。

如果我运行 lsusb,由于某种原因,一些以前连接的 USB 设备会被列出(同样,即使所有 USB 设备都已拔出),然后 lsusb 挂起。

当我运行 strace 时,因为它附加到 lsusb 进程,所以 lsusb 打印出另一行!很奇怪。strace 然后打印出:

openat(AT_FDCWD, "/sys/bus/usb/devices/3-3/product", O_RDONLY) =
read(8,

然后,当我 ctrl+c 退出 strace 时,lsusb 完成打印其输出的其余部分。也显得很奇怪。

dmesg 中没有错误。

所有 USB 端口似乎都工作正常,但主板上的两个 USB 3.0 端口现在似乎无法工作。

USB 3.0 驱动程序可能有问题吗?我现在只是猜测。

如何在不重新启动的情况下重新启动 USB 子系统?或者有其他方法可以在不重新启动的情况下解决此问题?

usb
  • 1 个回答
  • 25 Views
Martin Hope
Evan Carroll
Asked: 2024-02-28 12:33:20 +0800 CST

为什么 lsusb 中的设备名称与 dmesg 中的设备名称不同?

  • 5

当我插入 USB 设备时,我在系统中看到dmesg,

usb 5-2.2.2.2: new low-speed USB device number 48 using xhci_hcd
usb 5-2.2.2.2: New USB device found, idVendor=1130, idProduct=0202, bcdDevice= 1.00
usb 5-2.2.2.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 5-2.2.2.2: Product: Panic Button
input: Panic Button as /devices/pci0000:00/0000:00:07.0/0000:20:00.0/0000:21:02.0/0000:22:00.0/usb5/5-2/5-2.2/5-2.2.2/5-2.2.2.2/5-2.2.2.2:1.0/0003:1130:0202.0063/input/input136
hid-generic 0003:1130:0202.0063: input,hidraw5: USB HID v1.10 Device [Panic Button] on usb-0000:22:00.0-2.2.2.2/input0
input: Panic Button as /devices/pci0000:00/0000:00:07.0/0000:20:00.0/0000:21:02.0/0000:22:00.0/usb5/5-2/5-2.2/5-2.2.2/5-2.2.2.2/5-2.2.2.2:1.1/0003:1130:0202.0064/input/input137
hid-generic 0003:1130:0202.0064: input,hidraw6: USB HID v1.10 Device [Panic Button] on usb-0000:22:00.0-2.2.2.2/input1

然而,据lsusb我所见,

Bus 005 Device 048: ID 1130:0202 Tenx Technology, Inc. Rocket Launcher

为什么这里会出现差异呢?内核的设备数据库怎么说

产品: 紧急按钮

虽然 lsusb 设备数据库显示,

Tenx Technology, Inc. 火箭发射器

usb
  • 1 个回答
  • 32 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve