Results 1 to 9 of 9

Thread: Suspend / Hibernate

  1. #1

    Default Suspend / Hibernate

    Hi .. I'm assuming this has been addressed elsewhere, but cannot find on quick look so please feel free to link to an answer for me

    I'm trying to literally just sleep the laptop, is that possible and how to enable the option in the shutdown options (the "Leave" menu)?

    Many thanks

  2. #2

    Default Re: Suspend / Hibernate

    Quote Originally Posted by ManuelBandito View Post
    HI'm trying to literally just sleep the laptop, is that possible
    Of course.
    Just run "systemctl suspend"...

    and how to enable the option in the shutdown options (the "Leave" menu)?
    You're talking about KDE here I suppose?

    You can neither enable nor disable that option.
    It is shown automatically if the user is allowed to suspend, and it is hidden if not.

    So you most likely have some other problem, like the user session not correctly registered with logind.
    Does the above command work? Probably not.

    Please post the output of:
    Code:
    loginctl
    And did you enable "autofs.service"? There is a bug related to it that can cause problems in this regard, when Auto-Login is enabled.
    Does logging out and in again make the "Suspend" option appear?

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Suspend / Hibernate

    On 2015-05-16 13:56, wolfi323 wrote:

    > You can neither enable nor disable that option.
    > It is shown automatically if the user is allowed to suspend, and it is
    > hidden if not.


    It also disappears if the system supposes the machine can not suspend.
    Like being in the blacklist (use pm-is-supported to find out - but you
    have to test the output code, there is no message).

    But I don't know of a method to add/remove instantly a machine from the
    list, we had to report upstream.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  4. #4

    Default Re: Suspend / Hibernate

    Quote Originally Posted by robin_listas View Post
    On 2015-05-16 13:56, wolfi323 wrote:

    > You can neither enable nor disable that option.
    > It is shown automatically if the user is allowed to suspend, and it is
    > hidden if not.


    It also disappears if the system supposes the machine can not suspend.
    Like being in the blacklist (use pm-is-supported to find out - but you
    have to test the output code, there is no message).
    I'm not so sure about that. It is displayed in a VirtualBox guest too although that can not suspend.

    Anyway, I just want to mention that KDE does _not_ use pm-is-supported to find out whether suspend is allowed/supported.
    It asks upower/logind directly via DBUS. And if it is allowed for the user or not depends on polkit.

    But I don't know of a method to add/remove instantly a machine from the
    list, we had to report upstream.
    Again, there is none, for KDE at least.
    And pm-utils is deprecated/unmaintained anyway.

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Suspend / Hibernate

    On 2015-05-16 20:06, wolfi323 wrote:
    >
    > robin_listas;2710189 Wrote:


    >> It also disappears if the system supposes the machine can not suspend.
    >> Like being in the blacklist (use pm-is-supported to find out - but you
    >> have to test the output code, there is no message).
    >>

    > I'm not so sure about that. It is displayed in a VirtualBox guest too
    > although that can not suspend.


    Well, the blacklist is not complete.

    The system has to know that suspend does not work or is not allowed to
    remove the option.


    > Anyway, I just want to mention that KDE does _not_ use pm-is-supported
    > to find out whether suspend is allowed/supported.
    > It asks upower/logind directly via DBUS. And if it is allowed for the
    > user or not depends on polkit.


    Yes, that's about being allowed. I suggest that it also disappears if it
    thinks that it can not be done. It happened to me several years ago. kde
    3, perhaps, or gnome. I could hibernate perfectly via command, but not
    via menu.

    How exactly it finds now if the machine is capable or not, I don't know.


    > And pm-utils is deprecated/unmaintained anyway.


    Well, that's what the systemd people say :-p

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  6. #6

    Default Re: Suspend / Hibernate

    Quote Originally Posted by robin_listas View Post
    On 2015-05-16 20:06, wolfi323 wrote:
    >
    > robin_listas;2710189 Wrote:


    >> It also disappears if the system supposes the machine can not suspend.
    >> Like being in the blacklist (use pm-is-supported to find out - but you
    >> have to test the output code, there is no message).
    >>

    > I'm not so sure about that. It is displayed in a VirtualBox guest too
    > although that can not suspend.


    Well, the blacklist is not complete.
    Probably.
    But pm-utils' blacklist is not used at all anyway to determine whether suspend is possible.

    The system has to know that suspend does not work or is not allowed to
    remove the option.
    As I wrote:
    Whether it is allowed or not is determined by polkit.
    And KDE just asks systemd (logind) via DBUS whether suspend is possible/allowed.

    I don't think systemd has any "blacklist" built in.
    If suspend is not possible, it will fail, but I don't think it will report that it is not possible beforehand.
    In the end it just tells the kernel to suspend/hibernate.

    I suggest that it also disappears if it
    thinks that it can not be done. It happened to me several years ago. kde
    3, perhaps, or gnome. I could hibernate perfectly via command, but not
    via menu.
    But things from "several years ago" don't apply any more, particularly in this case.
    And things from KDE3 or GNOME don't necessarily apply to a current openSUSE KDE4 either.

    How exactly it finds now if the machine is capable or not, I don't know.
    Again, I don't think it does at all.

    If pm-utils are installed, they are still being used for the actual suspend/hibernate (or rather again, this was re-added by an update, they were ignored in 13.2 as shipped). But this is only checked when you actually suspend/hibernate.

    > And pm-utils is deprecated/unmaintained anyway.

    Well, that's what the systemd people say :-p
    And the openSUSE maintainers.
    Last edited by wolfi323; 16-May-2015 at 12:09.

  7. #7

    Default Re: Suspend / Hibernate

    Thanks for the answers guys much appreciated if a little over my head lol

  8. #8

    Default Re: Suspend / Hibernate

    One related question if ok, I find that when restarting it sometimes get's stuck in ramdisk (loading / intialising ramdisk)? but always works fine from a "cold" reboot.

    Any ideas about this? Many thanks

  9. #9

    Default Re: Suspend / Hibernate

    Quote Originally Posted by ManuelBandito View Post
    Any ideas about this? Many thanks
    Well, there seems to be a problem on certain AMD CPUs with the CPU microcode update during boot, that would cause a hang/freeze at that exact point.
    http://bugzilla.opensuse.org/show_bug.cgi?id=913996
    This is still under investigation...

    But AIUI, if that's your problem the system should hang on cold boot as well.

    Still, you might try to add "dis_ucode_ldr" to the kernel command line in YaST->System->Boot Loader->Kernel Parameters and see if it helps. (If it doesn't, you probably should better remove it again...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •