Autopoweroff NO Longer Works After Upgrading Kernel to 4.9.240

Forum Forums Official Releases antiX-19 “Marielle Franco, Hannie Schaft, Manolis Glezos, Grup Yorum, Wobblies” Autopoweroff NO Longer Works After Upgrading Kernel to 4.9.240

  • This topic has 12 replies, 6 voices, and was last updated Oct 30-6:45 pm by RobK88.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #43630
    Member
    RobK88

      I am running antiX Linux 19.3 on a 32-bit laptop.

      I have been using a program called autopoweroff which puts my laptop to sleep after a period of non-activity.
      See https://github.com/deragon/autopoweroff

      After upgrading my kernel from 4.9.221 to 4.9.240, autopoweroff no longer works. Even if I manually click suspend in the autopoweroff GUI, my laptop never goes into suspend or sleep. Instead, the display goes blank and the PC remains fully powered. I cannot get out of this state by pressing a key on the keyboard. I must do a hard shut-down (i.e. I must force the laptop to power down by holding the power button for 5 seconds or so).

      P.S. I can open a terminal and go into suspend mode using the “sudo pm-suspend” command. So suspend still works on the 4.9.240 32-bit kernel.

      If I go back to the 4.9.221 kernal, autopoweroff works as expected.

      I have filed an issue with autopoweroff but I suspect the real issue is with the kernel.
      See
      https://github.com/deragon/autopoweroff/issues/16

      I just want to give others a heads up if they are using autopoweroff.

      Of course, if anyone has a fix, please post it here!

      #43647
      Member
      fatmac
        Helpful
        Up
        0
        ::

        If I need to, I use
        sudo halt -p
        in a terminal.

        Linux (& BSD) since 1999

        #43653
        Moderator
        Brian Masinick
          Helpful
          Up
          0
          ::

          If I need to, I use
          sudo halt -p
          in a terminal.

          another one that works is sudo poweroff

          --
          Brian Masinick

          #43713
          Member
          RobK88
            Helpful
            Up
            0
            ::

            Thanks. But I am not trying to turn off the laptop automatically.

            Despite its name, the program autopoweroff can also be used to put a PC or laptop to sleep (or suspend) after a period of non activity.

            Unfortunately, after upgrading the kernel to 4.9.240, autopoweroff can no longer put my laptop to sleep. Very strange.
            Once I go back to the 4.9.221 kernel, everything works again. (e.g. After I leave my laptop alone for 15 minutes, my laptop goes to sleep automatically).

            it sure looks like there is something wrong with the 4.9.240 kernel.

            #43715
            Moderator
            Brian Masinick
              Helpful
              Up
              0
              ::

              sudo pm-suspend may be necessary if there is an outstanding defect preventing you from using the usual method.

              I usually power off my system and rarely suspend or hibernate so I defer to those who have better suggestions.

              --
              Brian Masinick

              #43716
              Moderator
              Brian Masinick
                Helpful
                Up
                0
                ::

                Since the issues appear with a particular kernel, for now work around using a kernel with the desired behavior.

                --
                Brian Masinick

                #43768
                Member
                Xecure
                  Helpful
                  Up
                  0
                  ::

                  I cannot help with the autopoweroff problem, but can explain how I set up autosuspend.

                  I installed xautlocker and added this to startup:

                  #start xautlocker, suspend after 15 minutes
                  xautolock -time 15 -locker "sudo pm-suspend" &

                  After rebooting, this will work. If your computer is 15 min without activity, it will suspend.

                  Maybe this has nothing to do with your troubles and even with this it doesn’t autosuspend. I cannot guaranty that the problem is not kernel related.

                  antiX Live system enthusiast.
                  General Live Boot Parameters for antiX.

                  #43827
                  Member
                  RobK88
                    Helpful
                    Up
                    0
                    ::

                    Thanks for the tip on the xautolock program. I may have to go with it but I do prefer the autopoweroff program with its GUI.

                    #43834
                    Moderator
                    Brian Masinick
                      Helpful
                      Up
                      0
                      ::

                      Thanks for the tip on the xautolock program. I may have to go with it but I do prefer the autopoweroff program with its GUI.

                      You are probably correct that this is a kernel problem. You can use a different kernel until a newer compatible kernel is either released or the offending kernel is patched to work.

                      --
                      Brian Masinick

                      #43836
                      Forum Admin
                      anticapitalista
                        Helpful
                        Up
                        0
                        ::

                        Just to check – are you using the 486 kernel or the 686-pae one?
                        I looked at the diff changes from working 4.9.221 and failing 4.9.240 and nothing obvious shows up.

                        Philosophers have interpreted the world in many ways; the point is to change it.

                        antiX with runit - leaner and meaner.

                        #43837
                        Moderator
                        Brian Masinick
                          Helpful
                          Up
                          0
                          ::

                          …still works on the 4.9.240 32-bit…

                          Copied from earlier in the thread. Unless the wrong instance of one kernel was accidentally copied it should be 32-bit.

                          Maybe double check and reinstall the kernel that is not working and make sure that the 32-bit version is used (assuming that is correct).

                          --
                          Brian Masinick

                          #43862
                          Forum Admin
                          SamK
                            Helpful
                            Up
                            0
                            ::

                            @RobK88

                            Thanks for highlighting the Autopoweroff project. It looks both interesting and useful.

                            On its GitHub web page is a mention that might limit its long term usefulness in antiX.
                            https://github.com/deragon/autopoweroff
                            Towards the foot of the page is a To Do section, which states the intention to “Move to systemd“. That will be a problem because antiX is systemd free.

                            Might you consider an addendum to your issue report at Autopoweroff requesting the author to continue the init.d version alongside the systemd version.

                            #44087
                            Member
                            RobK88
                              Helpful
                              Up
                              0
                              ::

                              Apparently, autopoweroff sends the following command when suspending a PC:

                              
                              echo -n mem >/sys/power/state
                              

                              In terminal, as root, I tried echo -n mem >/sys/power/state when using the 4.9.240 32-bit kernel.
                              Sometimes, it worked and put my laptop to sleep. And sometimes it did not. It was unpredictable.

                              By the way, here are details on the problematic kernel that I am using:

                              
                              $ uname -a
                              Linux antix1-laptop 4.9.240-antix.1-486-smp #1 SMP Mon Oct 19 06:12:43 EDT 2020 i686 GNU/Linux
                              

                              In the configuration GUI of autopoweroff, I replaced the suspend command with “sudo pm-suspend”. Now autopoweroff appears to put my PC to sleep (or suspend). (I am using the latest version of autopoweroff – version 3.2.1)

                              So it looks like the 4.9.240 kernel may be the problem. It does not like “echo -n mem >/sys/power/state” on this old slow 32-bit laptop.

                              P.S. I posted my findings on the autopoweroff website. I also asked whether he will continue to support init.d. I hope he does!

                              • This reply was modified 2 years, 6 months ago by RobK88.
                            Viewing 13 posts - 1 through 13 (of 13 total)
                            • You must be logged in to reply to this topic.