14

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
1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Zanna
    Jul 15, 2020 at 3:10

2 Answers 2

5

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, replacing sdXX 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.

8
  • 1
    Thank you! I've followed the commands to lower the swap. It will be a few days before I can boot from an external drive and clean up the file system. Not sure about checking firmware for the SSD with Windows... but I will attempt it if all else fails.
    – Aaron
    Jul 12, 2020 at 20:23
  • 1
    @Aaron Please do keep me posted. Thanks again for your help.
    – heynnema
    Jul 12, 2020 at 20:26
  • @Aaron Status please...
    – heynnema
    Jul 29, 2020 at 20:46
  • I posted an update in the chat. Since then I reinstalled 20.04 a few days ago and so far no crashes. Still no clue why they happened or if another will happen at any time...
    – Aaron
    Jul 29, 2020 at 23:01
  • @Aaron Thanks for the update. Did you ever run memtest?
    – heynnema
    Jul 30, 2020 at 4:24
0

I had similar crashes and figured out the problem was my Nvidia GPU. Nvidia drivers are are not compatible on Ubuntu. I switched to my Intel GPU and crashes are gone. For Ubuntu just use AMD or Intel. Problem is AMD are all power hogs and will wreck a regular office machine that does not have 500 PSU or greater. I don't do gaming so I don't even need a great GPU. Just no more crashing is all I care about now. Lesson learned. Make sure you only buy a computer that can support the non-Nvidia GPU of your choice. That means find out how much power your GPU REALLY will require, not what the manufacturer claims.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .