Boot

正常關機後開機過慢,但強制關機後沒有

  • December 11, 2020

*注意:*我已經在 Ask Ubuntu 上發布了這個,但被告知論壇只針對與真正的 Ubuntu 相關的問題。有人建議我在這裡發帖,所以我把問題移到這裡。

我已經在我的老 Thinkpad T43p 上安裝了 Zorin-OS Education Lite 32bit。該發行版基於 Ubuntu,圖形界面使用 xfce 和 lightdm。

最初,/、swap、/var、/var/log 和 /home 的單獨分區位於 HDD 上。然後我決定在 HDD 之外添加一個小型 (32G) SSD(T43p 支持兩個儲存設備)以希望加快系統速度。我將根分區移動到 SSD 並將所有其他分區留在 HDD 上。只有硬碟上的東西發生了變化:舊的根分區被刪除,交換分區被刪除/創建(太小了)。基本上,取得了巨大的成功。有趣的是系統現在工作的速度有多快。

然而,在某一時刻,出現了一個頑皮的問題(我無法確切知道這是什麼時候開始的):

  • 當我關閉系統,然後再次打開它時,啟動過程非常緩慢。大約 4-5 分鐘後,系統啟動並按預期工作。此過程中不顯示 grub 菜單,這是預期的行為。
  • 當我在啟動時間過長的情況下強制關閉電源(按住電源按鈕),然後重新啟動系統,它很快就會出現並顯示 grub 菜單。從啟動菜單中選擇正常的“Zorin OS”,系統會在不到一分鐘的時間內啟動並執行。(我懷疑 grub 菜單是 show,因為系統沒有完全關閉,對吧?)

我比較了兩個引導的引導日誌 (dmesg),發現了一些差異。解釋這些超出了我對引導過程的了解。希望其中一個或另一個差異會敲響一些知識淵博的靈魂的鐘聲。

為了找出不同之處,我在消息的開頭加上了時間戳,按詞法排序,然後將它們輸入到一個comarison工具中。結果如下(“delayed->”為延遲開機,“normal->”為強制關機後快速開機)

delayed ->        .data : 0xdd9b5c60 - 0xdde8eb40   (4963 kB)
                 .init : 0xddea6000 - 0xddfc8000   (1160 kB)
                 .text : 0xdd000000 - 0xdd9b5c60   (9943 kB)
normal  ->        .data : 0xd49b5c60 - 0xd4e8eb40   (4963 kB)
                 .init : 0xd4ea6000 - 0xd4fc8000   (1160 kB)
                 .text : 0xd4000000 - 0xd49b5c60   (9943 kB)
---------------------------------------------------------------------
delayed ->  Console: colour dummy device 80x25
normal  ->  Console: colour VGA+ 80x25
           Console: switching to colour dummy device 80x25
           Console: switching to colour frame buffer device 175x65
---------------------------------------------------------------------
delayed ->  Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-54-generic root=UUID=d50a32c6-34b0-11eb-a9eb-7111d485222b ro initrd=/casper/initrd.lz4 quiet splash vt.handoff=1
normal  ->  Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-54-generic root=UUID=d50a32c6-34b0-11eb-a9eb-7111d485222b ro initrd=/casper/initrd.lz4 quiet splash
---------------------------------------------------------------------
delayed ->  Memory: 1995804K/2095608K available (9943K kernel code, 938K rwdata, 3992K rodata, 1160K init, 836K bss, 99804K reserved, 0K cma-reserved, 1188744K highmem)
normal  ->  Memory: 1996092K/2095608K available (9943K kernel code, 938K rwdata, 3992K rodata, 1160K init, 836K bss, 99516K reserved, 0K cma-reserved, 1188744K highmem)
---------------------------------------------------------------------
delayed ->  [TTM] Zone  kernel: Available graphics memory: 434278 KiB
           [TTM] Zone highmem: Available graphics memory: 1028650 KiB
normal  ->  [TTM] Zone  kernel: Available graphics memory: 434422 KiB
           [TTM] Zone highmem: Available graphics memory: 1028794 KiB
---------------------------------------------------------------------
delayed ->  checking generic (c0000000 5a0000) vs hw (c0000000 8000000)
---------------------------------------------------------------------
delayed ->  clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x1eae0a205f2, max_idle_ns: 440795277977 ns
normal  ->  clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x1ead52fe7de, max_idle_ns: 440795275707 ns
---------------------------------------------------------------------
delayed ->  fb0: VESA VGA frame buffer device
           fb0: switching to radeondrmfb from VESA VGA
           fbcon: Deferring console take-over
           fbcon: Deferring console take-over
---------------------------------------------------------------------
delayed ->  initial memory mapped: [mem 0x00000000-0x1e5fffff]
normal  ->  initial memory mapped: [mem 0x00000000-0x155fffff]
---------------------------------------------------------------------
delayed ->  rtc_cmos 00:02: setting system clock to 2020-12-04T13:04:12 UTC (1607087052)
normal  ->  rtc_cmos 00:02: setting system clock to 2020-12-04T13:22:52 UTC (1607088172)
---------------------------------------------------------------------
delayed ->  smpboot: Total of 1 processors activated (4256.82 BogoMIPS)
normal  ->  smpboot: Total of 1 processors activated (4256.44 BogoMIPS)
---------------------------------------------------------------------
delayed ->  systemd-journald[299]: Received request to flush runtime journal from PID 1
normal  ->  systemd-journald[298]: File /var/log/journal/bd8e491d3fd246aba6861a6970e39e0d/system.journal corrupted or uncleanly shut down, renaming and replacing.
           systemd-journald[298]: Received request to flush runtime journal from PID 1
---------------------------------------------------------------------
normal  ->  systemd[1]: Created slice system-postfix.slice.
---------------------------------------------------------------------
delayed ->  systemd[1]: Listening on Journal Socket.
           systemd[1]: Mounting Huge Pages File System...
           systemd[1]: Reached target User and Group Name Lookups.
normal  ->  systemd[1]: Listening on Journal Audit Socket.
           systemd[1]: Listening on Syslog Socket.
---------------------------------------------------------------------
delayed ->  tsc: Detected 2128.414 MHz processor
           tsc: Fast TSC calibration using PIT
normal  ->  tsc: Detected 2128.220 MHz processor
           tsc: Fast TSC calibration failed
---------------------------------------------------------------------
normal  ->  tsc: PIT calibration matches PMTIMER. 1 loops
---------------------------------------------------------------------
delayed ->  vesafb: Truecolor: size=0:8:8:8, shift=0:16:8:0
           vesafb: framebuffer at 0xc0000000, mapped to 0x(ptrval), using 5760k, total 5760k
           vesafb: mode is 1400x1050x32, linelength=5600, pages=0
           vesafb: scrolling: redraw
---------------------------------------------------------------------
delayed ->  vt handoff: transparent VT on vt#1
------------------------------------------------------------------------

延遲啟動的啟動日誌的最後部分如下所示:

[   15.216737] audit: type=1400 audit(1607087065.208:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-previewer//sanitized_helper" pid=676 comm="apparmor_parser"
[  174.735613] thinkpad_ec: loading out-of-tree module taints kernel.
[  174.735783] thinkpad_ec: module verification failed: signature and/or required key missing - tainting kernel
[  174.740215] thinkpad_ec: thinkpad_ec 0.42 loaded.
[  174.741379] tp_smapi 0.42 loading...
[  174.743033] tp_smapi successfully loaded (smapi_port=0xb2).
[  174.767561] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[  174.767572] ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCTG: evaluate failed
[  174.812330] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[  174.812341] ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCTG: evaluate failed
[  195.615652] lib80211_crypt: registered algorithm 'CCMP'
[  195.673147] lib80211_crypt: registered algorithm 'TKIP'
[  195.689827] IPv6: ADDRCONF(NETDEV_CHANGE): wlp11s2: link becomes ready
[  211.880332] ipw2200: Firmware error detected.  Restarting.

正常速度啟動的是:

[   14.430665] audit: type=1400 audit(1607088184.628:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-previewer//sanitized_helper" pid=693 comm="apparmor_parser"
[   25.976615] thinkpad_ec: loading out-of-tree module taints kernel.
[   25.976668] thinkpad_ec: module verification failed: signature and/or required key missing - tainting kernel
[   25.981152] thinkpad_ec: thinkpad_ec 0.42 loaded.
[   25.981993] tp_smapi 0.42 loading...
[   25.983999] tp_smapi successfully loaded (smapi_port=0xb2).
[   26.011674] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[   26.011683] ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCTG: evaluate failed
[   26.054491] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[   26.054503] ACPI: \_SB_.PCI0.LPC_.EC__.HKEY: BCTG: evaluate failed
[  121.255499] ipw2200: Firmware error detected.  Restarting.
[  137.612515] lib80211_crypt: registered algorithm 'CCMP'
[  137.738593] lib80211_crypt: registered algorithm 'TKIP'
[  137.784727] IPv6: ADDRCONF(NETDEV_CHANGE): wlp11s2: link becomes ready

ipw2200消息之前的一些延遲是由於在顯示 grub 菜單時必須按Enter鍵。

我注意到核心是用一個額外的參數啟動的: vt.handoff=1 當啟動過程被延遲時。還有一些與影片、syslogd 和其他一些相關的差異。

有什麼提示接下來要看什麼嗎?TIA

2020 年 12 月 10 日更新我已決定重新開始,並且不會再在此執行緒中關注此問題。

在開始這個問題之前我已經安裝了兩次系統,我認為每次安裝後都會出現問題。目前,我擔心某些軟體更新 - 像往常一樣從 DVD 安裝後,有很多 - 會導致問題。因此,我決定進行全新安裝,但不會立即進行一般更新。希望逐步更新找到原因。沒關係,感謝您的時間。

重新安裝後,我沒有升級任何軟體包,除了 Firefox 的軟體包(似乎是無風險的)。接下來,我安裝了來自linrunnertlp儲存庫的 1.3 版軟體包,以及. 瞧,在兩次重新啟動後,啟動過程顯示了過多的延遲。我解除安裝了 V1.3 並安裝了官方的 Ubuntu 1.1 版,但行為相同。我也只解除安裝了,但這也無濟於事。tp-smapi-dkms``tlp``tp-smapi-dkms

在執行Zoin-OS Education Lite 32bit 的tlpThinkpad T43p上,肯定會導致問題

糟糕的是,我希望tlp這對這台機器的電源管理有所幫助。我不知道開箱即用的核心和 Zorin-OS 的電源管理有多好。將嘗試找到有關此的一些資訊。

無論如何,問題解決了。

引用自:https://unix.stackexchange.com/questions/623011