Systemd-analyze blame

my computer is taking to long to boot caused by lvm2 how do I fix this heres the output

root@ron-pc ~ # systemd-analyze blame 
1.786s lvm2-pvscan@8:19.service                                                >
1.278s systemd-logind.service                                                  >
1.235s lightdm.service                                                         >
 843ms udisks2.service                                                         >
 668ms systemd-random-seed.service                                             >
 602ms lvm2-monitor.service                                                    >
 447ms dev-sda2.device                                                         >
 438ms upower.service                                                          >
 266ms systemd-udevd.service                                                   >
 207ms systemd-journald.service                                                >
 179ms user@1000.service                                                       >
 161ms boot-efi.mount                                                          >
 146ms systemd-journal-flush.service                                           >
 102ms ldconfig.service                                                        >
 102ms systemd-rfkill.service                                                  >
  93ms systemd-fsck@dev-disk-by\x2duuid-90c9c482\x2d4143\x2d4087\x2d97ab\x2d711>
  75ms systemd-sysusers.service                                                >
  64ms systemd-udev-trigger.service                                            >
  56ms polkit.service                                                          >
  46ms NetworkManager.service                                                  >
  38ms avahi-daemon.service                                                    >
  26ms systemd-tmpfiles-clean.service                                          >
  24ms systemd-fsck@dev-disk-by\x2duuid-1838\x2dC1E5.service                   >
lines 1-23

regards Ron

If you don’t use lvm partitions, just disable this service.

sudo systemctl disable lvm2-monitor.service

2 Likes

ok thanks Fred

Tried that, even rebooted no change. Pretty sure not using LVM.

bob@Endeavour ~]$ cat /etc/fstab

UUID=FBBC-2123 /boot/efi vfat umask=0077 0 2
UUID=664573e9-0e86-4c19-94ed-a7f393e78bde / ext4 defaults,noatime 0 1

[bob@Endeavour ~]$ systemd-analyze blame
5.133s lvm2-monitor.service
3.922s dev-sda2.device
1.675s systemd-logind.service
1.521s udisks2.service
1.382s org.cups.cupsd.service
1.346s systemd-journal-flush.service
1.153s upower.service
998ms avahi-daemon.service
978ms NetworkManager.service
881ms systemd-sysusers.service
747ms ldconfig.service
721ms lightdm.service
508ms polkit.service
440ms systemd-udevd.service
406ms systemd-random-seed.service
393ms systemd-tmpfiles-setup-dev.service
303ms user@1000.service
300ms systemd-journald.service
287ms systemd-udev-trigger.service
262ms systemd-journal-catalog-update.service
245ms systemd-tmpfiles-setup.service
216ms systemd-rfkill.service
215ms colord.service

for those you cannot use disable… only activity will stop if you do sudo systemctl mask lvm2-monitor.service

2 Likes

Exactly … because using disable doesn’t stop it from restarting but mask does.

2 Likes

Thanks.
[bob@Endeavour ~]$ sudo systemctl mask lvm2-monitor.service
[sudo] password for bob:
Created symlink /etc/systemd/system/lvm2-monitor.service → /dev/null.

[bob@Endeavour ~]$ systemd-analyze blame
3.531s dev-sda2.device
1.481s systemd-logind.service
1.445s udisks2.service
1.320s NetworkManager.service
1.320s org.cups.cupsd.service
1.216s avahi-daemon.service
1.139s systemd-journal-flush.service
988ms systemd-udevd.service
906ms upower.service
696ms lightdm.service
683ms systemd-backlight@backlight:acpi_video0.service
531ms systemd-fsck@dev-disk-by\x2duuid-FBBC\x2d2123.service
450ms polkit.service
438ms wpa_supplicant.service
413ms systemd-tmpfiles-setup-dev.service
394ms user@1000.service
345ms colord.service
338ms systemd-random-seed.service
282ms systemd-journald.service
215ms systemd-rfkill.service
195ms systemd-tmpfiles-setup.service
190ms boot-efi.mount
190ms systemd-udev-trigger.service
lines 1-23

Ouch! I always forget this systemctl feature :frowning:

well the masking solution worked but there were other problems so I did some more looking around the forum and found someone suggested a reinstall which I decided to do,this install no problems so thanks for the help folks,your suggestions helped ,but I decided on a clean install to see if the bug returned,it did not but also I had fedora installed on another hard drive so I uninstalled it because the home partition was lvm so maybe thats where my problem was coming from once again thanks
kind regards Ron
ps bye the way the system is very good

just a side notice, if you decide to stop Mask with systemctl , it can be happend you made a fault on this, you can always chroot into the system and fix it like sudo systemctl unmask XXXX.service

1 Like

heres my inxi

  inxi -Fxxc0
System:
  Host: ron-pc Kernel: 5.3.5-arch1-1-ARCH x86_64 bits: 64 compiler: gcc 
  v: 9.2.0 Desktop: Xfce 4.14.1 tk: Gtk 3.24.10 wm: xfwm4 dm: LightDM 
  Distro: Arch Linux 
Machine:
  Type: Desktop Mobo: ASRock model: X570 Taichi serial: <root required> 
  UEFI: American Megatrends v: P2.00 date: 08/21/2019 
Battery:
  Device-1: hidpp_battery_0 
  model: Logitech M720 Triathlon Multi-Device Mouse serial: 405e-54-f2-7c-71 
  charge: 10% (should be ignored) status: Discharging 
  Device-2: hidpp_battery_1 model: Logitech K800 serial: 2010-31-7b-75-8a 
  charge: 55% (should be ignored) status: Discharging 
CPU:
  Topology: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP arch: Zen+ 
  rev: 2 L2 cache: 4096 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 118439 
  Speed: 1806 MHz min/max: 2200/3700 MHz Core speeds (MHz): 1: 1912 2: 1918 
  3: 1841 4: 2633 5: 2197 6: 2064 7: 2035 8: 2064 9: 1946 10: 2946 11: 1888 
  12: 1889 13: 1890 14: 1890 15: 1783 16: 1858 
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
  vendor: ASRock Phantom Gaming X driver: amdgpu v: kernel bus ID: 0d:00.0 
  chip ID: 1002:67df 
  Display: x11 server: X.Org 1.20.5 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa tty: N/A 
  Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:
  Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] 
  vendor: ASRock driver: snd_hda_intel v: kernel bus ID: 0d:00.1 
  chip ID: 1002:aaf0 
  Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel 
  v: kernel bus ID: 0f:00.3 chip ID: 1022:1457 
  Device-3: Logitech Logitech BRIO type: USB 
  driver: hid-generic,snd-usb-audio,usbhid,uvcvideo bus ID: 6-3:2 
  chip ID: 046d:085e 
  Sound Server: ALSA v: k5.3.5-arch1-1-ARCH 
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus ID: 06:00.0 
  chip ID: 8086:2723 
  IF: wlp6s0 state: up mac: 3c:f0:11:da:f7:dc 
  Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: 5.6.0-k 
   
Drives:
  Local Storage: total: 1.58 TiB used: 9.50 GiB (0.6%) 
  ID-1: /dev/nvme0n1 vendor: Gigabyte model: GP-ASACNE2512GTTDR 
  size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: SN191608950448 
  ID-2: /dev/sda vendor: Intel model: SSDSC2BW240A4 size: 223.57 GiB 
  speed: 6.0 Gb/s serial: BTDA33330AQA2403GN 
  ID-3: /dev/sdb vendor: Intel model: SSDSC2BW240A4 size: 223.57 GiB 
  speed: 6.0 Gb/s serial: CVDA409601GG2403GN 
  ID-4: /dev/sdc vendor: Samsung model: SSD 840 EVO 250GB size: 232.89 GiB 
  speed: 6.0 Gb/s serial: S1DBNSBF158993M 
  ID-5: /dev/sdd vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
  speed: 6.0 Gb/s serial: S21NNSBFC35476V 
  ID-6: /dev/sde vendor: Kingston model: SA400S37240G size: 223.57 GiB 
  speed: 6.0 Gb/s serial: 50026B777304141B 
Partition:
  ID-1: / size: 47.81 GiB used: 7.69 GiB (16.1%) fs: ext4 dev: /dev/sdb2 
  ID-2: /home size: 170.52 GiB used: 1.81 GiB (1.1%) fs: ext4 dev: /dev/sdb3 
Sensors:
  System Temperatures: cpu: 42.9 C mobo: N/A gpu: amdgpu temp: 38 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 932 
Info:
  Processes: 333 Uptime: 1h 17m Memory: 62.75 GiB used: 2.04 GiB (3.2%) 
  Init: systemd v: 243 Compilers: gcc: 9.2.0 Shell: bash v: 5.0.11 
  running in: xfce4-terminal inxi: 3.0.36 
1 Like