这个周末我一直在使用 10.04,在内核更新之后,我开始观察到一些不可靠的 USB 行为:即我的 USB 鼠标响应极其迟缓(通常在登录后几秒钟才打开)并且我的 USB 读卡器几乎根本不工作。
希望最新和最好的版本能够解决这个问题,并且需要切换到 x64,我升级到了 10.10,但失望地发现问题仍然存在。
我现在对 Ubuntu 的 USB 系统不是很熟悉,所以我想问一个问题:我该如何开始诊断这个问题?
更新 1:我已将 noapictimer 和 irqpoll 添加到内核命令中。没有变化。
更新 2:我拔掉了除鼠标和内置多卡读卡器(连接到主板的一个 USB 接头)之外的所有 USB 设备。下面的 dmesg 输出是结果。
一些相关的 dmesg 输出:您可以看到使鼠标上线需要多长时间。
$ dmesg | egrep "hci|usb"
[ 0.711064] usbcore: registered new interface driver usbfs
[ 0.711064] usbcore: registered new interface driver hub
[ 0.711064] usbcore: registered new device driver usb
[ 1.055260] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.055298] ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 1.055318] ehci_hcd 0000:00:12.2: EHCI Host Controller
[ 1.055355] ehci_hcd 0000:00:12.2: new USB bus registered, assigned bus number 1
[ 1.055382] ehci_hcd 0000:00:12.2: debug port 1
[ 1.055407] ehci_hcd 0000:00:12.2: irq 17, io mem 0xfe02c000
[ 1.060140] ehci_hcd 0000:00:12.2: USB 2.0 started, EHCI 1.00
[ 1.060335] ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 1.060347] ehci_hcd 0000:00:13.2: EHCI Host Controller
[ 1.060373] ehci_hcd 0000:00:13.2: new USB bus registered, assigned bus number 2
[ 1.060399] ehci_hcd 0000:00:13.2: debug port 1
[ 1.060423] ehci_hcd 0000:00:13.2: irq 19, io mem 0xfe029000
[ 1.080132] ehci_hcd 0000:00:13.2: USB 2.0 started, EHCI 1.00
[ 1.080269] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.080317] ohci_hcd 0000:00:12.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1.080330] ohci_hcd 0000:00:12.0: OHCI Host Controller
[ 1.080351] ohci_hcd 0000:00:12.0: new USB bus registered, assigned bus number 3
[ 1.080379] ohci_hcd 0000:00:12.0: irq 16, io mem 0xfe02e000
[ 1.144302] ohci_hcd 0000:00:12.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1.144313] ohci_hcd 0000:00:12.1: OHCI Host Controller
[ 1.144333] ohci_hcd 0000:00:12.1: new USB bus registered, assigned bus number 4
[ 1.144348] ohci_hcd 0000:00:12.1: irq 16, io mem 0xfe02d000
[ 1.204319] ohci_hcd 0000:00:13.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1.204331] ohci_hcd 0000:00:13.0: OHCI Host Controller
[ 1.204353] ohci_hcd 0000:00:13.0: new USB bus registered, assigned bus number 5
[ 1.204381] ohci_hcd 0000:00:13.0: irq 18, io mem 0xfe02b000
[ 1.264325] ohci_hcd 0000:00:13.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1.264336] ohci_hcd 0000:00:13.1: OHCI Host Controller
[ 1.264358] ohci_hcd 0000:00:13.1: new USB bus registered, assigned bus number 6
[ 1.264373] ohci_hcd 0000:00:13.1: irq 18, io mem 0xfe02a000
[ 1.324323] ohci_hcd 0000:00:14.5: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 1.324335] ohci_hcd 0000:00:14.5: OHCI Host Controller
[ 1.324361] ohci_hcd 0000:00:14.5: new USB bus registered, assigned bus number 7
[ 1.324376] ohci_hcd 0000:00:14.5: irq 18, io mem 0xfe028000
[ 1.384279] uhci_hcd: USB Universal Host Controller Interface driver
[ 1.435428] firewire_ohci 0000:03:0e.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 1.436716] ahci 0000:00:11.0: version 3.0
[ 1.436730] ahci 0000:00:11.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 1.436827] ahci 0000:00:11.0: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
[ 1.436829] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc
[ 1.438473] scsi2 : ahci
[ 1.438554] scsi3 : ahci
[ 1.438601] scsi4 : ahci
[ 1.438638] scsi5 : ahci
[ 1.440179] usb 2-6: new high speed USB device using ehci_hcd and address 2
[ 1.490160] firewire_ohci: Added fw-ohci device 0000:03:0e.0, OHCI v1.10, 4 IR + 8 IT contexts, quirks 0x2
[ 16.560107] usb 2-6: device descriptor read/64, error -110
[ 31.790134] usb 2-6: device descriptor read/64, error -110
[ 32.020129] usb 2-6: new high speed USB device using ehci_hcd and address 3
[ 47.150111] usb 2-6: device descriptor read/64, error -110
[ 62.380130] usb 2-6: device descriptor read/64, error -110
[ 62.610125] usb 2-6: new high speed USB device using ehci_hcd and address 4
[ 73.030125] usb 2-6: device not accepting address 4, error -110
[ 73.150122] usb 2-6: new high speed USB device using ehci_hcd and address 5
[ 83.570186] usb 2-6: device not accepting address 5, error -110
[ 83.760195] usb 4-2: new low speed USB device using ohci_hcd and address 2
[ 83.992508] usbcore: registered new interface driver hiddev
[ 83.997139] input: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM) as /devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/input/input3
[ 83.997357] generic-usb 0003:045E:0040.0001: input,hidraw0: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:12.1-2/input0
[ 83.997402] usbcore: registered new interface driver usbhid
[ 83.997408] usbhid: USB HID core driver
[ 84.260207] usb 6-3: new full speed USB device using ohci_hcd and address 2
[ 99.410194] usb 6-3: device descriptor read/64, error -110
[ 114.670184] usb 6-3: device descriptor read/64, error -110
[ 114.950222] usb 6-3: new full speed USB device using ohci_hcd and address 3
[ 130.100199] usb 6-3: device descriptor read/64, error -110
[ 145.360206] usb 6-3: device descriptor read/64, error -110
[ 145.620188] usb 6-3: new full speed USB device using ohci_hcd and address 4
[ 156.040197] usb 6-3: device not accepting address 4, error -110
[ 156.210204] usb 6-3: new full speed USB device using ohci_hcd and address 5
[ 166.630203] usb 6-3: device not accepting address 5, error -110
并记录在案。
$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
不幸的是,上面的输出中完全没有读卡器。大约 2 周前它还可以工作,直到我运行 10.04 时内核更新。
答案1
更新: dmesg 显示大量有关 USB 设备的读取错误,它们可能是鼠标性能不佳的原因。用户发现,断开其他 USB 设备的连接后,鼠标就可以重新工作了。
这可能是 APIC 问题,作为一种解决方法,您可以尝试使用以下选项启动系统:
noapictimer irqpoll
为此,您需要修改 /etc/default/grub 文件。步骤:
- 备份文件
sudo cp /etc/default/grub /etc/default/grub.bak
- 在 gedit 中打开文件
gksu gedit /etc/default/grub
并输入您的密码 - 找到这条线
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
- 将该行替换为
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noapictimer irqpoll"
- 保存文件并更新 grub 配置
sudo update-grub
- 重新启动系统
如果您想回滚更改,只需恢复 grub.bak 文件并再次 sudo update-grub :)
答案2
您是否正在运行默认的 Maverick 安装或进行了任何更改?例如,将面部识别部分添加到 GDM。
我承认我也遇到过同样的问题,但我很少重启电脑,所以很少注意到这个问题。它似乎只发生在我的台式机上,而不是笔记本电脑上。