Two swapfiles, hibernate working, how to correctly configure hibernate to not run out of space, or fail...












1















I have configured hibernate, its working, just to make sure it will not fail sometime - this question.



I have two swap files on different devices, first is small swap on SSD, second as big as ram on HDD. Hibernate configured to small one. It works fine for now, as hibernate not always requires too much(not everything written or compressed, I don't known).



How to configure hibernate to use both swaps? Or it process them automatically and nothing need to do? At kernel options I have setup for first small swap, and its good if it will use it first(as fastest) and then second.

I don't want to make SSD swap larger as SSD is small.



leonid@DevSSD:~$ grep resume < /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="no_console_suspend initcall_debug resume=UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9 resume_offset=34816"


/etc/fstab



UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9   /   ext4    relatime,grpquota,data=ordered,usrquota,rw,errors=remount-ro,quota  0   1
UUID=3bcf1591-7033-416a-addf-9cf8e2e10c93 /home/leonid/hdd ext4 defaults,rw,errors=remount-ro 0 1
/swapfile none swap sw 0 0
/home/leonid/hdd/swapfile none swap sw 0 0
UUID=26DA-1C76 /boot/efi vfat defaults 0 1


Update:
I have make even smaller swap for testing and setup priority. Hibernating not goes to swap with higher priority:



leonid@DevSSD:~$ swapon
NAME TYPE SIZE USED PRIO
/swap64k file 60K 0B 1
/home/leonid/hdd/swapfile file 8G 0B 100
leonid@DevSSD:~$ systemctl hibernate
Failed to hibernate system via logind: Sleep verb not supported









share|improve this question





























    1















    I have configured hibernate, its working, just to make sure it will not fail sometime - this question.



    I have two swap files on different devices, first is small swap on SSD, second as big as ram on HDD. Hibernate configured to small one. It works fine for now, as hibernate not always requires too much(not everything written or compressed, I don't known).



    How to configure hibernate to use both swaps? Or it process them automatically and nothing need to do? At kernel options I have setup for first small swap, and its good if it will use it first(as fastest) and then second.

    I don't want to make SSD swap larger as SSD is small.



    leonid@DevSSD:~$ grep resume < /etc/default/grub
    GRUB_CMDLINE_LINUX_DEFAULT="no_console_suspend initcall_debug resume=UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9 resume_offset=34816"


    /etc/fstab



    UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9   /   ext4    relatime,grpquota,data=ordered,usrquota,rw,errors=remount-ro,quota  0   1
    UUID=3bcf1591-7033-416a-addf-9cf8e2e10c93 /home/leonid/hdd ext4 defaults,rw,errors=remount-ro 0 1
    /swapfile none swap sw 0 0
    /home/leonid/hdd/swapfile none swap sw 0 0
    UUID=26DA-1C76 /boot/efi vfat defaults 0 1


    Update:
    I have make even smaller swap for testing and setup priority. Hibernating not goes to swap with higher priority:



    leonid@DevSSD:~$ swapon
    NAME TYPE SIZE USED PRIO
    /swap64k file 60K 0B 1
    /home/leonid/hdd/swapfile file 8G 0B 100
    leonid@DevSSD:~$ systemctl hibernate
    Failed to hibernate system via logind: Sleep verb not supported









    share|improve this question



























      1












      1








      1


      1






      I have configured hibernate, its working, just to make sure it will not fail sometime - this question.



      I have two swap files on different devices, first is small swap on SSD, second as big as ram on HDD. Hibernate configured to small one. It works fine for now, as hibernate not always requires too much(not everything written or compressed, I don't known).



      How to configure hibernate to use both swaps? Or it process them automatically and nothing need to do? At kernel options I have setup for first small swap, and its good if it will use it first(as fastest) and then second.

      I don't want to make SSD swap larger as SSD is small.



      leonid@DevSSD:~$ grep resume < /etc/default/grub
      GRUB_CMDLINE_LINUX_DEFAULT="no_console_suspend initcall_debug resume=UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9 resume_offset=34816"


      /etc/fstab



      UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9   /   ext4    relatime,grpquota,data=ordered,usrquota,rw,errors=remount-ro,quota  0   1
      UUID=3bcf1591-7033-416a-addf-9cf8e2e10c93 /home/leonid/hdd ext4 defaults,rw,errors=remount-ro 0 1
      /swapfile none swap sw 0 0
      /home/leonid/hdd/swapfile none swap sw 0 0
      UUID=26DA-1C76 /boot/efi vfat defaults 0 1


      Update:
      I have make even smaller swap for testing and setup priority. Hibernating not goes to swap with higher priority:



      leonid@DevSSD:~$ swapon
      NAME TYPE SIZE USED PRIO
      /swap64k file 60K 0B 1
      /home/leonid/hdd/swapfile file 8G 0B 100
      leonid@DevSSD:~$ systemctl hibernate
      Failed to hibernate system via logind: Sleep verb not supported









      share|improve this question
















      I have configured hibernate, its working, just to make sure it will not fail sometime - this question.



      I have two swap files on different devices, first is small swap on SSD, second as big as ram on HDD. Hibernate configured to small one. It works fine for now, as hibernate not always requires too much(not everything written or compressed, I don't known).



      How to configure hibernate to use both swaps? Or it process them automatically and nothing need to do? At kernel options I have setup for first small swap, and its good if it will use it first(as fastest) and then second.

      I don't want to make SSD swap larger as SSD is small.



      leonid@DevSSD:~$ grep resume < /etc/default/grub
      GRUB_CMDLINE_LINUX_DEFAULT="no_console_suspend initcall_debug resume=UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9 resume_offset=34816"


      /etc/fstab



      UUID=050f8852-d8f6-4979-a4e4-c3d9b981bee9   /   ext4    relatime,grpquota,data=ordered,usrquota,rw,errors=remount-ro,quota  0   1
      UUID=3bcf1591-7033-416a-addf-9cf8e2e10c93 /home/leonid/hdd ext4 defaults,rw,errors=remount-ro 0 1
      /swapfile none swap sw 0 0
      /home/leonid/hdd/swapfile none swap sw 0 0
      UUID=26DA-1C76 /boot/efi vfat defaults 0 1


      Update:
      I have make even smaller swap for testing and setup priority. Hibernating not goes to swap with higher priority:



      leonid@DevSSD:~$ swapon
      NAME TYPE SIZE USED PRIO
      /swap64k file 60K 0B 1
      /home/leonid/hdd/swapfile file 8G 0B 100
      leonid@DevSSD:~$ systemctl hibernate
      Failed to hibernate system via logind: Sleep verb not supported






      ssd swap hibernate






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 hours ago







      LeonidMew

















      asked 12 hours ago









      LeonidMewLeonidMew

      654518




      654518






















          1 Answer
          1






          active

          oldest

          votes


















          3














          In short, no you have to use a single file or partition for hibernation.



          TL;DR



          There is nothing in the basic kernel documentation for Sleep States or Power Interface which says that the swap has to be in a single file. Indeed, there is some indication that the hibernation data is written to available swap space on the computer:



          However, further exploration leads us to the documents for swsusp which has a short FAQ section, and the quote




          Q: Does swsusp (to disk) use only one swap partition or can it use
          multiple swap partitions (aggregate them into one logical space)?



          A: Only one swap partition, sorry.




          Although this only speaks directly to partitions I would certainly interpret this as applying to swap spaces on your machine.



          Your potential problem of "What if there is not enough space on my swap file". Here we run into some vagueness. The documentation assures us that the system will attempt by default to create an image about 2/5th the size of memory:




          /sys/power/image_size controls the size of hibernation images.



          It can be written a string representing a non-negative integer that
          will be used as a best-effort upper limit of the image size, in bytes.
          The hibernation core will do its best to ensure that the image size
          will not exceed that number. However, if that turns out to be
          impossible to achieve, a hibernation image will still be created and
          its size will be as small as possible. In particular, writing '0' to
          this file will enforce hibernation images to be as small as possible.




          However the documents to not indicate what might happen if the image exceeds swap size. My own experience when I have accidenatly had swap turned off and tried to hibernate, is that nothing happens.



          LATER EDIT



          Does this say something about me, Ubuntu users or Linux users?



          I was curious about what happens if the swapfile is too small, so I created a 44KB swapfile (that worked!) and tried to hibernate:



          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B -2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation


          I further tested by using two swapfiles, the smaller one being higher priority:



          chick@dad:~$ sudo swapon /swap2 -p 1
          chick@dad:~$ sudo swapon /swapfile -p 2
          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B 1
          /swapfile file 16G 0B 2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation





          share|improve this answer


























          • Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

            – dessert
            11 hours ago











          • @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

            – Charles Green
            11 hours ago











          • @dessert Edited question - I tested with a small swapfile.

            – Charles Green
            10 hours ago











          • Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

            – dessert
            10 hours ago






          • 2





            @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

            – Charles Green
            9 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124315%2ftwo-swapfiles-hibernate-working-how-to-correctly-configure-hibernate-to-not-ru%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          In short, no you have to use a single file or partition for hibernation.



          TL;DR



          There is nothing in the basic kernel documentation for Sleep States or Power Interface which says that the swap has to be in a single file. Indeed, there is some indication that the hibernation data is written to available swap space on the computer:



          However, further exploration leads us to the documents for swsusp which has a short FAQ section, and the quote




          Q: Does swsusp (to disk) use only one swap partition or can it use
          multiple swap partitions (aggregate them into one logical space)?



          A: Only one swap partition, sorry.




          Although this only speaks directly to partitions I would certainly interpret this as applying to swap spaces on your machine.



          Your potential problem of "What if there is not enough space on my swap file". Here we run into some vagueness. The documentation assures us that the system will attempt by default to create an image about 2/5th the size of memory:




          /sys/power/image_size controls the size of hibernation images.



          It can be written a string representing a non-negative integer that
          will be used as a best-effort upper limit of the image size, in bytes.
          The hibernation core will do its best to ensure that the image size
          will not exceed that number. However, if that turns out to be
          impossible to achieve, a hibernation image will still be created and
          its size will be as small as possible. In particular, writing '0' to
          this file will enforce hibernation images to be as small as possible.




          However the documents to not indicate what might happen if the image exceeds swap size. My own experience when I have accidenatly had swap turned off and tried to hibernate, is that nothing happens.



          LATER EDIT



          Does this say something about me, Ubuntu users or Linux users?



          I was curious about what happens if the swapfile is too small, so I created a 44KB swapfile (that worked!) and tried to hibernate:



          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B -2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation


          I further tested by using two swapfiles, the smaller one being higher priority:



          chick@dad:~$ sudo swapon /swap2 -p 1
          chick@dad:~$ sudo swapon /swapfile -p 2
          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B 1
          /swapfile file 16G 0B 2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation





          share|improve this answer


























          • Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

            – dessert
            11 hours ago











          • @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

            – Charles Green
            11 hours ago











          • @dessert Edited question - I tested with a small swapfile.

            – Charles Green
            10 hours ago











          • Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

            – dessert
            10 hours ago






          • 2





            @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

            – Charles Green
            9 hours ago
















          3














          In short, no you have to use a single file or partition for hibernation.



          TL;DR



          There is nothing in the basic kernel documentation for Sleep States or Power Interface which says that the swap has to be in a single file. Indeed, there is some indication that the hibernation data is written to available swap space on the computer:



          However, further exploration leads us to the documents for swsusp which has a short FAQ section, and the quote




          Q: Does swsusp (to disk) use only one swap partition or can it use
          multiple swap partitions (aggregate them into one logical space)?



          A: Only one swap partition, sorry.




          Although this only speaks directly to partitions I would certainly interpret this as applying to swap spaces on your machine.



          Your potential problem of "What if there is not enough space on my swap file". Here we run into some vagueness. The documentation assures us that the system will attempt by default to create an image about 2/5th the size of memory:




          /sys/power/image_size controls the size of hibernation images.



          It can be written a string representing a non-negative integer that
          will be used as a best-effort upper limit of the image size, in bytes.
          The hibernation core will do its best to ensure that the image size
          will not exceed that number. However, if that turns out to be
          impossible to achieve, a hibernation image will still be created and
          its size will be as small as possible. In particular, writing '0' to
          this file will enforce hibernation images to be as small as possible.




          However the documents to not indicate what might happen if the image exceeds swap size. My own experience when I have accidenatly had swap turned off and tried to hibernate, is that nothing happens.



          LATER EDIT



          Does this say something about me, Ubuntu users or Linux users?



          I was curious about what happens if the swapfile is too small, so I created a 44KB swapfile (that worked!) and tried to hibernate:



          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B -2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation


          I further tested by using two swapfiles, the smaller one being higher priority:



          chick@dad:~$ sudo swapon /swap2 -p 1
          chick@dad:~$ sudo swapon /swapfile -p 2
          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B 1
          /swapfile file 16G 0B 2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation





          share|improve this answer


























          • Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

            – dessert
            11 hours ago











          • @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

            – Charles Green
            11 hours ago











          • @dessert Edited question - I tested with a small swapfile.

            – Charles Green
            10 hours ago











          • Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

            – dessert
            10 hours ago






          • 2





            @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

            – Charles Green
            9 hours ago














          3












          3








          3







          In short, no you have to use a single file or partition for hibernation.



          TL;DR



          There is nothing in the basic kernel documentation for Sleep States or Power Interface which says that the swap has to be in a single file. Indeed, there is some indication that the hibernation data is written to available swap space on the computer:



          However, further exploration leads us to the documents for swsusp which has a short FAQ section, and the quote




          Q: Does swsusp (to disk) use only one swap partition or can it use
          multiple swap partitions (aggregate them into one logical space)?



          A: Only one swap partition, sorry.




          Although this only speaks directly to partitions I would certainly interpret this as applying to swap spaces on your machine.



          Your potential problem of "What if there is not enough space on my swap file". Here we run into some vagueness. The documentation assures us that the system will attempt by default to create an image about 2/5th the size of memory:




          /sys/power/image_size controls the size of hibernation images.



          It can be written a string representing a non-negative integer that
          will be used as a best-effort upper limit of the image size, in bytes.
          The hibernation core will do its best to ensure that the image size
          will not exceed that number. However, if that turns out to be
          impossible to achieve, a hibernation image will still be created and
          its size will be as small as possible. In particular, writing '0' to
          this file will enforce hibernation images to be as small as possible.




          However the documents to not indicate what might happen if the image exceeds swap size. My own experience when I have accidenatly had swap turned off and tried to hibernate, is that nothing happens.



          LATER EDIT



          Does this say something about me, Ubuntu users or Linux users?



          I was curious about what happens if the swapfile is too small, so I created a 44KB swapfile (that worked!) and tried to hibernate:



          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B -2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation


          I further tested by using two swapfiles, the smaller one being higher priority:



          chick@dad:~$ sudo swapon /swap2 -p 1
          chick@dad:~$ sudo swapon /swapfile -p 2
          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B 1
          /swapfile file 16G 0B 2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation





          share|improve this answer















          In short, no you have to use a single file or partition for hibernation.



          TL;DR



          There is nothing in the basic kernel documentation for Sleep States or Power Interface which says that the swap has to be in a single file. Indeed, there is some indication that the hibernation data is written to available swap space on the computer:



          However, further exploration leads us to the documents for swsusp which has a short FAQ section, and the quote




          Q: Does swsusp (to disk) use only one swap partition or can it use
          multiple swap partitions (aggregate them into one logical space)?



          A: Only one swap partition, sorry.




          Although this only speaks directly to partitions I would certainly interpret this as applying to swap spaces on your machine.



          Your potential problem of "What if there is not enough space on my swap file". Here we run into some vagueness. The documentation assures us that the system will attempt by default to create an image about 2/5th the size of memory:




          /sys/power/image_size controls the size of hibernation images.



          It can be written a string representing a non-negative integer that
          will be used as a best-effort upper limit of the image size, in bytes.
          The hibernation core will do its best to ensure that the image size
          will not exceed that number. However, if that turns out to be
          impossible to achieve, a hibernation image will still be created and
          its size will be as small as possible. In particular, writing '0' to
          this file will enforce hibernation images to be as small as possible.




          However the documents to not indicate what might happen if the image exceeds swap size. My own experience when I have accidenatly had swap turned off and tried to hibernate, is that nothing happens.



          LATER EDIT



          Does this say something about me, Ubuntu users or Linux users?



          I was curious about what happens if the swapfile is too small, so I created a 44KB swapfile (that worked!) and tried to hibernate:



          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B -2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation


          I further tested by using two swapfiles, the smaller one being higher priority:



          chick@dad:~$ sudo swapon /swap2 -p 1
          chick@dad:~$ sudo swapon /swapfile -p 2
          chick@dad:~$ swapon
          NAME TYPE SIZE USED PRIO
          /swap2 file 44K 0B 1
          /swapfile file 16G 0B 2
          chick@dad:~$ sudo systemctl hibernate
          Failed to hibernate system via logind: Not enough swap space for hibernation






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 10 hours ago

























          answered 11 hours ago









          Charles GreenCharles Green

          13.9k73859




          13.9k73859













          • Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

            – dessert
            11 hours ago











          • @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

            – Charles Green
            11 hours ago











          • @dessert Edited question - I tested with a small swapfile.

            – Charles Green
            10 hours ago











          • Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

            – dessert
            10 hours ago






          • 2





            @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

            – Charles Green
            9 hours ago



















          • Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

            – dessert
            11 hours ago











          • @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

            – Charles Green
            11 hours ago











          • @dessert Edited question - I tested with a small swapfile.

            – Charles Green
            10 hours ago











          • Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

            – dessert
            10 hours ago






          • 2





            @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

            – Charles Green
            9 hours ago

















          Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

          – dessert
          11 hours ago





          Great answer! “[N]othing happens” in the sense that it just suspends to RAM or that it does nothing at all?

          – dessert
          11 hours ago













          @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

          – Charles Green
          11 hours ago





          @dessert Thanks! I had just read https://meta.askubuntu.com/questions/16091/why-arent-most-questions-answered-with-references-to-documentation-or-mention-t yesterday... When I had swap off, choosing 'hibernate' simply did nothing. I thought nothing of it, re-enabled swap and went on with my life!

          – Charles Green
          11 hours ago













          @dessert Edited question - I tested with a small swapfile.

          – Charles Green
          10 hours ago





          @dessert Edited question - I tested with a small swapfile.

          – Charles Green
          10 hours ago













          Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

          – dessert
          10 hours ago





          Wait, you can set a priority? How about changing the priority just for the hibernation? That sounds scriptable, wouldn’t that solve the issue?

          – dessert
          10 hours ago




          2




          2





          @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

          – Charles Green
          9 hours ago





          @ leonid - man 2 swapon seems to indicate that there is also an "order loaded" preference in swap areas. This is an interesting question, and I migh suggest that for normal operations you load the SSD swap with a high priority, and the HDD swap with low priority, but load the HDD swap first in fstab.

          – Charles Green
          9 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124315%2ftwo-swapfiles-hibernate-working-how-to-correctly-configure-hibernate-to-not-ru%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Loup dans la culture

          How to solve the problem of ntp “Unable to contact time server” from KDE?

          Connection limited (no internet access)