I get an error at boot (it’s not critical) regarding swap and I do not know how to solve since most solutions around do not seem to apply to my case.
This is the error:
$ sudo systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● systemd-swap.service loaded failed failed Manage swap spaces on zram, files and partitions.
1 loaded units listed.
Any info?
I used to have a swap partition that later I ditched to use it for / space I needed, and I think this error appeared after this. The thing is I had removed the partition from fstab and had done some other things so I thought I had covered everything.
Anyway, the swapon -s command returns nothing all, and the swap line in my fstab is commented out, I just checked.
I think I must have done that too, but here is my /etc/default/grub anyway in case you see something relevant:
GRUB_DEFAULT=saved
GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
So searching swap in my Pamac I see only mkinitcpio-openswap and systemd-swap.
For the second package, this is the /etc/systemd/swap.conf
################################################################################
# Defaults are optimized for general usage
################################################################################
################################################################################
# You can override any settings by files in:
# /etc/systemd/swap.conf.d/*.conf
################################################################################
################################################################################
# Zswap
#
# Kernel >= 3.11
# Zswap create compress cache between swap and memory for reduce IO
# https://www.kernel.org/doc/Documentation/vm/zswap.txt
zswap_enabled=1
zswap_compressor=lz4 # lzo lz4
zswap_max_pool_percent=25 # 1-99
zswap_zpool=zbud # zbud z3fold
################################################################################
# ZRam
#
# Kernel >= 3.15
# Zram compression streams count for additional information see:
# https://www.kernel.org/doc/Documentation/blockdev/zram.txt
zram_enabled=0
zram_size=$(($RAM_SIZE/4)) # This is 1/4 of ram size by default.
zram_streams=$NCPU
zram_alg=lz4 # lzo lz4 deflate lz4hc 842 - for Linux 4.8.4
zram_prio=32767 # 1 - 32767
################################################################################
# Swap File Chunked
# Allocate swap files dynamically
# For btrfs fallback to swapfile + loop will be used
# ex. Min swap size 512M, Max 8*512M
swapfc_enabled=1
swapfc_force_use_loop=0 # Force usage of swapfile + loop
swapfc_frequency=1s # How often check free swap space
swapfc_chunk_size=512M # Allocate size of swap chunk
swapfc_max_count=8 # 0 - unlimited, note: 32 is a kernel maximum
swapfc_free_swap_perc=15 # Add new chunk if free < 15%
# Remove chunk if free > 15+40% & chunk count > 2
swapfc_path=/var/lib/systemd-swap/swapfc/
# Only for swapfile + loop
swapfc_nocow=1 # Disable CoW on swapfile
swapfc_directio=1 # Use directio for loop dev
swapfc_force_preallocated=0 # Will preallocate created files
################################################################################
# Swap devices
# Find and auto swapon all available swap devices
swapd_auto_swapon=1
swapd_prio=1024
I am not very experienced so sorry if there is an error in front of my nose and I don’t see it
Maybe this line should have 1 instead of 1s?
swapfc_frequency=1s # How often check free swap space
I have checked and I don’t see any /etc/systemd/swap.conf.d/*.conf file in my system. Also I see a /usr/share/systemd-swap/swap-default.conf I can include if you think it’s relevant.