Over the last few days, for no reason I can tell (no recent big updates), I've been experiencing frequent instances of complete system freezes. The mouse won't move, no key combinations trigger, and cannot reboot with Alt+SyReq either. The only way to do anything is to hold down the power button until it powers off. After rebooting it freezes again, sometimes after many hours, sometimes after only a few minutes. It is never linked to me running a program, happens inexplicably while i'm just browsing websites.
free -h gives:
total used free shared buff/cache available
Mem: 11Gi 1.0Gi 9.0Gi 134Mi 1.4Gi 9.9Gi
Swap: 2.0Gi 0B 2.0Gi
sysctl vm.swappiness gives:
vm.swappiness = 60
swapon -s gives:
Filename Type Size Used Priority
/swapfile file 2097148 0 -2
System "freezes" are often caused by running too many, too large programs and running out of available memory. Use
free
to see if you have swap space, readman mkswap swapon fstab fallocate
to create some. Swap space must be contiguous. usemkswap
orfallocate
, notdd
. Traditionally, swap space of 1.5 × RAM has been recommended, but YMMV. If you don't plan to hibernate your system, you can have less than 1.0 × RAM.With 12G RAM, your /swapfile may be a little small, and causing your freezes. Let's bump it from 2G to 4G and see if it helps.
Note: Incorrect use of the
rm
anddd
commands can cause data loss. Suggest copy/paste.In the
terminal
...Edit /etc/fstab, using
sudo -H gedit /etc/fstab
orsudo pico /etc/fstab
.Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...