You are not logged in.

#1 2014-01-22 17:34:30

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

[SOLVED] How to use Swap with new systemd?

If I have my swap fstab entry set, I've got errors as systemd suppouse to take care of it by it's own now. I've went through systemd's documentation on the topic and it suppouse to be an option as swap units can also be generated from fstab (and they are generated - just not working as it runs them after automatic swap mount, causing errors). It's fine my be but systemd mounts my swap partition with wrong priority:

[sms@sms ~]$ sudo swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda4                               partition       16777212        0       -1

so it's actually useless, I can't hibernate and it's never used. I have to manually turn it off and set again:

[sms@sms ~]$ sudo swapoff -a
[sms@sms ~]$ sudo swapon -p 100 /dev/sda4
[sms@sms ~]$ sudo swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda4                               partition       16777212        0       100

Edit: even after that, I can't really hibernate, it brings back -1 pariority after waking up...

Last edited by smsware (2014-01-22 18:36:40)

Offline

#2 2014-01-22 17:55:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] How to use Swap with new systemd?

As far as I know, priority matters only when you have more than one swap. And it defaults to -1.

Offline

#3 2014-01-22 18:00:29

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] How to use Swap with new systemd?

Hmm... then why hibernation is not working? After I wake up my PC, it just starts normally with Grub, KDM and applications turning on one by one, as usuall.

Offline

#4 2014-01-22 18:18:19

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] How to use Swap with new systemd?

Do you have the "resume" hook in initcpio (remember to run mkinitcpio after adding it)? Do you have "resume=" in grub's kernel line?

https://wiki.archlinux.org/index.php/Hi … ibernation

Offline

#5 2014-01-22 18:36:26

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] How to use Swap with new systemd?

Oh, thank you, I have resume in grub's kernel line but I didn't set up the hook...

Offline

Board footer

Powered by FluxBB