Ubuntu 20.04 冻结并崩溃

Urh*_*Urh 5 firefox freeze crash 20.04

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

\n

症状\n崩溃通常始于某些窗口完全冻结(无响应)(与代码或 Firefox 相比),并且在短时间内(30 到 60 秒)整个系统冻结,唯一的方法是通过电源按钮重新启动。\最近,我还注意到一些即时崩溃,整个屏幕变黑。\n我还注意到,崩溃通常发生在使用 Firefox 或 VS Code 时(但不是在有意执行硬计算时)。

\n

/var/崩溃

\n

最新的文件是 3 天前的,最后一次崩溃是在今天。

\n
urh@urh-laptop:/var/crash$ ls\nlinux-image-5.4.0-54-generic.203356.crash    _opt_teamviewer_tv_bin_teamviewerd.0.uploaded  _usr_share_code_code.1000.crash\nlinux-image-5.4.0-54-generic.213157.crash    _usr_bin_gnome-shell.1000.crash                _usr_share_code_code.1000.upload\n_opt_teamviewer_tv_bin_teamviewerd.0.crash   _usr_bin_gnome-shell.1000.upload               _usr_share_code_code.1000.uploaded\n_opt_teamviewer_tv_bin_teamviewerd.0.upload  _usr_bin_gnome-shell.1000.uploaded\n
Run Code Online (Sandbox Code Playgroud)\n

零件来自_usr_share_code.1000.crash

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

信息

\n

我正在Acer Spin 3上运行(双引导) Ubuntu 20.04.1 LTS,具有12gb ram、Intel\xc2\xae Core\xe2\x84\xa2 i7-7500U CPU @ 2.70GHz \xc3\x97 4 和 Mesa Intel\xc2\ xae 高清显卡 620 (KBL GT2)。

\n

侏儒版本:3.36.3

\n

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

\n
dec 05 14:16:12 urh-laptop mtp-probe[466455]: bus: 1, device: 11 was not an MTP device\ndec 05 14:16:14 urh-laptop systemd[1]: run-snapd-ns-snap\\x2dstore.mnt.mount: Succeeded.\ndec 05 14:16:14 urh-laptop systemd[1]: Unmounted /run/snapd/ns/snap-store.mnt.\ndec 05 14:16:14 urh-laptop systemd[1]: Unmounting /run/snapd/ns...\ndec 05 14:16:14 urh-laptop systemd[1]: run-snapd-ns.mount: Succeeded.\ndec 05 14:16:14 urh-laptop systemd[1]: Unmounted /run/snapd/ns.\ndec 05 14:16:14 urh-laptop systemd[1]: Stopped target Local File Systems (Pre).\ndec 05 14:16:14 urh-laptop systemd[1]: Stopped target Swap.\ndec 05 14:16:14 urh-laptop systemd[1]: Deactivating swap /dev/disk/by-id/ata-ST1000LM035-1RK172_WES1A7S2-part3...\ndec 05 14:16:14 urh-laptop systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.\ndec 05 14:16:14 urh-laptop systemd[1]: Stopped Create Static Device Nodes in /dev.\ndec 05 14:16:14 urh-laptop systemd[1]: systemd-sysusers.service: Succeeded.\ndec 05 14:16:14 urh-laptop systemd[1]: Stopped Create System Users.\ndec 05 14:16:14 urh-laptop systemd[1]: systemd-remount-fs.service: Succeeded.\ndec 05 14:16:14 urh-laptop systemd[1]: Stopped Remount Root and Kernel File Systems.\ndec 05 14:16:14 urh-laptop systemd[1]: Reached target Shutdown.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\\x2dpath-pci\\x2d0000:00:17.0\\x2data\\x2d1\\x2dpart3.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-path/pci-0000:00:17.0-ata-1-part3.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\\x2did-ata\\x2dST1000LM035\\x2d1RK172_WES1A7S2\\x2dpart3.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-id/ata-ST1000LM035-1RK172_WES1A7S2-part3.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\\x2did-wwn\\x2d0x5000c5009d10879a\\x2dpart3.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-id/wwn-0x5000c5009d10879a-part3.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\\x2dpartuuid-00af4d5c\\x2d43e1\\x2d4918\\x2d8b9e\\x2d8f331d86bab4.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-partuuid/00af4d5c-43e1-4918-8b9e-8f331d86bab4.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-sda3.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/sda3.\ndec 05 14:16:15 urh-laptop systemd[1]: dev-disk-by\\x2duuid-86c68832\\x2d3661\\x2d488d\\x2db520\\x2dbb94356b7b1f.swap: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Deactivated swap /dev/disk/by-uuid/86c68832-3661-488d-b520-bb94356b7b1f.\ndec 05 14:16:15 urh-laptop systemd[1]: Reached target Unmount All Filesystems.\ndec 05 14:16:15 urh-laptop systemd[1]: Reached target Final Step.\ndec 05 14:16:15 urh-laptop systemd[1]: systemd-poweroff.service: Succeeded.\ndec 05 14:16:15 urh-laptop systemd[1]: Finished Power-Off.\ndec 05 14:16:15 urh-laptop systemd[1]: Reached target Power-Off.\ndec 05 14:16:15 urh-laptop systemd[1]: Shutting down.\ndec 05 14:16:15 urh-laptop systemd-shutdown[1]: Syncing filesystems and block devices.\ndec 05 14:16:16 urh-laptop systemd-shutdown[1]: Sending SIGTERM to remaining processes...\ndec 05 14:16:16 urh-laptop systemd-journald[272]: Journal stopped\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:/var/crash$ free -h\n              total        used        free      shared  buff/cache   available\nMem:           11Gi       1,6Gi       7,2Gi       330Mi       2,8Gi       9,3Gi\nSwap:         9,3Gi          0B       9,3Gi\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:/var/crash$ sysctl vm.swappiness\nvm.swappiness = 60\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:/var/crash$ sudo dmidecode -s bios-version\n[sudo] password for urh: \nV1.04\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:/$ grep -i swap /etc/fstab\n# swap was on /dev/sdb3 during installation\nUUID=86c68832-3661-488d-b520-bb94356b7b1f none            swap    sw              0       0\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:/$ ls -al /usr/share/gnome-shell/extensions\ntotal 20\ndrwxr-xr-x 5 root root 4096 nov  3 00:39 .\ndrwxr-xr-x 7 root root 4096 nov  3 01:33 ..\ndrwxr-xr-x 2 root root 4096 nov  3 00:39 desktop-icons@csoriano\ndrwxr-xr-x 3 root root 4096 nov  2 22:03 ubuntu-appindicators@ubuntu.com\ndrwxr-xr-x 3 root root 4096 dec  1 18:17 ubuntu-dock@ubuntu.com\n
Run Code Online (Sandbox Code Playgroud)\n
\n

Ubutnu 18 从未崩溃过。我是一个菜鸟,所以我不能从崩溃报告中得到任何有用的东西。我还可以提供来自/var/log/

\n

更新#1

\n

交换

\n
urh@urh-laptop:~$ swapon --show\nNAME      TYPE      SIZE USED PRIO\n/dev/sda3 partition 9,3G   0B   -2\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:~$ sudo blkid\n[sudo] password for urh: \n/dev/sda3: UUID="86c68832-3661-488d-b520-bb94356b7b1f" TYPE="swap" PARTUUID="00af4d5c-43e1-4918-8b9e-8f331d86bab4"\n/dev/sda2: UUID="ac6f5269-f799-4b38-a91a-3688bd842038" TYPE="ext4" PARTUUID="8e1ba2b7-fc9d-4fbc-bbb3-a00170fd283c"\n/dev/loop0: TYPE="squashfs"\n/dev/loop1: TYPE="squashfs"\n/dev/loop2: TYPE="squashfs"\n/dev/loop3: TYPE="squashfs"\n/dev/loop4: TYPE="squashfs"\n/dev/loop5: TYPE="squashfs"\n/dev/loop6: TYPE="squashfs"\n/dev/loop7: TYPE="squashfs"\n/dev/sda1: LABEL="Podatki" UUID="16161663161643E1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ce22c83a-64d0-4091-9773-b65d637375e6"\n/dev/sda4: UUID="77ea92d2-e175-4648-a977-726e2ebae872" TYPE="ext4" PARTUUID="da5c0b1c-0285-4717-a98d-e280babb0044"\n/dev/sdb1: LABEL="System Reserved" UUID="A620DA0620D9DCFD" TYPE="ntfs" PARTUUID="9abd075d-01"\n/dev/sdb2: UUID="F4D8E4B1D8E47372" TYPE="ntfs" PARTUUID="9abd075d-02"\n/dev/sdb3: UUID="26AED78EAED754C1" TYPE="ntfs" PARTUUID="9abd075d-03"\n/dev/loop8: TYPE="squashfs"\n/dev/loop9: TYPE="squashfs"\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:~$ cat /etc/fstab\n# /etc/fstab: static file system information.\n#\n# Use 'blkid' to print the universally unique identifier for a\n# device; this may be used with UUID= as a more robust way to name devices\n# that works even if disks are added and removed. See fstab(5).\n#\n# <file system> <mount point>   <type>  <options>       <dump>  <pass>\n# / was on /dev/sdb2 during installation\nUUID=ac6f5269-f799-4b38-a91a-3688bd842038 /               ext4    errors=remount-ro 0       1\n# /home was on /dev/sdb4 during installation\nUUID=77ea92d2-e175-4648-a977-726e2ebae872 /home           ext4    defaults        0       2\n# swap was on /dev/sdb3 during installation\nUUID=86c68832-3661-488d-b520-bb94356b7b1f none            swap    sw              0       0\n/dev/disk/by-uuid/16161663161643E1 /mnt/Podatki auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Podatki 0 0\n/dev/disk/by-uuid/F4D8E4B1D8E47372 /mnt/dataFromWindows auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Data%20From%20Windows 0 0\n
Run Code Online (Sandbox Code Playgroud)\n
\n
drwxrwsrwt  2 root     whoopsie     4096 dec  5 15:18 .\ndrwxr-xr-x 14 root     root         4096 apr 25  2020 ..\n-rw-r--r--  1 kernoops whoopsie     2787 dec  1 15:57 linux-image-5.4.0-54-generic.203356.crash\n-rw-r--r--  1 kernoops whoopsie     2922 nov 29 19:45 linux-image-5.4.0-54-generic.213157.crash\n-rw-r-----  1 root     whoopsie  1072334 dec  5 15:05 _opt_teamviewer_tv_bin_teamviewerd.0.crash\n-rw-r--r--  1 root     whoopsie        0 dec  2 17:13 _opt_teamviewer_tv_bin_teamviewerd.0.upload\n-rw-------  1 whoopsie whoopsie       37 dec  2 17:13 _opt_teamviewer_tv_bin_teamviewerd.0.uploaded\n-rw-r-----  1 urh      whoopsie 63037944 nov 30 19:57 _usr_bin_gnome-shell.1000.crash\n-rw-r--r--  1 urh      whoopsie        0 nov 30 19:57 _usr_bin_gnome-shell.1000.upload\n-rw-------  1 whoopsie whoopsie       37 nov 30 19:57 _usr_bin_gnome-shell.1000.uploaded\n-rw-r-----  1 urh      whoopsie 74784629 dec  1 14:01 _usr_share_code_code.1000.crash\n-rw-r-----  1 urh      whoopsie 74784631 dec  5 15:18 _usr_share_code_code.1000.crash.save\n-rw-r--r--  1 urh      whoopsie        0 dec  1 14:01 _usr_share_code_code.1000.upload\n-rw-------  1 whoopsie whoopsie       37 dec  1 14:01 _usr_share_code_code.1000.uploaded\n
Run Code Online (Sandbox Code Playgroud)\n
\n

型号:Acer Spin 3

\n

型号:N16P9

\n

更新#2

\n

序列号:NXGK9AA0216480116F7200

\n

SNID:64800446372

\n

更新#3

\n
urh@urh-laptop:~$ ls -al ~/.local/share/gnome-shell/extensions\nls: cannot access '/home/urh/.local/share/gnome-shell/extensions': No such file or directory\n
Run Code Online (Sandbox Code Playgroud)\n
\n
urh@urh-laptop:~$ ls -al /usr/share/gnome-shell/extensions\ntotal 20\ndrwxr-xr-x 5 root root 4096 nov  3 00:39 .\ndrwxr-xr-x 7 root root 4096 nov  3 01:33 ..\ndrwxr-xr-x 2 root root 4096 nov  3 00:39 desktop-icons@csoriano\ndrwxr-xr-x 3 root root 4096 nov  2 22:03 ubuntu-appindicators@ubuntu.com\ndrwxr-xr-x 3 root root 4096 dec  1 18:17 ubuntu-dock@ubuntu.com\n
Run Code Online (Sandbox Code Playgroud)\n

更新 #4 - 解决方案?\n按照@heynnema的建议,我更新了BIOS。(令人烦恼的是宏碁只为 Windows 提供更新,所以这很有趣)。我也添加intel_idle.max_cstate=1/etc/default/grub,现在崩溃已经停止了。

\n

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

\n

Urh*_*Urh 2

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

intel_idle.max_cstate=1 processor.max_cstate=1
Run Code Online (Sandbox Code Playgroud)

GRUB_CMDLINE_LINUX=""

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

仅仅更新 BIOS 并不能阻止崩溃,尽管这种情况发生的频率较低。我不明白,为什么改变会grub停止崩溃。