You are not logged in.
Pages: 1
I'm experiencing the same issue.
hibernation was working well before an update and now it returns the same error "Failed to hibernate system via logind: Not enough swap space for hibernation".
swapfile was recreated according to ArchWiki pages "swap" and "Power management/Suspend and hibernate" with no success.
Any help would be appreciated.
Offline
Try hibernating without going through logind:
# echo disk > /sys/power/stateIf it works, then your issue might be a systemd bug.
Offline
nl6720, thanks for the reply.
My try was:
# echo 259:2 > /sys/power/statewhen 259:2 is maj:min of the partition where the swapfile lives, but the result was
# bash: echo: write error: Invalid argument However, now I see an additional feature. Running the following command
# echo 259:2 > /sys/power/resumealong with the proper resume_offset parameter and then running "systemctl hibernate" performs a shutdown and rewrites the resume_offset parameter to another number (always the same).
Offline
"disk" wasn't supposed to be substituted, it must be written literally. You can see the supported values by reading the /sys/power/state file.
On boot /sys/power/resume and /sys/power/resume_offset get set from the kernel parameters resume and resume_offset. If the values in /sys/power/resume* are wrong, then the kernel parameters are set to incorrect values.
Offline
Okay, so running
# echo disk > /sys/power/stateshutdowns the system and rewrites the value in /sys/power/resume_offset to (oddly enough) the line #23 from the "filefrag -v /swapfile" output.
this is what I have in grub file:
# GRUB boot loader configuration
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=/dev/nvme0n1p2 resume_offset=223232 loglevel=3"
GRUB_CMDLINE_LINUX=""when /dev/nvme0n1p2 is the partition where swapfile is and resume_offset was obtained from "filefrag -v /swapfile | awk '{ if($1=="0:"){print $4} }'" command output.
I understand that something went wrong and probably I'm missing something, but do not know what else to check.
Offline
rewrites the value in /sys/power/resume_offset
This makes no sense to me. When do you observe the changed values, is it after resuming (it's obviously not when the system is shut down)? Did you manually change /sys/power/resume_offset before hibernating and it changed after resuming?
Post the full output of
# filefrag -v /swapfileAnd also
$ cat /proc/cmdlineOffline
Yes, I've changed the /sys/power/resume_offset value manually before hibernating and it changed after resuming. If I won't change it manually(keeping the value placed by "the system") then
# echo disk > /sys/power/state
bash: echo: write error: No such deviceThe filefrag output:
$ sudo filefrag -v swapfile
Filesystem type is: ef53
File size of swapfile is 8589934592 (2097152 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 6143: 223232.. 229375: 6144:
1: 6144.. 10239: 258048.. 262143: 4096: 229376:
2: 10240.. 12287: 272384.. 274431: 2048: 262144:
3: 12288.. 14335: 282624.. 284671: 2048: 274432:
4: 14336.. 18431: 266240.. 270335: 4096: 284672:
5: 18432.. 24575: 337920.. 344063: 6144: 270336:
6: 24576.. 32767: 350208.. 358399: 8192: 344064:
7: 32768.. 34815: 389120.. 391167: 2048: 358400:
8: 34816.. 59391: 364544.. 389119: 24576: 391168:
9: 59392.. 73727: 403456.. 417791: 14336: 389120:
10: 73728.. 83967: 468992.. 479231: 10240: 417792:
11: 83968.. 88063: 462848.. 466943: 4096: 479232:
12: 88064.. 90111: 507904.. 509951: 2048: 466944:
13: 90112.. 98303: 684032.. 692223: 8192: 509952:
14: 98304.. 100351: 708608.. 710655: 2048: 692224:
15: 100352.. 104447: 714752.. 718847: 4096: 710656:
16: 104448.. 108543: 745472.. 749567: 4096: 718848:
17: 108544.. 116735: 737280.. 745471: 8192: 749568:
18: 116736.. 118783: 763904.. 765951: 2048: 745472:
19: 118784.. 120831: 794624.. 796671: 2048: 765952:
20: 120832.. 122879: 802816.. 804863: 2048: 796672:
21: 122880.. 126975: 790528.. 794623: 4096: 804864:
22: 126976.. 131071: 798720.. 802815: 4096: 794624:
23: 131072.. 137215: 841728.. 847871: 6144: 802816:
24: 137216.. 139263: 851968.. 854015: 2048: 847872:
25: 139264.. 163839: 860160.. 884735: 24576: 854016:
26: 163840.. 167935: 886784.. 890879: 4096: 884736:
27: 167936.. 169983: 894976.. 897023: 2048: 890880:
28: 169984.. 176127: 899072.. 905215: 6144: 897024:
29: 176128.. 178175: 927744.. 929791: 2048: 905216:
30: 178176.. 180223: 935936.. 937983: 2048: 929792:
31: 180224.. 184319: 940032.. 944127: 4096: 937984:
32: 184320.. 186367: 948224.. 950271: 2048: 944128:
33: 186368.. 188415: 968704.. 970751: 2048: 950272:
34: 188416.. 215039: 974848.. 1001471: 26624: 970752:
35: 215040.. 223231: 1003520.. 1011711: 8192: 1001472:
36: 223232.. 225279: 1019904.. 1021951: 2048: 1011712:
37: 225280.. 227327: 1024000.. 1026047: 2048: 1021952:
38: 227328.. 231423: 1015808.. 1019903: 4096: 1026048:
39: 231424.. 247807: 1032192.. 1048575: 16384: 1019904:
40: 247808.. 253951: 1222656.. 1228799: 6144: 1048576:
41: 253952.. 268287: 1234944.. 1249279: 14336: 1228800:
42: 268288.. 272383: 1263616.. 1267711: 4096: 1249280:
43: 272384.. 276479: 1253376.. 1257471: 4096: 1267712:
44: 276480.. 284671: 1294336.. 1302527: 8192: 1257472:
45: 284672.. 286719: 1370112.. 1372159: 2048: 1302528:
46: 286720.. 290815: 1355776.. 1359871: 4096: 1372160:
47: 290816.. 301055: 1398784.. 1409023: 10240: 1359872:
48: 301056.. 307199: 1419264.. 1425407: 6144: 1409024:
49: 307200.. 313343: 1427456.. 1433599: 6144: 1425408:
50: 313344.. 315391: 1435648.. 1437695: 2048: 1433600:
51: 315392.. 317439: 1439744.. 1441791: 2048: 1437696:
52: 317440.. 319487: 1566720.. 1568767: 2048: 1441792:
53: 319488.. 321535: 1718272.. 1720319: 2048: 1568768:
54: 321536.. 323583: 1763328.. 1765375: 2048: 1720320:
55: 323584.. 325631: 1767424.. 1769471: 2048: 1765376:
56: 325632.. 329727: 1753088.. 1757183: 4096: 1769472:
57: 329728.. 331775: 1771520.. 1773567: 2048: 1757184:
58: 331776.. 333823: 1785856.. 1787903: 2048: 1773568:
59: 333824.. 335871: 1792000.. 1794047: 2048: 1787904:
60: 335872.. 337919: 1800192.. 1802239: 2048: 1794048:
61: 337920.. 342015: 1777664.. 1781759: 4096: 1802240:
62: 342016.. 344063: 1808384.. 1810431: 2048: 1781760:
63: 344064.. 352255: 1832960.. 1841151: 8192: 1810432:
64: 352256.. 354303: 1855488.. 1857535: 2048: 1841152:
65: 354304.. 360447: 1861632.. 1867775: 6144: 1857536:
66: 360448.. 368639: 1847296.. 1855487: 8192: 1867776:
67: 368640.. 370687: 1871872.. 1873919: 2048: 1855488:
68: 370688.. 372735: 1888256.. 1890303: 2048: 1873920:
69: 372736.. 376831: 1884160.. 1888255: 4096: 1890304:
70: 376832.. 385023: 1875968.. 1884159: 8192: 1888256:
71: 385024.. 399359: 1892352.. 1906687: 14336: 1884160:
72: 399360.. 403455: 1908736.. 1912831: 4096: 1906688:
73: 403456.. 407551: 1925120.. 1929215: 4096: 1912832:
74: 407552.. 409599: 1935360.. 1937407: 2048: 1929216:
75: 409600.. 411647: 1949696.. 1951743: 2048: 1937408:
76: 411648.. 413695: 1957888.. 1959935: 2048: 1951744:
77: 413696.. 417791: 1945600.. 1949695: 4096: 1959936:
78: 417792.. 419839: 1990656.. 1992703: 2048: 1949696:
79: 419840.. 423935: 1974272.. 1978367: 4096: 1992704:
80: 423936.. 428031: 1986560.. 1990655: 4096: 1978368:
81: 428032.. 430079: 2002944.. 2004991: 2048: 1990656:
82: 430080.. 434175: 2011136.. 2015231: 4096: 2004992:
83: 434176.. 436223: 2031616.. 2033663: 2048: 2015232:
84: 436224.. 440319: 2052096.. 2056191: 4096: 2033664:
85: 440320.. 442367: 2076672.. 2078719: 2048: 2056192:
86: 442368.. 446463: 2068480.. 2072575: 4096: 2078720:
87: 446464.. 450559: 2093056.. 2097151: 4096: 2072576:
88: 450560.. 452607: 2240512.. 2242559: 2048: 2097152:
89: 452608.. 454655: 2252800.. 2254847: 2048: 2242560:
90: 454656.. 456703: 2258944.. 2260991: 2048: 2254848:
91: 456704.. 462847: 2263040.. 2269183: 6144: 2260992:
92: 462848.. 464895: 2275328.. 2277375: 2048: 2269184:
93: 464896.. 466943: 2285568.. 2287615: 2048: 2277376:
94: 466944.. 468991: 2297856.. 2299903: 2048: 2287616:
95: 468992.. 471039: 2312192.. 2314239: 2048: 2299904:
96: 471040.. 473087: 2328576.. 2330623: 2048: 2314240:
97: 473088.. 477183: 2338816.. 2342911: 4096: 2330624:
98: 477184.. 479231: 2361344.. 2363391: 2048: 2342912:
99: 479232.. 483327: 2404352.. 2408447: 4096: 2363392:
100: 483328.. 485375: 2449408.. 2451455: 2048: 2408448:
101: 485376.. 497663: 2484224.. 2496511: 12288: 2451456:
102: 497664.. 499711: 2504704.. 2506751: 2048: 2496512:
103: 499712.. 501759: 2512896.. 2514943: 2048: 2506752:
104: 501760.. 503807: 2592768.. 2594815: 2048: 2514944:
105: 503808.. 507903: 2609152.. 2613247: 4096: 2594816:
106: 507904.. 509951: 2693120.. 2695167: 2048: 2613248:
107: 509952.. 514047: 2732032.. 2736127: 4096: 2695168:
108: 514048.. 518143: 2873344.. 2877439: 4096: 2736128:
109: 518144.. 522239: 2879488.. 2883583: 4096: 2877440:
110: 522240.. 524287: 2910208.. 2912255: 2048: 2883584:
111: 524288.. 526335: 2914304.. 2916351: 2048: 2912256:
112: 526336.. 540671: 2924544.. 2938879: 14336: 2916352:
113: 540672.. 555007: 2955264.. 2969599: 14336: 2938880:
114: 555008.. 561151: 2983936.. 2990079: 6144: 2969600:
115: 561152.. 569343: 2992128.. 3000319: 8192: 2990080:
116: 569344.. 571391: 3022848.. 3024895: 2048: 3000320:
117: 571392.. 583679: 3028992.. 3041279: 12288: 3024896:
118: 583680.. 585727: 3067904.. 3069951: 2048: 3041280:
119: 585728.. 587775: 3072000.. 3074047: 2048: 3069952:
120: 587776.. 589823: 3076096.. 3078143: 2048: 3074048:
121: 589824.. 591871: 3080192.. 3082239: 2048: 3078144:
122: 591872.. 593919: 3086336.. 3088383: 2048: 3082240:
123: 593920.. 595967: 3090432.. 3092479: 2048: 3088384:
124: 595968.. 647167: 3094528.. 3145727: 51200: 3092480:
125: 647168.. 651263: 3256320.. 3260415: 4096: 3145728:
126: 651264.. 657407: 3272704.. 3278847: 6144: 3260416:
127: 657408.. 1032191: 3295232.. 3670015: 374784: 3278848:
128: 1032192.. 1034239: 3901440.. 3903487: 2048: 3670016:
129: 1034240.. 1038335: 4022272.. 4026367: 4096: 3903488:
130: 1038336.. 1042431: 4055040.. 4059135: 4096: 4026368:
131: 1042432.. 1046527: 4091904.. 4095999: 4096: 4059136:
132: 1046528.. 1048575: 4124672.. 4126719: 2048: 4096000:
133: 1048576.. 1050623: 4147200.. 4149247: 2048: 4126720:
134: 1050624.. 1054719: 4157440.. 4161535: 4096: 4149248:
135: 1054720.. 1062911: 4128768.. 4136959: 8192: 4161536:
136: 1062912.. 1067007: 4190208.. 4194303: 4096: 4136960:
137: 1067008.. 1073151: 4274176.. 4280319: 6144: 4194304:
138: 1073152.. 1083391: 4282368.. 4292607: 10240: 4280320:
139: 1083392.. 1488895: 4313088.. 4718591: 405504: 4292608:
140: 1488896.. 1490943: 4753408.. 4755455: 2048: 4718592:
141: 1490944.. 1501183: 4757504.. 4767743: 10240: 4755456:
142: 1501184.. 1675263: 4775936.. 4950015: 174080: 4767744:
143: 1675264.. 1966079: 4952064.. 5242879: 290816: 4950016:
144: 1966080.. 1990655: 5281792.. 5306367: 24576: 5242880:
145: 1990656.. 2041855: 5308416.. 5359615: 51200: 5306368:
146: 2041856.. 2043903: 5761024.. 5763071: 2048: 5359616:
147: 2043904.. 2045951: 5818368.. 5820415: 2048: 5763072:
148: 2045952.. 2047999: 5824512.. 5826559: 2048: 5820416:
149: 2048000.. 2058239: 5851136.. 5861375: 10240: 5826560:
150: 2058240.. 2060287: 5865472.. 5867519: 2048: 5861376:
151: 2060288.. 2062335: 5881856.. 5883903: 2048: 5867520:
152: 2062336.. 2066431: 5877760.. 5881855: 4096: 5883904:
153: 2066432.. 2078719: 5885952.. 5898239: 12288: 5881856:
154: 2078720.. 2080767: 6250496.. 6252543: 2048: 5898240:
155: 2080768.. 2097151: 6518784.. 6535167: 16384: 6252544: last,eof
swapfile: 156 extents foundAnd
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=595f9cbb-f53a-41ee-b4dd-949ba6dcce74 rw quiet resume=/dev/nvme0n1p2 resume_offset=841728 loglevel=3Since I've done a reboot thing and haven't changed it manually the value of resume_offset is not the one written in grub.
Offline
/proc/cmdline should match /etc/default/grub, unless you didn't re-generate grub.cfg with grub-mkconfig after editing /etc/default/grub.
Offline
After running a grub-mkconfig hibernation is back to business. Thank you very much!
Maybe it would be good for the newbies like myself to add these two commands to the ArchWiki description of the procedure.
Offline
Power management/Suspend and hibernate#Required kernel parameters links to Kernel parameters and Kernel parameters#GRUB provides the grub-mkconfig command.
Offline
While you are at it, change 'resume=/dev/nvme0n1p2' to 'resume=UUID-of-the-partition-where-swapfile-is-located'. https://wiki.archlinux.org/index.php/Pe … ice_naming
Offline
Mod note: split from https://bbs.archlinux.org/viewtopic.php?id=256548
shuruper, please mark this topic as solved (assuming it is).
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1