You are not logged in.

#1 2020-06-11 19:20:48

navarroaxel
Member
Registered: 2018-11-04
Posts: 23

[SOLVED] Swap not working with Kernel 5.7.2

After the upgrade linux package from 5.4.15 to 5.7.2 the swapfile is not working anymore. The upgrade of systemd from 245.6-4 to 245.6-6 didn't fix it.

journalctl -b output about Swap:

PC systemd[1]: swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION
PC systemd[1]: swapfile.swap: Failed with result 'exit-code'.
PC systemd[1]: Failed to activate swap /swapfile.
PC systemd[1]: Dependency failed for Swap.

cat /etc/fstab

# /dev/mapper/volgroup0-lv0
UUID=7a0d5b9a-c10b-4943-8920-xxxxx       /               ext4            rw,relatime     0 1

# /dev/sda5
UUID=31cd2bd7-b2ad-4177-9510-xxxxx       /boot           ext4            rw,relatime     0 2

/swapfile none swap sw 0 0

Root partition encrypted with LUKS + LVM with the following instructions:

cryptsetup luksFormat /dev/sda3
cryptsetup open --type luks /dev/sda3 lvm
pvcreate --dataalignment 1m /dev/mapper/lvm
vgcreate volgroup0 /dev/mapper/lvm
lvcreate -l 100%FREE volgroup0 -n lv0 
modprobe dm_mod

Archlinux OS installed in February 2019.

Last edited by navarroaxel (2020-06-11 19:48:04)

Offline

#2 2020-06-11 19:23:51

loqs
Member
Registered: 2014-03-06
Posts: 18,090

Re: [SOLVED] Swap not working with Kernel 5.7.2

Offline

#3 2020-06-11 22:37:26

xerxes_
Member
Registered: 2018-04-29
Posts: 802

Re: [SOLVED] Swap not working with Kernel 5.7.2

So is it related to swap file only or also to swap partition? Does LUKS and LVM has something to do with it?

Offline

#4 2020-06-11 23:37:42

loqs
Member
Registered: 2014-03-06
Posts: 18,090

Re: [SOLVED] Swap not working with Kernel 5.7.2

66921 only affects swap files on ext4 filesystems.

Offline

#5 2020-06-12 03:55:07

mjtullio
Member
Registered: 2014-12-22
Posts: 3

Re: [SOLVED] Swap not working with Kernel 5.7.2

I fixed the issue by removing my old swap file, which was created with fallocate, created a new one with dd and the issue disappeared. As seen on the wiki: https://wiki.archlinux.org/index.php/swap#Swap_file

First I disabled and removed my old swapfile located in / :

# swapoff -a
# rm /swapfile 

Then I made a 20Gb swapfile as recommended for my 16Gb Ram as I usually do hibernation:

# dd if=/dev/zero of=/swapfile bs=1M count=20480 status=progress
# chmod 600 /swapfile 
# mkswap /swapfile 
# swapon /swapfile

Reboot and that's it.

Cheers!

Last edited by mjtullio (2020-06-12 05:19:56)

Offline

#6 2020-06-12 06:24:12

wildw1ng
Member
Registered: 2020-03-17
Posts: 11

Re: [SOLVED] Swap not working with Kernel 5.7.2

thank you! worked for me too

Offline

#7 2020-06-14 08:22:35

vasyabelkin
Member
Registered: 2009-09-10
Posts: 20

Re: [SOLVED] Swap not working with Kernel 5.7.2

Thanks for the hint for dd. Solved for me also

Offline

#8 2020-06-24 02:31:11

taiongh
Member
Registered: 2018-10-04
Posts: 75

Re: [SOLVED] Swap not working with Kernel 5.7.2

thank you! worked for me too

Offline

#9 2020-06-24 13:48:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,233

Re: [SOLVED] Swap not working with Kernel 5.7.2

Closing to end the barrage of "me too" posts.

navarroaxel, if you need the thread re-opened, please ask a moderator via the report function.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB