Announcement

Collapse
No announcement yet.

Sleep and hibernate don't work

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sleep and hibernate don't work

    Hi,

    My suspend (sleep) and hibernate features of my desktop computer no longer work. They did in 8.10, but didn't in 8.04 and now again they don't in 9.04. It is a no name desktop (made by professionals in my city), all I can give you is the specs: AMD 64 X2 5400+ 2.8 GHz, 3 GB RAM, Nvidia 8400 GS 256 vRAM. Don't know if that'll be useful, though.

    Is there any way to make hibernate or sleep work? Is it a known issue?

    #2
    Re: Sleep and hibernate don't work

    Hrm... I had to do something to make it work. I forgot what that was -- besides downgrading to 3 GB and sticking acpi_sleep=s3_bios,s3_mode to my GRUB kernel parameters, which I've always had to do. But I think I found the culprit in /var/log/pm-suspend.log -- some leftover script from 8.10 that failed and thereby sabotaged the suspend process.

    (Also, I purged powersaved and libpowersave11 (name?), apmd, laptop-mode-tools, kde-guidance-powermanager, guidance-power-manager, and a couple other power things I didn't seem to need. But I don't think that's what mattered.)

    Comment


      #3
      Re: Sleep and hibernate don't work

      Thanks abalone, but I am a little stuck. I don't have the file pm-suspend.log in /var/log/, because I did a clean install? Further, only apmd and laptop-mode-tools are installed, but I'd rather like to keep them (as the latter one spins the hard drive down during inactivity I read, a useful feature). Could there be any other causes? I appreciate your kind help.

      Comment


        #4
        Re: Sleep and hibernate don't work

        Most probably, I can't help you. But if nobody else posts, I might as well...

        I find it odd there's no /var/log/pm-suspend.log. Do you have pm-utils installed at all?

        So, another thing I did was to put noapic in the kernel line some time last year, in addition to the old acpi_sleep=s3_mode,s3_bios. That was really to get working optical drives (they stopped working from Hardy on, I think) and then to stabilize the realtime-patched kernel when I upgraded to an Athlon X2... but who knows. Might be good for more than that. There're other fun options, like nolapic, all of which do stuff I don't really understand.

        When I start apmd, all I get is the message "No APM support in kernel". Since I suppose you're running the same kernel... you sure you need apmd? Isn't it pretty much superseded by ACPI?

        I'm not sure acpid is necessary; in my case, it just gets in the way: it runs powerbtn.sh when I press the power button, which in turn doesn't know how to bring up KDE 4's shutdown dialogue and thus falls through to an abrupt shutdown -h now. Annoying! Maybe if you have a fancy multimedia keyboard? I don't know.

        In what way does suspend to RAM (or "Sleep" in the KDE 4 menu) not work? What happens when you try to suspend?

        What happens when you try it from the console? There're several methods I'm aware of:

        1) sudo pm-suspend (from the package pm-utils)
        2) dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.S uspend int32:0
        3) sudo /etc/acpi/sleep.sh force (script might come with the package acpid, dunno offhand)
        4) sudo s2ram and variants like sudo s2ram --force, sudo s2ram --force --vbe_save etc. (see man s2ram for more options; this is from the package uswsusp)

        Maybe one of them will print an enlightening error message (if you've got more tech skill than I, that is).

        When you go to System Settings -> Advanced -> Service Manager, is PowerDevil running?

        Laptop mode:

        1) You said you were using a desktop PC. From what I've read -- laptop harddisks can take a lot more spinning down and back up than desktop harddisks. So I'd give it a very long timeout, and perhaps only on a harddisk that's rarely used in the first place.
        2) Can you do me a favour and paste the output of the command sudo laptop_mode status?

        Comment


          #5
          Re: Sleep and hibernate don't work

          Thank you very much for replying.

          Originally posted by abalone
          Most probably, I can't help you. But if nobody else posts, I might as well...

          I find it odd there's no /var/log/pm-suspend.log. Do you have pm-utils installed at all?
          Yes, I have pm-utils installed. Maybe because there hasn't been a successful suspend (either to RAM or disk) that the file does not exist?

          Originally posted by abalone
          When I start apmd, all I get is the message "No APM support in kernel". Since I suppose you're running the same kernel... you sure you need apmd? Isn't it pretty much superseded by ACPI?
          Probably not, but as you can see I do not know much about Linux. Inserting something into the kernel line seems dangerous, I wouldn't dare to try it.

          Originally posted by abalone
          I'm not sure acpid is necessary; in my case, it just gets in the way: it runs powerbtn.sh when I press the power button, which in turn doesn't know how to bring up KDE 4's shutdown dialogue and thus falls through to an abrupt shutdown -h now. Annoying! Maybe if you have a fancy multimedia keyboard? I don't know.
          No, I have a regular/classic keyboard.

          Originally posted by abalone
          In what way does suspend to RAM (or "Sleep" in the KDE 4 menu) not work? What happens when you try to suspend?
          The machine does turn off, but when I turn it back on, all I get is a black screen.

          Originally posted by abalone
          What happens when you try it from the console? There're several methods I'm aware of:

          (...)

          Maybe one of them will print an enlightening error message (if you've got more tech skill than I, that is).
          Thanks for all those options. Regarding the tech skill, I probably have way less than you.

          Originally posted by abalone
          When you go to System Settings -> Advanced -> Service Manager, is PowerDevil running?
          Yes, PowerDevil is running.

          Originally posted by abalone
          Laptop mode:

          1) You said you were using a desktop PC. From what I've read -- laptop harddisks can take a lot more spinning down and back up than desktop harddisks. So I'd give it a very long timeout, and perhaps only on a harddisk that's rarely used in the first place.
          2) Can you do me a favour and paste the output of the command sudo laptop_mode status?
          The output of the laptop_mode status command is attached. Should I remove the package altogether, because it wears my Desktop PC's drive down, or isn't that what you mean?
          Attached Files

          Comment


            #6
            Re: Sleep and hibernate don't work

            "inserting something into the kernel line": I mean the parameters you can give in the GRUB boot menu (/boot/grub/menu.list). By default there's something like quiet vga=something splash there. I've never been shy about experimenting with that, so far nothing blew up but I couldn't tell you if it's dangerous. My nvidia driver no longer starts when I take noapic out again but I don't know what exactly caused that to happen.

            pm-suspend.log: In my case it seems to record everything, not just successful suspend operations.

            black screen on resume: is the keyboard still active? If sound was playing, does it resume playing? Can you toggle caps lock, num lock, etc.? Maybe even type commands blindly? Tried switching to TTYs? (Ctrl-Alt-F1, -F2, etc.... -F7 for the graphical desktop)

            laptop-mode: Well, I'm using it, sometimes, but not with the default 20 second idle timeout... I've set it to 1800 seconds.

            laptop-mode is complicated. I'll try to give you a rundown, but this is only my own imperfect understanding of it, and I can't and won't assume responsibility for any rubbish I'm about to write. If anyone with any sort of clue is reading this, I'd really like some comments.

            About that "(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)"... I'm guessing that laptop-mode can apply some potentially dangerous settings to your drives, and that these settings may not automatically revert to safe factory defaults just because laptop-mode isn't running anymore. There're NOLM_... ("no laptop-mode") options in laptop-mode.conf to tell laptop-mode what other, less power-saving-happy settings to apply when disabling itself cleanly (versus being stopped by a reset, crash, power outage, or sun spots).

            And then there's this: "Laptop Mode Tools is NOT allowed to run: /var/run/laptop-mode-tools/enabled does not exist." I don't know if that's how you're supposed to do it, but you can change that with a sudo touch /var/run/laptop-mode-tools/enabled. That'll create the file.

            As a desktop user, you may have to edit /etc/laptop-mode/laptop-mode.conf if you want laptop-mode to run at all. For starters, you'll probably have to set ENABLE_LAPTOP_MODE_ON_AC=1.

            Some of the other options in that file are:

            CONTROL_READAHEAD=1 allows laptop-moed to make the drives read data in greater chunks - so they can more easily be spun down while still (say) playing music. LM_READAHEAD and NOLM_READAHEAD determine how many KB to read ahead with laptop-mode running/not running.

            CONTROL_HD_IDLE_TIMEOUT=1 allows laptop-mode to control the drives' "wait before spinning down" time, and LM_AC_HD_IDLE_TIMEOUT_SECONDS and NOLM_AC_HD_IDLE_TIMEOUT_SECONDS determine that time (for laptop-mode enabled/disabled, respectively).

            CONTROL_HD_POWERMGMT=1 allows laptop-mode to alter the drives' advanced power management levels. The levels themselves are set via LM_AC_HD_POWERMGMT and NOLM_AC_HD_POWERMGMT. Run man hdparm and look for the -B option for more info: it seems laptop-mode is executing hdparm -B <level> /dev/sda (/sdb, etc.) commands with the levels specified. It also seems values above 127 do not permit spin-down, so I set LM_AC_HD_POWERMGMT=127 and NOLM_AC_HD_POWERMGMT=254 (no spin-down when laptop-mode is disabled). Before changing this, you might want to run sudo hdparm -I /dev/sda (/sdb, whatever drives you have). This will print some info about your harddrive's current status, including (one hopes) its advanced power management level and recommended values. I have two drives, and they behave differently -- but it doesn't look like you can make laptop-mode apply per-drive advanced power management levels. Maybe it's better to use sudo hdparm -B <value> /dev/sda (/sdb, etc.) to set the level manually and set CONTROL_HD_POWERMGMT=0 to prevent laptop-mode from messing with it...?

            You better read and go by the documentation...

            Comment


              #7
              Re: Sleep and hibernate don't work

              mine does the same thing.

              When it opens its a black screen. You can wait forever there. What I do is move the mouse and it prompts for passwd. Try that or hit a keyboard key.
              Hope this helps.

              Comment

              Working...
              X