Ubuntu 20.04 冻结和崩溃

Ubuntu 20.04 冻结和崩溃

我最近使用软件更新将版本 18 LTS 升级到 20,从那时起就注意到系统随机冻结或崩溃。

症状 崩溃通常始于某些窗口完全冻结(无响应)(vs code 或 firefox),在短时间内(30 秒到 60 秒)整个系统冻结,唯一的解决办法是通过电源按钮重新启动。最近,我还注意到一些瞬间崩溃,整个屏幕变黑。我还注意到崩溃通常发生在使用 firefox 或 vs code 时(但不发生在故意执行硬计算时)。

/var/崩溃

最新文件已有 3 天,最后一次崩溃发生在今天。

urh@urh-laptop:/var/crash$ ls
linux-image-5.4.0-54-generic.203356.crash    _opt_teamviewer_tv_bin_teamviewerd.0.uploaded  _usr_share_code_code.1000.crash
linux-image-5.4.0-54-generic.213157.crash    _usr_bin_gnome-shell.1000.crash                _usr_share_code_code.1000.upload
_opt_teamviewer_tv_bin_teamviewerd.0.crash   _usr_bin_gnome-shell.1000.upload               _usr_share_code_code.1000.uploaded
_opt_teamviewer_tv_bin_teamviewerd.0.upload  _usr_bin_gnome-shell.1000.uploaded

零件来自_usr_share_code.1000.crash

  GNU nano 4.8                                                                          _usr_share_code_code.1000.crash                                                                                    
ProblemType: Crash
Architecture: amd64
Date: Tue Dec  1 14:01:31 2020
DistroRelease: Ubuntu 20.04
ExecutablePath: /usr/share/code/code
ExecutableTimestamp: 1603764692
ProcCmdline: /usr/share/code/code\ --type=renderer\ --disable-color-correct-rendering\ --no-sandbox\ --field-trial-handle=11739126107242220802,6576820938724679016,131072\ --enable-features=WebComponents>
ProcCwd: /home/urh
ProcEnviron:
ProcMaps:
.
.
.
ProcStatus:
 Name:  code
 Umask: 0002
 State: S (sleeping)
 Tgid:  288605
 Ngid:  0
 Pid:   288605
 PPid:  288509
 TracerPid:     0
 Uid:   1000    1000    1000    1000
 Gid:   1000    1000    1000    1000
 FDSize:        128
 Groups:        4 24 27 30 46 116 126 127 1000
 NStgid:        288605
 NSpid: 288605
 NSpgid:        153351
 NSsid: 153351
 VmPeak:         8625096 kB
 VmSize:         4626800 kB
 VmLck:        0 kB
 VmPin:        0 kB
 VmHWM:   194540 kB
 VmRSS:   125928 kB
 RssAnon:          38616 kB
 RssFile:          87292 kB
 RssShmem:            20 kB
 VmData:          267896 kB
 VmStk:      132 kB
 VmExe:   112352 kB
 VmLib:        0 kB
 VmPTE:      844 kB
 VmSwap:               0 kB
 HugetlbPages:         0 kB
 CoreDumping:   1
 THP_enabled:   1
 Threads:       20
 SigQ:  0/47179
SigPnd:        0000000000000000
 ShdPnd:        0000000000000000
 SigBlk:        0000000000000000
 SigIgn:        0000000000000002
 SigCgt:        00000001800010f8
 CapInh:        0000000000000000
 CapPrm:        0000000000000000
 CapEff:        0000000000000000
 CapBnd:        0000003fffffffff
 CapAmb:        0000000000000000
 NoNewPrivs:    0
 Seccomp:       0
 Speculation_Store_Bypass:      thread vulnerable
 Cpus_allowed:  f
 Cpus_allowed_list:     0-3
 Mems_allowed:  00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000>
 Mems_allowed_list:     0
 voluntary_ctxt_switches:       11320
 nonvoluntary_ctxt_switches:    4009
Signal: 11
Uname: Linux 5.4.0-54-generic x86_64
UserGroups: adm cdrom dip kvm lpadmin plugdev sambashare sudo

信息

我正在运行(双启动)Ubuntu 20.04.1 LTS关于宏碁旋转 312GB 内存、Intel® Core™ i7-7500U CPU @ 2.70GHz × 4、以及 Mesa Intel® HD Graphics 620 (KBL GT2)。

侏儒版本:3.36.3

跑步journalctl -b -1 -e揭示:

dec 05 14:16:12 urh-laptop mtp-probe[466455]: bus: 1, device: 11 was not an MTP device
dec 05 14:16:14 urh-laptop systemd[1]: run-snapd-ns-snap\x2dstore.mnt.mount: Succeeded.
dec 05 14:16:14 urh-laptop systemd[1]: Unmounted /run/snapd/ns/snap-store.mnt.
dec 05 14:16:14 urh-laptop systemd[1]: Unmounting /run/snapd/ns...
dec 05 14:16:14 urh-laptop systemd[1]: run-snapd-ns.mount: Succeeded.
dec 05 14:16:14 urh-laptop systemd[1]: Unmounted /run/snapd/ns.
dec 05 14:16:14 urh-laptop systemd[1]: Stopped target Local File Systems (Pre).
dec 05 14:16:14 urh-laptop systemd[1]: Stopped target Swap.
dec 05 14:16:14 urh-laptop systemd[1]: Deactivating swap /dev/disk/by-id/ata-ST1000LM035-1RK172_WES1A7S2-part3...
dec 05 14:16:14 urh-laptop systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
dec 05 14:16:14 urh-laptop systemd[1]: Stopped Create Static Device Nodes in /dev.
dec 05 14:16:14 urh-laptop systemd[1]: systemd-sysusers.service: Succeeded.
dec 05 14:16:14 urh-laptop systemd[1]: Stopped Create System Users.
dec 05 14:16:14 urh-laptop systemd[1]: systemd-remount-fs.service: Succeeded.
dec 05 14:16:14 urh-laptop systemd[1]: Stopped Remount Root and Kernel File Systems.
dec 05 14:16:14 urh-laptop systemd[1]: Reached target Shutdown.
dec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\x2dpath-pci\x2d0000:00:17.0\x2data\x2d1\x2dpart3.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-path/pci-0000:00:17.0-ata-1-part3.
dec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\x2did-ata\x2dST1000LM035\x2d1RK172_WES1A7S2\x2dpart3.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-id/ata-ST1000LM035-1RK172_WES1A7S2-part3.
dec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\x2did-wwn\x2d0x5000c5009d10879a\x2dpart3.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-id/wwn-0x5000c5009d10879a-part3.
dec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\x2dpartuuid-00af4d5c\x2d43e1\x2d4918\x2d8b9e\x2d8f331d86bab4.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-partuuid/00af4d5c-43e1-4918-8b9e-8f331d86bab4.
dec 05 14:16:15 urh-laptop systemd[1]: dev-sda3.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/sda3.
dec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\x2duuid-86c68832\x2d3661\x2d488d\x2db520\x2dbb94356b7b1f.swap: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-uuid/86c68832-3661-488d-b520-bb94356b7b1f.
dec 05 14:16:15 urh-laptop systemd[1]: Reached target Unmount All Filesystems.
dec 05 14:16:15 urh-laptop systemd[1]: Reached target Final Step.
dec 05 14:16:15 urh-laptop systemd[1]: systemd-poweroff.service: Succeeded.
dec 05 14:16:15 urh-laptop systemd[1]: Finished Power-Off.
dec 05 14:16:15 urh-laptop systemd[1]: Reached target Power-Off.
dec 05 14:16:15 urh-laptop systemd[1]: Shutting down.
dec 05 14:16:15 urh-laptop systemd-shutdown[1]: Syncing filesystems and block devices.
dec 05 14:16:16 urh-laptop systemd-shutdown[1]: Sending SIGTERM to remaining processes...
dec 05 14:16:16 urh-laptop systemd-journald[272]: Journal stopped

urh@urh-laptop:/var/crash$ free -h
              total        used        free      shared  buff/cache   available
Mem:           11Gi       1,6Gi       7,2Gi       330Mi       2,8Gi       9,3Gi
Swap:         9,3Gi          0B       9,3Gi

urh@urh-laptop:/var/crash$ sysctl vm.swappiness
vm.swappiness = 60

urh@urh-laptop:/var/crash$ sudo dmidecode -s bios-version
[sudo] password for urh: 
V1.04

urh@urh-laptop:/$ grep -i swap /etc/fstab
# swap was on /dev/sdb3 during installation
UUID=86c68832-3661-488d-b520-bb94356b7b1f none            swap    sw              0       0

urh@urh-laptop:/$ ls -al /usr/share/gnome-shell/extensions
total 20
drwxr-xr-x 5 root root 4096 nov  3 00:39 .
drwxr-xr-x 7 root root 4096 nov  3 01:33 ..
drwxr-xr-x 2 root root 4096 nov  3 00:39 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 nov  2 22:03 [email protected]
drwxr-xr-x 3 root root 4096 dec  1 18:17 [email protected]

Ubutnu 18 从未崩溃过。我是菜鸟,所以我无法从崩溃报告中得到任何有用的东西。我也可以提供一些东西/var/log/

更新 #1

斯瓦彭

urh@urh-laptop:~$ swapon --show
NAME      TYPE      SIZE USED PRIO
/dev/sda3 partition 9,3G   0B   -2

urh@urh-laptop:~$ sudo blkid
[sudo] password for urh: 
/dev/sda3: UUID="86c68832-3661-488d-b520-bb94356b7b1f" TYPE="swap" PARTUUID="00af4d5c-43e1-4918-8b9e-8f331d86bab4"
/dev/sda2: UUID="ac6f5269-f799-4b38-a91a-3688bd842038" TYPE="ext4" PARTUUID="8e1ba2b7-fc9d-4fbc-bbb3-a00170fd283c"
/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="Podatki" UUID="16161663161643E1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ce22c83a-64d0-4091-9773-b65d637375e6"
/dev/sda4: UUID="77ea92d2-e175-4648-a977-726e2ebae872" TYPE="ext4" PARTUUID="da5c0b1c-0285-4717-a98d-e280babb0044"
/dev/sdb1: LABEL="System Reserved" UUID="A620DA0620D9DCFD" TYPE="ntfs" PARTUUID="9abd075d-01"
/dev/sdb2: UUID="F4D8E4B1D8E47372" TYPE="ntfs" PARTUUID="9abd075d-02"
/dev/sdb3: UUID="26AED78EAED754C1" TYPE="ntfs" PARTUUID="9abd075d-03"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"

urh@urh-laptop:~$ cat /etc/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/sdb2 during installation
UUID=ac6f5269-f799-4b38-a91a-3688bd842038 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sdb4 during installation
UUID=77ea92d2-e175-4648-a977-726e2ebae872 /home           ext4    defaults        0       2
# swap was on /dev/sdb3 during installation
UUID=86c68832-3661-488d-b520-bb94356b7b1f none            swap    sw              0       0
/dev/disk/by-uuid/16161663161643E1 /mnt/Podatki auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Podatki 0 0
/dev/disk/by-uuid/F4D8E4B1D8E47372 /mnt/dataFromWindows auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Data%20From%20Windows 0 0

drwxrwsrwt  2 root     whoopsie     4096 dec  5 15:18 .
drwxr-xr-x 14 root     root         4096 apr 25  2020 ..
-rw-r--r--  1 kernoops whoopsie     2787 dec  1 15:57 linux-image-5.4.0-54-generic.203356.crash
-rw-r--r--  1 kernoops whoopsie     2922 nov 29 19:45 linux-image-5.4.0-54-generic.213157.crash
-rw-r-----  1 root     whoopsie  1072334 dec  5 15:05 _opt_teamviewer_tv_bin_teamviewerd.0.crash
-rw-r--r--  1 root     whoopsie        0 dec  2 17:13 _opt_teamviewer_tv_bin_teamviewerd.0.upload
-rw-------  1 whoopsie whoopsie       37 dec  2 17:13 _opt_teamviewer_tv_bin_teamviewerd.0.uploaded
-rw-r-----  1 urh      whoopsie 63037944 nov 30 19:57 _usr_bin_gnome-shell.1000.crash
-rw-r--r--  1 urh      whoopsie        0 nov 30 19:57 _usr_bin_gnome-shell.1000.upload
-rw-------  1 whoopsie whoopsie       37 nov 30 19:57 _usr_bin_gnome-shell.1000.uploaded
-rw-r-----  1 urh      whoopsie 74784629 dec  1 14:01 _usr_share_code_code.1000.crash
-rw-r-----  1 urh      whoopsie 74784631 dec  5 15:18 _usr_share_code_code.1000.crash.save
-rw-r--r--  1 urh      whoopsie        0 dec  1 14:01 _usr_share_code_code.1000.upload
-rw-------  1 whoopsie whoopsie       37 dec  1 14:01 _usr_share_code_code.1000.uploaded

模型:宏碁 Spin 3

型号:N16P9

更新 #2

序列号:NXGK9AA0216480116F7200

斯尼德:64800446372

更新 #3

urh@urh-laptop:~$ ls -al ~/.local/share/gnome-shell/extensions
ls: cannot access '/home/urh/.local/share/gnome-shell/extensions': No such file or directory

urh@urh-laptop:~$ ls -al /usr/share/gnome-shell/extensions
total 20
drwxr-xr-x 5 root root 4096 nov  3 00:39 .
drwxr-xr-x 7 root root 4096 nov  3 01:33 ..
drwxr-xr-x 2 root root 4096 nov  3 00:39 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 nov  2 22:03 [email protected]
drwxr-xr-x 3 root root 4096 dec  1 18:17 [email protected]

更新#4-解决方案? 根据 @heynnema 的建议,我更新了 BIOS。(令人讨厌的是,Acer 只为 Windows 制作更新,所以这很有趣)。我还添加了intel_idle.max_cstate=1/etc/default/grub现在崩溃已经停止了。

更改的提示grub在错误代码中bug soft lockup CPU#2 stuck for 23 s,该代码仅在崩溃时显示一次。(通常屏幕变黑而不显示日志)。

答案1

很多崩溃。让我们从这些开始吧...

BIOS

宏碁 Spin 3

您的 BIOS 版本为 1.04。

有较新的 BIOS 可用,版本 1.08,日期为 2018 年 4 月 17 日,可以下载这里

注意:请确认我拥有适合您型号的正确网站。

注意:更新 BIOS 之前请做好备份。

记忆

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

答案2

作为@heynnema建议,我更新了 BIOS。 正如其他许多网站所建议的那样,我编辑 /etc/default/grub并添加了

intel_idle.max_cstate=1 processor.max_cstate=1

GRUB_CMDLINE_LINUX=""

NVIDIA 硬件也发生了类似的崩溃;这里解释

仅更新 BIOS 并不能阻止崩溃,尽管这种情况发生得不那么频繁了。我不明白,为什么更改 BIOS 就能grub阻止崩溃。

相关内容