Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

Suspend to {RAM,Disk] (was: Re: Re: Runlevels, ordering initscripts and running them in background)

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


wonko at wonkology

May 18, 2012, 12:59 PM

Post #1 of 8 (468 views)
Permalink
Suspend to {RAM,Disk] (was: Re: Re: Runlevels, ordering initscripts and running them in background)

walt writes:

> On 05/16/2012 01:40 AM, Ignas Anikevicius wrote:
>
> > I want to do this, so that I do not have to wait while non-crucial
> > services are being started
>
> I can barely remember when I was young enough to care about saving
> a few seconds. (But, good for you :)

Isn't rebooting uncool nowadays anyway? Apart from the time for booting,
you have to log in, and open all the stuff you need to do your work. At
least for me, this is a lot. My PC runs all day, because it runs some
services others need, so this is not an issue. But when I will no longer
need to do this, I will try to make suspend to {ram,disk} work.

Of course, while this seems to work just fine for most people, it doesn't
for me. I had trouble with suspending to disk (using tuxonice-sources) in
the past, when I was using ati-drivers (fglrx) instead of the open
source radeon drivers, which were not working for me at that time.
Sometimes it just worked, sometimes I had to try suspending for multiple
times, sometimes it did not work at all. Then I experienced file system
corruption of my root partition, and did not try again. Such a corruption
also happened on another PC, so I do not really dare to try this again
soon.

Suspend to ram (using the hibernate-ram command from
sys-power/hibernate-script) seems to work better. It is much faster, and
needs only a few watts for standby. But there seem to be side effects. My
ISDN setup does not work after suspending to RAM. Well, it doesn't work
anyway, but at least I can see incoming calls normally, which does not
work afterwards. And I cannot remove the ISDN modules before suspending,
maybe I should try an older kernel, where this was working. And one time
I I had trouble with any USB devices after suspend, but I'm not really
sure this was related, I cannot reproduce this now. Didn't try very often
yet, though.

I hope to get this working soon. I just found the rtcwake command
(sys-apps/util-linux), this allows to suspend to RAM and automatically
wake up at a specified date. Nice, I can set the PC to sleep, and it
wakes up before I have to :)

Wonko


anikevicius at gmail

May 18, 2012, 2:42 PM

Post #2 of 8 (430 views)
Permalink
Re: Suspend to {RAM,Disk] [In reply to]

On 18/05/12 20:59, Alex Schuster wrote:
> Suspend to ram (using the hibernate-ram command from
> sys-power/hibernate-script) seems to work better.

What about pm-utils? Does it work better or worse than hibernate-script.
I had 0 problems with it during entire usage of linux, whereas with the
hibernate script package I had some issues...

And yes, I am usually suspending to ram, but I was just thinking about
possibilities to make my computer boot faster in the cases I really need
to do a restart. :)

Cheers,
Ignas


volkerarmin at googlemail

May 18, 2012, 3:09 PM

Post #3 of 8 (435 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

Am Freitag, 18. Mai 2012, 22:42:59 schrieb Ignas Anikevicius:
> On 18/05/12 20:59, Alex Schuster wrote:
> > Suspend to ram (using the hibernate-ram command from
> > sys-power/hibernate-script) seems to work better.
>
> What about pm-utils? Does it work better or worse than hibernate-script.
> I had 0 problems with it during entire usage of linux, whereas with the
> hibernate script package I had some issues...
>
> And yes, I am usually suspending to ram, but I was just thinking about
> possibilities to make my computer boot faster in the cases I really need
> to do a restart. :)
>
> Cheers,
> Ignas

I just do echo mem > ... or click on the 'Ruhezustand' button in KDE. Results
in the same. Well working suspend-to-ram. With fglrx. X running etc pp.

--
#163933


caneko at gmail

May 18, 2012, 3:26 PM

Post #4 of 8 (438 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

On Fri, May 18, 2012 at 5:09 PM, Volker Armin Hemmann
<volkerarmin [at] googlemail> wrote:
> Am Freitag, 18. Mai 2012, 22:42:59 schrieb Ignas Anikevicius:
>> On 18/05/12 20:59, Alex Schuster wrote:
>> > Suspend to ram (using the hibernate-ram command from
>> > sys-power/hibernate-script) seems to work better.
>>
>> What about pm-utils? Does it work better or worse than hibernate-script.
>> I had 0 problems with it during entire usage of linux, whereas with the
>> hibernate script package I had some issues...
>>
>> And yes, I am usually suspending to ram, but I was just thinking about
>> possibilities to make my computer boot faster in the cases I really need
>> to do a restart. :)
>>
>> Cheers,
>> Ignas
>
> I just do echo mem > ... or click on the 'Ruhezustand' button in KDE. Results
> in the same. Well working suspend-to-ram. With fglrx. X running etc pp.

With upower to suspend-to-ram you can just:

dbus-send --system --print-reply --dest="org.freedesktop.UPower"
/org/freedesktop/UPower org.freedesktop.UPower.Suspend

or use the "Suspend" option in GNOME 3 (GNOME uses upower). That I
already knew. What I didn't knew was that

dbus-send --system --print-reply --dest="org.freedesktop.UPower"
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate

works as well for suspend-to-disk. I hadn't hibernated my laptop in
ages, it's good to know it still works. I use systemd+dracut, which I
suppose it matters for the hibernate option.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


volkerarmin at googlemail

May 18, 2012, 3:37 PM

Post #5 of 8 (442 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

Am Freitag, 18. Mai 2012, 17:26:10 schrieb Canek Pelez Valds:
> On Fri, May 18, 2012 at 5:09 PM, Volker Armin Hemmann
>
> <volkerarmin [at] googlemail> wrote:
> > Am Freitag, 18. Mai 2012, 22:42:59 schrieb Ignas Anikevicius:
> >> On 18/05/12 20:59, Alex Schuster wrote:
> >> > Suspend to ram (using the hibernate-ram command from
> >> > sys-power/hibernate-script) seems to work better.
> >>
> >> What about pm-utils? Does it work better or worse than hibernate-script.
> >> I had 0 problems with it during entire usage of linux, whereas with the
> >> hibernate script package I had some issues...
> >>
> >> And yes, I am usually suspending to ram, but I was just thinking about
> >> possibilities to make my computer boot faster in the cases I really need
> >> to do a restart. :)
> >>
> >> Cheers,
> >> Ignas
> >
> > I just do echo mem > ... or click on the 'Ruhezustand' button in KDE.
> > Results in the same. Well working suspend-to-ram. With fglrx. X running
> > etc pp.
> With upower to suspend-to-ram you can just:
>
> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
> /org/freedesktop/UPower org.freedesktop.UPower.Suspend
>

which is way harder to type and memorize than:
echo mem > /sys/power/state

> or use the "Suspend" option in GNOME 3 (GNOME uses upower). That I
> already knew. What I didn't knew was that
>
> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
> /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
>
> works as well for suspend-to-disk. I hadn't hibernated my laptop in
> ages, it's good to know it still works. I use systemd+> dracut, which I
> suppose it matters for the hibernate option.

no, not really...
.
--
#163933


caneko at gmail

May 18, 2012, 4:36 PM

Post #6 of 8 (441 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

On Fri, May 18, 2012 at 5:37 PM, Volker Armin Hemmann
<volkerarmin [at] googlemail> wrote:
> Am Freitag, 18. Mai 2012, 17:26:10 schrieb Canek Peláez Valdés:
>> On Fri, May 18, 2012 at 5:09 PM, Volker Armin Hemmann
>>
>> <volkerarmin [at] googlemail> wrote:
>> > Am Freitag, 18. Mai 2012, 22:42:59 schrieb Ignas Anikevicius:
>> >> On 18/05/12 20:59, Alex Schuster wrote:
>> >> > Suspend to ram (using the hibernate-ram command from
>> >> > sys-power/hibernate-script) seems to work better.
>> >>
>> >> What about pm-utils? Does it work better or worse than hibernate-script.
>> >> I had 0 problems with it during entire usage of linux, whereas with the
>> >> hibernate script package I had some issues...
>> >>
>> >> And yes, I am usually suspending to ram, but I was just thinking about
>> >> possibilities to make my computer boot faster in the cases I really need
>> >> to do a restart. :)
>> >>
>> >> Cheers,
>> >> Ignas
>> >
>> > I just do echo mem > ... or click on the 'Ruhezustand' button in KDE.
>> > Results in the same. Well working suspend-to-ram. With fglrx. X running
>> > etc pp.
>> With upower to suspend-to-ram you can just:
>>
>> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
>> /org/freedesktop/UPower org.freedesktop.UPower.Suspend
>>
>
> which is way harder to type and memorize than:
> echo mem > /sys/power/state

Yeah. However, he Dbus method works as a simple user; the
/sys/power/state thing you can only do it as root. At least in my
system.

>> or use the "Suspend" option in GNOME 3 (GNOME uses upower). That I
>> already knew. What I didn't knew was that
>>
>> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
>> /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
>>
>> works as well for suspend-to-disk. I hadn't hibernated my laptop in
>> ages, it's good to know it still works. I use systemd+> dracut, which I
>> suppose it matters for the hibernate option.
>
> no, not really...

The restore-from-hibernate requires booting the kernel in a special
way to load the memory state from the swap partition. That requires
special handling from the init process and the initramfs; we had a
discussion some weeks ago about genkernel not handling this correctly.

Maybe systemd has nothing to do with restore-from-hibernate working (I
don't know); but dracut surely does. It has a module called "resume"
that seems to handle this.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


caneko at gmail

May 18, 2012, 4:45 PM

Post #7 of 8 (443 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

On Fri, May 18, 2012 at 6:36 PM, Canek Peláez Valdés <caneko [at] gmail> wrote:
> On Fri, May 18, 2012 at 5:37 PM, Volker Armin Hemmann
> <volkerarmin [at] googlemail> wrote:
>> Am Freitag, 18. Mai 2012, 17:26:10 schrieb Canek Peláez Valdés:
>>> On Fri, May 18, 2012 at 5:09 PM, Volker Armin Hemmann
>>>
>>> <volkerarmin [at] googlemail> wrote:
>>> > Am Freitag, 18. Mai 2012, 22:42:59 schrieb Ignas Anikevicius:
>>> >> On 18/05/12 20:59, Alex Schuster wrote:
>>> >> > Suspend to ram (using the hibernate-ram command from
>>> >> > sys-power/hibernate-script) seems to work better.
>>> >>
>>> >> What about pm-utils? Does it work better or worse than hibernate-script.
>>> >> I had 0 problems with it during entire usage of linux, whereas with the
>>> >> hibernate script package I had some issues...
>>> >>
>>> >> And yes, I am usually suspending to ram, but I was just thinking about
>>> >> possibilities to make my computer boot faster in the cases I really need
>>> >> to do a restart. :)
>>> >>
>>> >> Cheers,
>>> >> Ignas
>>> >
>>> > I just do echo mem > ... or click on the 'Ruhezustand' button in KDE.
>>> > Results in the same. Well working suspend-to-ram. With fglrx. X running
>>> > etc pp.
>>> With upower to suspend-to-ram you can just:
>>>
>>> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
>>> /org/freedesktop/UPower org.freedesktop.UPower.Suspend
>>>
>>
>> which is way harder to type and memorize than:
>> echo mem > /sys/power/state
>
> Yeah. However, he Dbus method works as a simple user; the
> /sys/power/state thing you can only do it as root. At least in my
> system.
>
>>> or use the "Suspend" option in GNOME 3 (GNOME uses upower). That I
>>> already knew. What I didn't knew was that
>>>
>>> dbus-send --system --print-reply --dest="org.freedesktop.UPower"
>>> /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
>>>
>>> works as well for suspend-to-disk. I hadn't hibernated my laptop in
>>> ages, it's good to know it still works. I use systemd+> dracut, which I
>>> suppose it matters for the hibernate option.
>>
>> no, not really...
>
> The restore-from-hibernate requires booting the kernel in a special
> way to load the memory state from the swap partition. That requires
> special handling from the init process and the initramfs; we had a
> discussion some weeks ago about genkernel not handling this correctly.
>
> Maybe systemd has nothing to do with restore-from-hibernate working (I
> don't know)

Oh, and less than two weeks ago systemd added suspend/hibernate targets on git:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16

Which of course is not necessary for suspend/hibernate to work, but it
is cool nonetheless.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


wonko at wonkology

May 18, 2012, 5:26 PM

Post #8 of 8 (434 views)
Permalink
Re: Re: Suspend to {RAM,Disk] [In reply to]

Ignas Anikevicius writes:

> On 18/05/12 20:59, Alex Schuster wrote:
> > Suspend to ram (using the hibernate-ram command from
> > sys-power/hibernate-script) seems to work better.
>
> What about pm-utils? Does it work better or worse than hibernate-script.
> I had 0 problems with it during entire usage of linux, whereas with the
> hibernate script package I had some issues...

I thought hibernate-ram and pm-suspend do the same... anyway, in my case
the ISDN stuff gets borked with either method. Too bad. Maybe I have to
switch to mISDN, as I cannot make the fcpci driver work to make outgoing
ISDN PPP connections. At the moment, I have to use another PC for that,
which still runs the old udev.
Or I can try another ISDN card I have (Cologne Chip Designs GmbH ISDN
network controller [HFC-PCI]), maybe I have more luck with this.

> And yes, I am usually suspending to ram, but I was just thinking about
> possibilities to make my computer boot faster in the cases I really need
> to do a restart. :)

Opening all my LUKS partitions takes so long anyway, I do not care much
about gaining a few seconds :)

Wonko

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.