我怎么知道为什么 20.04 崩溃了?

Aar*_*ron 10 crash 20.04

在过去一周左右的时间里,Ubuntu 20.04 在我的戴尔 XPS 开发人员版笔记本电脑上随机冻结(每天 3 或 4 次)。我所能做的就是按住电源按钮手动关闭机器然后重新启动。

没有登录/var/crash和运行

journalctl -b -1 -e
Run Code Online (Sandbox Code Playgroud)

不显示任何记录的信息 - 最后记录的项目是在崩溃前大约 10 分钟。

我还安装了传感器,并在昨天工作时监控温度。发生崩溃时,温度正常(所有核心均约为 40.0°C)。

所有软件都是最新的。

每次崩溃时我都在做不同的事情。我(可能?)打开的唯一常见程序是 Chrome,虽然我不完全确定,这只是一个猜测,因为我几乎总是打开它。

任何帮助表示赞赏。18.04 很少崩溃,20.04 一开始很好,但在这里升级几个月后我...

它是戴尔 XPS 13 7390 Intel® Core™ i7-10710U CPU @ 1.10GHz × 12


aaron@xps13:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       1.7Gi        11Gi       640Mi       2.3Gi        12Gi
Swap:          31Gi          0B        31Gi
Run Code Online (Sandbox Code Playgroud)
aaron@xps13:~$ sysctl vm.swappiness
vm.swappiness = 60
Run Code Online (Sandbox Code Playgroud)
aaron@xps13:~$ sudo dmidecode -s bios-version
[sudo] password for aaron: 
1.5.1
Run Code Online (Sandbox Code Playgroud)
aaron@xps13:~$ grep -i swap /etc/fstab
/swapfile                                 none            swap    sw              0       0
Run Code Online (Sandbox Code Playgroud)
aaron@xps13:~$ ls -al /var/crash
total 8
drwxrwsrwt  2 root whoopsie 4096 Jun 29 07:54 .
drwxr-xr-x 14 root root     4096 Apr 18 21:51 ..
Run Code Online (Sandbox Code Playgroud)
aaron@xps13:~$ ls -al ~/.local/share/gnome-shell/extensions
ls: cannot access '/home/aaron/.local/share/gnome-shell/extensions': No such file or directory
aaron@xps13:~$ ls -al /usr/share/gnome-shell/extensions
total 20
drwxr-xr-x 5 root root 4096 Jun  2 11:53 .
drwxr-xr-x 7 root root 4096 Jul  9 23:04 ..
drwxr-xr-x 2 root root 4096 Jun 11 14:33 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 Jun  2 11:48 ubuntu-appindicators@ubuntu.com
drwxr-xr-x 3 root root 4096 Jun 18 22:38 ubuntu-dock@ubuntu.com
Run Code Online (Sandbox Code Playgroud)

磁盘截图

grep -i ata /var/log/syslog*

grep -i iwlwifi /var/log/syslog*

/var/log/syslog 显示崩溃

aaron@xps13:~$ uname -r
5.4.0-40-generic
Run Code Online (Sandbox Code Playgroud)

hey*_*ema 5

戴尔 XPS 13 7390

\n

BIOS

\n

您的 BIOS 最新版本为 1.5.1。

\n

FSCK

\n

您的文件系统很脏。

\n
    \n
  • 以 \xe2\x80\x9c 引导至 Ubuntu Live DVD/USB 尝试 Ubuntu\xe2\x80\x9d 模式
  • \n
  • terminalCtrl+ Alt+打开一个窗口T
  • \n
  • 类型sudo fdisk -l
  • \n
  • 识别“Linux 文件系统”的 /dev/sdXX 设备名称
  • \n
  • 输入sudo fsck -f /dev/sdXX,替换sdXX为您之前找到的数字
  • \n
  • fsck如果有错误则重复命令
  • \n
  • 类型reboot
  • \n
\n

内存测试

\n

访问https://www.memtest86.com/并下载/运行他们的免费 memtest 来测试您的记忆力。至少完成一次所有 4/4 测试,以确认良好的记忆力。这可能需要几个小时才能完成。

\n

交换

\n

您的 /swapfile 过多。不能保证这会解决您的问题,但有可能。我们会将 /swapfile 从 31G 减少到 4G。

\n

注意:命令使用不当dd可能会导致数据丢失。建议复制/粘贴。

\n
sudo swapoff -a           # turn off swap\nsudo rm -i /swapfile      # remove old /swapfile\n\nsudo dd if=/dev/zero of=/swapfile bs=1M count=4096\n\nsudo chmod 600 /swapfile  # set proper file protections\nsudo mkswap /swapfile     # init /swapfile\nsudo swapon /swapfile     # turn on swap\nfree -h                   # confirm 16G RAM and 4G swap\nreboot                    # reboot and verify operation\n
Run Code Online (Sandbox Code Playgroud)\n

将此行添加到 /etc/fstab (如果它尚不存在)...

\n
/swapfile \xc2\xa0 \xc2\xa0none \xc2\xa0 \xc2\xa0swap \xc2\xa0 \xc2\xa0sw \xc2\xa0 \xc2\xa0 \xc2\xa00   0\n
Run Code Online (Sandbox Code Playgroud)\n

三星NVMe

\n

检查您的 Samsung NVMe 的固件更新。下载Samsung Magician 这里。这需要 Windows,或者您可以尝试构建一个 FreeDOS USB 记忆棒来执行此操作。

\n