View previous topic :: View next topic |
Author |
Message |
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Fri Apr 22, 2011 10:16 pm Post subject: |
|
|
h2sammo,
Try the tuxonice kernel
Suspend to disk and suspend to RAM are really intended for laptops but there is no reason why you sould not try it on a desktop too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sat Apr 23, 2011 4:10 am Post subject: |
|
|
You can also use s2disk from sys-power/suspend in a stock kernel if you enable the hibernation options. |
|
Back to top |
|
|
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
Posted: Sat Apr 23, 2011 12:48 pm Post subject: |
|
|
if i use stock kernel and sys-power/suspend do i have to set a hibernation partition in the kernel (i saw an option for it).
what should i put there? /dev/sdax or the swap partition? does it matter?
do i have to edit grub even if i use sys-power/suspend and stock kernel or suspend will make those changes for me? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sat Apr 23, 2011 5:35 pm Post subject: |
|
|
h2sammo wrote: | if i use stock kernel and sys-power/suspend do i have to set a hibernation partition in the kernel (i saw an option for it). | You do not need to set one, but it is easier to set it in the kernel configuration than to configure it at runtime.
h2sammo wrote: | what should i put there? /dev/sdax or the swap partition? | Specify the swap partition.
h2sammo wrote: | do i have to edit grub even if i use sys-power/suspend and stock kernel or suspend will make those changes for me? | Grub does not need to be modified at all to work with s2disk based suspend, but you do need to have the resume kernel know to resume, either via an initramfs or a command line entry. I use an initramfs since I hibernate to encrypted swap. |
|
Back to top |
|
|
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
Posted: Sat Apr 23, 2011 7:38 pm Post subject: |
|
|
i went ahead with the gentoo preferred tuxonice. i followed instructions but on reboot, tuxonice loads with an error and trying the hibernate command fails with an error as well, any ideas?
Code: |
localhost bobby # dmesg | grep TuxOnIce
[ 1.204514] TuxOnIce 3.2-rc2 (http://tuxonice.net)
[ 1.209782] TuxOnIce: No matching enabled allocator found. Resuming disabled.
localhost bobby # hibernate
/usr/share/hibernate/scriptlets.d/tuxonice: line 525: echo: write error: Device or resource busy |
one thing different from the setup was that i cold not find the following in my kernel so i did not enable it:
Quote: | Processor type and features --->
[*] Support for suspend on SMP and hot-pluggable CPUs
|
also, hibernate command is not recognized from my user, only from root.
thx |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Thu Apr 28, 2011 4:50 pm Post subject: |
|
|
h2sammo,
Please post your kernel .config file and grub.conf
If you have an initrd - how was it made? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
aronparsons Tux's lil' helper
Joined: 04 Oct 2004 Posts: 117 Location: Virginia
|
Posted: Thu Apr 28, 2011 5:00 pm Post subject: |
|
|
emerge pm-utils
/usr/sbin/pm-suspend for suspend-to-ram
/usr/sbin/pm-hibernate for hibernate
Make sure you have the support enabled in your kernel for whichever suspend method you want to use. Suspend works quite well in current kernels; TuxOnIce shouldn't be necessary these days. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Thu Apr 28, 2011 6:03 pm Post subject: |
|
|
w/ a str8 vanilla kernel Code: | sync; echo mem > /sys/power/state | suspends and Code: | sync; echo disk > /sys/power/state | hibernates. |
|
Back to top |
|
|
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
Posted: Fri Apr 29, 2011 1:26 am Post subject: |
|
|
NeddySeagoon wrote: | h2sammo,
Please post your kernel .config file and grub.conf
If you have an initrd - how was it made? |
.config: http://ompldr.org/vOGd2eA
Code: |
default 0
timeout 2
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.36-tuxonice-r3
root (hd0,0)
kernel /boot/2.6.36-tuxonice-r3 video=uvesafb:ywrap,mtrr:3,1280x1024-32@70 root=/dev/sda3 resume=s$
title Gentoo Linux 2.6.36-gentoo-r5
root (hd0,0)
kernel /boot/2.6.36-gentoo-r5 video=uvesafb:ywrap,mtrr:3,1280x1024-32@70 root=/dev/sda3
# vim:ft=conf:
title Windows XP
rootnoverify (hd0,3)
makeactive
chainloader +1
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54239 Location: 56N 3W
|
Posted: Fri Apr 29, 2011 5:15 pm Post subject: |
|
|
h2sammo,
This truncated part of grub.conf
should say resume=swap:/dev/<your_swap>
You need to use the command Code: | nano -w /boot/grub/grub.conf | to avoid lines being truncated.
Your kernel looks ok. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
Posted: Sat Apr 30, 2011 2:01 pm Post subject: |
|
|
thank you i have fixed that:
Code: | title Gentoo Linux 2.6.36-tuxonice-r3
root (hd0,0)
kernel /boot/2.6.36-tuxonice-r3 video=uvesafb:ywrap,mtrr:3,1280x1024-32@70 root=/dev/sda3 resume=swap:/dev/sda2 |
based on
Code: |
Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 83 Linux
/dev/sda2 80325 16868249 8393962+ 82 Linux swap / Solaris
/dev/sda3 16868250 217279124 100205437+ 83 Linux
/dev/sda4 * 217279125 390716864 86718870 7 HPFS/NTFS |
but it still complains:
Code: | localhost bobby # hibernate
/usr/share/hibernate/scriptlets.d/tuxonice: line 525: echo: write error: Device or resource busy |
any ideas? |
|
Back to top |
|
|
h2sammo Veteran
Joined: 11 Mar 2009 Posts: 1025 Location: Michigan
|
Posted: Sat Jun 04, 2011 5:22 pm Post subject: |
|
|
bump |
|
Back to top |
|
|
qdii Tux's lil' helper
Joined: 19 Sep 2009 Posts: 106 Location: Madrid
|
Posted: Mon Dec 05, 2011 9:00 am Post subject: |
|
|
Hey did you find a solution for that? I’m having the same problem here. |
|
Back to top |
|
|
ShanaXXII Apprentice
Joined: 29 Jun 2014 Posts: 283 Location: Canada
|
Posted: Mon Sep 29, 2014 2:02 am Post subject: |
|
|
toralf wrote: | w/ a str8 vanilla kernel Code: | sync; echo mem > /sys/power/state | suspends and Code: | sync; echo disk > /sys/power/state | hibernates. |
Can I do this without being root?
I can't seem to execute this command even with sudo.
Only root(su) seemed to work |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Mon Sep 29, 2014 2:59 am Post subject: |
|
|
Please do not resurrect retired threads for off-topic questions. You must be privileged to suspend or hibernate the machine. You did not explain how you failed, but you most likely made the standard mistake of most sudo users. Redirections are processed by the unprivileged shell, before sudo runs. |
|
Back to top |
|
|
ShanaXXII Apprentice
Joined: 29 Jun 2014 Posts: 283 Location: Canada
|
Posted: Mon Sep 29, 2014 11:22 am Post subject: |
|
|
Hu wrote: | Please do not resurrect retired threads for off-topic questions. You must be privileged to suspend or hibernate the machine. You did not explain how you failed, but you most likely made the standard mistake of most sudo users. Redirections are processed by the unprivileged shell, before sudo runs. |
What does that mean?
and is it bad to resurrect retired threads? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Mon Sep 29, 2014 3:48 pm Post subject: |
|
|
ShanaXXII, though it was great that you searched for a similar problem, but your problem deserves a new posting "create a new thread" because it is of a different aspect than of the original thread creator, and can be confusing to people subscribed to the thread.
Anyway, to clarify the redirection problem Hu hinted at, these two methods should work for you to write while in a regular user shell as /sys/power/state requires root to be written to:
sync; sudo sh -c 'echo mem > /sys/power/state'
or
sync; echo mem | sudo tee /sys/power/state _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
ShanaXXII Apprentice
Joined: 29 Jun 2014 Posts: 283 Location: Canada
|
Posted: Mon Sep 29, 2014 4:07 pm Post subject: |
|
|
eccerr0r wrote: | ShanaXXII, though it was great that you searched for a similar problem, but your problem deserves a new posting "create a new thread" because it is of a different aspect than of the original thread creator, and can be confusing to people subscribed to the thread.
Anyway, to clarify the redirection problem Hu hinted at, these two methods should work for you to write while in a regular user shell as /sys/power/state requires root to be written to:
sync; sudo sh -c 'echo mem > /sys/power/state'
or
sync; echo mem | sudo tee /sys/power/state |
Oh, okay. Thank you very much |
|
Back to top |
|
|
|