加速启动过程

加速启动过程

由于开发工作,我经常需要重启笔记本电脑,因此我尝试尽量缩短 Ubuntu 19.10 的启动时间

这是输出dmesg

# dmesg 
...
[    0.017283] On node 0 totalpages: 10414141
[    0.017285]   DMA zone: 64 pages used for memmap
[    0.017286]   DMA zone: 22 pages reserved
[    0.017287]   DMA zone: 3998 pages, LIFO batch:0
[    0.017375]   DMA32 zone: 4931 pages used for memmap
[    0.017377]   DMA32 zone: 315551 pages, LIFO batch:63
[    0.030794]   Normal zone: 157728 pages used for memmap
[    0.030795]   Normal zone: 10094592 pages, LIFO batch:63
!!!
[    0.233593] Reserving Intel graphics memory at [mem 0x59800000-0x5d7fffff]
[    0.233942] ACPI: PM-Timer IO Port: 0x1808
[    0.233945] ACPI: Local APIC address 0xfee00000
[    0.233956] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.233958] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.234026] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[    0.234030] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.234032] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.234035] ACPI: IRQ0 used by override.
[    0.234036] ACPI: IRQ9 used by override.
[    0.234039] Using ACPI (MADT) for SMP configuration information
[    0.234042] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.234053] smpboot: Allowing 8 CPUs, 0 hotplug CPUs
[    0.234080] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.234113] [mem 0x5d800000-0xdfffffff] available for PCI devices
[    0.234115] Booting paravirtualized kernel on bare hardware
[    0.234119] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.234128] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
[    0.234438] percpu: Embedded 54 pages/cpu s184320 r8192 d28672 u262144
[    0.234449] pcpu-alloc: s184320 r8192 d28672 u262144 alloc=1*2097152
[    0.234450] pcpu-alloc: [0] 0 1 2 3 4 5 6 7 
[    0.234491] Built 1 zonelists, mobility grouping on.  Total pages: 10251396
[    0.234492] Policy zone: Normal
[    0.234495] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-26-generic root=UUID=6ee68347-66eb-42e2-a7f2-0e0509ef4729 ro
[    0.240262] Dentry cache hash table entries: 8388608 (order: 14, 67108864 bytes, linear)
[    0.243146] Inode-cache hash table entries: 4194304 (order: 13, 33554432 bytes, linear)
[    0.243266] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.249108] Calgary: detecting Calgary via BIOS EBDA area
[    0.249110] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
!!!
[    0.371578] Memory: 40637016K/41656564K available (14339K kernel code, 2388K rwdata, 4728K rodata, 2668K init, 5056K bss, 1019548K reserved, 0K cma-reserved)
[    0.371786] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.371803] ftrace: allocating 43225 entries in 169 pages
[    0.398601] rcu: Hierarchical RCU implementation.
[    0.398604] rcu:     RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=8.
[    0.398606]  Tasks RCU enabled.
[    0.398607] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.398609] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
...
[    0.485421] fbcon: Taking over console
[    0.485472] ACPI: Added _OSI(Module Device)
[    0.485475] ACPI: Added _OSI(Processor Device)
[    0.485478] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.485481] ACPI: Added _OSI(Processor Aggregator Device)
[    0.485485] ACPI: Added _OSI(Linux-Dell-Video)
[    0.485488] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.485491] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
!!!
[    0.585676] ACPI: 11 ACPI AML tables successfully acquired and loaded
[    0.605094] ACPI: Dynamic OEM Table Load:
[    0.605122] ACPI: SSDT 0xFFFF8EB671281D00 0000F4 (v02 PmRef  Cpu0Psd  00003000 INTL 20160422)
[    0.607987] ACPI: \_SB_.PR00: _OSC native thermal LVT Acked
[    0.612948] ACPI: Dynamic OEM Table Load:
[    0.612963] ACPI: SSDT 0xFFFF8EB67127F000 000400 (v02 PmRef  Cpu0Cst  00003001 INTL 20160422)
[    0.616060] ACPI: Dynamic OEM Table Load:
[    0.616075] ACPI: SSDT 0xFFFF8EB67156A800 0004FD (v02 PmRef  Cpu0Ist  00003000 INTL 20160422)
[    0.619983] ACPI: Dynamic OEM Table Load:
[    0.619998] ACPI: SSDT 0xFFFF8EB67156A000 0005FC (v02 PmRef  ApIst    00003000 INTL 20160422)
...
[    0.831873] UDP-Lite hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.832183] NET: Registered protocol family 1
[    0.832194] NET: Registered protocol family 44
[    0.832213] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.834297] PCI: CLS 64 bytes, default 64
[    0.834370] Trying to unpack rootfs image as initramfs...
!!!
[    1.156238] Freeing initrd memory: 93776K
[    1.173460] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.173466] software IO TLB: mapped [mem 0x4a294000-0x4e294000] (64MB)
[    1.173940] check: Scanning for low memory corruption every 60 seconds
[    1.176834] Initialise system trusted keyrings
[    1.176850] Key type blacklist registered
[    1.176886] workingset: timestamp_bits=36 max_order=24 bucket_order=0
[    1.178880] zbud: loaded
...
[    1.201538] Linux agpgart interface v0.103
[    1.211572] battery: ACPI: Battery Slot [BAT1] (battery present)
!!!
[    1.270272] loop: module loaded
[    1.270640] libphy: Fixed MDIO Bus: probed
[    1.270664] tun: Universal TUN/TAP device driver, 1.6
...
[    1.377668] AppArmor: AppArmor sha1 policy hashing enabled
[    1.380188] ima: Allocated hash algorithm: sha1
!!!
[    1.477603] No architecture policies found
[    1.478216] evm: Initialising EVM extended attributes:
[    1.478772] evm: security.selinux
[    1.479304] evm: security.SMACK64
[    1.479819] evm: security.SMACK64EXEC
[    1.480324] evm: security.SMACK64TRANSMUTE
[    1.480826] evm: security.SMACK64MMAP
[    1.481317] evm: security.apparmor
[    1.481885] evm: security.ima
[    1.482392] evm: security.capability
[    1.482886] evm: HMAC attrs: 0x1
[    1.484419] PM:   Magic number: 4:550:708
[    1.485230] rtc_cmos 00:04: setting system clock to 2020-01-12T00:42:06 UTC (1578789726)
[    1.486795] Freeing unused decrypted memory: 2040K
[    1.487639] Freeing unused kernel image memory: 2668K
[    1.488122] Write protecting the kernel read-only data: 22528k
[    1.489138] Freeing unused kernel image memory: 2008K
[    1.489994] Freeing unused kernel image memory: 1416K
[    1.496954] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    1.497440] Run /init as init process
!!!
[    1.554902] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[    1.555890] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[    1.556856] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[    1.557708] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[    1.558619] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:02)
[    1.559628] acpi PNP0C14:04: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:02)
[    1.567537] hidraw: raw HID events driver (C) Jiri Kosina
[    1.569516] IPMI message handler: version 39.2
[    1.570866] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
[    1.571021] i801_smbus 0000:00:1f.4: SPD Write Disable is set
[    1.572461] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[    1.572474] ipmi device interface
[    1.576800] nvme nvme0: pci function 0000:3b:00.0
[    1.578579] cryptd: max_cpu_qlen set to 1000
[    1.600209] i2c_hid i2c-MSFT0001:02: i2c-MSFT0001:02 supply vdd not found, using dummy regulator
[    1.600707] i2c_hid i2c-MSFT0001:02: i2c-MSFT0001:02 supply vddl not found, using dummy regulator
[    1.613402] usb 1-2: new full-speed USB device number 2 using xhci_hcd
!!!
[    1.684108] intel-lpss 0000:00:15.1: enabling device (0000 -> 0002)
[    1.689050] i2c_hid i2c-WCOM5169:00: i2c-WCOM5169:00 supply vdd not found, using dummy regulator
[    1.689602] i2c_hid i2c-WCOM5169:00: i2c-WCOM5169:00 supply vddl not found, using dummy regulator
!!!
[    1.762358] nvidia: loading out-of-tree module taints kernel.
[    1.762439] intel-lpss 0000:00:15.2: enabling device (0000 -> 0002)
[    1.762941] nvidia: module license 'NVIDIA' taints kernel.
[    1.762941] Disabling lock debugging due to kernel taint
[    1.765957] usb 1-2: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.10
[    1.766552] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.767147] usb 1-2: Product: USB Receiver
[    1.767712] usb 1-2: Manufacturer: Logitech
[    1.771956] i2c_hid i2c-0416C300:00: i2c-0416C300:00 supply vdd not found, using dummy regulator
[    1.773025] i2c_hid i2c-0416C300:00: i2c-0416C300:00 supply vddl not found, using dummy regulator
[    1.773997] AVX2 version of gcm_enc/dec engaged.
[    1.775005] AES CTR mode by8 optimization enabled
[    1.776122] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.777841] checking generic (4000000000 7f0000) vs hw (4000000000 10000000)
[    1.777841] fb0: switching to inteldrmfb from EFI VGA
[    1.778538] Console: switching to colour dummy device 80x25
[    1.778586] i915 0000:00:02.0: vgaarb: deactivate vga console
[    1.779948] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.779952] [drm] Driver supports precise vblank timestamp query.
[    1.780711] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    1.781219] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    1.785250] nvidia-nvlink: Nvlink Core is being initialized, major device number 238
[    1.785758] nvidia 0000:3a:00.0: enabling device (0106 -> 0107)
!!!
[    1.885521] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  430.50  Thu Sep  5 22:36:31 CDT 2019
[    1.886194] nvme nvme0: missing or invalid SUBNQN field.
[    1.886279] [drm] Initialized i915 1.6.0 20190619 for 0000:00:02.0 on minor 0
[    1.888011] input: MSFT0001:02 06CB:7F8F Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:02/0018:06CB:7F8F.0001/input/input4
[    1.888130] input: MSFT0001:02 06CB:7F8F Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-MSFT0001:02/0018:06CB:7F8F.0001/input/input5
[    1.888176] hid-generic 0018:06CB:7F8F.0001: input,hidraw0: I2C HID v1.00 Mouse [MSFT0001:02 06CB:7F8F] on i2c-MSFT0001:02
...
[    2.083300] usb 1-5: SerialNumber: 0001
[    2.201708] tsc: Refined TSC clocksource calibration: 1799.999 MHz
[    2.201729] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x19f228ab7a2, max_idle_ns: 440795289252 ns
[    2.201811] clocksource: Switched to clocksource tsc
[    2.213726] usb 1-6: new full-speed USB device number 4 using xhci_hcd
[    2.243213] input: Wacom HID 5169 Pen as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-WCOM5169:00/0018:056A:5169.0002/input/input19
[    2.243568] input: Wacom HID 5169 Finger as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-WCOM5169:00/0018:056A:5169.0002/input/input20
[    2.244008] wacom 0018:056A:5169.0002: hidraw1: I2C HID v1.00 Mouse [WCOM5169:00 056A:5169] on i2c-WCOM5169:00
!!!
[    2.363777] usb 1-6: New USB device found, idVendor=06cb, idProduct=0081, bcdDevice= 1.64
[    2.363816] usb 1-6: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[    2.363831] usb 1-6: SerialNumber: f0c8b48655eb
!!!
[    2.493702] usb 1-7: new full-speed USB device number 5 using xhci_hcd
!!!
[    2.643575] usb 1-7: config 1 interface 1 altsetting 0 endpoint 0x3 has wMaxPacketSize 0, skipping
[    2.643613] usb 1-7: config 1 interface 1 altsetting 0 endpoint 0x83 has wMaxPacketSize 0, skipping
[    2.643633] usb 1-7: New USB device found, idVendor=8087, idProduct=0025, bcdDevice= 0.02
[    2.643649] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
!!!
[    2.810924] logitech-djreceiver 0003:046D:C52B.0006: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-2/input2
!!!
[    2.933241] input: Logitech Unifying Device. Wireless PID:4071 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:4071.0007/input/input22
[    2.933392] input: Logitech Unifying Device. Wireless PID:4071 Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:4071.0007/input/input23
[    2.933588] input: Logitech Unifying Device. Wireless PID:4071 Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:4071.0007/input/input24
[    2.933693] input: Logitech Unifying Device. Wireless PID:4071 System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:4071.0007/input/input25
[    2.933873] hid-generic 0003:046D:4071.0007: input,hidraw3: USB HID v1.11 Keyboard [Logitech Unifying Device. Wireless PID:4071] on usb-0000:00:14.0-2/input2:1
[    2.945102] input: Logitech MX Anywhere 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:404A.0008/input/input29
[    3.037379] raid6: avx2x4   gen() 34627 MB/s
!!!
[    3.085377] raid6: avx2x4   xor() 23156 MB/s
!!!
[    3.133376] raid6: avx2x2   gen() 34254 MB/s
!!!
[    3.181377] raid6: avx2x2   xor() 21216 MB/s
[    3.229382] raid6: avx2x1   gen() 27855 MB/s
!!!
[    3.277379] raid6: avx2x1   xor() 19064 MB/s
!!!
[    3.325379] raid6: sse2x4   gen() 14772 MB/s
!!!
[    3.373374] raid6: sse2x4   xor()  9974 MB/s
!!!
[    3.421375] raid6: sse2x2   gen() 13812 MB/s
[    3.469389] raid6: sse2x2   xor()  9233 MB/s
!!!
[    3.517378] raid6: sse2x1   gen() 12266 MB/s
!!!!!!!! 0,5s all together !!!!!!!!!!!!!!!!!!!!!!! 
[    3.565378] raid6: sse2x1   xor()  6988 MB/s
[    3.566275] raid6: using algorithm avx2x4 gen() 34627 MB/s
[    3.567156] raid6: .... xor() 23156 MB/s, rmw enabled
[    3.568017] raid6: using avx2x2 recovery algorithm
[    3.569624] xor: automatically using best checksumming function   avx       
[    3.571240] async_tx: api initialized (async)
[    3.605273] Btrfs loaded, crc32c=crc32c-intel
[    3.633803] logitech-hidpp-device 0003:046D:404A.0008: input,hidraw4: USB HID v1.11 Keyboard [Logitech MX Anywhere 2] on usb-0000:00:14.0-2/input2:2
[    3.640992] input: Logitech Performance MX as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:101A.0009/input/input30
[    3.661025] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null)
[    3.678445] logitech-hidpp-device 0003:046D:101A.0009: input,hidraw5: USB HID v1.11 Mouse [Logitech Performance MX] on usb-0000:00:14.0-2/input2:3
[    3.729271] input: Logitech MX Master as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:046D:C52B.0006/0003:046D:4071.0007/input/input31
[    3.730678] logitech-hidpp-device 0003:046D:4071.0007: input,hidraw3: USB HID v1.11 Keyboard [Logitech MX Master] on usb-0000:00:14.0-2/input2:1
!!!
[    3.881503] systemd[1]: Inserted module 'autofs4'
!!!
[    3.950590] systemd[1]: systemd 242 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    3.970198] systemd[1]: Detected architecture x86-64.
[    3.980663] systemd[1]: Set hostname to <einstein>.
[    3.982953] systemd[1]: Failed to bump fs.file-max, ignoring: Invalid argument
[    4.056915] systemd[1]: /lib/systemd/system/dbus.socket:4: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
[    4.070612] systemd[1]: /etc/systemd/system/teamviewerd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/teamviewerd.pid → /run/teamviewerd.pid; please update the unit file accordingly.
[    4.089619] systemd[1]: /lib/systemd/system/rpc-statd.service:13: PIDFile= references a path below legacy directory /var/run/, updating /var/run/rpc.statd.pid → /run/rpc.statd.pid; please update the unit file accordingly.
[    4.094255] systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references a path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
!!!!!!!! references a path below legacy directory together: 0.13s !!!!
[    4.114507] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    4.117478] systemd[1]: Listening on fsck to fsckd communication Socket.
[    4.137769] lp: driver loaded but no devices found
[    4.139677] ppdev: user-space parallel port driver
[    4.151615] EXT4-fs (nvme0n1p6): re-mounted. Opts: errors=remount-ro
[    4.185115] RPC: Registered named UNIX socket transport module.
[    4.185116] RPC: Registered udp transport module.
[    4.185116] RPC: Registered tcp transport module.
[    4.185116] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    4.202178] Installing knfsd (copyright (C) 1996 [email protected]).
!!!
[    4.390972] systemd-journald[520]: Received request to flush runtime journal from PID 1
[    4.463241] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 236
[    4.505307] ACPI Warning: \_SB.PCI0.RP09.PXSX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20190703/nsarguments-59)
[    4.539731] input: Ideapad extra buttons as /devices/pci0000:00/0000:00:1f.0/PNP0C09:00/VPC2004:00/input/input32
[    4.560936] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    4.562301] idma64 idma64.0: Found Intel integrated DMA 64-bit
[    4.567316] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[    4.567821] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
...
[    4.887384] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19
[    4.887386] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
[    4.931271] iwlwifi 0000:39:00.0 wlp57s0: renamed from wlan0
[    4.998361] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input37
[    4.998405] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input38
[    4.998444] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input39
[    4.998483] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input40
[    4.998758] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input41
[    4.998804] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input42
[    4.998846] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input43
!!! 0.5s
[    5.410363] audit: type=1400 audit(1578789730.420:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-senddoc" pid=992 comm="apparmor_parser"
[    5.411166] audit: type=1400 audit(1578789730.420:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=991 comm="apparmor_parser"
[    5.411332] audit: type=1400 audit(1578789730.420:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/haveged" pid=993 comm="apparmor_parser"
[    5.414149] audit: type=1400 audit(1578789730.424:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ippusbxd" pid=1007 comm="apparmor_parser"
[    5.414727] audit: type=1400 audit(1578789730.424:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-oopslash" pid=998 comm="apparmor_parser"
[    5.416059] audit: type=1400 audit(1578789730.424:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=1008 comm="apparmor_parser"
[    5.417422] audit: type=1400 audit(1578789730.428:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=999 comm="apparmor_parser"
[    5.418143] audit: type=1400 audit(1578789730.428:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/tcpdump" pid=995 comm="apparmor_parser"
[    5.418207] audit: type=1400 audit(1578789730.428:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/freshclam" pid=996 comm="apparmor_parser"
!!! 0.5s
[    6.006422] Process accounting resumed
[    6.089447] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    6.089448] Bluetooth: BNEP filters: protocol multicast
[    6.089451] Bluetooth: BNEP socket layer initialized
[    6.093694] Bluetooth: hci0: Waiting for firmware download to complete
[    6.093943] Bluetooth: hci0: Firmware loaded in 1377726 usecs
[    6.093978] Bluetooth: hci0: Waiting for device to boot
[    6.106950] Bluetooth: hci0: Device booted in 12685 usecs
[    6.110076] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-18-16-1.ddc
[    6.112957] Bluetooth: hci0: Applying Intel DDC parameters completed
!!! 0.4s
[    6.514876] iwlwifi 0000:39:00.0: Applying debug destination EXTERNAL_DRAM
[    6.631036] iwlwifi 0000:39:00.0: Applying debug destination EXTERNAL_DRAM
!!!
[    6.704738] iwlwifi 0000:39:00.0: FW already configured (0) - re-configuring
[    6.725177] iwlwifi 0000:39:00.0: BIOS contains WGDS but no WRDS
!!! 0.5s
[    7.315006] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[    7.315187] NFSD: Using legacy client tracking operations.
[    7.315196] NFSD: starting 90-second grace period (net f00000a8)
!!! 1.5s
[    9.933698] wlp57s0: authenticate with 82:3b:e4:08:31:40
[    9.936496] wlp57s0: send auth to 82:3b:e4:08:31:40 (try 1/3)
[   10.082374] wlp57s0: authenticated
[   10.085709] wlp57s0: associate with 82:3b:e4:08:31:40 (try 1/3)
[   10.088606] wlp57s0: RX AssocResp from 82:3b:e4:08:31:40 (capab=0x1 status=0 aid=1)
[   10.094169] wlp57s0: associated
[   10.097948] IPv6: ADDRCONF(NETDEV_CHANGE): wlp57s0: link becomes ready
!!! 1.5s
[   11.531414] kauditd_printk_skb: 57 callbacks suppressed
[   11.531416] audit: type=1107 audit(1578789736.540:68): pid=1111 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="GetDynamicUsers" mask="send" name="org.freedesktop.systemd1" pid=1637 label="/usr/bin/freshclam" peer_pid=1 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[   11.553126] vboxdrv: Found 8 processor cores
[   11.569633] vboxdrv: TSC mode is Invariant, tentative frequency 1799998388 Hz
[   11.569634] vboxdrv: Successfully loaded version 6.0.14_Ubuntu (interface 0x00290008)
[   11.577055] VBoxNetFlt: Successfully started.
[   11.583818] VBoxNetAdp: Successfully started.
[   11.590794] VBoxPciLinuxInit
(without logitech controller: saved 1.8s untill here:)[    9.770071] vboxpci: IOMMU not found (not registered)
[   11.592872] vboxpci: IOMMU not found (not registered)
!!! 1.5s
[   12.940072] rfkill: input handler disabled
... enter login 
[   20.135717] Bluetooth: RFCOMM TTY layer initialized
[   20.135721] Bluetooth: RFCOMM socket layer initialized
[   20.135724] Bluetooth: RFCOMM ver 1.11
[   20.246209] rfkill: input handler enabled
!!! 5s
[   25.163554] rfkill: input handler disabled

我补充道

...

其中只有不到十分之一秒的差距,并且增加了

!!!

在那里,时间在悄然流逝。

似乎最后过了很长时间才出现这条消息两次:

rfkill: input handler disabled

我可以使用以下方法分析 systemd 服务

$ systemd-analyze blame
          4.219s NetworkManager-wait-online.service
          2.333s [email protected]
          2.186s e2scrub_reap.service
          1.104s nfs-server.service
           969ms dev-nvme0n1p6.device
           950ms fwupd.service
           881ms snapd.service
           744ms systemd-logind.service
           671ms snap-core18-1288.mount
           661ms snap-snapd-5643.mount
           648ms snap-gnome\x2dsystem\x2dmonitor-111.mount
           648ms snap-gnome\x2dcalculator-544.mount
           615ms snap-gnome\x2dlogs-81.mount
           586ms snap-core-8213.mount
           580ms snap-riot\x2dweb-40.mount
           516ms bolt.service
           491ms snap-gnome\x2dcharacters-375.mount
           480ms snap-chromium-971.mount
           468ms systemd-resolved.service
           447ms snap-atom-245.mount
           442ms systemd-timesyncd.service
           423ms media-Daten.mount
           420ms dev-loop8.device
           418ms systemd-fsck@dev-disk-by\x2duuid-B655\x2d9C3D.service
           408ms mpd.service
           392ms dev-loop1.device
           368ms snap-android\x2dstudio-81.mount
           368ms snap-core18-1279.mount
           366ms snap-freemind-4.mount
           359ms snap-snapd-5754.mount
           356ms dev-loop2.device
           353ms dev-loop4.device
           348ms dev-loop9.device
           341ms dev-loop3.device
           337ms networkd-dispatcher.service
           328ms dev-loop6.device
           327ms systemd-journald.service
           326ms upower.service
           306ms snap-gnome\x2d3\x2d28\x2d1804-110.mount
           304ms dev-loop10.device
           302ms udisks2.service
           301ms dev-loop11.device
           293ms gpu-manager.service
           291ms snap-core-8268.mount
           279ms dev-loop7.device
           273ms snap-gnome\x2dsystem\x2dmonitor-123.mount
           272ms snap-gnome\x2dcharacters-367.mount
           272ms snap-gtk\x2dcommon\x2dthemes-1353.mount
           270ms systemd-rfkill.service
           257ms dev-loop12.device
           255ms systemd-journal-flush.service
           251ms dev-loop5.device

我已经优化了一些步骤:

  1. 将 grub 超时设置为一秒/etc/default/grub

    GRUB_TIMEOUT=1
    
  2. 通过分析启动日志dmesg,我注意到我的罗技通用接收器鼠标的加密狗(我很少使用)在启动过程中需要一秒钟以上的时间才能安装。因此,当我不需要它时,我会移除加密狗。

  3. 我有 40GB RAM,所以我禁用了交换/etc/fstab

  4. 固定的PIDFile= references a path below legacy directory

    SERVICEFILES="/lib/systemd/system/dbus.socket /etc/systemd/system/teamviewerd.service /lib/systemd/system/rpc-statd.service /lib/systemd/system/fail2ban.service"
    sudo cp $SERVICEFILES /var/tmp/
    sudo sed -i 's~/var/run/~/run/~g' $SERVICEFILES
    
  5. 启动时禁用 postgres:

    sudo systemctl disable postgresql
    
  6. 禁用 wifi 和蓝牙可节省 2 秒的启动时间

我怎样才能加快启动过程?

相关内容