20.04 LTS 启动缓慢

20.04 LTS 启动缓慢

感谢 Czar 的回复。编辑:我使用 Grub 菜单中的秒表对启动进行了计时,时间为 2 分 17 秒 systemd-analyze 报告 1 分 28 秒 不确定为什么会有这种差异 我的显卡是 Radeon 5450 [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 系列]

journalctl 的输出非常庞大,太长了,无法在此处粘贴。实际上,它有 403MB 的数据。lsblk -f 的输出为:

NAME   FSTYPE   LABEL                           UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                                            0   100% /snap/core/8935
loop1  squashfs                                                                            0   100% /snap/core/9066
loop2  squashfs                                                                            0   100% /snap/core18/1705
loop3  squashfs                                                                            0   100% /snap/core18/1754
loop4  squashfs                                                                            0   100% /snap/gnome-3-28-1804/116
loop5  squashfs                                                                            0   100% /snap/gnome-3-28-1804/71
loop6  squashfs                                                                            0   100% /snap/gnome-3-34-1804/27
loop7  squashfs                                                                            0   100% /snap/gtk-common-themes/1502
loop8  squashfs                                                                            0   100% /snap/gtk-common-themes/1506
loop9  squashfs                                                                            0   100% /snap/mc-installer/488
loop10 squashfs                                                                            0   100% /snap/mc-installer/496
loop11 squashfs                                                                            0   100% /snap/minetest/1370
loop12 squashfs                                                                            0   100% /snap/minetest/1521
loop13 squashfs                                                                            0   100% /snap/quake-shareware/10
loop14 squashfs                                                                            0   100% /snap/quake-shareware/14
loop15 squashfs                                                                            0   100% /snap/quakespasm-beidl/45
loop16 squashfs                                                                            0   100% /snap/snap-store/433
loop17 squashfs                                                                            0   100% /snap/vlc/1397
loop18 squashfs                                                                            0   100% /snap/vlc/1620
loop19 squashfs                                                                            0   100% /snap/yamagi-quake2-beidl/40
sda                                                                                                 
├─sda1 ntfs     System Reserved                 DEAC9B64AC9B364D                                    
├─sda2 ntfs                                     48B49D12B49D039A                                    
├─sda3 ntfs                                     30A404C2A4048C92                                    
├─sda4                                                                                              
└─sda5 ext4                                     09bbb74b-60e5-4bae-99a4-86e6ed35a9dc  100.8G    48% /
sr0    udf      LOTR_THE_FELLOWSHIP_OF_THE_RING 2caf81e800000000                           0   100% /media/bloch/LOTR_THE_FELLOWSHIP_OF_THE_RING

我的 OptiPlex 9010 启动很慢。我安装了 Ubuntu 19.10,在 Dell P2412H 显示器上启动后出现了黑屏问题。然后我升级到了 20.04。启动时间似乎略有减少,但仍然很慢。我不知道显示器问题是否与启动缓慢有关。

systemd-analyze blame 的输出如下:

44.890s plymouth-quit-wait.service                                           
29.461s dev-sda5.device                                                      
28.830s systemd-journal-flush.service                                        
24.891s snapd.service                                                        
23.393s networkd-dispatcher.service                                          
20.497s udisks2.service                                                      
20.161s dev-loop15.device                                                    
20.104s dev-loop18.device                                                    
19.874s dev-loop17.device                                                    
19.790s dev-loop19.device                                                    
19.686s dev-loop6.device                                                     
19.551s dev-loop10.device                                                    
19.163s dev-loop5.device                                                     
17.642s dev-loop16.device                                                    
17.553s dev-loop0.device                                                     
17.528s dev-loop12.device                                                    
17.489s dev-loop13.device                                                    
17.429s dev-loop2.device                                                     
17.429s dev-loop4.device                                                     
17.370s dev-loop14.device                                                    
16.999s accounts-daemon.service                                              
16.812s dev-loop8.device                                                     
16.358s dev-loop9.device                                                     
16.300s dev-loop11.device                                                    
15.985s dev-loop3.device                                                     
14.782s dev-loop7.device                                                     
14.051s dev-loop1.device                                                     
11.180s NetworkManager-wait-online.service                                   
10.320s ModemManager.service                                                 
 9.707s apport-autoreport.service                                            
 8.384s systemd-udevd.service                                                
 8.036s polkit.service                                                       
 7.970s NetworkManager.service                                               
 7.914s avahi-daemon.service                                                 
 7.490s switcheroo-control.service                                           
 6.158s thermald.service                                                     
 6.156s wpa_supplicant.service                                               
 6.152s systemd-logind.service                                               
 5.195s gpu-manager.service                                                  
 5.188s systemd-resolved.service                                             
 4.668s grub-common.service                                                  
 4.614s apport.service                                                       
 4.322s rsyslog.service                                                      
 3.299s apparmor.service                                                     
 2.992s grub-initrd-fallback.service                                         
 2.885s colord.service                                                       
 2.712s e2scrub_reap.service                                                 
 2.604s snapd.apparmor.service                                               
 2.257s snap-core-8935.mount                                                 
 2.191s snap-core-9066.mount                                                 
 2.100s [email protected]                                                    
 2.076s gdm.service                                                          
 2.057s snap-core18-1705.mount                                               
 1.955s snap-core18-1754.mount                                               
 1.745s geoclue.service                                                      
 1.707s snap-gnome\x2d3\x2d28\x2d1804-116.mount                              
 1.672s snap-gnome\x2d3\x2d28\x2d1804-71.mount                               
 1.610s fwupd.service                                                        
 1.481s plymouth-read-write.service                                          
 1.472s snap-gnome\x2d3\x2d34\x2d1804-27.mount                               
 1.429s systemd-tmpfiles-setup.service                                       
 1.366s pppd-dns.service                                                     
 1.365s smartmontools.service                                                
 1.299s snap-gtk\x2dcommon\x2dthemes-1502.mount                              
 1.274s [email protected]                                                    
 1.226s snap-gtk\x2dcommon\x2dthemes-1506.mount                              
 1.200s systemd-modules-load.service                                         
 1.002s snap-mc\x2dinstaller-488.mount                                       
  935ms binfmt-support.service                                               
  904ms snapd.seeded.service                                                 
  903ms snap-mc\x2dinstaller-496.mount                                       
  895ms plymouth-start.service                                               
  820ms [email protected]                                        
  765ms systemd-tmpfiles-setup-dev.service                                   
  762ms snap-minetest-1370.mount                                             
  741ms systemd-random-seed.service                                          
  677ms [email protected]                                                 
  655ms keyboard-setup.service                                               
  640ms systemd-sysusers.service                                             
  638ms systemd-journald.service                                             
  637ms snap-minetest-1521.mount                                             
  585ms systemd-udev-trigger.service                                         
  579ms systemd-sysctl.service                                               
  561ms snap-quake\x2dshareware-10.mount                                     
  550ms swapfile.swap                                                        
  503ms snap-quake\x2dshareware-14.mount                                     
  473ms upower.service                                                       
  467ms kerneloops.service                                                   
  450ms ufw.service                                                          
  437ms snap-quakespasm\x2dbeidl-45.mount                                    
  411ms systemd-timesyncd.service                                            
  341ms snap-vlc-1620.mount                                                  
  300ms snap-yamagi\x2dquake2\x2dbeidl-40.mount                              
  261ms snap-snap\x2dstore-433.mount                                         
  215ms systemd-remount-fs.service                                           
  214ms console-setup.service                                                
  191ms snap-vlc-1397.mount                                                  
  161ms dev-hugepages.mount                                                  
  160ms dev-mqueue.mount                                                     
  159ms sys-kernel-debug.mount                                               
  159ms sys-kernel-tracing.mount                                             
  149ms kmod-static-nodes.service                                            
  138ms rtkit-daemon.service                                                 
   97ms proc-sys-fs-binfmt_misc.mount                                        
   94ms systemd-user-sessions.service                                        
   93ms systemd-update-utmp.service                                          
   78ms setvtrgb.service                                                     
   76ms systemd-tmpfiles-clean.service                                       
   65ms openvpn.service                                                      
    9ms systemd-update-utmp-runlevel.service                                 
    8ms alsa-restore.service                                                 
    3ms sys-fs-fuse-connections.mount                                        
    2ms sys-kernel-config.mount                                              
  746us snapd.socket                                                         
  401us clean-mount-point@media-bloch-LOTR_THE_FELLOWSHIP_OF_THE_RING.service




  bloch@bloch-OptiPlex-9010:~/Desktop$ systemd-analyze
    Startup finished in 4.838s (kernel) + 1min 30.328s (userspace) = 1min 35.166s 
    graphical.target reached after 1min 30.246s in userspace

答案1

较新的 Radeon 显卡似乎在内核 5.3 及以上版本上存在问题。在 19.10 上安装 RX-580 后,我的系统不稳定,在全新清理/安装 Ubuntu 20.04 后,系统仍然崩溃。旧款 Nvidia GTX-470 上个月没有出现任何问题。我还没有找到解决方案。

什么类型的驱动器?硬盘还是 SSD?

通过按向左或向右箭头键观察系统启动情况。我有一个错误配置的交换文件,导致启动过程延长了 1 分 30 秒。

列出输出日志控制

好像dev-sda5.设备滞后最多。 /dev/sda5 的输出是什么: sudo lsblk -f

快速清理一下你的系统并没有什么坏处。 选项“autoclean”、“autoremove”和“clean”之间有什么区别?

您的 snap 正在讨论要安装多长时间。如果可能,请考虑进行常规安装。在 snap 论坛上发现此内容:

作为一种解决方法,您可以在启动时按“shift”键并移动鼠标,这将使登录更快。

https://forum.snapcraft.io/t/snapd-service-delays-startup-in-ubuntu-18-04-with-4-15-0-24/6205/9

相关内容