升级到 19.10 后启动时间更长

升级到 19.10 后启动时间更长

从 19.04 升级到 19.10 后,我注意到启动时间增加了,以及一个奇怪的图形问题:在启动画面和登录画面之间,我有一个黑屏,屏幕闪烁_。此屏幕持续 1 分钟以上,并对按键做出反应:我可以在这里输入,即使它什么也不做。

dmesg 结束:

[   10.767817] wlo1: associated
[   11.829939] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[   19.465736] random: crng init done
[   19.465742] random: 7 urandom warning(s) missed due to ratelimiting
[  116.212968] rfkill: input handler disabled
[  138.839629] rfkill: input handler enabled
[  139.737489] Bluetooth: RFCOMM TTY layer initialized
[  139.737548] Bluetooth: RFCOMM socket layer initialized
[  139.737561] Bluetooth: RFCOMM ver 1.11
[  145.316271] rfkill: input handler disabled

我不确定这是否相关,但随机和 rfkill 之间存在巨大差距。

systemd-analyze blame(不包括<1s):

1min 42.198s plymouth-quit-wait.service
     10.306s gdm.service
      7.850s NetworkManager-wait-online.service
      3.535s dev-sda5.device
      2.500s snapd.service
      2.171s e2scrub_reap.service
      1.676s upower.service
      1.666s dev-loop10.device
      1.660s systemd-logind.service
      1.656s dev-loop18.device
      1.647s dev-loop16.device
      1.640s dev-loop12.device
      1.637s dev-loop14.device
      1.634s dev-loop19.device
      1.634s dev-loop13.device
      1.631s dev-loop11.device
      1.615s dev-loop9.device
      1.614s dev-loop15.device
      1.612s dev-loop8.device
      1.596s dev-loop17.device
      1.513s systemd-rfkill.service
      1.179s dev-loop0.device
      1.177s dev-loop2.device
      1.158s dev-loop1.device
      1.133s dev-loop3.device
      1.103s systemd-resolved.service
      1.094s dev-loop4.device
      1.068s systemd-timesyncd.service
      1.065s dev-loop5.device
      1.055s dev-loop7.device
      1.045s systemd-journald.service

对发生什么事有任何线索吗?

答案1

这看起来像是恶意进程的问题NetworkManager-wait-online.service,可以看到该进程正在对日志中的这些条目进行操作rfkill。只要这台机器没有被用作服务器(如果它运行的是非 LTS 版本的 Ubuntu Desktop,则很可能不是),那么您可以禁用它而不会产生任何后果。

操作方法如下:

  1. 打开终端(如果尚未打开)

  2. 禁用服务:

    $ sudo systemctl disable NetworkManager-wait-online.service
    $ sudo systemctl mask NetworkManager-wait-online.service
    
  3. 重启

第一个命令禁用该服务。第二个命令确保它不会在启动时重新激活。

此服务的目的是确保网络在继续引导过程之前已连接并处于活动状态。如果您不需要网络上的其他计算机访问您的系统在您登录之前,则可以安全地禁用它。网络将继续按预期上线,但没有服务在那里等待它完成。

希望这能解决您的问题。


笔记:如果你想恢复该服务,可以通过取消屏蔽然后启用来实现 NetworkManager-wait-online.service 像这样:

$ sudo systemctl unmask NetworkManager-wait-online.service
$ sudo systemctl enable NetworkManager-wait-online.service

答案2

这是对@nobody 评论的回答。因为我不是作者,所以这样应该更容易

lsmod | grep wmi

snd_rawmidi            36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd                    90112  33 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi


sudo dmidecode -t 0

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
    Vendor: American Megatrends Inc.
    Version: P1.40
    Release Date: 12/06/2016
    Address: 0xF0000
    Runtime Size: 64 kB
    ROM Size: 16 MB
    Characteristics:
        PCI is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        Boot from CD is supported
        Selectable boot is supported
        BIOS ROM is socketed
        EDD is supported
        5.25"/1.2 MB floppy services are supported (int 13h)
        3.5"/720 kB floppy services are supported (int 13h)
        3.5"/2.88 MB floppy services are supported (int 13h)
        Print screen service is supported (int 5h)
        8042 keyboard services are supported (int 9h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        ACPI is supported
        USB legacy is supported
        BIOS boot specification is supported
        Targeted content distribution is supported
        UEFI is supported
    BIOS Revision: 5.12


lsusb | grep -i blue
returned empty

相关内容