Hibernation not working on Linux Mint 19

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















I'm currently on Linux Mint 19.1 and it uses swap file by default instead of swap partition. Everything including suspend works fine. But resume after hibernation is not working. I have following configuration in my /etc/default/grub



GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=38c97b08-a1d5-44b5-9e96-afca13595fe2 resume_offset=27854848"


where UUID is the root partition where swap file belongs and resume_offset is the offset of the swap file. System successfully hibernates. But on the next boot, it shows resuming from the UUID location and suddenly screen goes blank( see this ). There is no response from the system after that. I have gone through the following threads and nothing seems to work.



  • Ubuntu 18.04 can't resume after hibernate


  • Hibernation in 18.04


Complete system details can be found here



I have secure boot disabled and currently on kernel 4.18. Does anyone have success with hibernation using swap file or any idea on why hibernation not working?










share|improve this question




























    3















    I'm currently on Linux Mint 19.1 and it uses swap file by default instead of swap partition. Everything including suspend works fine. But resume after hibernation is not working. I have following configuration in my /etc/default/grub



    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=38c97b08-a1d5-44b5-9e96-afca13595fe2 resume_offset=27854848"


    where UUID is the root partition where swap file belongs and resume_offset is the offset of the swap file. System successfully hibernates. But on the next boot, it shows resuming from the UUID location and suddenly screen goes blank( see this ). There is no response from the system after that. I have gone through the following threads and nothing seems to work.



    • Ubuntu 18.04 can't resume after hibernate


    • Hibernation in 18.04


    Complete system details can be found here



    I have secure boot disabled and currently on kernel 4.18. Does anyone have success with hibernation using swap file or any idea on why hibernation not working?










    share|improve this question


























      3












      3








      3


      1






      I'm currently on Linux Mint 19.1 and it uses swap file by default instead of swap partition. Everything including suspend works fine. But resume after hibernation is not working. I have following configuration in my /etc/default/grub



      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=38c97b08-a1d5-44b5-9e96-afca13595fe2 resume_offset=27854848"


      where UUID is the root partition where swap file belongs and resume_offset is the offset of the swap file. System successfully hibernates. But on the next boot, it shows resuming from the UUID location and suddenly screen goes blank( see this ). There is no response from the system after that. I have gone through the following threads and nothing seems to work.



      • Ubuntu 18.04 can't resume after hibernate


      • Hibernation in 18.04


      Complete system details can be found here



      I have secure boot disabled and currently on kernel 4.18. Does anyone have success with hibernation using swap file or any idea on why hibernation not working?










      share|improve this question
















      I'm currently on Linux Mint 19.1 and it uses swap file by default instead of swap partition. Everything including suspend works fine. But resume after hibernation is not working. I have following configuration in my /etc/default/grub



      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=38c97b08-a1d5-44b5-9e96-afca13595fe2 resume_offset=27854848"


      where UUID is the root partition where swap file belongs and resume_offset is the offset of the swap file. System successfully hibernates. But on the next boot, it shows resuming from the UUID location and suddenly screen goes blank( see this ). There is no response from the system after that. I have gone through the following threads and nothing seems to work.



      • Ubuntu 18.04 can't resume after hibernate


      • Hibernation in 18.04


      Complete system details can be found here



      I have secure boot disabled and currently on kernel 4.18. Does anyone have success with hibernation using swap file or any idea on why hibernation not working?







      linux-mint hibernate






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 31 '18 at 6:45









      SouravGhosh

      481311




      481311










      asked Dec 31 '18 at 4:48









      Basil K YBasil K Y

      265




      265




















          2 Answers
          2






          active

          oldest

          votes


















          1














          Linux Mint 19 does not support hibernation out of the box as per a Guide article in the Mint Forums.



          The standard hibernation configuration will fail if your swap file is not in /swapfile .



          If there is not enough room in the swap file for the contents of your RAM plus whatever else you may have swapped out already, hibernation will fail, since the kernel writes a hibernation image of a size up to 2/5 the size of your RAM. As a rule of thumb, simply set up your swap file to at least the size of your RAM, or even double your RAM on systems with very low total RAM (since you are more likely to swap).



          Please run this in a terminal window: free -h then swapon to confirm the swap file is large enough. If it is not large enough, expand the swap file. If it is, please proceed with:



          RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4gsub(/./,"");print $4;') " 

          if grep resume /etc/default/grub>/dev/null; then echo -e "nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="$RESUME_PARAMS/" /etc/default/grub;fi


          Unless there is an error message, then do sudo update-grub; if there are error messages, follow their instructions before performing sudo update-grub.



          Lastly, add Hibernation to the GRUB2 menu with



          sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
          [Enable hibernate]
          Identity=unix-user:*
          Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions
          ResultActive=yes
          EOB






          share|improve this answer

























          • Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

            – Basil K Y
            Dec 31 '18 at 20:07











          • Then, I'd look for an error in the configuration.

            – K7AAY
            Dec 31 '18 at 21:05


















          1














          I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.



          hibernation (freezes on resume) since 4.13.0-25.29



          It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.






          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f491690%2fhibernation-not-working-on-linux-mint-19%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Linux Mint 19 does not support hibernation out of the box as per a Guide article in the Mint Forums.



            The standard hibernation configuration will fail if your swap file is not in /swapfile .



            If there is not enough room in the swap file for the contents of your RAM plus whatever else you may have swapped out already, hibernation will fail, since the kernel writes a hibernation image of a size up to 2/5 the size of your RAM. As a rule of thumb, simply set up your swap file to at least the size of your RAM, or even double your RAM on systems with very low total RAM (since you are more likely to swap).



            Please run this in a terminal window: free -h then swapon to confirm the swap file is large enough. If it is not large enough, expand the swap file. If it is, please proceed with:



            RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4gsub(/./,"");print $4;') " 

            if grep resume /etc/default/grub>/dev/null; then echo -e "nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="$RESUME_PARAMS/" /etc/default/grub;fi


            Unless there is an error message, then do sudo update-grub; if there are error messages, follow their instructions before performing sudo update-grub.



            Lastly, add Hibernation to the GRUB2 menu with



            sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
            [Enable hibernate]
            Identity=unix-user:*
            Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions
            ResultActive=yes
            EOB






            share|improve this answer

























            • Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

              – Basil K Y
              Dec 31 '18 at 20:07











            • Then, I'd look for an error in the configuration.

              – K7AAY
              Dec 31 '18 at 21:05















            1














            Linux Mint 19 does not support hibernation out of the box as per a Guide article in the Mint Forums.



            The standard hibernation configuration will fail if your swap file is not in /swapfile .



            If there is not enough room in the swap file for the contents of your RAM plus whatever else you may have swapped out already, hibernation will fail, since the kernel writes a hibernation image of a size up to 2/5 the size of your RAM. As a rule of thumb, simply set up your swap file to at least the size of your RAM, or even double your RAM on systems with very low total RAM (since you are more likely to swap).



            Please run this in a terminal window: free -h then swapon to confirm the swap file is large enough. If it is not large enough, expand the swap file. If it is, please proceed with:



            RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4gsub(/./,"");print $4;') " 

            if grep resume /etc/default/grub>/dev/null; then echo -e "nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="$RESUME_PARAMS/" /etc/default/grub;fi


            Unless there is an error message, then do sudo update-grub; if there are error messages, follow their instructions before performing sudo update-grub.



            Lastly, add Hibernation to the GRUB2 menu with



            sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
            [Enable hibernate]
            Identity=unix-user:*
            Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions
            ResultActive=yes
            EOB






            share|improve this answer

























            • Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

              – Basil K Y
              Dec 31 '18 at 20:07











            • Then, I'd look for an error in the configuration.

              – K7AAY
              Dec 31 '18 at 21:05













            1












            1








            1







            Linux Mint 19 does not support hibernation out of the box as per a Guide article in the Mint Forums.



            The standard hibernation configuration will fail if your swap file is not in /swapfile .



            If there is not enough room in the swap file for the contents of your RAM plus whatever else you may have swapped out already, hibernation will fail, since the kernel writes a hibernation image of a size up to 2/5 the size of your RAM. As a rule of thumb, simply set up your swap file to at least the size of your RAM, or even double your RAM on systems with very low total RAM (since you are more likely to swap).



            Please run this in a terminal window: free -h then swapon to confirm the swap file is large enough. If it is not large enough, expand the swap file. If it is, please proceed with:



            RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4gsub(/./,"");print $4;') " 

            if grep resume /etc/default/grub>/dev/null; then echo -e "nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="$RESUME_PARAMS/" /etc/default/grub;fi


            Unless there is an error message, then do sudo update-grub; if there are error messages, follow their instructions before performing sudo update-grub.



            Lastly, add Hibernation to the GRUB2 menu with



            sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
            [Enable hibernate]
            Identity=unix-user:*
            Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions
            ResultActive=yes
            EOB






            share|improve this answer















            Linux Mint 19 does not support hibernation out of the box as per a Guide article in the Mint Forums.



            The standard hibernation configuration will fail if your swap file is not in /swapfile .



            If there is not enough room in the swap file for the contents of your RAM plus whatever else you may have swapped out already, hibernation will fail, since the kernel writes a hibernation image of a size up to 2/5 the size of your RAM. As a rule of thumb, simply set up your swap file to at least the size of your RAM, or even double your RAM on systems with very low total RAM (since you are more likely to swap).



            Please run this in a terminal window: free -h then swapon to confirm the swap file is large enough. If it is not large enough, expand the swap file. If it is, please proceed with:



            RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4gsub(/./,"");print $4;') " 

            if grep resume /etc/default/grub>/dev/null; then echo -e "nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="$RESUME_PARAMS/" /etc/default/grub;fi


            Unless there is an error message, then do sudo update-grub; if there are error messages, follow their instructions before performing sudo update-grub.



            Lastly, add Hibernation to the GRUB2 menu with



            sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
            [Enable hibernate]
            Identity=unix-user:*
            Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions
            ResultActive=yes
            EOB







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 31 '18 at 18:30

























            answered Dec 31 '18 at 18:21









            K7AAYK7AAY

            396319




            396319












            • Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

              – Basil K Y
              Dec 31 '18 at 20:07











            • Then, I'd look for an error in the configuration.

              – K7AAY
              Dec 31 '18 at 21:05

















            • Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

              – Basil K Y
              Dec 31 '18 at 20:07











            • Then, I'd look for an error in the configuration.

              – K7AAY
              Dec 31 '18 at 21:05
















            Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

            – Basil K Y
            Dec 31 '18 at 20:07





            Thanks for the reply. I have the same configuration generated by the script already in my /etc/default/grub file. My ram size is 7.7 GB and the swapfile (/swapfile) is having 8GB size.

            – Basil K Y
            Dec 31 '18 at 20:07













            Then, I'd look for an error in the configuration.

            – K7AAY
            Dec 31 '18 at 21:05





            Then, I'd look for an error in the configuration.

            – K7AAY
            Dec 31 '18 at 21:05













            1














            I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.



            hibernation (freezes on resume) since 4.13.0-25.29



            It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.






            share|improve this answer



























              1














              I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.



              hibernation (freezes on resume) since 4.13.0-25.29



              It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.






              share|improve this answer

























                1












                1








                1







                I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.



                hibernation (freezes on resume) since 4.13.0-25.29



                It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.






                share|improve this answer













                I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.



                hibernation (freezes on resume) since 4.13.0-25.29



                It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 7 at 10:13









                Basil K YBasil K Y

                265




                265



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f491690%2fhibernation-not-working-on-linux-mint-19%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

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay