我正在尝试在系统上启用休眠功能。目前,我进入了睡眠模式,但有时它不起作用。当它起作用时,当我打开笔记本电脑时,它会耗尽我的电池电量。
当我使用下面的命令时,收到一条错误消息:
root@OMEN:/# systemctl hibernate
Failed to hibernate system via logind: Not enough swap space for hibernation
我找到了这篇文章:
swapon
我的系统上没有。
更新
文件系统 >>cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=f81f9e45-4f96-40e0-aaea-00f859ac559f / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=C682-3748 /boot/efi vfat umask=0077 0 1
# /swapfile none swap sw 0 0