You are not logged in.
When I was installing my system, I used archinstall. I relied on a "recommended" disk layout and overlooked swap settings. Luckily, archinstall conveniently set up swap on zram. To make things worse, I had to enable disk encryption, and now things are a bit more complicated.
I'm now trying to set up sleep/hibernation, and arch wiki isn't helpful for my setup. What would be the most advisable way to proceed with sleep configuration?
Here's output of some commands:
$ sudo fdisk -l
Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 980 PRO 1TB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5C80754F-F1EA-4972-A100-4D3CE9B167C1
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1048575 1046528 511M EFI System
/dev/nvme0n1p2 1050624 1953523711 1952473088 931G Linux filesystem
Disk /dev/mapper/cryptlvm: 931 GiB, 999649443840 bytes, 1952440320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/zram0: 4 GiB, 4294967296 bytes, 1048576 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
$ df -h
Filesystem Size Used Avail Use% Mounted on
dev 24G 0 24G 0% /dev
run 24G 1.8M 24G 1% /run
/dev/mapper/cryptlvm 916G 254G 616G 30% /
tmpfs 24G 223M 24G 1% /dev/shm
/dev/nvme0n1p1 510M 80M 431M 16% /boot
tmpfs 24G 22M 24G 1% /tmp
tmpfs 4.7G 48K 4.7G 1% /run/user/1000
$ cat /proc/swaps
Filename Type Size Used Priority
/dev/zram0 partition 4194300 0 100
$ cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/ainstnvme0n1p2
UUID=780a27dd-9f52-4bc2-9f2c-1a64a458e28f / ext4 rw,relatime 0 1
# /dev/nvme0n1p1
UUID=BAF6-89E9 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,err
Last edited by iamkarlson (2023-02-10 13:10:06)
Offline
You can't hibernate without swap. Just using zram won't work for that unless you hack the shit out of it. Probably best to shrink the root partition and add some real swap. Or add a permanent swap file, I suppose.
Jin, Jîyan, Azadî
Offline
Yeah, apparently you can create a regular swap file and be fine with it. As an alternative, you can use suspend and it's already good enough for most cases.
Offline