我正在对Ubuntu20.04上的usb_modeswitch
故障进行故障排除。
以下是各种命令的输出。他们中没有人真正详细地解释了失败的原因。
你知道如何修复usb_modeswitch
吗?
$ systemctl --失败
UNIT LOAD ACTIVE SUB DESCRIPTION
● usb_modeswitch@1-1.3.2.service loaded failed failed USB_ModeSwitch_1-1.3.2
$ systemctl状态usb_modeswitch@1-1.3.2.service
● usb_modeswitch@1-1.3.2.service - USB_ModeSwitch_1-1.3.2
Loaded: loaded (/lib/systemd/system/usb_modeswitch@.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-10-28 12:15:13 PDT; 25min ago
Docs: man:usb_modeswitch_dispatcher(1)
Process: 3680020 ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode 1-1.3.2 (code=exited, status=1/FAILURE)
Main PID: 3680020 (code=exited, status=1/FAILURE)
Oct 28 12:15:13 Satellite-E55 systemd[1]: Starting USB_ModeSwitch_1-1.3.2...
Oct 28 12:15:13 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 12:15:13 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Failed with result 'exit-code'.
Oct 28 12:15:13 Satellite-E55 systemd[1]: Failed to start USB_ModeSwitch_1-1.3.2.
$ grep modeswitch /var/log/syslog
Oct 28 11:46:05 Satellite-E55 systemd[1]: Starting USB_ModeSwitch_1-1.3.2...
Oct 28 11:46:05 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 11:46:05 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Failed with result 'exit-code'.
Oct 28 11:46:05 Satellite-E55 systemd[1]: Failed to start USB_ModeSwitch_1-1.3.2.
$ sudo systemctl启动usb_modeswitch@1-1.3.2
Job for usb_modeswitch@1-1.3.2.service failed because the control process exited with error code.
See "systemctl status usb_modeswitch@1-1.3.2.service" and "journalctl -xe" for details.
$日志-xe -xe
Oct 28 12:15:13 Satellite-E55 systemd[1]: Starting USB_ModeSwitch_1-1.3.2...
-- Subject: A start job for unit usb_modeswitch@1-1.3.2.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit usb_modeswitch@1-1.3.2.service has begun execution.
--
-- The job identifier is 50559.
Oct 28 12:15:13 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit usb_modeswitch@1-1.3.2.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Oct 28 12:15:13 Satellite-E55 systemd[1]: usb_modeswitch@1-1.3.2.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit usb_modeswitch@1-1.3.2.service has entered the 'failed' state with result 'exit-code'.
Oct 28 12:15:13 Satellite-E55 systemd[1]: Failed to start USB_ModeSwitch_1-1.3.2.
-- Subject: A start job for unit usb_modeswitch@1-1.3.2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit usb_modeswitch@1-1.3.2.service has finished with a failure.
--
-- The job identifier is 50559 and the job result is failed.
Oct 28 12:15:13 Satellite-E55 sudo[3680017]: pam_unix(sudo:session): session closed for user root
美元b
Bus 001 Device 004: ID 04ca:7017 Lite-On Technology Corp.
Bus 001 Device 008: ID 8087:07dc Intel Corp.
Bus 001 Device 020: ID 046d:0a0e Logitech, Inc.
Bus 001 Device 021: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 019: ID 03f0:032a HP, Inc
Bus 001 Device 018: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 026: ID 0480:a00c Toshiba America Inc
Bus 003 Device 025: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 003 Device 024: ID 0bda:0411 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 007: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 002 Device 006: ID 0bda:5411 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
发布于 2020-10-30 16:03:13
Update #1:在我删除打印机设置面板中的HPUSB打印机定义并尝试重新添加HPUSB打印机之前,以下操作是有效的。没有看到惠普的USB端口。我不得不取消评论我的修复,下面,并重新启动。然后,我可以添加惠普USB打印机回来。
我发现问题了!
usb_modeswitch
正试图打开我的惠普打印机!
这是线索..。
$ systemctl --失败
UNIT LOAD ACTIVE SUB DESCRIPTION
● usb_modeswitch@1-1.3.2.service loaded failed failed USB_ModeSwitch_1-1.3.2
1-1.3.2是失败设备的USB地址。那是哪种装置?
$ lsusb -tv
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
ID 0bda:0411 Realtek Semiconductor Corp.
|__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
ID 0bda:0411 Realtek Semiconductor Corp.
|__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
ID 0480:a00c Toshiba America Inc
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
ID 0bda:5411 Realtek Semiconductor Corp.
|__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
ID 0bda:5411 Realtek Semiconductor Corp.
|__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
|__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
ID 8087:8000 Intel Corp.
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
|__ Port 3: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 051d:0002 American Power Conversion Uninterruptible Power Supply
|__ Port 4: Dev 7, If 2, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:0a0e Logitech, Inc.
|__ Port 4: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 12M
ID 046d:0a0e Logitech, Inc.
|__ Port 4: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 12M
ID 046d:0a0e Logitech, Inc.
|__ Port 2: Dev 5, If 1, Class=Vendor Specific Class, Driver=, 480M
ID 03f0:032a HP, Inc
|__ Port 2: Dev 5, If 0, Class=Printer, Driver=usblp, 480M
ID 03f0:032a HP, Inc
|__ Port 5: Dev 8, If 0, Class=Wireless, Driver=btusb, 12M
ID 8087:07dc Intel Corp.
|__ Port 5: Dev 8, If 1, Class=Wireless, Driver=btusb, 12M
ID 8087:07dc Intel Corp.
|__ Port 8: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
ID 04ca:7017 Lite-On Technology Corp.
|__ Port 8: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
ID 04ca:7017 Lite-On Technology Corp
lsusb -tv
显示设备1-1.3.2是我的HP打印机!
|__ Port 2: Dev 5, If 0, Class=Printer, Driver=usblp, 480M
ID 03f0:032a HP, Inc
从lsusb
中我们可以看到,我的HP打印机是设备代码:
Bus 001 Device 019: ID 03f0:032a HP, Inc
所以现在我们去/lib/udev/rules.d/40-usb_modeswitch.rules
,我们发现:
# HP LaserJet Professional P1102w
ATTR{idVendor}=="03f0", ATTR{idProduct}=="032a", RUN+="usb_modeswitch '/%k'"
它与HP打印机的设备代码匹配。
我们评论一下第二行..。
# HP LaserJet Professional P1102w
#ATTR{idVendor}=="03f0", ATTR{idProduct}=="032a", RUN+="usb_modeswitch '/%k'"
我们重新启动,这一切都修复了!usb_modeswitch
不再失败时,试图翻转我的惠普打印机!
发布于 2021-09-25 03:56:24
由于这是谷歌的第一批结果之一,我将把我的解决方案留在这里,即使这不是完全相同的问题。
在我的例子中,问题实际上在于usb_modeswitch本身的一个bug,这个bug可以在这里找到:https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/1866926?comments=all
由于ubuntu 20提供了modeswitch的2.5.2
版本,所以解决方案是在2.6.0
版本上进行的,所以升级应该解决这个问题。
这个bug显然会影响覆盆子、pi/usb集线器和其他操作系统。
https://askubuntu.com/questions/1287789
复制相似问题