You are not logged in.

#1 2025-09-01 14:14:29

Matteo Peterlongo
Member
Registered: 2021-04-12
Posts: 9

systemd-udevd constant very high cpu usage

Hello everyone,

since the last week I noticed that the process called systemd-udevd is making intensive use of the cpu.
Does anyone have any Idea why this is happening and how to fix it.

Thank you in advance
Greetings,
Matteo

Offline

#2 2025-09-01 14:23:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: systemd-udevd constant very high cpu usage

Have you checked the systemd journal? Perhaps that can reveal more about the problem.

Did you attach any new devices to the machine recently?

I found this after searching for "systemd-udev high cpu": https://github.com/systemd/systemd/issues/25021


Jin, Jîyan, Azadî

Offline

#3 2025-09-01 14:49:10

Matteo Peterlongo
Member
Registered: 2021-04-12
Posts: 9

Re: systemd-udevd constant very high cpu usage

This is the output of journalct

-- Boot e97f00dd03ca4b7f944faad4374dfb8f --
ago 29 20:02:30 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
ago 29 20:02:30 thinkpad systemd-udevd[363]: Using default interface naming scheme 'v257'.
ago 29 20:02:30 thinkpad systemd-udevd[363]: /etc/udev/rules.d/01-ttyusb.rules:1 Invalid key/value pair, ignorin>
ago 29 20:02:30 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.
ago 29 20:02:30 thinkpad mtp-probe[410]: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2->
ago 29 20:02:30 thinkpad mtp-probe[410]: bus: 2, device: 2 was not an MTP device
ago 29 20:02:30 thinkpad mtp-probe[446]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1->
ago 29 20:02:30 thinkpad mtp-probe[446]: bus: 1, device: 3 was not an MTP device
ago 30 14:04:47 thinkpad systemd[1]: Stopping Rule-based Manager for Device Events and Files...
ago 30 14:04:47 thinkpad systemd[1]: systemd-udevd.service: Deactivated successfully.
ago 30 14:04:47 thinkpad systemd[1]: Stopped Rule-based Manager for Device Events and Files.
ago 30 14:04:47 thinkpad systemd[1]: systemd-udevd.service: Consumed 2h 12min 12.979s CPU time, 384.2M memory pe>
ago 30 14:04:47 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
ago 30 14:04:47 thinkpad systemd-udevd[24869]: Using default interface naming scheme 'v257'.
ago 30 14:04:47 thinkpad systemd-udevd[24869]: /etc/udev/rules.d/01-ttyusb.rules:1 Invalid key/value pair, ignor>
ago 30 14:04:47 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.
ago 30 14:05:17 thinkpad systemd[1]: Stopping Rule-based Manager for Device Events and Files...
ago 30 14:05:17 thinkpad systemd[1]: systemd-udevd.service: Deactivated successfully.
ago 30 14:05:17 thinkpad systemd[1]: Stopped Rule-based Manager for Device Events and Files.
ago 30 14:05:17 thinkpad systemd[1]: systemd-udevd.service: Consumed 43.271s CPU time, 35.8M memory peak.
ago 30 14:22:45 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
ago 30 14:22:45 thinkpad systemd-udevd[26119]: Using default interface naming scheme 'v257'.
ago 30 14:22:45 thinkpad systemd-udevd[26119]: /etc/udev/rules.d/01-ttyusb.rules:1 Invalid key/value pair, ignor>
ago 30 14:22:45 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.
-- Boot c88888c40b804e90a68af475b6d2f67d --
ago 31 10:15:58 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
ago 31 10:15:58 thinkpad systemd-udevd[361]: Using default interface naming scheme 'v257'.
ago 31 10:15:58 thinkpad systemd-udevd[361]: /etc/udev/rules.d/01-ttyusb.rules:1 Invalid key/value pair, ignorin>
ago 31 10:15:58 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.
ago 31 10:15:58 thinkpad mtp-probe[408]: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2->
ago 31 10:15:58 thinkpad mtp-probe[408]: bus: 2, device: 2 was not an MTP device
ago 31 10:15:58 thinkpad mtp-probe[450]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1->
ago 31 10:15:58 thinkpad mtp-probe[450]: bus: 1, device: 3 was not an MTP device
set 01 16:05:33 thinkpad systemd-udevd[361]: /etc/udev/rules.d/01-ttyusb.rules:1 Invalid key/value pair, ignorin>
set 01 16:47:19 thinkpad systemd[1]: Stopping Rule-based Manager for Device Events and Files...
set 01 16:47:19 thinkpad systemd[1]: systemd-udevd.service: Deactivated successfully.
set 01 16:47:19 thinkpad systemd[1]: Stopped Rule-based Manager for Device Events and Files.
set 01 16:47:19 thinkpad systemd[1]: systemd-udevd.service: Consumed 6h 9min 57.533s CPU time, 1.3G memory peak.
set 01 16:47:19 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
set 01 16:47:19 thinkpad systemd-udevd[26162]: Using default interface naming scheme 'v257'.
set 01 16:47:20 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.

Last edited by Matteo Peterlongo (2025-09-02 08:47:12)

Offline

#4 2025-09-01 19:25:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: systemd-udevd constant very high cpu usage

ix.io is down (not that I blame them, we really hammer their service) and the posted output is truncated and doesn't appear to be complete.

That /etc/udev/rules.d/01-ttyusb.rules looks to be throwing an error so check that file, and perhaps move it to see if that's the culprit.

Otherwise, if ix.io doesn't come back up soon please repost the journal contents but with the --no-pager (--no-p for short) option added to the journalctl command. Thanks!

EDIT: and please read the linked bug report, it seems very relevant.

Last edited by Head_on_a_Stick (2025-09-01 19:27:14)


Jin, Jîyan, Azadî

Offline

#5 2025-09-01 20:10:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,169

Re: systemd-udevd constant very high cpu usage

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Also post the /etc/udev/rules.d/01-ttyusb.rules and quantify "intensive" - how much (in numbers) and when (immediately, when plugging specific devices, after suspending, does it get worse over time, …)
Also probably

systemctl status systemd-udevd

@HoaS, ix.io is effectively dead, the link is from 2021, https://bbs.archlinux.org/viewtopic.php … 4#p1967494

Online

#6 2025-09-02 09:00:39

Matteo Peterlongo
Member
Registered: 2021-04-12
Posts: 9

Re: systemd-udevd constant very high cpu usage

Sorry, I don't know why I mistakenly included an ix.io link in my post.

Here is the 0x0.st link: https://0x0.st/KH7-.txt

Since I thought that /etc/udev/rules.d/01-ttyusb.rules could cause some problems I commented it out just to be sure.
However, this is the content:

# SUBSYSTEMS=="usb-serial", TAG+="uaccess", MODE=0666
# KERNEL=="ttyACM[0-9]*", MODE="0666"

systemctl status:

● systemd-udevd.service - Rule-based Manager for Device Events and Files
     Loaded: loaded (/usr/lib/systemd/system/systemd-udevd.service; static)
    Drop-In: /usr/lib/systemd/system/systemd-udevd.service.d
             └─50-rc_keymap.conf
     Active: active (running) since Mon 2025-09-01 16:51:45 CEST; 18h ago
 Invocation: b549a9d8485c4830a41544f479060e88
TriggeredBy: ● systemd-udevd-control.socket
             ● systemd-udevd-kernel.socket
       Docs: man:systemd-udevd.service(8)
             man:udev(7)
   Main PID: 373 (systemd-udevd)
     Status: "Processing with 32 children at max"
      Tasks: 17
     Memory: 244.6M (peak: 246M, swap: 2.4M, swap peak: 2.4M, zswap: 314.5K)
        CPU: 46min 35.699s
     CGroup: /system.slice/systemd-udevd.service
             └─udev
               ├─  373 /usr/lib/systemd/systemd-udevd
               ├─19434 "(udev-worker)"
               ├─19435 "(udev-worker)"
               ├─19436 "(udev-worker)"
               ├─19437 "(udev-worker)"
               ├─19438 "(udev-worker)"
               ├─19439 "(udev-worker)"
               ├─19440 "(udev-worker)"
               ├─19441 "(udev-worker)"
               ├─19443 "(udev-worker)"
               ├─19444 "(udev-worker)"
               ├─19446 "(udev-worker)"
               ├─19447 "(udev-worker)"
               ├─19448 "(udev-worker)"
               ├─19449 "(udev-worker)"
               ├─19450 "(udev-worker)"
               └─19452 "(udev-worker)"

set 01 16:51:45 thinkpad systemd[1]: Starting Rule-based Manager for Device Events and Files...
set 01 16:51:45 thinkpad systemd-udevd[373]: Using default interface naming scheme 'v257'.
set 01 16:51:45 thinkpad systemd[1]: Started Rule-based Manager for Device Events and Files.
set 01 16:51:45 thinkpad mtp-probe[421]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3"

Also, to be more precise, htop shows systemd-udevd constantly using 100% or more CPU

Offline

#7 2025-09-02 14:48:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,169

Re: systemd-udevd constant very high cpu usage

set 01 16:52:14 thinkpad udisksd[1573]: Mounted /dev/sda1 at /run/media/matteo/tmp_backup on behalf of uid 1000
set 02 10:11:33 thinkpad udisksd[1573]: Error statting /dev/sda1: No such file or directory
set 02 10:11:33 thinkpad udisksd[1573]: Cleaning up mount point /run/media/matteo/tmp_backup (device 8:1 no longer exists)
set 02 10:11:33 thinkpad udisksd[1573]: Error cleaning up mount point /run/media/matteo/tmp_backup: Error removing directory: Device or resource busy

There're ~ 78.000 lines of that - I'd look there.

Online

#8 2025-09-02 21:41:34

Matteo Peterlongo
Member
Registered: 2021-04-12
Posts: 9

Re: systemd-udevd constant very high cpu usage

That event (I think I removed an hard drive without ejecting it properly) happened yesterday. However, this kind of strange behavior has been going on for a few days if not weeks, even after several reboots

Offline

#9 2025-09-03 08:10:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,169

Re: systemd-udevd constant very high cpu usage

Please post a clean journal where this happened w/o this incident.

Online

Board footer

Powered by FluxBB