Mar*_*ter 7 logs usb console dmesg
当 USB 鼠标插入我的笔记本电脑时,dmesg 充斥着以下消息:
usb 3-1: USB disconnect, device number 28
usb 3-1: new low-speed USB device number 29 using xhci_hcd
usb 3-1: New USB device found, idVendor=045e, idProduct=00cb
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: Microsoft USB Optical Mouse
usb 3-1: Manufacturer: PixArt
usb 3-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
input: PixArt Microsoft USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/input/input39
hid-generic 0003:045E:00CB.001C: input: USB HID v1.11 Mouse [PixArt Microsoft USB Optical Mouse] on usb-0000:00:14.0-1/input0
usb 3-1: USB disconnect, device number 29
usb 3-1: new low-speed USB device number 30 using xhci_hcd
usb 3-1: New USB device found, idVendor=045e, idProduct=00cb
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: Microsoft USB Optical Mouse
usb 3-1: Manufacturer: PixArt
usb 3-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
input: PixArt Microsoft USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/input/input40
hid-generic 0003:045E:00CB.001D: input: USB HID v1.11 Mouse [PixArt Microsoft USB Optical Mouse] on usb-0000:00:14.0-1/input0
Run Code Online (Sandbox Code Playgroud)
看起来好像鼠标一直在被移除,然后又被重新发现。
当我登录控制台(即 CTRL+ALT+F1)时,这些消息也会淹没我的控制台。有没有办法解决这个问题,这样这些消息就不会打扰我?
临时解决方案(重启后会重置):
(作为根)
sysctl -w kernel.printk="3 4 1 7"
Run Code Online (Sandbox Code Playgroud)
上述的永久版本:
/etc/sysctl.d/
,也许no_msgs.conf
(必须以 .conf 结尾)文件内容:
kernel.printk = 3 4 1 7
Run Code Online (Sandbox Code Playgroud)作为 root,执行:(使用上面使用的任何文件名)这将立即生效,并将在每次重新启动时再次设置。
sysctl -p /etc/sysctl.d/no_msgs.conf
Run Code Online (Sandbox Code Playgroud)参数为kernel.printk
:(按从左到右的顺序)
这些值会影响打印或记录错误消息时 printk() 的行为。有关不同日志级别的更多信息,请参阅“man 2”syslog”。
本质上,我们将该值从默认值4降低到3,从而拒绝打印“ warn ( 4 )”类型消息,只有更糟糕的类型消息才会被允许打印到控制台。(3=错误,2=暴击,1=警报,0=紧急(呃哦!))
如果您发现3不能停止消息,请尝试2 4 1 7
,但实际上,您应该调查是什么导致您的鼠标不断重新连接。也许它没有获得足够的力量?尝试将其插入计算机上的其他端口,或者更好地将其插入自供电集线器。设备不应该那样振荡。
归档时间: |
|
查看次数: |
6371 次 |
最近记录: |