我是 Ubuntu 和 Linux 的新用户。大约 3 个月前我第一次安装它。
从大约 2 个月前开始,我的电脑就越来越频繁地出现死机现象,导致电脑完全死机。鼠标不动,音频循环播放。然后我不得不强行关闭电脑。一个月前,电脑崩溃导致我的 SSD 坏掉,所以我重新安装了 Ubuntu 20.04.2 LTS。
我对这种类型的故障排除还不熟悉,所以问题可能非常简单。
非常感谢您的帮助
免费-h:
total used free shared buff/cache available
Mem: 31Gi 1.8Gi 28Gi 44Mi 1.4Gi 29Gi
Swap: 2.0Gi 0B 2.0Gi
sysctl vm.swappiness:
vm.swappiness = 60
sudo lshw -C 内存:
*-firmware
description: BIOS
vendor: American Megatrends Inc.
physical id: 0
version: P1.80
date: 02/22/2021
size: 64KiB
capacity: 16MiB
capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
*-memory
description: System Memory
physical id: f
slot: System board or motherboard
size: 32GiB
*-bank:0
description: [empty]
product: Unknown
vendor: Unknown
physical id: 0
serial: Unknown
slot: DIMM 0
*-bank:1
description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0.3 ns)
product: F4-3200C16-16GVK
vendor: Unknown
physical id: 1
serial: 00000000
slot: DIMM 1
size: 16GiB
width: 64 bits
clock: 3200MHz (0.3ns)
*-bank:2
description: [empty]
product: Unknown
vendor: Unknown
physical id: 2
serial: Unknown
slot: DIMM 0
*-bank:3
description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0.3 ns)
product: F4-3200C16-16GVK
vendor: Unknown
physical id: 3
serial: 00000000
slot: DIMM 1
size: 16GiB
width: 64 bits
clock: 3200MHz (0.3ns)
*-cache:0
description: L1 cache
physical id: 12
slot: L1 - Cache
size: 384KiB
capacity: 384KiB
clock: 1GHz (1.0ns)
capabilities: pipeline-burst internal write-back unified
configuration: level=1
*-cache:1
description: L2 cache
physical id: 13
slot: L2 - Cache
size: 3MiB
capacity: 3MiB
clock: 1GHz (1.0ns)
capabilities: pipeline-burst internal write-back unified
configuration: level=2
*-cache:2
description: L3 cache
physical id: 14
slot: L3 - Cache
size: 32MiB
capacity: 32MiB
clock: 1GHz (1.0ns)
capabilities: pipeline-burst internal write-back unified
configuration: level=3
ls-al / var /崩溃:
total 10996
drwxrwsrwt 2 root whoopsie 4096 Jun 26 16:48 .
drwxr-xr-x 14 root root 4096 Feb 9 20:56 ..
-rw-r----- 1 nicholas whoopsie 11244497 Jun 26 16:48 _usr_bin_gnome-control-center.1000.crash
-rw-r--r-- 1 nicholas whoopsie 0 Jun 26 16:48 _usr_bin_gnome-control-center.1000.upload
-rw------- 1 whoopsie whoopsie 37 Jun 26 16:48 _usr_bin_gnome-control-center.1000.uploaded
swapon -s:
Filename Type Size Used Priority
/swapfile file 2097148 0 -2
sudo journalctl-b-1-e:
Jun 26 21:12:08 nicholas-desktop kernel: RDX: ffff99eadebad210 RSI: ffff99ea57085e00 RDI: ffff99eadebac740
Jun 26 21:12:08 nicholas-desktop kernel: RBP: ffffad0f87797f08 R08: 0000000000000000 R09: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff99ea57085e00
Jun 26 21:12:08 nicholas-desktop kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: FS: 00007f6490b43700(0000) GS:ffff99eadeb80000(0000) knlGS:0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b CR3: 0000000702168000 CR4: 0000000000340ee0
Jun 26 21:12:08 nicholas-desktop kernel: Call Trace:
Jun 26 21:12:08 nicholas-desktop kernel: do_sched_yield+0x66/0x80
Jun 26 21:12:08 nicholas-desktop kernel: __do_sys_sched_yield+0xe/0x20
Jun 26 21:12:08 nicholas-desktop kernel: do_syscall_64+0x49/0xc0
Jun 26 21:12:08 nicholas-desktop kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9
Jun 26 21:12:08 nicholas-desktop kernel: RIP: 0033:0x7f64972fb89b
Jun 26 21:12:08 nicholas-desktop kernel: Code: 73 01 c3 48 8b 0d f5 55 0e 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 18 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c5 55 0e 00 f7 d8 64>
Jun 26 21:12:08 nicholas-desktop kernel: RSP: 002b:00007f6490b42398 EFLAGS: 00000206 ORIG_RAX: 0000000000000018
Jun 26 21:12:08 nicholas-desktop kernel: RAX: ffffffffffffffda RBX: 000055fc25801f20 RCX: 00007f64972fb89b
Jun 26 21:12:08 nicholas-desktop kernel: RDX: 000055fc25807fc0 RSI: 0000000097b2b004 RDI: 000055fc258076fc
Jun 26 21:12:08 nicholas-desktop kernel: RBP: 0000000000000032 R08: 0000000000000000 R09: 0000000060d77c08
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000003
Jun 26 21:12:08 nicholas-desktop kernel: R13: 000000000000000a R14: 000000000000004b R15: 000055fc258076fc
Jun 26 21:12:08 nicholas-desktop kernel: Modules linked in: rfcomm ip6table_filter ip6_tables iptable_filter bpfilter ccm cmac algif_hash algif_skcipher af_alg bnep nls_iso8859_1 nvidia_uvm(OE) nvidia_drm(POE) nvidia_modeset(POE) s>
Jun 26 21:12:08 nicholas-desktop kernel: xhci_pci_renesas wmi gpio_amdpt gpio_generic
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b
Jun 26 21:12:08 nicholas-desktop kernel: ---[ end trace b06917b61d045423 ]---
Jun 26 21:12:08 nicholas-desktop kernel: RIP: 0010:schedule+0x55/0xc0
Jun 26 21:12:08 nicholas-desktop kernel: Code: 89 e7 41 f6 44 24 24 20 74 6f e8 56 d3 53 ff 49 83 bc 24 b0 0b 00 00 00 74 34 65 48 8b 1c 25 c0 7b 01 00 31 ff e8 4b f5 ff ff <48> 8b 03 a8 08 75 f2 41 8b 44 24 24 a9 20 00 00 20 74 0c>
Jun 26 21:12:08 nicholas-desktop kernel: RSP: 0018:ffffad0f87797ef8 EFLAGS: 00010296
Jun 26 21:12:08 nicholas-desktop kernel: RAX: 0000000000000000 RBX: 000002e62f38035b RCX: ffff99eadebad210
Jun 26 21:12:08 nicholas-desktop kernel: RDX: ffff99eadebad210 RSI: ffff99ea57085e00 RDI: ffff99eadebac740
Jun 26 21:12:08 nicholas-desktop kernel: RBP: ffffad0f87797f08 R08: 0000000000000000 R09: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff99ea57085e00
Jun 26 21:12:08 nicholas-desktop kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: FS: 00007f6490b43700(0000) GS:ffff99eadeb80000(0000) knlGS:0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b CR3: 0000000702168000 CR4: 0000000000340ee0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Local Device Found
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: type: 26ce 01a2
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: path: sdl://0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: serial_number: - 0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Manufacturer:
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Product: ASRock LED Controller
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Release: 110
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Interface: -1
ls -al ~/.local/share/gnome-shell/extensions: 响应:
ls: cannot access '/home/nicholas/.local/share/gnome-shell/extensions': No such file or directory
我确实手动导航到那里但找不到该文件夹。
ls-al/usr/share/gnome-shell/extensions:
total 20
drwxr-xr-x 5 root root 4096 Feb 9 20:49 .
drwxr-xr-x 7 root root 4096 Jun 14 23:16 ..
drwxr-xr-x 2 root root 4096 Feb 9 20:49 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 May 31 17:36 [email protected]
drwxr-xr-x 3 root root 4096 Feb 9 20:49 [email protected]
答案1
/交换文件
您的 2G /swapfile 太小了。让我们将其增加到 4G...
笔记:错误使用rm
和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 32G 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
记忆
去https://www.memtest86.com/并免费下载/运行它们memtest
来测试你的记忆力。至少完成一次所有 4/4 测试以确认记忆力良好。这可能需要几个小时才能完成。
更新#1:
禁用 XMP,重新启动,然后重新测试是否锁定/冻结。
更新 #2:
从 Ubuntu 20.04.2 更新到 21.04,到目前为止没有崩溃!
答案2
在 BIOS 中禁用“自动 C 状态管理”或“全局 C 状态控制”或类似名称的选项可以帮助我解决类似的问题。