i dont know what is causing it to freeze, all i know is that it happens while playing to some games (i only play with Factorio and Minecraft, and i experienced freezes with both games). Sometimes it happens when i leave the laptop open for a little while. i maybe guess that its a memory overload, but it doesnt seem likeli, since with the "free" line it gave me this result:
total used free shared buff/cache available
Mem: 3933868 1110256 1259964 191904 1563648 2373964
Swap: 2097148 0 2097148it's been happening for quite a while, since even before 20.04 came out.
help, if the specs are needed, i will provide em'.
edit asked:
sysctl vm.swappiness result:
vm.swappiness = 60top result:
sudo grep -i swap /etc/fstab result:
1678 "name" 20 0 3751376 174480 46848 R 4,3 4,4 124:10.55 gnome-s+ 0 1 Answer
With only 4G RAM, a 2G /swapfile is probably too small. We'll enlarge it to 4G.
Note: Consider adding more RAM. Configure RAM to be equal sized (SO)DIMM pairs to take speed advantage of memory interleaving. So if you have one 4G (SO)DIMM now, add another 4G (SO)DIMM.
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 4G RAM and 4G swap
reboot # reboot and verify operation 7