小智 2
在更高版本的 Linux 内核上,您需要有一个交换来休眠。但也有解决方法。您可以在任何地方设置交换文件而无需分区。
在这里阅读相关内容。 https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
快速解决方案(归功于 Robert Munteanu)
Create the swap file : dd if=/dev/zero of=/swapfile bs=1024 count=8388608 ( 8GB )
Setup the swap file: mkswap /swapfile
Only when you need to set suspend you can activate it: swapon /swapfile
When you resume you can deactivate it: swapoff /swapfile
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1967 次 |
| 最近记录: |