我有一台联想 T430,自 2016 年以来一直在其上运行 Ubuntu。最近,我遇到了越来越多明显随机的崩溃,一切都无限期地冻结,除了硬重启之外没有任何效果。
这个问题始于我运行 Ubuntu 16.04 时,在全新安装 20.04 后仍然存在(或略有恶化)。我更换了 RAM 和硬盘,但情况没有任何改善。(我运行了 BIOS、硬盘和 RAM 测试,结果没有问题。)
有时它可以正常运行几天,但有时它会连续崩溃多次。
这种情况非常随机,有时甚至在我不使用电脑时也会发生,但最常见的情况是使用 Firefox + YouTube 和其他视频或 JavaScript 繁重的应用程序。如果在播放音频时卡住,它会继续反复播放最后半秒。
唯一完全可靠地发生这种情况的情况是尝试在 VLC 中播放 H.264 视频时。其他编解码器播放大多正常。(我尝试启用 VLC 调试日志记录,但在播放导致其崩溃的视频时没有显示任何内容。)
唯一可靠的没有在恢复模式下启动时会发生这种情况。 (然后在 VLC 中播放相同的视频没有问题。)从 USB 驱动器启动时,Ubuntu 20.04 也能正常运行。
我花了几个小时查看各种日志,却没有找到任何看似相关的内容。
- CPU:Intel® CPU @ 2.60GHz × 4
- BIOS 版本:G1ET17WW (0.17)
- 显卡:英特尔高清显卡 4000 (IVB GT2)
- 内存:11.6 GB
- GNOME 版本:3.36.8
- 窗口系统:x11
- 内核:5.8.0-44-generic
以下是我在其他类似问题中看到的所要求的各种信息。
结果swapon --show
:
NAME TYPE SIZE USED PRIO
/swapfile file 2G 0B -2
结果blkid
:
/dev/sda2: LABEL="system" UUID="69efbbf3-98d7-4173-b6c7-e72136f35001" TYPE="ext4" PARTLABEL="system" PARTUUID="4aad3c63-c551-40ef-9d2f-ad79166be270"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="swap" UUID="b2a9ac94-dd4a-465b-8889-3e7ccb9af0af" TYPE="swap" PARTLABEL="swap" PARTUUID="9cb305f2-1f73-4bb7-8da6-42a6124c8ee7"
/dev/sda3: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="089D-C851" TYPE="vfat" PARTLABEL="efi" PARTUUID="180dac3f-322e-4023-a3c0-9bc4ed90a32b"
/dev/sdb: LABEL="fs-data" UUID="0199caea-12da-401a-bdf4-6b1cc96677d4" TYPE="ext4"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
/dev/loop21: TYPE="squashfs"
/dev/loop22: TYPE="squashfs"
/dev/loop23: TYPE="squashfs"
/dev/loop24: TYPE="squashfs"
/dev/loop25: TYPE="squashfs"
/dev/loop26: TYPE="squashfs"
/dev/loop27: TYPE="squashfs"
/dev/loop28: TYPE="squashfs"
结果lshw -c video
:
*-display
description: VGA compatible controller
product: 3rd Gen Core processor Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 05
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:32 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:5000(size=64) memory:c0000-dffff
结果fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=69efbbf3-98d7-4173-b6c7-e72136f35001 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=089D-C851 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=0199caea-12da-401a-bdf4-6b1cc96677d4 /media/fm/fs-data auto nosuid,nodev,nofail,x-gvfs-show 0 0
更新 1:
lsmod 中的视频部分(一旦删除“大小”和“使用者”值,恢复模式、USB 启动和正常启动之间的结果相同)
uvcvideo
video thinkpad_acpi,i915
videobuf2_common videobuf2_v4l2,uvcvideo
videobuf2_memops videobuf2_vmalloc
videobuf2_v4l2 uvcvideo
videobuf2_vmalloc uvcvideo
videodev videobuf2_v4l2,uvcvideo,videobuf2_common
更新 2:
在我把硬盘换到另一台 ThinkPad 后,这个问题不再出现。这让我相信这是 BIOS 或硬件问题,而不是由内核引起的。
更新 3 包含更多详细信息:
(这些详细信息来自在不同的 ThinkPad 上使用相同的 HDD/Ubuntu 安装,而原来的 ThinkPad 在尝试更新 BIOS 时发生崩溃后正在商店接受治疗。)
交换文件设置和内核是相同的,但问题基本消失(尽管它仍然偶尔挂起)所以我认为问题主要是与硬件/BIOS 有关。
结果swapon -s
:
Filename Type Size Used Priority
/swapfile file 2097148 0 -2
结果free -h
:
total used free shared buff/cache available
Mem: 7.6Gi 3.1Gi 1.7Gi 810Mi 2.9Gi 3.5Gi
Swap: 2.0Gi 0B 2.0Gi
结果fdisk -l
:
Disk /dev/loop0: 162.48 MiB, 170360832 bytes, 332736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 161.4 MiB, 168857600 bytes, 329800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 138.77 MiB, 145489920 bytes, 284160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 99.21 MiB, 104026112 bytes, 203176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 55.39 MiB, 58073088 bytes, 113424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 175.101 MiB, 184532992 bytes, 360416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 161.42 MiB, 169254912 bytes, 330576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 55.48 MiB, 58159104 bytes, 113592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 43B5902C-6EA9-4EB8-86AD-B643C582109B
Device Start End Sectors Size Type
/dev/sda1 1048576 49233919 48185344 23G Linux swap
/dev/sda2 49233920 1953523711 1904289792 908G Linux filesystem
/dev/sda3 2048 1048575 1046528 511M Microsoft basic data
Partition table entries are not in disk order.
Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000LM015-2E81
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/loop8: 98.36 MiB, 103129088 bytes, 201424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 175.38 MiB, 183885824 bytes, 359152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 175.37 MiB, 183881728 bytes, 359144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 162.89 MiB, 170778624 bytes, 333552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop12: 64.79 MiB, 67915776 bytes, 132648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop13: 164.65 MiB, 172634112 bytes, 337176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop14: 51.2 MiB, 53501952 bytes, 104496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop15: 217.92 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop16: 64.36 MiB, 67477504 bytes, 131792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop17: 64.6 MiB, 67170304 bytes, 131192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop18: 32.28 MiB, 33845248 bytes, 66104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop19: 218.102 MiB, 229629952 bytes, 448496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop20: 31.9 MiB, 32595968 bytes, 63664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop21: 64.34 MiB, 67461120 bytes, 131760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop22: 164.65 MiB, 172630016 bytes, 337168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop23: 137.17 MiB, 143831040 bytes, 280920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop24: 20.45 MiB, 21434368 bytes, 41864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop25: 190.73 MiB, 199974912 bytes, 390576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop26: 175.101 MiB, 184532992 bytes, 360416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop27: 51.4 MiB, 53522432 bytes, 104536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop28: 20.5 MiB, 21487616 bytes, 41968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
答案1
唯一不会发生这种情况的情况是在恢复模式下启动时。(然后在 VLC 中播放相同的视频没有问题。)从 USB 驱动器启动时,Ubuntu 20.04 也能正常运行。
如果我的怀疑是正确的,并且它只使用基本的通用驱动程序进行恢复和安装磁盘模式启动,那么这说明视频驱动程序存在问题。然后在安装到磁盘时,它使用特定于英特尔视频卡的不同驱动程序,那么谜团就解开了。尝试使用sudo lsmod
并在所有启动模式下,在加载的模块中查找差异。
答案2
BIOS
联想 T430
bios 版本:G1ET17WW (0.17)
您的 BIOS 非常旧。有较新的 BIOS 可用这里或者这里。
注意:确认我拥有适合您型号的正确网页。
注意:更新 BIOS 之前请做好备份。
/swapfile 和交换分区 /dev/sda1
您有一个 2G 的 /swapfile,以及一个位于 /dev/sda1 上的交换分区。尽管swapon -s
只显示了正在使用的 /swapfile,但我们需要根据您的配置将 /swapfile 大小更改为 4G,并删除gparted
交换分区 /dev/sda1。
笔记:命令使用不当dd
可能导致数据丢失。建议复制/粘贴。
在里面terminal
...
sudo swapoff -a # turn off swap
sudo rm -i /swapfile # remove old /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 600 /swapfile # set proper file protections
sudo mkswap /swapfile # init /swapfile
sudo swapon /swapfile # turn on swap
free -h # confirm 8G RAM and 4G swap
编辑 /dev/fstab,使用sudo -H gedit /etc/fstab
或sudo pico /etc/fstab
。
确认 /etc/fstab 中的此 /swapfile 行...并确认没有其他“交换”行...在此行中使用空格...确认没有制表符...
/swapfile none swap sw 0 0
并删除此行的前导空格......
UUID=089D-C851 /boot/efi vfat umask=0077 0 1
保存文件。然后...
reboot # reboot and verify operation
然后用来gparted
删除/dev/sda1交换分区。
然后再次重新启动。
三星 SSD 860
确保固件是最新的。使用Samsung Magician
可下载的软件这里。
内存大小
您将内存显示为... 内存:11.6 GiB
但free -h
显示你的内存为...Mem:7.6Gi
哪一个是准确的?
答案3
安装 ffmpeg 帮我解决了这个问题。 https://linuxhint.com/install-ffmpeg-ubuntu/