Xubuntu 在恢复模式下运行良好,但在正常模式下冻结

Xubuntu 在恢复模式下运行良好,但在正常模式下冻结

我一直在使用Xubuntu 20.04 LTS作为主操作系统。它有时会随机冻结并重新启动。冻结可能随时发生,无论是否打开某些特定程序。冻结时什么都不起作用。我必须手动按电源按钮将其关闭。但有趣的是,在登录 grub 恢复模式并从那里开始正常启动时,它不会冻结。

这是我的交换文件和其他描述链接 https://pasteboard.co/8krbKHbriZzR.png

这是我的屏幕截图 https://pasteboard.co/RbaWBF55Ab8v.png

这是我的 SMART 数据和自我测试图片 https://pasteboard.co/Rvv1eY7hsqwb.png

电脑规格:

  • 内存:6GB DDR3
  • 处理器:英特尔奔腾 B960 @2.40GHz
  • 硬盘大小:500 GB
  • 显卡:Intel HD Graphics 2000

我曾使用过各种方法来解决这个问题。

我尝试过的方法:

  • 更新并升级了所有软件包
  • 修复缺失的依赖项
  • 更新内核至最新稳定版本
  • 安装正确的显卡驱动程序
  • 进行了启动修复

我什至重新安装Xubuntu 但错误仍然一样。

答案1

是的,正如我所想,您的 /swapfile 太小了,只有 2G。让我们将其增加到 4G,看看是否有帮助...

笔记:根据您的使用模式,您可能需要添加更多 RAM。

笔记:错误使用rmdd命令可能会导致数据丢失。建议复制/粘贴。

在里面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 6G RAM and 4G swap

sudo -H gedit /etc/fstab使用或编辑 /etc/fstab sudo pico /etc/fstab

确认 /etc/fstab 中的此 /swapfile 行...并确认没有其他“交换”行...在此行中使用空格...确认没有制表符...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

更新#1:

检查了您旧款 500G 硬盘的 SMART 数据后,发现存在读取错误、待处理扇区错误和自检错误。我们应该对您的磁盘进行坏块处理,看看能否找出任何坏扇区。

磁盘出现坏块后,运行Disks应用程序 SMART 自检以确认正常运行。

注意:不要中止坏块扫描!

注意:不要对 SSD 造成坏块

注意:请先备份您的重要文件!

注意:这可能需要几个小时

注意:您可能面临硬盘故障

在“尝试 Ubuntu”模式下启动 Ubuntu Live DVD/USB。

terminal...

sudo fdisk -l# 识别所有“Linux 文件系统”分区

sudo e2fsck -fcky /dev/sdXX# 只读测试

或者

sudo e2fsck -fccky /dev/sdXX# 非破坏性读写测试(受到推崇的)

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fccky 参数...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.

相关内容