USB 设备断开连接/触摸板关闭

USB 设备断开连接/触摸板关闭

我有一台 Toshiba Z20T-C 敞篷车,运行 Ubuntu 19.04,内核 5.0.0-29。几天/几周以来,可拆卸键盘底座(底部)中的触摸板、键盘背光和 USB 端口在启动到桌面后几乎立即停止工作。触摸屏和键盘继续工作。所有设备和端口在 BIOS 菜单中都可以工作,所以我排除了硬件缺陷。当我拆卸/重新连接底座时,键盘灯短暂闪烁,触摸板工作了几秒钟,然后再次死机。我尝试关闭 usbcore 的自动挂起(内核启动参数中的 usbcore.autosuspend=-1 并更新 grub)。这有帮助,直到屏幕关闭。之后触摸板又死机了。还尝试在 powertop 中切换某些 USB 设备的电源设置,但这没有帮助。但我不确定我是否瞄准了正确的设备。
断开/重新连接底座时,dmesg 告诉我:

--> disconnect here
[  264.391932] toshiba_acpi: Unknown event received 94
[  264.391955] toshiba_acpi: Unknown event received 86
[  264.392192] ACPI: \_SB_.PCI0.DOCK: undocking
--> connect here, touchpad works
[  270.991992] ACPI: \_SB_.PCI0.DOCK: docking
[  271.006017] toshiba_acpi: Unknown event received 94
[  271.006038] toshiba_acpi: Unknown event received 86
[  271.008403] battery: ACPI: Battery Slot [BAT2] (battery present)
[  271.567978] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  271.588533] usb 2-3: New USB device found, idVendor=0424, idProduct=5534, bcdDevice=60.80
[  271.588540] usb 2-3: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[  271.588543] usb 2-3: Product: USB5534B
[  271.588546] usb 2-3: Manufacturer: SMSC
[  271.591370] hub 2-3:1.0: USB hub found
[  271.591573] hub 2-3:1.0: 2 ports detected
[  271.715875] usb 1-3: new high-speed USB device number 9 using xhci_hcd
[  271.864417] usb 1-3: New USB device found, idVendor=0424, idProduct=2134, bcdDevice=60.80
[  271.864424] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  271.864427] usb 1-3: Product: USB2134B
[  271.864430] usb 1-3: Manufacturer: SMSC
[  271.865745] hub 1-3:1.0: USB hub found
[  271.866997] hub 1-3:1.0: 2 ports detected
[  272.011929] usb 1-3: USB disconnect, device number 9
[  272.064419] usb 2-3: USB disconnect, device number 5
--> touchpad dead

完整的 dmesg 日志是这里

编辑1:我使用“udevadm monitor”检查设备死机时会发生什么。它打印:

KERNEL[547.410340] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
KERNEL[547.410579] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
KERNEL[547.411309] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
KERNEL[547.411504] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
UDEV  [547.415427] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
UDEV  [547.417120] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
UDEV  [547.419275] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
UDEV  [547.424835] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
KERNEL[547.597264] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
KERNEL[547.597446] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
KERNEL[547.598157] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
KERNEL[547.598363] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
UDEV  [547.601256] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
UDEV  [547.606231] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
UDEV  [547.613479] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
UDEV  [547.618184] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)

因此看起来内核关闭了集线器

编辑2:我尝试将“acpi=off”添加到内核启动模式参数,并回滚到内核 5.0.0-13,但这没有任何改变。我还尝试添加 UDEV 规则文件“/etc/udev/rules.d/99-powersave.rules”:

ACTION=="add", SUBSYSTEM=="usb", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{power/autosuspend}="0"
ACTION=="add", SUBSYSTEM=="usb", ATTR{power/autosuspend_delay_ms}="-1"
ACTION=="add", SUBSYSTEM=="usb", ATTR{busnum}=="1", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{busnum}=="2", ATTR{power/control}="on"

但这也没什么用。我现在完全不知道下一步该怎么做。

编辑3:我现在已经尝试了内核版本 4.18.20、5.0.21 和 5.2.21,但都失败了。这可能是 udev / acpi / 驱动程序的问题,但我不知道该去哪里查找...

答案1

回答有许多 USB 自动关闭设置可供检查:

经过几天的努力,我终于在 Ubuntu 17.10 上找到了解决方案。希望这对所有遇到 D6000 底座问题的人都有用。以下格式为 markdown(懒得转换)

有关修复 Ubuntu 中 Dock 上显示器空白问题的说明。

确保在进行更改后重新启动!

禁用 USB 自动暂停
  • sudo gedit /etc/default/tlp并将以下值从 更改10
USB_AUTOSUSPEND=0
  • sudo gedit /etc/udev/rules.d/01-usb-dock.rules。这将创建一个新文件。
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1bcf", ATTR{idProduct}=="2b95", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1bcf", ATTR{idProduct}=="0005", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1d6b", ATTR{idProduct}=="0002", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1d6b", ATTR{idProduct}=="0003", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="0143", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04f3", ATTR{idProduct}=="24a1", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0608", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0610", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0620", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="06c4", ATTR{idProduct}=="c411", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="6006", TEST=="power/control", ATTR{power/control}="on"
禁用显示电源管理
  • sudo gedit /etc/X11/xorg.conf将以下选项附加到文件。
Section "Monitor"
Identifier "DVI-I-3-2"
Option "DPMS" "false"
EndSection

Section "Monitor"
Identifier "DVI-I-2-1"
Option "DPMS" "false"
EndSection
禁用音频暂停
  • sudo gedit /etc/pulse/default.pa. 注释掉下面所示的行。
### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle
在 BIOS 中禁用 USB 唤醒

机器开机时按 F12 键进入 BIOS。在Power Management>>下USB Wake Support取消选中两个框。

答案2

就我的情况而言,这毕竟是硬件缺陷。有一次,甚至键盘也坏了,所以我更换了整个键盘/底座部件。现在一切都恢复正常了,所以这不是 Linux 的问题……

答案3

我的 USB 3.5 英寸硬盘盒随机断开连接时出现了问题。

  1. 我发现建议关闭 BIOS 中的 USB xHCI Handoff 选项。

  2. 我还使用usbcore.autosuspend=-1内核参数禁用了USB 自动暂停(GRUB_CMDLINE_LINUX_DEFAULT="..."然后)/etc/default/grubsudo update-grub

以上两种方法都无济于事。

  1. 然后我添加了no-usb-handoff内核参数,以及
    usbcore.quirks=1234:5678:ben怪癖[ usb-storage.quirks=1234:5678:t1],
    其中1234:5678供应商编号产品编号您的设备标识符,可通过以下方式获取lsusb
e = USB_QUIRK_RESET (device can't be reset (e.g morph devices), don't use reset);
n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a pause after every control message);
t = NO_ATA_1X (don't allow ATA(12) and ATA(16) commands, uas only);

看来这招终于奏效了。再也没有断线了。

[1]https://www.kernel.org/doc/html/v5.0/admin-guide/kernel-parameters.html

相关内容