Hibernate is missing from the logout menu

Forum Forums New users New Users and General Questions Hibernate is missing from the logout menu

  • This topic has 6 replies, 2 voices, and was last updated Dec 24-5:12 am by BobC.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4265
    Moderator
    BobC

      This is on a Dell XPS 15 laptop running AntiX17 Full 64 bit. It has 16gb of memory, running from an SSD and a 29gb swap partition on a separate hard drive that I was thinking it would hibernate to.

      Perhaps the hibernate option was removed from the menus?

      When I’m running off the battery it would be nice if it could hibernate before it runs out of power especially when sleeping unattended.

      Any ideas?

      #4266
      Anonymous
        Helpful
        Up
        0
        ::

        Perhaps the hibernate option was removed from the menus?

        Yes, removed during antiX17 betatesting due to multiple reports that it wasn’t working.

        A week ago, someone reported Tips-n-Tricks }} topic: howto fix “Hibernate does not work” a fix for antiX16,
        but AFAIK no one has yet tested/reported whether the fix works in antiX17.

        sudo updatedb
        locate desktop-session-exit.py

        The reputed fix would be to edit desktop-session-exit.py and insert the following line (bolded, below)

        self.build_button(ICONS+”/lock.svg”,”Lock Screen”,”desktop-session-exit -L”,”left”)
        self.build_button(ICONS+”/hibernate.svg”,”Hibernate”,”desktop-session-exit -H”,”left”)
        self.build_button(ICONS+”/upgrade.svg”,”Restart Session”,”desktop-session-exit -R”,”left”)

        Please post back to report whether this works for your antiX17 system.

        #4269
        Moderator
        BobC
          Helpful
          Up
          0
          ::

          Thanks for the reply…

          Yes, I had a look at it and there looked to be some confusion on the options, where -h was passed, but that was coded to put out a help screen, where -H was coded to hibernate. But the hibernate code is commented out as well, so I’ll give it a try changing it to what I think would have been intended.

          I reprogrammed Ctrl+Shift+s to Suspend
          key “Ctrl+Shift+s” dbus-send –system –print-reply –dest=”org.freedesktop.UPower” /org/freedesktop/UPower org.freedesktop.UPower.Suspend

          and Ctrl+Shift+h to Hibernate
          key “Ctrl+Shift+h” dbus-send –system –print-reply –dest=”org.freedesktop.UPower” /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

          The dbus-send suspend works great, but I was trying to find out what was wrong with the hibernate and why it was removed before trying it. I would guess if that worked, maybe the pm-suspend and pm-hibernate might work as well, but I’m just guessing…

          #4271
          Anonymous
            Helpful
            Up
            0
            ::

            but I was trying to find out what was wrong with the hibernate and why it was removed before trying it.

            I don’t recall the gory details. You can search MX Linux forum for “hibernate” to skim the problem reports (and recent successes) regarding hibernate across recent months.

            #4275
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              I eventually found that I’m getting an I/O Error.

              I looked my AntiX16 system and the code is there, but the setup is similar and hibernate doesn’t work there either. On that one its able to hibernate but can’t resume.

              If my guess is correct, in addition to the code problems, the resume file is missing,fstab doesn’t have the right entries, and initramfs needs to be rebuilt, just based on what what I found in debian stretch loaded on the same system, so I’m changing things to be like debian and will try again.

              Of course I don’t really don’t know, just guessing.

              https://askubuntu.com/questions/671941/how-can-i-redetect-swap-partition-after-formating-to-enable-hibernation?rq=1

              https://blog.roland-kluge.de/?p=793

              https://askubuntu.com/questions/496237/sh-echo-i-o-error-on-pm-suspend-ubuntu-14-04

              http://chriseiffel.com/uncategorized/step-by-step-how-to-get-hibernate-working-for-linux-ubuntu-11-04-mint-11/

              #4276
              Moderator
              BobC
                Helpful
                Up
                0
                ::

                Yes, that fixed it…

                edit files with simple text editor, like geany, not libreoffice writer

                Need resume in grub…
                /etc/default/grub
                GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
                GRUB_CMDLINE_LINUX_DEFAULT=”vga=791 gfxsave quiet acpi_osi=! acpi_osi=Windows resume=UUID=e583126a-f180-4cf8-a663-9136fb858c52
                GRUB_CMDLINE_LINUX=””

                Need drives in fstab…
                /etc/fstab

                # bobc - file copied/modified from debian stretch
                #
                # <file system> <mount point>   <type>  <options>       <dump>  <pass>
                # / was on /dev/sda3 during installation
                UUID=421329eb-2ee3-4a99-b2b3-4c7325562eaf /               ext4    errors=remount-ro 0       1
                # /boot/efi was on /dev/sda1 during installation
                UUID=3021-2E43  /boot/efi       vfat    umask=0077      0       1
                # swap was on /dev/sdb6 during installation
                UUID=e583126a-f180-4cf8-a663-9136fb858c52 none            swap    sw              0       0
                

                Run:
                sudo update-initramfs -u
                sudo update-grub

                blkid was:

                bobc@DellXPS15:~
                $ blkid
                /dev/sda1: LABEL=”ESP” UUID=”3021-2E43″ TYPE=”vfat” PARTLABEL=”0″ PARTUUID=”3c980929-692c-49c6-bf5d-ee5779ff191c”
                /dev/sda2: LABEL=”OS” UUID=”01D2A9BBA8D70CD0″ TYPE=”ntfs” PARTUUID=”7401bcd7-c035-4d25-b170-f3e0c165c2ab”
                /dev/sda3: LABEL=”3-antiX17″ UUID=”421329eb-2ee3-4a99-b2b3-4c7325562eaf” TYPE=”ext4″ PARTLABEL=”3-antix17″ PARTUUID=”0f1b2c08-1c00-46f7-a8a9-cdb2d652302c”
                /dev/sda4: UUID=”b02683a5-6ae7-4bb3-9146-e19110cbe9fd” TYPE=”ext4″ PARTLABEL=”4-” PARTUUID=”43729042-758d-497f-ba6e-2b80247c990a”
                /dev/sda5: LABEL=”5-Knoppix771″ UUID=”c74f9ed3-b710-4913-b4d9-d1e3c3774c36″ TYPE=”ext4″ PARTLABEL=”5-Knoppix771″ PARTUUID=”e22a2725-6bc3-46aa-be2a-3bf034213bff”
                /dev/sda6: UUID=”0502fb42-47f1-4224-adf4-c4ac0f766f25″ TYPE=”ext4″ PARTLABEL=”6-” PARTUUID=”93c28f17-4de8-4592-bab5-2ca7d83818dc”
                /dev/sda7: UUID=”42833ec3-52cb-45e0-bcab-2a2f8a14b3df” TYPE=”ext4″ PARTLABEL=”7-” PARTUUID=”dbfdc2cb-8280-4222-acae-eaa211a22a3c”
                /dev/sda8: LABEL=”8-Knoppix810″ UUID=”2daa4cc4-bc24-4cfa-a88b-4a39f4130307″ TYPE=”ext4″ PARTLABEL=”8-Knoppix810″ PARTUUID=”15c47605-fb1e-4786-9eac-b3451c540415″
                /dev/sda9: LABEL=”9-empty” UUID=”52c034ec-cbe8-4f63-aced-9bca4eb8b355″ TYPE=”ext4″ PARTLABEL=”9-” PARTUUID=”a37f4e73-b3fa-4e3c-9c9b-74d06fb75c4e”
                /dev/sda10: LABEL=”10-debian9″ UUID=”ee0944d2-e7e8-4e0f-a381-a5941f2f13ba” TYPE=”ext4″ PARTLABEL=”10-debian9″ PARTUUID=”c7154409-a1b1-4981-b1a7-cdfabb622568″
                /dev/sdb1: LABEL=”ESP” UUID=”3021-2E43″ TYPE=”vfat” PARTLABEL=”EFI system partition” PARTUUID=”2bee7a7b-305d-4784-acec-6ad0c521bb17″
                /dev/sdb3: LABEL=”OS” UUID=”B8E82381E8233CCE” TYPE=”ntfs” PARTLABEL=”Basic data partition” PARTUUID=”29fea6ad-4826-4b08-88a2-a471d51cb874″
                /dev/sdb4: LABEL=”WINRETOOLS” UUID=”C2C62FC0C62FB417″ TYPE=”ntfs” PARTUUID=”4469cea8-59f7-443b-a8f3-f613538514b9″
                /dev/sdb5: LABEL=”Image” UUID=”787E30FB7E30B3AA” TYPE=”ntfs” PARTUUID=”b1e8129a-c374-4e28-94c4-ca0794c2049b”
                /dev/sdb6: UUID=”e583126a-f180-4cf8-a663-9136fb858c52″ TYPE=”swap” PARTLABEL=”swap” PARTUUID=”5a69eaf1-7bc1-4280-b016-10856f5ceab3″
                bobc@DellXPS15:~

                Merry Christmas to All 🙂

                • This reply was modified 5 years, 4 months ago by BobC.
                #4278
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  Yes, that fixed it…

                  You need to edit files with simple text editor, like geany, not libreoffice writer. I didn’t find any complete example of the device being named in /dev/sdxy format, in my case /dev/sdb6, but that could possibly work. I wasn’t able to get it to work that way, but the problems might have been caused by me letting the default program libreoffice writer edit the grub file.

                  The resume file is missing…
                  /etc/initramfs-tools/conf.d/resume
                  RESUME=UUID=e583126a-f180-4cf8-a663-9136fb858c52

                  Need resume in grub…
                  /etc/default/grub
                  GRUB_CMDLINE_LINUX_DEFAULT=”vga=791 gfxsave quiet acpi_osi=! acpi_osi=Windows resume=UUID=e583126a-f180-4cf8-a663-9136fb858c52
                  GRUB_CMDLINE_LINUX=””

                  Need drives in fstab…
                  /etc/fstab

                  # bobc - file copied/modified from debian stretch
                  #
                  # <file system> <mount point>   <type>  <options>       <dump>  <pass>
                  # / was on /dev/sda3 during installation
                  UUID=421329eb-2ee3-4a99-b2b3-4c7325562eaf /               ext4    errors=remount-ro 0       1
                  # /boot/efi was on /dev/sda1 during installation
                  UUID=3021-2E43  /boot/efi       vfat    umask=0077      0       1
                  # swap was on /dev/sdb6 during installation
                  UUID=e583126a-f180-4cf8-a663-9136fb858c52 none            swap    sw              0       0
                  

                  The swap space needs to be larger than memory and swap needs to be turned on.
                  Run:
                  sudo swapon -a
                  sudo update-initramfs -u
                  sudo update-grub

                  blkid was:

                  /dev/sda1: LABEL=”ESP” UUID=”3021-2E43″ TYPE=”vfat” PARTLABEL=”0″ PARTUUID=”3c980929-692c-49c6-bf5d-ee5779ff191c”
                  /dev/sda3: LABEL=”3-antiX17″ UUID=”421329eb-2ee3-4a99-b2b3-4c7325562eaf” TYPE=”ext4″ PARTLABEL=”3-antix17″ PARTUUID=”0f1b2c08-1c00-46f7-a8a9-cdb2d652302c”
                  /dev/sdb6: UUID=”e583126a-f180-4cf8-a663-9136fb858c52″ TYPE=”swap” PARTLABEL=”swap” PARTUUID=”5a69eaf1-7bc1-4280-b016-10856f5ceab3″

                  Merry Christmas to All

                  • This reply was modified 5 years, 4 months ago by BobC.
                  • This reply was modified 5 years, 4 months ago by BobC. Reason: Add details of missing resume file , swap size and swapon
                  • This reply was modified 5 years, 4 months ago by BobC.
                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.