Difference between revisions of "Swap"

fix: fallocate => dd
(Marked this version for translation)
(fix: fallocate => dd)
(One intermediate revision by one other user not shown)
Line 84: Line 84:
  if [ "$(whoami)" = 'root' ]; then
  if [ "$(whoami)" = 'root' ]; then
   dmesg | grep "zswap:" | grep --silent "load"
   dmesg | grep "zswap:" | grep --silent "load"
   if [[ $? -eq 0 ]]; then
   if [ $? -eq 0 ]; then
     # zswap is active
     # zswap is active
     echo "zswap information:"
     echo "zswap information:"
Line 172: Line 172:
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.</translate>
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.</translate>


<translate><!--T:49--> Prior to running the {{ic|fallocate}} step above, you should run these commands:</translate>
<translate><!--T:49--> Prior to running the {{ic|dd}} step above, you should run these commands:</translate>
  sudo truncate -s 0 /swapfile
  sudo truncate -s 0 /swapfile
  sudo chattr +C /swapfile
  sudo chattr +C /swapfile
Line 257: Line 257:
Then run:
Then run:
  sudo update-grub
  sudo update-grub
If removing hibernation entirely then also delete {{ic|resume}} from the {{ic|HOOKS}} line in {{ic|/etc/mkinitpcio.conf}} and run:
If removing hibernation entirely then also delete {{ic|resume}} from the {{ic|HOOKS}} line in {{ic|/etc/mkinitcpio.conf}} and run:
  sudo mkinitpcio -P
  sudo mkinitcpio -P
</translate>
</translate>


1

edit