1 |
On 02/05/2020 05:06, tuxic@××××××.de wrote: |
2 |
> as far as I know, the hibernation mechanism of the kernel uses swap |
3 |
> as storage place for an RAM image. |
4 |
> |
5 |
> If you plan to use hibernation, I think you need swap space in the |
6 |
> size of your RAM. |
7 |
|
8 |
For this case you can set vm.swappiness=0 and still have a swap |
9 |
partition. This disables swap for normal use but still has a swap |
10 |
partition available for things like hibernation. Just create a .conf |
11 |
file in /etc/sysctl.d/ (I use "/etc/sysctl.d/local.conf") with this in it: |
12 |
|
13 |
vm.swappiness=0 |
14 |
|
15 |
This will apply the setting during boot. To set it for the currently |
16 |
running session as well without having to reboot, execute: |
17 |
|
18 |
sysctl vm.swappiness=0 |
19 |
|
20 |
as root. |