Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
System rusza powoli - jak to zdebugować?
#1
0
Od jakiegoś czasu - nie pamiętam, czy cokolwiek zmieniałem wtedy w systemie - mój Mint startuje bardzo długo. Wcześniej zajmowało to góra kilka sekund - od gruba do loginscreenu.



Teraz trwa to ...długo, jeśli wierzyć logom - ponad półtorej minuty.



dmesg w najbardziej podejrzanym miejscu pokazuje mi takie coś:

Kod:
[    7.777694] usbcore: registered new interface driver snd-usb-audio
[    7.778748] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam Studio(TM) (045e:0772)
[    7.839785] input: Microsoft® LifeCam Studio(TM): as /devices/pci0000:00/0000:00:07.0/0000:04:00.0/usb10/10-1/10-1:1.0/input/input25
[    7.839877] usbcore: registered new interface driver uvcvideo
[    7.839878] USB Video Class driver (1.1.1)
[   64.023341] fbcon: Taking over console
[   64.023669] Console: switching to colour frame buffer device 240x67
[   96.925194] audit: type=1400 audit(1617245355.029:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=849 comm="apparmor_parser"
[   96.927489] audit: type=1400 audit(1617245355.033:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ntpd" pid=851 comm="apparmor_parser"
[   96.927985] audit: type=1400 audit(1617245355.033:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-oopslash" pid=853 comm="apparmor_parser"
[   96.928182] audit: type=1400 audit(1617245355.033:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="virt-aa-helper" pid=852 comm="apparmor_parser"
[   96.928595] audit: type=1400 audit(1617245355.033:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=856 comm="apparmor_parser"
[   96.928848] audit: type=1400 audit(1617245355.033:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/tcpdump" pid=850 comm="apparmor_parser"
Co ciekawe - przy każdym rozruchu logi nieco się różnią, ale zawsze skok jest na linijkach z apparmor, dlatego podejrzewam, że problem jest gdzieś w tym. Ale nie znam sie na tym zupełnie...



Mam jeszcze to:
Kod:
# systemd-analyze
Startup finished in 202us (firmware) + 136us (loader) + 6.357s (kernel) + 1min 40.341s (userspace) = 1min 46.698s
graphical.target reached after 1min 33.852s in userspace



Jak to ogarnąć?
#2
0
Wrzuć jeszcze wyniki:
sudo systemd-analyze blame
sudo systemd-analyze critical-chain
sudo systemd-analyze plot >bootup.svg (wynikowy plik bootup.svg wrzuć jako załącznik)
#3
0
Wrzucam:
Kod:
systemd-analyze blame
Kod:
#  systemd-analyze blame
6.664s apt-daily.service                                                                       
6.553s upower.service                                                                          
2.783s NetworkManager-wait-online.service                                                      
2.399s udisks2.service                                                                         
1.575s fwupd-refresh.service                                                                   
1.520s smartmontools.service                                                                   
762ms systemd-logind.service                                                                  
674ms apt-daily-upgrade.service                                                               
652ms dev-sda1.device                                                                         
569ms lightdm.service                                                                         
564ms plymouth-quit-wait.service                                                              
533ms lvm2-monitor.service                                                                    
462ms vmware-USBArbitrator.service                                                            
447ms networkd-dispatcher.service                                                             
441ms accounts-daemon.service                                                                 
331ms systemd-journald.service                                                                
292ms [email protected]                                                                       
250ms systemd-modules-load.service                                                            
245ms systemd-resolved.service                                                                
236ms systemd-sysusers.service                                                                
234ms systemd-random-seed.service                                                             
232ms ubuntu-system-adjustments.service                                                       
228ms bluetooth.service                                                                       
225ms avahi-daemon.service                                                                    
223ms NetworkManager.service                                                                  
218ms polkit.service                                                                          
211ms systemd-journal-flush.service                                                           
197ms libvirt-guests.service                                                                  
191ms gpu-manager.service                                                                     
167ms thermald.service                                                                        
163ms systemd-machined.service                                                                
159ms ModemManager.service                                                                    
157ms libvirtd.service                                                                        
155ms wpa_supplicant.service                                                                  
153ms systemd-fsck@dev-disk-by\x2duuid-aabdd86e\x2d0da8\x2d4bee\x2da75a\x2d97ee17f647a5.service
152ms e2scrub_reap.service                                                                    
138ms networking.service                                                                      
127ms systemd-rfkill.service                                                                  
127ms grub-common.service                                                                     
109ms virtualbox.service                                                                      
  96ms keyboard-setup.service                                                                  
  94ms alsa-restore.service                                                                    
  93ms systemd-udev-trigger.service                                                            
  92ms systemd-udevd.service                                                                   
  85ms motion.service                                                                          
  85ms secureboot-db.service                                                                   
  78ms apparmor.service                                                                        
  76ms geoclue.service                                                                         
  65ms colord.service                                                                          
  62ms dev-disk-by\x2duuid-4f1b0309\x2dd9d3\x2d43dc\x2d9ab6\x2ddf9aee554172.swap               
  62ms ftscanhv.service                                                                        
  61ms dev-disk-by\x2duuid-f23927de\x2dce04\x2d43e4\x2dab13\x2dacb6b1c89723.swap               
  58ms ftsprhv.service                                                                         
  56ms lm-sensors.service                                                                      
  54ms rsyslog.service                                                                         
  48ms systemd-tmpfiles-clean.service                                                          
  47ms qemu-kvm.service                                                                        
  45ms home.mount                                                                              
  43ms systemd-tmpfiles-setup.service                                                          
  36ms pppd-dns.service                                                                        
  35ms binfmt-support.service                                                                  
  32ms grub-initrd-fallback.service                                                            
  31ms hddtemp.service                                                                         
  31ms ntp.service                                                                             
  29ms systemd-user-sessions.service                                                           
  20ms kerneloops.service                                                                      
  20ms [email protected]                                                           
  19ms vboxweb.service                                                                         
  19ms dev-hugepages.mount                                                                     
  18ms dev-mqueue.mount                                                                        
  18ms systemd-remount-fs.service                                                              
  17ms systemd-sysctl.service                                                                  
  17ms console-setup.service                                                                   
  17ms sys-kernel-debug.mount                                                                  
  17ms plymouth-start.service                                                                  
  16ms sys-kernel-tracing.mount                                                                
  15ms plymouth-read-write.service                                                             
  14ms blk-availability.service                                                                
  14ms ifupdown-pre.service                                                                    
  13ms systemd-tmpfiles-setup-dev.service                                                      
  12ms systemd-update-utmp.service                                                             
  12ms kmod-static-nodes.service                                                               
  12ms proc-sys-fs-binfmt_misc.mount                                                           
  11ms openvpn.service                                                                         
  10ms systemd-update-utmp-runlevel.service                                                    
   9ms rtkit-daemon.service                                                                    
   9ms finalrd.service                                                                         
   6ms sys-fs-fuse-connections.mount                                                           
   5ms ufw.service                                                                             
   4ms sys-kernel-config.mount                                                                 
   3ms setvtrgb.service                                                                        
   3ms libvirtd.socket      

Kod:
systemd-analyze critical-chain
Kod:
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @1min 33.595s
└─multi-user.target @1min 33.595s
  └─virtualbox.service @1min 33.486s +109ms
    └─network-online.target @1min 33.475s
      └─NetworkManager-wait-online.service @1min 30.691s +2.783s
        └─NetworkManager.service @1min 30.464s +223ms
          └─dbus.service @1min 30.459s
            └─basic.target @1min 30.439s
              └─sockets.target @1min 30.439s
                └─libvirtd-ro.socket @1min 30.439s
                  └─libvirtd.socket @1min 30.435s +3ms
                    └─sysinit.target @1min 30.429s
                      └─apparmor.service @1min 30.350s +78ms
                        └─systemd-journald.socket @254ms
                          └─-.mount @248ms
                            └─system.slice @248ms
                              └─-.slice @248ms

Kod:
systemd-analyze plot >bootup.svg

Udało mi się załączyć tylko spakowane, plik .svg nie jest obsługiwany przez forum.


Załączone pliki
.gz   bootup.svg.tar.gz (Rozmiar: 21,38 KB / Pobrań: 2)
#4
1
Better response on post RE: System rusza powoli - jak to zdebugować?Może warto spróbować (tak trochę strzelam) parametr "noresume" do GRUBa?

Edytuj GRUB: xed admin:///etc/default/grub i zmień linię GRUB CMDLINE... żeby wyglądała tak:
Kod:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"
Zapisz plik i zamknij, wykonaj:
Kod:
sudo update-grub
Zobacz czy po restarcie coś się zmieni.
#5
0
Niestety, kompletnie bez zmian
Kod:
    6.745674] EDAC amd64: Node 0: DRAM ECC disabled.
[    6.745675] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
                Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
                (Note that use of the override may cause unknown side effects.)
[    6.793623] EDAC amd64: Node 0: DRAM ECC disabled.
[    6.793625] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
                Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
                (Note that use of the override may cause unknown side effects.)
[    6.837587] EDAC amd64: Node 0: DRAM ECC disabled.
[    6.837588] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
                Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
                (Note that use of the override may cause unknown side effects.)
[    6.865718] usbcore: registered new interface driver snd-usb-audio
[    6.885721] EDAC amd64: Node 0: DRAM ECC disabled.
[    6.885723] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
                Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
                (Note that use of the override may cause unknown side effects.)
[   25.267822] fbcon: Taking over console
[   25.277185] radeon_dp_aux_transfer_native: 242 callbacks suppressed
[   25.393602] Console: switching to colour frame buffer device 240x67
[   96.023921] audit: type=1400 audit(1617308772.119:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ntpd" pid=848 comm="apparmor_parser"
[   96.024641] audit: type=1400 audit(1617308772.119:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-oopslash" pid=850 comm="apparmor_parser"
[   96.024680] audit: type=1400 audit(1617308772.119:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=846 comm="apparmor_parser"
[   96.025912] audit: type=1400 audit(1617308772.123:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=853 comm="apparmor_parser"
[   96.026798] audit: type=1400 audit(1617308772.123:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="virt-aa-helper" pid=849 comm="apparmor_parser"
[   96.027094] audit: type=1400 audit(1617308772.123:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/tcpdump" pid=847 comm="apparmor_parser"
[   96.029494] audit: type=1400 audit(1617308772.127:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=852 comm="apparmor_parser"
[   96.029497] audit: type=1400 audit(1617308772.127:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd" pid=852 comm="apparmor_parser"
[   96.029500] audit: type=1400 audit(1617308772.127:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd//third_party" pid=852 comm="apparmor_parser"
[   96.030084] audit: type=1400 audit(1617308772.127:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=861 comm="apparmor_parser"
[   96.318394] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   96.318396] Bluetooth: BNEP filters: protocol multicast
#6
0
Masz automatyczne logowanie, czy logujesz się "ręcznie"?
#7
0
Pokaż jeszcze inxi -Fxz. To nie jest przypadkiem jakiś Ryzen?
Aktualizujesz jądra systemu?
#8
0
Loguję się ręcznie. Po dojściu do ekranu logowania wszystko już działa jak ta lala, tylko muszę się na ten ekran naczekać.

System aktualizuję, nie jest to Ryzen - starszy FX-3870 (całkiem żwawy procesor Smile )

Kod:
#inxi -Fxz
System:    Kernel: 5.4.0-70-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0 Distro: Linux Mint 20.1 Ulyssa
           base: Ubuntu 20.04 focal
Machine:   Type: Desktop Mobo: ASUSTeK model: M5A97 R2.0 v: Rev 1.xx serial: <filter> UEFI: American Megatrends v: 2603
           date: 06/26/2015
CPU:       Topology: 8-Core model: AMD FX-8370 bits: 64 type: MCP arch: Bulldozer L2 cache: 2048 KiB
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 64219
           Speed: 2364 MHz min/max: 1400/4000 MHz Core speeds (MHz): 1: 1404 2: 1404 3: 2538 4: 2606 5: 1404 6: 1405 7: 1404
           8: 1405
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] vendor: Gigabyte
           driver: radeon v: kernel bus ID: 01:00.0
           Display: x11 server: X.Org 1.20.9 driver: ati,radeon unloaded: fbdev,modesetting,vesa
           resolution: 1920x1080~60Hz, 1920x1080~60Hz
           OpenGL: renderer: AMD TAHITI (DRM 2.50.0 5.4.0-70-generic LLVM 11.0.0) v: 4.5 Mesa 20.2.6 direct render: Yes
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] SBx00 Azalia vendor: ASUSTeK driver: snd_hda_intel v: kernel
           bus ID: 00:14.2
           Device-2: Advanced Micro Devices [AMD/ATI] Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] vendor: Gigabyte
           driver: snd_hda_intel v: kernel bus ID: 01:00.1
           Device-3: Microsoft LifeCam Studio type: USB driver: hid-generic,snd-usb-audio,usbhid,uvcvideo bus ID: 10-1:2
           Sound Server: ALSA v: k5.4.0-70-generic
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK P8 series driver: r8169 v: kernel
           port: d000 bus ID: 02:00.0
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
           IF-ID-1: virbr0 state: down mac: <filter>
           IF-ID-2: virbr0-nic state: down mac: <filter>
Drives:    Local Storage: total: 2.60 TiB used: 220.71 GiB (8.3%)
           ID-1: /dev/sda vendor: Samsung model: SSD 840 Series size: 111.79 GiB
           ID-2: /dev/sdb vendor: Western Digital model: WD15EARS-00MVWB0 size: 1.36 TiB
           ID-3: /dev/sdc vendor: A-Data model: SU650 size: 223.57 GiB
           ID-4: /dev/sdd vendor: Seagate model: ST31000333AS size: 931.51 GiB
Partition: ID-1: / size: 101.66 GiB used: 26.46 GiB (26.0%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 274.89 GiB used: 192.20 GiB (69.9%) fs: ext4 dev: /dev/sdb5
           ID-3: swap-1 size: 8.00 GiB used: 2.05 GiB (25.6%) fs: swap dev: /dev/sda5
           ID-4: swap-2 size: 1.86 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb3
Sensors:   System Temperatures: cpu: 35.5 C mobo: N/A gpu: radeon temp: 67 C
           Fan Speeds (RPM): N/A
Info:      Processes: 294 Uptime: 17h 51m Memory: 11.66 GiB used: 9.76 GiB (83.7%) Init: systemd runlevel: 5 Compilers:
           gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38

Dodano po pewnym czasie:
ekhm, oczywiście to jest fx-8370, a nie 3870 Smile
#9
0
(01-04-2021, 20:36)yahoob3 napisał(a): Może warto spróbować (tak trochę strzelam) parametr "noresume" do GRUBa?

Edytuj GRUB: xed admin:///etc/default/grub i zmień linię GRUB CMDLINE... żeby wyglądała tak:
Kod:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"
Zapisz plik i zamknij, wykonaj:
Kod:
sudo update-grub
Zobacz czy po restarcie coś się zmieni.
Juz sie cieszyłem, że pomogło dopisanie "noresume", ale okazało się, że po aktualizacji do nowej wersji Minta czyli z 22 na 22.1 system startuje normalnie.
Wcześniej
Kod:
systemd-analyze
pokazywał:
Startup finished in 7.102s (firmware) + 4.389s (loader) + 1.927s (kernel) + 12.985s (userspace) = 59.321s
graphical.target reached after 12.892s in userspace.

a teraz jest:
Startup finished in 6.702s (firmware) + 4.089s (loader) + 1.637s (kernel) + 12.702s (userspace) = 25.131s
graphical.target reached after 12.692s in userspace.

Bardzo ciekawi mnie co spowodowało wcześniej tak długi start. Na początku po instalacji Mint 22, system startował szybko, po kilku aktualizacjach, ale wtedy nie zwróciłem na to uwagi, zaczął uruchamiać się bardzo długo Smile, czyli około 1min  i wtedy rozpocząłem poszukiwania lecz do tego czasu nie znalazłem rozwiązania. Dopiero aktualizacja do nowego Minta 22.1 spowodowała nagłe przyspieszenie do 25s oczywiście piszę tutaj o parametrze (userspace). Teraz postaram się kontrolować to zachowanie przy starcie, może znowu jakaś aktualizacja to spowoduje, więc Timeshift będzie używany intensywnie Smile.


Skocz do:




Użytkownicy przeglądający ten wątek: 1 gości