You are not logged in.

#1 2025-05-16 12:57:11

afrostmage
Member
Registered: 2024-09-05
Posts: 20

[Abandoned] Adding udev rule doubles boot time

I added a udev rule to block the bluetooth "part?' of my internal intel ax200, which works, but now I find that my boot time doubled from ~ 13s to ~ 27s (I know big deal xD)

❯ systemd-analyze
Startup finished in 17.399s (firmware) + 2.925s (loader) + 1.018s (kernel) + 3.086s (initrd) + 2.801s (userspace) = 27.231s
graphical.target reached after 2.799s in userspace.

the delay seems to be caused by an increase in the firmware part of the boot process.

❯ systemd-analyze blame
3.723s sys-devices-LNXSYSTM:00-LNXSYBUS:00-MSFT0101:00-tpmrm-tpmrm0.device
3.723s dev-tpmrm0.device
3.716s sys-devices-platform-serial8250-serial8250:0-serial8250:0.1-tty-ttyS1.device
3.716s dev-ttyS1.device
3.715s sys-devices-platform-serial8250-serial8250:0-serial8250:0.2-tty-ttyS2.device
3.715s dev-ttyS2.device
3.715s dev-ttyS0.device
3.715s sys-devices-platform-serial8250-serial8250:0-serial8250:0.0-tty-ttyS0.device
3.713s dev-ttyS3.device
3.713s sys-devices-platform-serial8250-serial8250:0-serial8250:0.3-tty-ttyS3.device
3.703s sys-module-fuse.device
3.702s sys-module-configfs.device
3.319s dev-nvme0n1p2.device
3.319s dev-disk-by\x2dpartuuid-c0b93cf8\x2da206\x2d4205\x2da65c\x2d1af53fd9235c.device
3.319s dev-disk-by\x2ddiskseq-1\x2dpart2.device
3.319s sys-devices-pci0000:00-0000:00:1d.0-0000:06:00.0-nvme-nvme0-nvme0n1-nvme0n1p2.device
3.319s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-aa9b59d0\x2d8dfe\x2d40e8\x2d8c30\x2d147a314cb140.device
3.319s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK__194324B22667\x2dpart2.device
3.319s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-2.device
3.319s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667\x2dpart2.device
3.319s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart2.device
3.319s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667_1\x2dpart2.device
3.319s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-c0b93cf8\x2da206\x2d4205\x2da65c\x2d1af53fd9235c.device
3.319s dev-disk-by\x2duuid-aa9b59d0\x2d8dfe\x2d40e8\x2d8c30\x2d147a314cb140.device
3.319s dev-disk-by\x2did-nvme\x2deui.000000000000000100a0751924b22667\x2dpart2.device
3.318s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart1.device
3.318s sys-devices-pci0000:00-0000:00:1d.0-0000:06:00.0-nvme-nvme0-nvme0n1-nvme0n1p1.device
3.318s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667\x2dpart1.device
3.318s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK__194324B22667\x2dpart1.device
3.318s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667_1\x2dpart1.device
3.318s dev-disk-by\x2ddiskseq-1\x2dpart1.device
3.318s dev-disk-by\x2did-nvme\x2deui.000000000000000100a0751924b22667\x2dpart1.device
3.318s dev-nvme0n1p1.device
3.318s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-DFBC\x2d1C5C.device
3.318s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-1.device
3.318s dev-disk-by\x2dpartuuid-5b8278fb\x2d2964\x2d4965\x2d843b\x2d751b4ae333bd.device
3.318s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-5b8278fb\x2d2964\x2d4965\x2d843b\x2d751b4ae333bd.device
3.318s dev-disk-by\x2duuid-DFBC\x2d1C5C.device
3.317s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667\x2dpart3.device
3.317s dev-disk-by\x2duuid-c3adfef4\x2d45a5\x2d4ff5\x2db5b3\x2d435989f2967e.device
3.317s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-3.device
3.317s dev-disk-by\x2dpartuuid-44d98732\x2dcc4d\x2d48b9\x2d8852\x2d5bb6c020de74.device
3.317s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-c3adfef4\x2d45a5\x2d4ff5\x2db5b3\x2d435989f2967e.device
3.317s dev-disk-by\x2ddiskseq-1\x2dpart3.device
3.317s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart3.device
3.317s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK__194324B22667\x2dpart3.device
3.317s dev-gpt\x2dauto\x2droot.device
3.317s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-44d98732\x2dcc4d\x2d48b9\x2d8852\x2d5bb6c020de74.device
3.317s sys-devices-pci0000:00-0000:00:1d.0-0000:06:00.0-nvme-nvme0-nvme0n1-nvme0n1p3.device
3.317s dev-disk-by\x2did-nvme\x2deui.000000000000000100a0751924b22667\x2dpart3.device
3.317s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667_1\x2dpart3.device
3.317s dev-nvme0n1p3.device
3.308s dev-disk-by\x2dpath-pci\x2d0000:06:00.0\x2dnvme\x2d1.device
3.308s sys-devices-pci0000:00-0000:00:1d.0-0000:06:00.0-nvme-nvme0-nvme0n1.device
3.308s dev-disk-by\x2ddiskseq-1.device
3.308s dev-disk-by\x2did-nvme\x2deui.000000000000000100a0751924b22667.device
3.308s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667.device
3.308s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK_________194324B22667_1.device
3.308s dev-nvme0n1.device
3.308s dev-disk-by\x2did-nvme\x2dMicron_2200_MTFDHBA1T0TCK__194324B22667.device
2.288s sys-devices-pci0000:00-0000:00:02.0-drm-card0-card0\x2deDP\x2d1-intel_backlight.device
 706ms initrd-switch-root.service
 365ms ldconfig.service
 354ms NetworkManager.service
 276ms plymouth-start.service
 237ms systemd-journal-flush.service
 228ms user@1000.service
 182ms systemd-udev-trigger.service
 134ms systemd-tmpfiles-setup.service
 131ms ufw.service
 131ms plymouth-switch-root.service
 115ms geoclue.service
 111ms power-profiles-daemon.service
 108ms upower.service
  91ms accounts-daemon.service
  87ms systemd-resolved.service
  84ms systemd-udevd.service
  76ms systemd-tmpfiles-setup-dev-early.service
  75ms udisks2.service
  69ms lm_sensors.service
  67ms systemd-journald.service
  63ms polkit.service
  56ms systemd-hostnamed.service
  54ms boot.mount
  54ms systemd-logind.service
  54ms bluetooth.service
  51ms systemd-rfkill.service
  51ms dbus-broker.service
  51ms systemd-timesyncd.service
  49ms plymouth-quit-wait.service
  48ms plymouth-quit.service
  45ms systemd-binfmt.service
  42ms dev-disk-by\x2duuid-aa9b59d0\x2d8dfe\x2d40e8\x2d8c30\x2d147a314cb140.swap
  40ms systemd-tmpfiles-setup-dev.service
  40ms nbfc_service.service
  38ms plymouth-read-write.service
  36ms systemd-backlight@backlight:intel_backlight.service
  34ms initrd-cleanup.service
  33ms systemd-sysusers.service
  33ms systemd-journal-catalog-update.service
  33ms initrd-parse-etc.service
  32ms dev-mqueue.mount
  32ms dev-hugepages.mount
  32ms alsa-restore.service
  32ms systemd-vconsole-setup.service
  31ms sys-kernel-debug.mount
  31ms sys-kernel-tracing.mount
  30ms kmod-static-nodes.service
  30ms systemd-modules-load.service
  29ms systemd-user-sessions.service
  29ms wpa_supplicant.service
  25ms tmp.mount
  24ms cpupower.service
  24ms systemd-userdbd.service
  23ms user-runtime-dir@1000.service
  23ms modprobe@dm_mod.service
  23ms modprobe@loop.service
  22ms intel-undervolt.service
  20ms rtkit-daemon.service
  18ms systemd-random-seed.service
  17ms systemd-remount-fs.service
  17ms nvidia-persistenced.service
  17ms systemd-update-utmp.service
  16ms systemd-update-done.service
  15ms modprobe@configfs.service
  14ms modprobe@fuse.service
  14ms proc-sys-fs-binfmt_misc.mount
  12ms modprobe@drm.service
  12ms systemd-udev-load-credentials.service
  11ms systemd-sysctl.service
   7ms initrd-udevadm-cleanup-db.service
   7ms setkeycodes.service
   6ms systemd-battery-check.service
   5ms sys-fs-fuse-connections.mount
   5ms sys-kernel-config.mount

my hooks in mkinitcpio.conf

HOOKS=(base systemd plymouth autodetect microcode modconf keyboard keymap sd-vconsole consolefont numlock block filesystems)

I remember replacing udev by systemd in hooks to hide fsck messages during boot. Could that have caused this delay?

Last edited by afrostmage (2025-05-16 17:07:15)

Offline

#2 2025-05-16 13:42:11

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,734

Re: [Abandoned] Adding udev rule doubles boot time

firmware is the system/motherboard firmware that initializes the hardware before it loads the operating system at all. A udev rule wouldn't affect it.

Offline

#3 2025-05-16 14:26:07

afrostmage
Member
Registered: 2024-09-05
Posts: 20

Re: [Abandoned] Adding udev rule doubles boot time

You're right.. I neglected to mention that I'm now using an external dongle for bluetooth, and unplugging it removes that extra delay. Could I ask why loading the particular module for this device takes so long though? (I will make a separate topic if necessary)

The device is a tplink ub500 which has rtl8761bu chipset.

Offline

#4 2025-05-16 15:30:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,734

Re: [Abandoned] Adding udev rule doubles boot time

afrostmage wrote:

Could I ask why loading the particular module for this device takes so long though?

Again, before the OS, so no module involved. It's likely polling USB devices to see what's bootable, and the dongle is just taking that long to respond.

Offline

#5 2025-05-16 17:06:35

afrostmage
Member
Registered: 2024-09-05
Posts: 20

Re: [Abandoned] Adding udev rule doubles boot time

Yeah sorry I realized after I posted. sad

Offline

Board footer

Powered by FluxBB