除非系统重新启动,否则重新插入后鼠标将无法工作

除非系统重新启动,否则重新插入后鼠标将无法工作

除非在系统启动期间插入鼠标,否则鼠标不会工作,并且如果我拔下鼠标再插回去,鼠标将再次停止工作,除非我在插入鼠标的情况下重新启动系统。此外,即使鼠标不工作,它也会通电。插入鼠标后,其下方的红灯就会亮起。

我正在使用 Ubuntu 18.10 (budgie)。我从 ElementryOS 切换到 Linux Mint 时开始遇到这个问题,当我

switched from Mint to Ubuntu budgie.

[  252.554893] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.0008/input/input21
[  252.618857] hid-generic 0003:1A2C:0042.0008: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  256.058888] usb 2-1.2: USB disconnect, device number 8
[  256.706680] usb 2-1.2: new low-speed USB device number 9 using ehci-pci
[  256.823807] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  256.823812] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  256.823814] usb 2-1.2: Product: Usb Mouse
[  256.823815] usb 2-1.2: Manufacturer: SEMICCHIP
[  256.827199] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.0009/input/input22
[  256.886866] hid-generic 0003:1A2C:0042.0009: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  260.063803] usb 2-1.2: USB disconnect, device number 9
[  260.666765] usb 2-1.2: new low-speed USB device number 10 using ehci-pci
[  260.779578] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  260.779591] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  260.779593] usb 2-1.2: Product: Usb Mouse
[  260.779594] usb 2-1.2: Manufacturer: SEMICCHIP
[  260.784180] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.000A/input/input23
[  260.842789] hid-generic 0003:1A2C:0042.000A: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  264.278050] usb 2-1.2: USB disconnect, device number 10
[  264.638619] usb 2-1.2: new low-speed USB device number 11 using ehci-pci
[  264.752063] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  264.752066] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  264.752068] usb 2-1.2: Product: Usb Mouse
[  264.752070] usb 2-1.2: Manufacturer: SEMICCHIP
[  264.754825] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.000B/input/input24
[  264.815509] hid-generic 0003:1A2C:0042.000B: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  270.422064] usb 2-1.2: USB disconnect, device number 11
[  271.055002] usb 2-1.2: new low-speed USB device number 12 using ehci-pci
[  271.167595] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  271.167599] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  271.167601] usb 2-1.2: Product: Usb Mouse
[  271.167602] usb 2-1.2: Manufacturer: SEMICCHIP
[  271.170469] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.000C/input/input25
[  271.227231] hid-generic 0003:1A2C:0042.000C: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  281.589311] usb 2-1.2: USB disconnect, device number 12
[  282.055406] usb 2-1.2: new low-speed USB device number 13 using ehci-pci
[  282.169314] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  282.169318] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  282.169320] usb 2-1.2: Product: Usb Mouse
[  282.169322] usb 2-1.2: Manufacturer: SEMICCHIP
[  282.173175] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.000D/input/input26
[  282.173316] hid-generic 0003:1A2C:0042.000D: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0
[  288.522312] usb 2-1.2: USB disconnect, device number 13
[  289.011677] usb 2-1.2: new low-speed USB device number 14 using ehci-pci
[  289.125022] usb 2-1.2: New USB device found, idVendor=1a2c, idProduct=0042, bcdDevice= 1.10
[  289.125026] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  289.125027] usb 2-1.2: Product: Usb Mouse
[  289.125029] usb 2-1.2: Manufacturer: SEMICCHIP
[  289.129574] input: SEMICCHIP Usb Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:1A2C:0042.000E/input/input27
[  289.187819] hid-generic 0003:1A2C:0042.000E: input,hidraw0: USB HID v1.10 Mouse [SEMICCHIP Usb Mouse] on usb-0000:00:1d.0-1.2/input0

编辑:使用 xinput list 命令后,我注意到我的鼠标“SEMICCHIP USB Mouse”不断消失和出现。另外,我想指出的是,问题不仅限于我的鼠标,还扩展到 USB 驱动器和硬盘。我无法访问存储设备,直到我重新启动设备,一旦我这样做,它们就会正常工作,直到我重新插入它们。

xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]

xinput list
    ⎡ Virtual core pointer                      id=2    [master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]
    ⎜   ↳ SEMICCHIP Usb Mouse                       id=15   [slave  pointer  (2)]

xinput query-state "SEMICCHIP Usb Mouse"
2 classes :
ButtonClass
    button[1]=up
    button[2]=up
    button[3]=up
    button[4]=up
    button[5]=up
    button[6]=up
    button[7]=up
    button[8]=up
    button[9]=up
ValuatorClass Mode=Relative Proximity=In
    valuator[0]=475
    valuator[1]=329
    valuator[2]=0
    valuator[3]=2925

xinput test "SEMICCHIP Usb Mouse"
## Nothing here. It's stuck with a blinking cursor ##

sudo service udev restart

编辑3;

sudo dmesg -l err
[    0.000000] ACPI: SPCR: Unexpected SPCR Access Width.  Defaulting to byte size
[    6.364123] ata1.00: failed to set xfermode (err_mask=0x40)

这是鼠标重新插入后断开连接的情况。

lsmod | grep usb
btusb                  45056  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
btintel                20480  1 btusb
bluetooth             552960  31 btrtl,btintel,btbcm,bnep,btusb,rfcomm
usb_storage            69632  2 uas,ums_realtek
usbhid                 49152  0
hid                   122880  2 usbhid,hid_generic


find /sys/bus/usb/devices/2-1.2/power/ -type f -exec sh -c 'echo -n "$1 " && cat $1' -- {} \;

/sys/bus/usb/devices/2-1.2/power/runtime_active_time 53500
/sys/bus/usb/devices/2-1.2/power/wakeup disabled
/sys/bus/usb/devices/2-1.2/power/wakeup_count 
/sys/bus/usb/devices/2-1.2/power/active_duration 53700
/sys/bus/usb/devices/2-1.2/power/wakeup_abort_count 
/sys/bus/usb/devices/2-1.2/power/wakeup_expire_count 
/sys/bus/usb/devices/2-1.2/power/runtime_active_kids 0
/sys/bus/usb/devices/2-1.2/power/wakeup_total_time_ms 
/sys/bus/usb/devices/2-1.2/power/wakeup_active_count 
/sys/bus/usb/devices/2-1.2/power/connected_duration 53712
/sys/bus/usb/devices/2-1.2/power/persist 1
/sys/bus/usb/devices/2-1.2/power/runtime_usage 1
/sys/bus/usb/devices/2-1.2/power/runtime_status active
/sys/bus/usb/devices/2-1.2/power/autosuspend_delay_ms 2000
/sys/bus/usb/devices/2-1.2/power/async enabled
/sys/bus/usb/devices/2-1.2/power/runtime_suspended_time 0
/sys/bus/usb/devices/2-1.2/power/wakeup_max_time_ms 
/sys/bus/usb/devices/2-1.2/power/wakeup_active 
/sys/bus/usb/devices/2-1.2/power/runtime_enabled forbidden
/sys/bus/usb/devices/2-1.2/power/control on
/sys/bus/usb/devices/2-1.2/power/level on
/sys/bus/usb/devices/2-1.2/power/autosuspend 2
/sys/bus/usb/devices/2-1.2/power/wakeup_last_time_ms 


find /sys/bus/usb/devices/2-1.2/port/ -type f -exec sh -c 'echo -n "$1 " && cat $1' -- {} \;

/sys/bus/usb/devices/2-1.2/port/uevent /sys/bus/usb/devices/2-1.2/port/power/runtime_active_time 14691368
/sys/bus/usb/devices/2-1.2/port/power/runtime_active_kids 0
/sys/bus/usb/devices/2-1.2/port/power/runtime_usage 1
/sys/bus/usb/devices/2-1.2/port/power/runtime_status active
/sys/bus/usb/devices/2-1.2/port/power/pm_qos_no_power_off 1
/sys/bus/usb/devices/2-1.2/port/power/autosuspend_delay_ms cat: /sys/bus/usb/devices/2-1.2/port/power/autosuspend_delay_ms: Input/output error
/sys/bus/usb/devices/2-1.2/port/power/async enabled
/sys/bus/usb/devices/2-1.2/port/power/runtime_suspended_time 0
/sys/bus/usb/devices/2-1.2/port/power/runtime_enabled enabled
/sys/bus/usb/devices/2-1.2/port/power/control auto
/sys/bus/usb/devices/2-1.2/port/over_current_count 0
/sys/bus/usb/devices/2-1.2/port/connect_type unknown
/sys/bus/usb/devices/2-1.2/port/quirks 00000000

答案1

你的

find /sys/bus/usb/devices/2-1.2/power/ -type f -exec sh -c 'echo -n "$1 " && cat $1' -- {} \;

/sys/bus/usb/devices/2-1.2/power/runtime_active_time 53500
/sys/bus/usb/devices/2-1.2/power/wakeup disabled
/sys/bus/usb/devices/2-1.2/power/wakeup_count 
/sys/bus/usb/devices/2-1.2/power/active_duration 53700
/sys/bus/usb/devices/2-1.2/power/wakeup_abort_count 
/sys/bus/usb/devices/2-1.2/power/wakeup_expire_count 
/sys/bus/usb/devices/2-1.2/power/runtime_active_kids 0
/sys/bus/usb/devices/2-1.2/power/wakeup_total_time_ms 
/sys/bus/usb/devices/2-1.2/power/wakeup_active_count 
/sys/bus/usb/devices/2-1.2/power/connected_duration 53712
/sys/bus/usb/devices/2-1.2/power/persist 1
/sys/bus/usb/devices/2-1.2/power/runtime_usage 1
/sys/bus/usb/devices/2-1.2/power/runtime_status active
/sys/bus/usb/devices/2-1.2/power/autosuspend_delay_ms 2000
/sys/bus/usb/devices/2-1.2/power/async enabled
/sys/bus/usb/devices/2-1.2/power/runtime_suspended_time 0
/sys/bus/usb/devices/2-1.2/power/wakeup_max_time_ms 
/sys/bus/usb/devices/2-1.2/power/wakeup_active 
/sys/bus/usb/devices/2-1.2/power/runtime_enabled forbidden
/sys/bus/usb/devices/2-1.2/power/control on
/sys/bus/usb/devices/2-1.2/power/level on
/sys/bus/usb/devices/2-1.2/power/autosuspend 2
/sys/bus/usb/devices/2-1.2/power/wakeup_last_time_ms 

输出确实显示了几个令我担心的选项值,而且很可能是导致问题的根源,所以让我们尝试更改它们,看看我们是否可以改变这个 USB 端口的行为方式。以下是我觉得特别令人担忧的选项值:

/sys/bus/usb/devices/2-1.2/power/runtime_enabled forbidden
/sys/bus/usb/devices/2-1.2/power/control on
/sys/bus/usb/devices/2-1.2/power/level on
/sys/bus/usb/devices/2-1.2/power/autosuspend 2

测试修复 1:现在,control我认为level应该设置为auto。control 是控制此 USB 设备运行时电源管理的用户空间属性。因此,让我们尝试更改它以及这些附加属性:

sudo echo "auto" > /sys/bus/usb/devices/2-1.2/power/level
sudo echo "auto" > /sys/bus/usb/devices/2-1.2/power/control
sudo echo "0" > /sys/bus/usb/devices/2-1.2/power/autosuspend
sudo echo "enabled" > /sys/bus/usb/devices/2-1.2/power/runtime_enabled
sudo echo "0" > /sys/bus/usb/devices/2-1.2/power/runtime_usage
sudo echo "-1" > /sys/bus/usb/devices/2-1.2/power/autosuspend_delay_ms 

最后,重新运行find /sys/bus/usb/devices/2-1.2/power/ -type f -exec sh -c 'echo -n "$1 " && cat $1' -- {} \;以确保这些更改正确进行,并通过拔下并重新插入鼠标来重新测试端口,并查看外观dmesg并查看connected disconnected序列是否仍在重复。

测试修复 2:我还注意到您lsmod | grep usb似乎没有列出任何 usb-common 或 usbcore 模块。您也可以尝试:

sudo modprobe usbcore
sudo modprobe usb-common

相关内容