dmesg log flooding
Opened this issue · 2 comments
Hello,
First of all thank you for such nice software!
I've been using co2meter (0.2.5 from pip) with flask server option on my two PCs running Ubuntu 20.04
It seems that every request for co2 and temperature is followed by kernel message:
Dec 18 11:34:29 homie1 co2meter_server[30179]: INFO:root:[2021-12-18 11:34:29] 510 ppm, 23.8 deg C
Dec 18 11:34:29 homie1 kernel: hid-generic 0003:04D9:A052.00FA: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
Dec 18 11:35:01 homie1 co2meter_server[30179]: INFO:root:[2021-12-18 11:35:01] 507 ppm, 23.9 deg C
Dec 18 11:35:01 homie1 kernel: hid-generic 0003:04D9:A052.00FB: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
Dec 18 11:35:34 homie1 co2meter_server[30179]: INFO:root:[2021-12-18 11:35:34] 506 ppm, 23.9 deg C
Dec 18 11:35:34 homie1 kernel: hid-generic 0003:04D9:A052.00FC: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
so dmesg log looks like this:
[Sat Dec 18 11:35:01 2021] hid-generic 0003:04D9:A052.00FB: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
[Sat Dec 18 11:35:34 2021] hid-generic 0003:04D9:A052.00FC: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
[Sat Dec 18 11:36:06 2021] hid-generic 0003:04D9:A052.00FD: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
[Sat Dec 18 11:36:39 2021] hid-generic 0003:04D9:A052.00FE: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
[Sat Dec 18 11:37:11 2021] hid-generic 0003:04D9:A052.00FF: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
[Sat Dec 18 11:37:44 2021] hid-generic 0003:04D9:A052.0100: hiddev0,hidraw0: USB HID v1.10 Device [Holtek USB-zyTemp] on usb-0000:00:1a.0-1.5/input0
Is it possible to suppress these messages?
Hello @satter
Thank you for the report. To be honest I don't know why does it happen, since this logging is not set up explicitly by co2meter (neither do I fully understand what and how logs to dmesg).
Do you have any idea how to suppress it?
These logs seems to be generated by hid-core driver: https://github.com/torvalds/linux/blob/master/drivers/hid/hid-core.c#L2020
Similar log line appears on hid device connect:
[Sun Jan 2 21:05:39 2022] usb 3-2: new full-speed USB device number 3 using xhci_hcd
[Sun Jan 2 21:05:39 2022] usb 3-2: New USB device found, idVendor=2717, idProduct=5001, bcdDevice= 1.00
[Sun Jan 2 21:05:39 2022] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Sun Jan 2 21:05:39 2022] usb 3-2: Product: MI wireless mouse
[Sun Jan 2 21:05:39 2022] usb 3-2: Manufacturer: GTech
[Sun Jan 2 21:05:39 2022] input: GTech MI wireless mouse Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:2717:5001.74B7/input/input30
[Sun Jan 2 21:05:39 2022] input: GTech MI wireless mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:2717:5001.74B7/input/input31
[Sun Jan 2 21:05:39 2022] input: GTech MI wireless mouse Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:2717:5001.74B7/input/input32
[Sun Jan 2 21:05:39 2022] input: GTech MI wireless mouse System Control as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:2717:5001.74B7/input/input33
[Sun Jan 2 21:05:39 2022] hid-generic 0003:2717:5001.74B7: input,hiddev0,hidraw1: USB HID v1.10 Mouse [GTech MI wireless mouse] on usb-0000:00:14.0-2/input0
Maybe it is related to the way co2meter reads data from device? For example, co2mond does not trigger such logs for the same device