How can I tell why 20.04 is crashing?
For the past week or so, Ubuntu 20.04 randomly freezes (3 or 4 times a day) on my Dell XPS Developer Edition laptop. All I can do is hold down the power button to manually turn off the machine and then restart.
There are no logs in /var/crash
and running
journalctl -b -1 -e
doesn't reveal any logged info - the last logged item is about 10 minutes before the crash.
I also installed sensors and was monitoring the temp yesterday while working. When a crash happened the temperature was normal (about 40.0°C on all cores).
All software is up to date.
Each time it crashes I'm doing something different. The only common program I (probably?) have open is Chrome though I'm not completely sure, it's just a guess because I almost always have it open.
Any help is appreciated. 18.04 rarely crashed and 20.04 was fine at first but several months after upgrading here I am...
It's a Dell 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
aaron@xps13:~$ sysctl vm.swappiness
vm.swappiness = 60
aaron@xps13:~$ sudo dmidecode -s bios-version
[sudo] password for aaron:
1.5.1
aaron@xps13:~$ grep -i swap /etc/fstab
/swapfile none swap sw 0 0
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 ..
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 [email protected]
drwxr-xr-x 3 root root 4096 Jun 18 22:38 [email protected]
Disks screenshot
grep -i ata /var/log/syslog*
grep -i iwlwifi /var/log/syslog*
/var/log/syslog
showing crash
aaron@xps13:~$ uname -r
5.4.0-40-generic
Solution 1:
Dell XPS 13 7390
BIOS
Your BIOS is current at version 1.5.1.
fsck
You have a dirty file system.
- boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
- open a
terminal
window by pressing Ctrl+Alt+T - type
sudo fdisk -l
- identify the /dev/sdXX device name for your "Linux Filesystem"
- type
sudo fsck -f /dev/sdXX
, replacingsdXX
with the number you found earlier - repeat the
fsck
command if there were errors - type
reboot
memtest
Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.
swap
Your /swapfile is excessive. There's no guarantee that this will fix your problem, but it might. We'll reduce /swapfile from 31G to 4G.
Note: Incorrect use of the dd
command can cause data loss. Suggest copy/paste.
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 16G RAM and 4G swap
reboot # reboot and verify operation
Add this line to /etc/fstab (if it doesn't already exist)...
/swapfile none swap sw 0 0
Samsung NVMe
Check for firmware updates for your Samsung NVMe. Download the Samsung Magician
here. This will require Windows, or you can try building a FreeDOS USB stick to do this.