每次启动和重新启动后,我的 Ubuntu 21.04 都可以正常工作。然而 3-4 小时后,它“冻结”了。除了强制重启没有任何帮助。如何避免后者?
终端运行:
<free -h
total used free shared buff/cache available
Mem: 3.5Gi 2.2Gi 243Mi 278Mi 1.1Gi 832Mi
Swap: 2.0Gi 17Mi 2.0Gi
vm.swappiness = 60
Filename Type Size Used Priority
/swapfile file 2097148 17772 -2
top - 09:32:34 up 26 min, 1 user, load average: 0.26, 0.59, 1.18
Tasks: 203 total, 3 running, 200 sleeping, 0 stopped, 0 zombie
%Cpu(s): 42.9 us, 0.0 sy, 0.0 ni, 57.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0top - 09:33:54 up 27 min, 1 user, load average: 0.72, 0.73, 1.18
Tasks: 203 total, 3 running, 200 sleeping, 0 stopped, 0 zombie
%Cpu(s): 25.0 us, 18.8 sy, 0.0 ni, 56.2 id, 0.0 wa, 0.0 hi, 0.0 si, top - 09:33:54 up 27 min, 1 user, load average: 0.72, 0.73, 1.18
Tasks: 203 total, 4 running, 199 sleeping, 0 stopped, 0 zombie
%Cpu(s): 40.0 us, 20.0 sy, 0.0 ni, 40.0 id, 0.0 wa, 0.0 hi, 0.0 si,top - 09:33:54 up 27 min, 1 user, load average: 0.72, 0.73, 1.18
Tasks: 203 total, 2 running, 201 sleeping, 0 stopped, 0 zombie
%Cpu(s): 33.3 us, 33.3 sy, 0.0 ni, 33.3 id, 0.0 wa, 0.0 hi, 0.0 si,top - 09:33:54 up 27 min, 1 user, load average: 0.72, 0.73, 1.18
Tasks: 203 total, 5 running, 198 sleeping, 0 stopped, 0 zombie
%Cpu(s): 28.6 us, 42.9 sy, 0.0 ni, 28.6 id, 0.0 wa, 0.0 hi, 0.0 si,
MiB Mem : 3623.3 total, 139.9 free, 2286.0 used, 1197.4 buff/c
MiB Swap: 2048.0 total, 2029.4 free, 18.6 used. 822.0 avail>
# /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/sda1 during installation
UUID=28539ebd-a6e3-4fa7-8dcc-8bdc31b0f505 / ext4 errors=remount-ro 0 1
/swapfile none swap sw
首先,最有价值的东西应该放在硬盘上(例如 Transcend),并且每天都在修改(关闭 Internet)。准备好安装工具。当冻结不好并且无法获得建议时,请强制关闭,插入安装工具,然后按F2启动。从启动菜单中,选择上述工具并重新安装系统。首选 LTS 版本。介意 Livepatch。这在我的情况下有效。
您没有足够的 RAM 或足够的交换空间。
我们会将您的交换从 2G 增加到 4G,看看是否有帮助...
注意
rm
:和命令的错误使用dd
会导致数据丢失。建议复制/粘贴。在
terminal
...编辑 /etc/fstab,使用
sudo -H gedit /etc/fstab
或sudo pico /etc/fstab
。在 /etc/fstab 中确认此 /swapfile 行...并确认没有其他“交换”行...在此行中使用空格...确认 NO TABS...
更新#1:
重新安装 Ubuntu 以解决问题。