笔记:我已将其发布在 Ask Ubuntu 上,但被告知该论坛仅针对与真实 Ubuntu 相关的问题。有人建议我在这里发帖,所以我将问题移到这里。
我在我的旧 Thinkpad T43p 上安装了 Zorin-OS Education Lite 32 位。该发行版基于 Ubuntu,使用 xfce 和 lightdm 作为图形界面。
最初,/、swap、/var、/var/log 和 /home 的单独分区位于 HDD 上。然后我决定除了 HDD(T43p 支持两个存储设备)之外添加一个小型(32G)SSD,以期加快系统速度。我将根分区移至 SSD,将所有其他分区保留在 HDD 上。仅 HDD 上发生了变化:旧的根分区被删除,交换分区被删除/创建(太小)。基本上,取得了巨大的成功。有趣的是,现在系统的运行速度快了很多。
然而,有一次,出现了一个顽皮的问题(我无法确切地说出这是什么时候开始的):
当我关闭系统并稍后再次启动时,启动过程非常慢。大约 4-5 分钟后,系统启动并按预期工作。此过程中没有显示 grub 菜单,这是预期的行为。
当我在启动时间过长时强制关闭电源(按住电源按钮),然后重新启动系统时,它会很快出现并显示 grub 菜单。从启动菜单中选择正常的“Zorin OS”,系统将在不到一分钟的时间内启动并运行。 (我怀疑,grub 菜单显示是因为系统没有完全关闭,对吧?)
我比较了两个启动的启动日志 (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 菜单显示时。
我注意到内核是用一个附加参数启动的:
vt.handoff=1
当启动过程延迟时。此外,还有一些与视频、syslogd 等相关的差异。
有什么提示接下来要看什么吗? TIA
更新 10.12.2020我决定重新开始,不再在这个线程中关注这个问题。
在开始这个问题之前,我已经安装了两次系统,每次我都认为问题是在安装一段时间后出现的。目前,我担心某些软件更新(像往常一样从 DVD 安装后,有很多软件更新)导致了该问题。因此,我决定进行全新安装,但不会立即进行常规更新。希望通过逐步更新找到原因。没关系,谢谢您的宝贵时间。
答案1
重新安装后,除了 Firefox 的软件包(似乎是无风险的软件包)之外,我没有升级任何软件包。接下来,我安装了来自 linrunner 存储库的tlp
1.3 版软件包,以及.瞧,两次重新启动后,启动过程显示出过多的延迟。我卸载了 V1.3 并安装了官方 Ubuntu 版本 1.1,但行为相同。我也只是卸载了,但这也没有帮助。tp-smapi-dkms
tlp
tp-smapi-dkms
在我的 Thinkpad T43p 上运行Zoin-OS教育精简版32位,tlp
是肯定会造成问题。
不幸的是,正如我希望的那样,这tlp
对这台机器的电源管理有所帮助。我不知道内核和 Zorin-OS 的电源管理开箱即用有多好。将尝试查找一些有关此的信息。
无论如何,问题解决了。