Power Management: Difference between revisions
Hustlerone (talk | contribs) Tested on nixpkgs 7fd36ee82c0275fb545775cc5e4d30542899511d. I looked into this in depth but I can't find the damned post. Why do search engines have to be so dogshit they shuffle results around? |
Hustlerone (talk | contribs) m remove some whitespace and fix typo |
||
| Line 45: | Line 45: | ||
Hibernation requires a configured swap device. See [https://nixos.org/manual/nixos/stable/#ch-installation installation instructions] on how to create a swap partition. | Hibernation requires a configured swap device. See [https://nixos.org/manual/nixos/stable/#ch-installation installation instructions] on how to create a swap partition. | ||
Please note that <code>resumeDevice</code> must match the output of <code>swapon -s</code> especially if you're dealing with mapped volumes (LUKS, logical volumes, logical volumes under LUKS, etc.). If you're using a swapfile, you must also [https://search.nixos.org/options?channel=unstable&show=boot.resumeDevice&from=0&size=50&sort=relevance&type=packages&query=resume+offset specify the offset to it] | Please note that <code>resumeDevice</code> must match the output of <code>swapon -s</code> especially if you're dealing with mapped volumes (LUKS, logical volumes, logical volumes under LUKS, etc.). If you're using a swapfile, you must also [https://search.nixos.org/options?channel=unstable&show=boot.resumeDevice&from=0&size=50&sort=relevance&type=packages&query=resume+offset specify the offset to it.] | ||
Therefore, an example configuration could look like this:<syntaxhighlight lang="nix"> | Therefore, an example configuration could look like this:<syntaxhighlight lang="nix"> | ||
| Line 67: | Line 66: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Test and use hibernation with the following command:<syntaxhighlight lang="nix"> | |||
Test and use hibernation with following command:<syntaxhighlight lang="nix"> | |||
systemctl hibernate | systemctl hibernate | ||
</syntaxhighlight> | </syntaxhighlight> | ||