在允许我登录或验证 sudo 之前出现虚假超时

在允许我登录或验证 sudo 之前出现虚假超时

有时当我在命令行中使用 sudo 时,20 多秒内什么都没有发生。之后,所需的事情发生了,即系统要求我在指纹读取器上滑动手指,如果没有发生,则输入密码。

同样,有时当屏幕被锁定时,我尝试解锁/恢复,有时它在大约 20 秒内什么也不做。

我该如何调试这种令人恼火的行为?还有人见过吗?

谢谢!

更新:这是其中一个事件期间的系统日志示例:

Apr  7 10:31:21 T450s-high kernel: [1007821.465715] usb 2-7: new full-speed USB device number 95 using xhci_hcd
Apr  7 10:31:21 T450s-high kernel: [1007821.601740] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:22 T450s-high dbus-daemon[1621]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.16814' (uid=0 pid=3682008 comm="sudo emacs /etc/hosts " label="unconfined")
Apr  7 10:31:22 T450s-high systemd[1]: Starting Fingerprint Authentication Daemon...
Apr  7 10:31:35 T450s-high systemd[3073]: Started Application launched by gsd-media-keys.
Apr  7 10:31:35 T450s-high systemd[3073]: Started VTE child process 3682066 launched by gnome-terminal-server process 1924388.
Apr  7 10:31:37 T450s-high kernel: [1007837.313788] usb 2-7: device descriptor read/64, error -110
Apr  7 10:31:37 T450s-high kernel: [1007837.549784] usb 2-7: new full-speed USB device number 96 using xhci_hcd
Apr  7 10:31:37 T450s-high kernel: [1007837.681771] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:37 T450s-high kernel: [1007837.925788] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:37 T450s-high kernel: [1007838.033835] usb usb2-port7: attempt power cycle
Apr  7 10:31:38 T450s-high kernel: [1007838.693813] usb 2-7: new full-speed USB device number 97 using xhci_hcd
Apr  7 10:31:38 T450s-high kernel: [1007838.693956] usb 2-7: Device not responding to setup address.
Apr  7 10:31:38 T450s-high kernel: [1007838.901916] usb 2-7: Device not responding to setup address.
Apr  7 10:31:38 T450s-high kernel: [1007839.109764] usb 2-7: device not accepting address 97, error -71
Apr  7 10:31:38 T450s-high kernel: [1007839.241739] usb 2-7: new full-speed USB device number 98 using xhci_hcd
Apr  7 10:31:38 T450s-high kernel: [1007839.241879] usb 2-7: Device not responding to setup address.
Apr  7 10:31:39 T450s-high kernel: [1007839.449901] usb 2-7: Device not responding to setup address.
Apr  7 10:31:39 T450s-high kernel: [1007839.661741] usb 2-7: device not accepting address 98, error -71
Apr  7 10:31:39 T450s-high kernel: [1007839.661817] usb usb2-port7: unable to enumerate USB device
Apr  7 10:31:39 T450s-high dbus-daemon[1621]: [system] Successfully activated service 'net.reactivated.Fprint'
Apr  7 10:31:39 T450s-high systemd[1]: Started Fingerprint Authentication Daemon.

这是 kern.log:

Apr  7 10:31:01 T450s-high kernel: [1007801.937805] usb usb2-port7: unable to enumerate USB device
Apr  7 10:31:21 T450s-high kernel: [1007821.465715] usb 2-7: new full-speed USB device number 95 using xhci_hcd
Apr  7 10:31:21 T450s-high kernel: [1007821.601740] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:37 T450s-high kernel: [1007837.313788] usb 2-7: device descriptor read/64, error -110
Apr  7 10:31:37 T450s-high kernel: [1007837.549784] usb 2-7: new full-speed USB device number 96 using xhci_hcd
Apr  7 10:31:37 T450s-high kernel: [1007837.681771] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:37 T450s-high kernel: [1007837.925788] usb 2-7: device descriptor read/64, error -71
Apr  7 10:31:37 T450s-high kernel: [1007838.033835] usb usb2-port7: attempt power cycle
Apr  7 10:31:38 T450s-high kernel: [1007838.693813] usb 2-7: new full-speed USB device number 97 using xhci_hcd
Apr  7 10:31:38 T450s-high kernel: [1007838.693956] usb 2-7: Device not responding to setup address.
Apr  7 10:31:38 T450s-high kernel: [1007838.901916] usb 2-7: Device not responding to setup address.
Apr  7 10:31:38 T450s-high kernel: [1007839.109764] usb 2-7: device not accepting address 97, error -71
Apr  7 10:31:38 T450s-high kernel: [1007839.241739] usb 2-7: new full-speed USB device number 98 using xhci_hcd
Apr  7 10:31:38 T450s-high kernel: [1007839.241879] usb 2-7: Device not responding to setup address.
Apr  7 10:31:39 T450s-high kernel: [1007839.449901] usb 2-7: Device not responding to setup address.
Apr  7 10:31:39 T450s-high kernel: [1007839.661741] usb 2-7: device not accepting address 98, error -71
Apr  7 10:31:39 T450s-high kernel: [1007839.661817] usb usb2-port7: unable to enumerate USB device

USB 错误看起来不太好。这有帮助吗?

$ lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 030: ID 0bc2:ab34 Seagate RSS LLC Backup Plus
Bus 003 Device 029: ID 17ef:1010 Lenovo ThinkPad Ultra Dock Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 008: ID 04ca:703c Lite-On Technology Corp. Integrated Camera
Bus 002 Device 123: ID 138a:0017 Validity Sensors, Inc. VFS 5011 fingerprint sensor
Bus 002 Device 003: ID 04f3:0418 Elan Microelectronics Corp. Touchscreen
Bus 002 Device 087: ID 047d:1022 Kensington Orbit Optical
Bus 002 Device 086: ID 046d:0826 Logitech, Inc. HD Webcam C525
Bus 002 Device 083: ID 17ef:100f Lenovo ThinkPad Ultra Dock Hub
Bus 002 Device 080: ID 17ef:1010 Lenovo ThinkPad Ultra Dock Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

更新

@Rinzwind 可能正在帮助我解决一个不相关的问题(USB)。与此相关,我列出了我的 /etc/modprobe.d 的内容:

lrwxrwxrwx 1 root root   41 Jun 30  2021 blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
-rw-r--r-- 1 root root 2733 Mar 30  2020 alsa-base.conf
-rw-r--r-- 1 root root 1518 Apr 12  2019 blacklist.conf
-rw-r--r-- 1 root root  677 Apr 12  2019 blacklist-framebuffer.conf
-rw-r--r-- 1 root root  154 Aug 24  2018 intel-microcode-blacklist.conf
-rw-r--r-- 1 root root  154 Jun 26  2018 amd64-microcode-blacklist.conf
-rw-r--r-- 1 root root  325 May 28  2018 blacklist-ath_pci.conf
-rw-r--r-- 1 root root  210 May 28  2018 blacklist-firewire.conf
-rw-r--r-- 1 root root  583 May 28  2018 blacklist-rare-network.conf
-rw-r--r-- 1 root root  347 May 28  2018 iwlwifi.conf
-rw-r--r-- 1 root root  127 Feb  7  2017 dkms.conf
-rw-r--r-- 1 root root 2507 Jul 30  2015 alsa-base.conf~
-rw-r--r-- 1 root root  156 Jul 30  2015 blacklist-modem.conf

没有“options:”文件。我应该创建它吗?

至于域名解析可能是问题所在,我怎么知道呢?我在一个通过以太网连接的大学校园里,但也许与我自己的主机名有关的问题可能是问题所在?

答案1

这回答了日志中的错误,但可能不是问题的答案,所以如果不是,请给我发私信,我会将其删除。

device descriptor read/64, error -110可能是由 造成的-71。关于device descriptor read/64, error -71。该错误可能是长时间延迟的原因。

修改文件

 /etc/modprobe.d/options:

并添加

options usbcore use_both_schemes=y

可能需要重新启动。

来源解释如下:

“旧方案”是 Linux 2.6.10 之前的工作方式。当插入新设备时,系统首先为其分配一个地址,然后读取设备描述符的初始 8 个字节,然后读取整个 18 字节的设备描述符。

“新方案”基本上就是 Windows 的工作方式。(毫不奇怪,有些设备无法以其他方式工作。)插入新设备时,系统首先发出 64 字节的设备描述符读取请求,然后重置设备,为其分配地址,然后读取实际的 18 字节设备描述符。

这些恶作剧的原因是,对于全速设备,端点 0 的最大数据包大小 (ep0maxpacket) 事先是未知的。它可能是 8、16、32 或 64 字节。(低速设备必须使用 8,高速设备必须使用 64。)ep0maxpacket 值存储在设备描述符的初始 8 个字节中,但要读取设备描述符,您必须使用端点 0!

上述两种方案是解决这个“先有鸡还是先有蛋”问题的两种常见方案。旧方案是 USB 实施者论坛推荐的方案(这使它成为“标准”);新方案是 Microsoft 使用的方案(这使它成为另一种“标准”!)。设计良好的符合标准的设备可以很好地与任何一种方案配合使用。不幸的是,似乎无论你选择哪种方案,一些设计不良的不符合标准的设备都无法工作。在特别糟糕的情况下,人们可以使用一个额外的 usbcore.ko 模块参数:

use_both_schemes=y

这将导致系统尝试其中一种方案,如果失败,则尝试另一种方案。(也许这应该始终是默认的......)

相关内容