Systemd-udevd активно потребляет ресурсы ЦП

Всем доброго времени суток!
У меня вот какая проблема: после обновления ядра linux-lts-4.9.78 на ядро linux-lts-4.14.16 (и далее на linux-lts-4.14.17) у меня systemd-udevd после загрузки потребляет ~12% ЦП. Если откатится назад на 4.9.78, то все нормально.
Подскажите, пожалуйста, что нужно посмотреть, чтобы понять в чем проблема?
Пробовал смотреть вот такой командой:
sudo udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1326.600584] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.600970] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.604156] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.604260] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.604661] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.610772] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.610927] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.611336] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.616738] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.616901] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.617283] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.622787] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.622955] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.623401] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.628391] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.628580] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
UDEV  [1326.628982] unbind   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
KERNEL[1326.634191] bind     /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7.2/2-1.7.2:1.0 (usb)
И вот подобный спам bind/unbind продолжается все время. Может, в этом дело?
Если я правильно понял, то в этом списке устройств:
[gena@AlienwareM15x ~]$ lspci
00:00.0 Host bridge: Intel Corporation Core Processor DMI (rev 11)
00:03.0 PCI bridge: Intel Corporation Core Processor PCI Express Root Port 1 (rev 11)
00:08.0 System peripheral: Intel Corporation Core Processor System Management Registers (rev 11)
00:08.1 System peripheral: Intel Corporation Core Processor Semaphore and Scratchpad Registers (rev 11)
00:08.2 System peripheral: Intel Corporation Core Processor System Control and Status Registers (rev 11)
00:08.3 System peripheral: Intel Corporation Core Processor Miscellaneous Registers (rev 11)
00:10.0 System peripheral: Intel Corporation Core Processor QPI Link (rev 11)
00:10.1 System peripheral: Intel Corporation Core Processor QPI Routing and Protocol Registers (rev 11)
00:19.0 Ethernet controller: Intel Corporation 82577LC Gigabit Network Connection (rev 06)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 06)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 06)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation PM55 Chipset LPC Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
02:00.0 VGA compatible controller: NVIDIA Corporation GK106M [GeForce GTX 765M] (rev a1)
02:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)
07:00.0 Network controller: Broadcom Limited BCM43224 802.11a/b/g/n (rev 01)
09:07.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
09:07.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
09:07.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
09:07.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-Core Registers (rev 04)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 04)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 04)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 04)
ff:03.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller (rev 04)
ff:03.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Target Address Decoder (rev 04)
ff:03.4 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Test Registers (rev 04)
ff:04.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Control Registers (rev 04)
ff:04.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Address Registers (rev 04)
ff:04.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Rank Registers (rev 04)
ff:04.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers (rev 04)
ff:05.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Control Registers (rev 04)
ff:05.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Address Registers (rev 04)
ff:05.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Rank Registers (rev 04)
ff:05.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers (rev 04)
[gena@AlienwareM15x ~]$ lsusb
Bus 002 Device 008: ID 413c:8156 Dell Computer Corp. Wireless 370 Bluetooth Mini-card
Bus 002 Device 007: ID 413c:8158 Dell Computer Corp. Integrated Touchpad / Trackstick
Bus 002 Device 006: ID 413c:8157 Dell Computer Corp. Integrated Keyboard
Bus 002 Device 005: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 002 Device 004: ID 187c:0512 Alienware Corporation
Bus 002 Device 003: ID 046d:c24a Logitech, Inc. G600 Gaming Mouse
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0c45:6412 Microdia
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...мое проблемное устройство вот это:
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
Как можно понять для чего оно или почему происходит такой баг?
В linux-lts-4.9.78 никакого флуда в udevadm monitor нет...
Можно, конечно, сидеть и на старом ядре, но хочется понять в чем проблема :)
С тех пор, как modprobe и insmod заменили на обёртки для библиотеки kmod, udev (тогда ещё не systemd) научился загружать модули ядра непосредственно с помощью этой библиотеки, без явного вызова сторонних программ.
По-видимому, проблема не в udev, а в модуле, который она (неудачно) загружает или пытается загрузить.
Можете попробовать запостить баг.
Natrio
С тех пор, как modprobe и insmod заменили на обёртки для библиотеки kmod, udev (тогда ещё не systemd) научился загружать модули ядра непосредственно с помощью этой библиотеки, без явного вызова сторонних программ.
По-видимому, проблема не в udev, а в модуле, который она (неудачно) загружает или пытается загрузить.
Можете попробовать запостить баг.
А подскажите, пожалуйста, куда можно по поводу этого бага отписать?
Shatur
Как можно понять для чего оно
Узнать устройства, подключенные к контроллеру/шине, можно, используя утилиту lshw.
Если устройство не нужно, попробуй отключить его.
Ошибки не исчезают с опытом - они просто умнеют
vasek
Узнать устройства, подключенные к контроллеру/шине, можно, используя утилиту lshw.
Если устройство не нужно, попробуй отключить его.
Я так понимаю, что 00:1d.0 это оно:
*-usb:1
             description: USB controller
             product: 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: 06
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:23 memory:f0f27400-f0f277ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 4.9.78-1-lts ehci_hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 4.09
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@2:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=8 speed=480Mbit/s
                 *-usb:0
                      description: Mouse
                      product: Gaming Mouse G600
                      vendor: Logitech
                      physical id: 2
                      bus info: usb@2:1.2
                      version: 77.00
                      serial: A1A4B636A8D10012
                      capabilities: usb-2.00
                      configuration: driver=usbhid maxpower=500mA speed=12Mbit/s
                 *-usb:1
                      description: Human interface device
                      product: Mobiles
                      vendor: Alienware Gaming
                      physical id: 4
                      bus info: usb@2:1.4
                      version: 0.00
                      serial: 1.1.3
                      capabilities: usb-1.10
                      configuration: driver=usbhid maxpower=64mA speed=12Mbit/s
                 *-usb:2
                      description: USB hub
                      product: BCM2046B1
                      vendor: Broadcom
                      physical id: 7
                      bus info: usb@2:1.7
                      version: 1.00
                      capabilities: usb-2.00
                      configuration: driver=hub maxpower=94mA slots=3 speed=12Mbit/s
                    *-usb:0
                         description: Keyboard
                         product: Integrated Keyboard
                         vendor: Dell Computer Corp.
                         physical id: 1
                         bus info: usb@2:1.7.1
                         version: 1.00
                         capabilities: usb-2.00
                         configuration: driver=usbhid maxpower=2mA speed=12Mbit/s
                    *-usb:1 UNCLAIMED
                         description: Mouse
                         product: Integrated Touchpad / Trackstick
                         vendor: Dell Computer Corp.
                         physical id: 2
                         bus info: usb@2:1.7.2
                         version: 1.00
                         capabilities: usb-2.00
                         configuration: maxpower=2mA speed=12Mbit/s
                    *-usb:2
                         description: Bluetooth wireless interface
                         product: Dell Wireless 370 Bluetooth Mini-card
                         vendor: Dell Computer Corp
                         physical id: 3
                         bus info: usb@2:1.7.3
                         version: 4.56
                         capabilities: bluetooth usb-2.00
                         configuration: driver=btusb maxpower=100mA speed=12Mbit/s
И в нем находятся остальные устройства?
Shatur
Я так понимаю, что 00:1d.0 это оно:
И в нем находятся остальные устройства?
Узнаем какие устройства подключены к контроллеру (в выводе выбираем нужный, например, мой вывод для 00:1d.0)
sudo lshw -businfo
pci@0000:00:1d.0                 bus            6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
usb@4             usb4           bus            EHCI Host Controller
usb@4:1                          bus            Integrated Rate Matching Hub
usb@4:1.1                        generic        HUAWEI Mobile
usb@4:1.2                        input          USB OPTICAL MOUSE
usb@4:1.4                        multimedia     HP HD Webcam [Fixed]
usb@4:1.6                        communication  AR3011 Bluetooth
и ищи по шине свое устройство 2-1.7.2. Уточнить можно по lsusb -t, а лучше по tree /sys/bus/usb/drivers - в этом выводе будет много строк, ищи по шине, там же будет указан и драйвер, по которому можно тоже догадаться, что это за устройство.

EDIT 1 - привожу часть своего вывода tree /sys/bus/usb/drivers , таких строк будет несколько, ориентируйся по контроллеру 1d.0, выйдешь на шины устройств и можешь сравнить с 1-ым выводом sudo lshw -businfo. Вообще, как тебе удобнее, но я, обычно, всегда перепроверяю.
└── uvcvideo
├── 4-1.4:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.4/4-1.4:1.0
├── 4-1.4:1.1 -> ../../../../devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.4/4-1.4:1.1
├── bind
├── module -> ../../../../module/uvcvideo
Ошибки не исчезают с опытом - они просто умнеют
vasek
Узнаем какие устройства подключены к контроллеру (в выводе выбираем нужный, например, мой вывод для 00:1d.0)
Спасибо! Т.е. в моем выводе:
sudo lshw -businfo
Bus info          Device    Class          Description
======================================================
                            system         M15x
                            bus            Motherboard
                            memory         118KiB BIOS
                            bus            Motherboard
cpu@0                       processor      Intel(R) Core(TM) i7 CPU       Q 740  @ 1.73GHz
                            memory         32KiB L1 cache
                            memory         256KiB L2 cache
                            memory         6MiB L3 cache
                            memory         8GiB System Memory
                            memory         SODIMM Synchronous [empty]
                            memory         8GiB SODIMM DDR3 Synchronous 1333 MHz (0,8 ns)
pci@0000:00:00.0            bridge         Core Processor DMI
pci@0000:00:03.0            bridge         Core Processor PCI Express Root Port 1
pci@0000:02:00.0            display        GK106M [GeForce GTX 765M]
pci@0000:02:00.1            multimedia     GK106 HDMI Audio Controller
pci@0000:00:08.0            generic        Core Processor System Management Registers
pci@0000:00:08.1            generic        Core Processor Semaphore and Scratchpad Registers
pci@0000:00:08.2            generic        Core Processor System Control and Status Registers
pci@0000:00:08.3            generic        Core Processor Miscellaneous Registers
pci@0000:00:10.0            generic        Core Processor QPI Link
pci@0000:00:10.1            generic        Core Processor QPI Routing and Protocol Registers
pci@0000:00:19.0  enp0s25   network        82577LC Gigabit Network Connection
pci@0000:00:1a.0            bus            5 Series/3400 Series Chipset USB2 Enhanced Host Controller
usb@1             usb1      bus            EHCI Host Controller
usb@1:1                     bus            Integrated Rate Matching Hub
usb@1:1.4                   multimedia     Laptop_Integrated_Webcam_2M
pci@0000:00:1b.0            multimedia     5 Series/3400 Series Chipset High Definition Audio
pci@0000:00:1c.0            bridge         5 Series/3400 Series Chipset PCI Express Root Port 1
pci@0000:00:1c.2            bridge         5 Series/3400 Series Chipset PCI Express Root Port 3
pci@0000:00:1c.3            bridge         5 Series/3400 Series Chipset PCI Express Root Port 4
pci@0000:07:00.0  wlp7s0b1  network        BCM43224 802.11a/b/g/n
pci@0000:00:1d.0            bus            5 Series/3400 Series Chipset USB2 Enhanced Host Controller
usb@2             usb2      bus            EHCI Host Controller
usb@2:1                     bus            Integrated Rate Matching Hub
usb@2:1.2                   input          Gaming Mouse G600
usb@2:1.4                   input          Mobiles
usb@2:1.7                   bus            BCM2046B1
usb@2:1.7.1                 input          Integrated Keyboard
usb@2:1.7.2                 input          Integrated Touchpad / Trackstick
usb@2:1.7.3                 communication  Dell Wireless 370 Bluetooth Mini-card
pci@0000:00:1e.0            bridge         82801 Mobile PCI Bridge
pci@0000:09:07.0            bus            R5C832 IEEE 1394 Controller
pci@0000:09:07.1            generic        R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
pci@0000:09:07.2            generic        R5C592 Memory Stick Bus Host Adapter
pci@0000:09:07.3            generic        xD-Picture Card Controller
pci@0000:00:1f.0            bridge         PM55 Chipset LPC Interface Controller
pci@0000:00:1f.2            storage        5 Series/3400 Series Chipset 6 port SATA AHCI Controller
pci@0000:00:1f.3            bus            5 Series/3400 Series Chipset SMBus Controller
pci@0000:ff:00.0            bridge         Core Processor QuickPath Architecture Generic Non-Core Registers
pci@0000:ff:00.1            bridge         Core Processor QuickPath Architecture System Address Decoder
pci@0000:ff:02.0            bridge         Core Processor QPI Link 0
pci@0000:ff:02.1            bridge         Core Processor QPI Physical 0
pci@0000:ff:03.0            bridge         Core Processor Integrated Memory Controller
pci@0000:ff:03.1            bridge         Core Processor Integrated Memory Controller Target Address Decoder
pci@0000:ff:03.4            bridge         Core Processor Integrated Memory Controller Test Registers
pci@0000:ff:04.0            bridge         Core Processor Integrated Memory Controller Channel 0 Control Registers
pci@0000:ff:04.1            bridge         Core Processor Integrated Memory Controller Channel 0 Address Registers
pci@0000:ff:04.2            bridge         Core Processor Integrated Memory Controller Channel 0 Rank Registers
pci@0000:ff:04.3            bridge         Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers
pci@0000:ff:05.0            bridge         Core Processor Integrated Memory Controller Channel 1 Control Registers
pci@0000:ff:05.1            bridge         Core Processor Integrated Memory Controller Channel 1 Address Registers
pci@0000:ff:05.2            bridge         Core Processor Integrated Memory Controller Channel 1 Rank Registers
pci@0000:ff:05.3            bridge         Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers
                            power          Intel Corporation
                            system
                            power          To Be Defined By O.E.M
...нужное устройство:
usb@2:1.7.2                 input          Integrated Touchpad / Trackstick
Надо попробовать выключить тачпад. Может ДЕ его пытается включить, например, а ядро выключает?
Shatur
…нужное устройство:

usb@2:1.7.2 input Integrated Touchpad / Trackstick

Надо попробовать выключить тачпад. Может ДЕ его пытается включить, например, а ядро выключает?
Да, все верно, посмотри предыдущий пост - добавил второй вывод, для лучшего понимания.
Попробуй отключи тачпад и посмотри, как скажется на загрузке cpu.
Погуглил такой bug и что то он мне не попался. Может это и bug, если пропадает при понижении версии ядра, а может bug обусловлен дефектом железа или драйвера. Гадать нет смысла. Подожди до обновления нового ядра, а пока можешь попробовать отключить тачпад - но здесь нужно пробовать разными способами, какой сработает, не знаю.
Ошибки не исчезают с опытом - они просто умнеют
vasek
Попробуй отключи тачпад и посмотри, как скажется на загрузке cpu.
Выключил тачпад, пробовал в самой DE (Plasma) и горячей клавише на клавиатуре. Но ЦП все так же нагружен(
Или надо отключить как-то более глобально?

UPD: Заметил, что нагрузка ЦП появляется только после входа в графическое окружение
Чтобы экспериментировать нужно разобраться с твоим подключением - странная схема.
usb@2:1.2                   input          Gaming Mouse G600
usb@2:1.4                   input          Mobiles
usb@2:1.7.1                 input          Integrated Keyboard
usb@2:1.7.2                 input          Integrated Touchpad / Trackstick
Сравни с моей, общепринятой
sudo lshw -businfo | grep input
usb@4:1.2                        input          USB OPTICAL MOUSE
Не пойму почему такая схема - то ли так и было, то ли что делал сам? Да, и вспомнил — год назад у тебя была проблема с аудио и, как помню, ты писал, что твое железо сборное. Может поэтому такая странная схема.
Хотел, сначала предложить тебе отключить (unbind) шину 2:1.7, но здесь сидит и тачпад и клавиатура, потом не сможешь ничего сделать с отключенной клавиатурой. Я бы попробовал разделить и тачпад и клаву, чтобы они были на разных шинах, если, конечно, это возможно.
Можно, конечно, попробовать отключить (unbind) 2:1.7.2 и посмотреть, что будет, но не понятно с этими шинами — то ли установлен дополнительный хаб, то ли что.
Попробовать то можно, но при этом нужно одновременно и смотреть логи udevadm monitor и нагрузку cpu.
А может у тебя cpu грузится по другой причине? Какой процесс грузит.
Вообщем тебе виднее.
Ошибки не исчезают с опытом - они просто умнеют
 
Зарегистрироваться или войдите чтобы оставить сообщение.