Hi!
I have a System76 laptop with NixOS unstable on it
- system: `"x86_64-linux"`
- host os: `Linux 5.16.4, NixOS, 22.05 (Quokka)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.6.0`
- channels(root): `"unstable-22.05pre343944.ff377a78794, nixos-hardware, nixos-21.11.335037.e67c94a1adb, master"`
- channels(lillecarl): `""`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Using the unstable channel to build my system
nixos on ξ master [$!]
β― neofetch
ββββ βββββ ββββ lillecarl@lemur
βββββ βββββ βββββ ---------------
βββββ ββββββββββ OS: NixOS 22.05 (Quokka) x86_64
βββββ ββββββββ Host: Lemur Pro lemp10
βββββββββββββββββββ ββββββ ββ Kernel: 5.16.4
βββββββββββββββββββββ βββββ ββββ Uptime: 10 hours, 23 mins
βββββ βββββ βββββ Packages: 2648 (nix-system), 716 (nix-user), 55 (nix-default), 12 (flatpak)
βββββ ββββ βββββ Shell: zsh 5.8
βββββ ββ βββββ Resolution: 1920x1080
βββββββββββββ ββββββββββββ DE: Plasma 5.23.5
ββββββββββββ βββββββββββββ WM: KWin
βββββ ββ βββββ Theme: Breeze [GTK2/3]
βββββ ββββ βββββ Icons: breeze-dark [GTK2/3]
βββββ βββββ βββββ Terminal: WezTerm
ββββ βββββ ββββββββββββββββββββ CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz
ββ ββββββ ββββββββββββββββββ GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]
ββββββββ βββββ Memory: 6647MiB / 39976MiB
ββββββββββ βββββ
βββββ βββββ βββββ
ββββ βββββ ββββ
~
β― pm-is-supported --suspend && echo yes
yes
~
β― pm-is-supported --hibernate && echo yes
yes
~
β― pm-is-supported --suspend-hybrid && echo yes
~
β―
pm-is-supported suggests my system doesnβt support hybrid sleeping, but what I donβt quite understand is how hybrid sleep is any different than a normal sleep (hardware support wise). Is this a hardware problem or something I could configure myself around?
β― lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme1n1 259:0 0 465.8G 0 disk
ββnvme1n1p1 259:4 0 1G 0 part /boot-fallback
ββnvme1n1p2 259:5 0 464.8G 0 part
ββmd1337 9:1337 0 464.6G 0 raid1
ββmd1337p1 259:6 0 40G 0 part [SWAP]
ββmd1337p2 259:7 0 424.6G 0 part
ββcrypt0 254:0 0 424.6G 0 crypt /var/lib/lxd/storage-pools/default
nvme0n1 259:1 0 465.8G 0 disk
ββnvme0n1p1 259:2 0 1G 0 part /boot
ββnvme0n1p2 259:3 0 464.8G 0 part
ββmd1337 9:1337 0 464.6G 0 raid1
ββmd1337p1 259:6 0 40G 0 part [SWAP]
ββmd1337p2 259:7 0 424.6G 0 part
ββcrypt0 254:0 0 424.6G 0 crypt /var/lib/lxd/storage-pools/default
I havenβt tried yet since Iβm not sure if Iβll break something or not, but does the swap have to be bigger for hybrid sleep than hibernation somehow? The Linux kernel documentation in this area isnβt the clearest, or Iβm looking at the wrong place.
My nix configuration is available here: https://github.com/lillecarl/nixos in case thereβs anything youβd like to check out. The machine in question is βlemurβ.
So what happens is that both suspend and hibernate works like they should, but hybrid sleep acts just like hibernation and shuts the machine off straight away after writing RAM to disk. Iβve messed with the sleep.conf file in may ways but whatβs supposed to work according to the web doesnβt work for me. Iβm not sure where I should start troubleshooting this either so Iβm hoping someone knows something about these things here
I tried reading the source for pm-is-supported, but i found the script implementation too complex/arcane for me to understand.
Thankful for anythings that might lead me in the right direction, donβt hesitate to ask if i left something youβd like to know out.