Announcement

Collapse
No announcement yet.

How to suspend to RAM in terminal?

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

    How to suspend to RAM in terminal?

    More specifically, I'm interested in configuring a keyboard shortcut so that I can suspend to RAM faster.

    However, to do that I guess I would need to know which terminal command to run to suspend to RAM to begin with.

    Any tips, folks? Thanks a lot for any input.

    #2
    Re: How to suspend to RAM in terminal?

    > Re: How to make suspend/hibernate buttons work
    ...
    Remote application: org.kde.powerdevilsystem
    Remote object: /modules/powerdevil
    Function: suspend
    Arguments: 2

    Hibernate is set up exactly the same but the argument is 4 instead of 2. There
    are also other options available (shutdown, etc.) - see the enum IdleAction in
    PowerDevil's source code
    kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h
    => with the qbus:
    Code:
    qdbus org.kde.powerdevilsystem /modules/powerdevil suspend 2
    or/and:
    Code:
    qdbus org.kde.powerdevilsystem /modules/powerdevil suspend 4
    This seems to be same as: K > Leave > Hibernate (Suspend to Disk).


    More of the qbus:

    > D-Bus wiki
    > Topic: shutdown command in kde4 [solved]
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: How to suspend to RAM in terminal? (SOLVED)

      Thanks a lot, Rog. I'm going to test this out momentarily. I appreciate the help.

      Comment


        #4
        Re: How to suspend to RAM in terminal?

        Originally posted by Rog131
        => with the qbus:
        Code:
        qdbus org.kde.powerdevilsystem /modules/powerdevil suspend 2
        or/and:
        Code:
        qdbus org.kde.powerdevilsystem /modules/powerdevil suspend 4
        Works OK. The first one crashed my system (it wouldn't suspend and I had to reboot).

        The second one logged me out of my session and suspended to RAM, which is basically what I was looking for but with that added extra (previously, I had just been suspending to RAM, while leaving the session unlocked).

        OK, I am in qdbusviewer and looking powerdevilsystem. Do you know where I can find those arguments?

        I have a kind of menu-ish thing that I can browse down and go down a tree in, but I'm not sure where to go.

        Thanks a lot for the insight.

        Comment


          #5
          Re: How to suspend to RAM in terminal?

          Originally posted by fidesratioque

          I'm interested in configuring a keyboard shortcut so that I can suspend to RAM faster.

          With the kpowersave icon on the panel, I am exactly two mouse clicks, a right and a left, away from S2RAM. How much faster are you thinking it is going to be? I'm having some fun imagining why you need instantaneous S2RAM!

          Comment


            #6
            Re: How to suspend to RAM in terminal?

            Afterthought: I'm using Kubuntu 9.04 Jaunty Jackalope, KDE 4.2


            There is a plasma-widget script > Suspend Applet
            Description:
            Suspend Applet is a small applet designed to quickly suspend or hibernate your computer. It also allows for turning off your display (only if PowerDevil is active).
            Do you know where I can find those arguments?
            As said:
            enum IdleAction in
            PowerDevil's source code
            kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h
            one place to look at the net => PowerDevilDaemon.h
            None = 0,
            Standby = 1,
            S2Ram = 2,
            S2Disk = 4,
            Shutdown = 8,
            Lock = 16,
            ShutdownDialog = 32,
            TurnOffScreen = 64

            The first one crashed my system (it wouldn't suspend and I had to reboot).
            Here it was working - ?? - Do you have a swap partition ? The > All About Linux Swap Part 3: Analysis tells:
            Because of the ability to hibernate - if you plan to use this functionality - allocate at least as much swap as you have of system memory. This is especially important during partitioning, because Linux cannot hibernate to a swap file.
            Before you edit, BACKUP !

            Why there are dead links ?
            1. Thread: Please explain how to access old kubuntu forum posts
            2. Thread: Lost Information

            Comment

            Working...
            X