 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

30th September 2005, 12:58 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 50

|
|
|
how to sleep/suspend on desktop?
I've searched through these forums, and on Google, for instructions on how to suspend my system, which is a desktop and not a laptop.
The only instructions I've found have been for laptops, and I haven't been able to get them to work on my system at all.
I'd like to be able to suspend to RAM (and/or disk, but RAM especially) with FC4 on my desktop. I don't want to have to boot my system each night, and I don't like the idea of burning all that electricity through the workday and the night (and most of most evenings) when I'm not using the machine.
So,
- Is suspend possible with FC4 on a desktop?
- Do I need something not available through core or extras?
- How do I do it?
Any help greatly appreciated.
/Dan
|

4th October 2005, 11:02 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
Dan,
Did you see the following post? I found it useful...
http://fedoraforum.org/forum/showthr...hlight=suspend
But now I am trying to figure out how to have the machine automatically wake up at a certain time...if you find anything please post it.
Ken
Last edited by kenm_uk; 4th October 2005 at 11:23 AM.
|

4th October 2005, 01:45 PM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: philadelphia, pa
Posts: 172

|
|
|
Hey there,
Good luck on your search. The reason that you are finding more info on lappys is that they do not have unlimited power like a desktop does. There is usually no reason to sleep a desktop. Which leads into my next question: Why do you need to do this ?
regards,
scoon
|

4th October 2005, 02:29 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
|
Scoon,
Thanks for your reply. The reason I want to sleep my server is that I do not want to run it 24/7 because it would be a waste of power and wear on the machine. I use it to host a multiplayer game which I want to play only in the evenings from a remote location. So I am trying to figure out how to get the box to sleep until 7pm and then start up to serve the multiplayer game.
Anyway, I think I have found the solution:
echo YYYY-MM-DD HH:MM:SS > /proc/acpi/alarm
and then sleep the machine with
echo "mem" > /sys/power/state
I tried it once and it put my server to sleep and woke it up on time. What would be a bit more ideal is if I could somehow wake it remotely on demand. Like Wake-on-LAN. but I don't think I can do this through a DSL-604+ router over the internet.
If you have any thoughts or recommendations please share.
Cheers,
Ken
|

4th October 2005, 03:02 PM
|
 |
Registered User
|
|
Join Date: May 2005
Posts: 534

|
|
|
Have you thought about setting up a cron job? Maybe have it run the commands you listed above at 3 in the morning or something? That way it wouldn't be running all day and would give you plenty of time to play your game.
|

4th October 2005, 07:57 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
|
brandor,
Thanks for your reply. A cron job would do the trick for adding the next alarm time to the alarm folder and then running the suspend command. I am just a bit too new to Linux to have worked out how to write my own scripts. Any thoughts on where I could find such a script? Basically all I need it to do is to put in today's date with the time 19:00 in the alarm file and then run the echo "mem > /sys/power/state command to be run by cron at 3am. BUT...if I happen to be using my server at 3am (either locally or remotely) it would be nice to see a warning which would allow me to abort the shutdown.
Anyway that is TOO MUCH for me to do now. But if you could recommend a good book or site on how to write a script that would be much appreciated.
Cheers,
Ken
|

5th October 2005, 03:28 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 50

|
|
|
This command does absolutely nothing on my machine:
echo "mem" > /sys/power/state
At least nothing that I can observe. It certainly doesn't put it to sleep. I assume this is all system-dependent. I'm on a Dell 4600 (ICH5-based) running FC4.
To answer another's post, I want to suspend my desktop to save power. Shutting down and later rebooting would also save power, but it's very inconvenient. Of course it's a bigger issue on a laptop, but it's still relevant for desktops.
/Dan
|

5th October 2005, 09:10 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
Dan,
I am just a newbie so not sure if I'll be of much help. I'll tell you what I have read and maybe oters will comment.
First, I think your motherboard must be acpi compatible (which I believe yours is). Second, it may need to be enabled in the BIOS settings. Third, you may need to be running the acpid deamon (not sure).
I found the following site of use:
http://acpi.sourceforge.net/
Ken
|

5th October 2005, 12:56 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 50

|
|
|
> First, I think your motherboard must be acpi compatible (which I believe yours is).
I believe so, too. Both suspend to RAM and suspend to disk work on Windows XP.
> Second, it may need to be enabled in the BIOS settings.
Well, works in Windows. Same BIOS.
> Third, you may need to be running the acpid deamon (not sure).
That's definitely running.
Thanks for the site, I'll check it out.
/Dan
|

6th October 2005, 04:15 AM
|
|
Registered User
|
|
Join Date: Sep 2005
Posts: 423

|
|
|
This works on my HP DV4000....
Here is some code that works on my HP DV4000.
I was having problems with the screen not "waking up" after
a suspension, but I found (quite by accident) that changing
the console to a straight text console and then back to the
X console that the video would come back on...
Jerry
[jerry@localhost ~]$ more standby.c
// standby.c
// Author: Jerry LeVan
// Date: Sept 9,2005
// Build: make standby
// Env: HP DV4000, Fedora Core 4, a reasonable version of acpi
// Build: make standby
// sudo chown root standby
// sudo chmod u+s standby
// A short program to put the laptop
// to sleep. Toggling the door switch
// or hitting a key will awake the computer.
#include <unistd.h>
#include <stdlib.h>
int main (int argc , char** argv)
{
char * cmd = "/bin/sh" ;
char * theOpt = "-c";
char * theArg =
"sync;sync; /sbin/modprobe -r uhci_hcd ehci_hcd ; \
echo mem > /sys/power/state ; \
/sbin/modprobe uhci_hcd ; /sbin/modprobe ehci_hcd ; \
chvt 1 ; chvt 7 ; /sbin/ifup eth1 ; /usr/sbin/anacron -s ";
// the setuid will ensure that the exec'ed shell will run as root
setuid(0);
// Get the ball rollin...
int status=execl(cmd,cmd,theOpt,theArg,NULL);
(void)exit(0);
}
|

7th October 2005, 02:16 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
|
I am trying to get my machine to wake at a particular hour (say 8pm). I used:
echo 2005-10-(*DATE*) 20:00:00 > /etc/acpi/alarm
which seemed to work once or twice a few days ago but is no longer waking my server at the designated time.
Does anyone know what the problem might be?
Cheers,
Ken
P.S. I read something about how rebooting the machine affects the RTC which causes the alarm not to wake the system. But I did not quite understand what they meant or if that is affecting me.
|

7th October 2005, 06:19 PM
|
|
Registered User
|
|
Join Date: Sep 2005
Posts: 423

|
|
Quote:
|
Originally Posted by kenm_uk
I am trying to get my machine to wake at a particular hour (say 8pm). I used:
echo 2005-10-(*DATE*) 20:00:00 > /etc/acpi/alarm
which seemed to work once or twice a few days ago but is no longer waking my server at the designated time.
Does anyone know what the problem might be?
Cheers,
Ken
|
Hi Ken,
Where did you find the doc that echoing the date/time to /etc/acpi/alarm would
awake the machine?
I can do this on my MacOS X machine ( using the power manager) but have not
been able to figure out how to set a wakeup call in FC4.
Thanks,
Jerry
|

8th October 2005, 02:33 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
|
GrayFox,
I think that "/etc/acpi/alarm" may have been a typo. My previous post read "/proc/acpi/alarm". I will try that and see if my machine wakes on time. Will let you know.
Ken
|

8th October 2005, 05:30 AM
|
 |
Administrator
|
|
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224

|
|
|
Hey,
I have the same problem as in the old post. echo "mem" just sounds like it shuts down the harddrives. Nothing happens. Right away, screen goes blank, and HD's shut off. Not much time to save everything to memory... Anyway, when I hit the power button again, my CRT monitor won't come back on even though the computer will. I use a Dell and i can standby in XP so i know it works...
Firewing1
Last edited by Firewing1; 1st September 2006 at 09:49 PM.
|

8th October 2005, 12:22 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Location: London
Posts: 86

|
|
|
Firewing1,
By "mem" I think that the machine goes to sleep and stores everything in the RAM. Since everything already is in the RAM there is not much for it to do. My machine shuts off the fans, hard drives, and the only sign that it is still somewhat on is that the power light blinks (indicating it is asleep).
When I wake the machine, I am also having difficulty getting it to restart my USB mouse/keyboard and to start up my monitor (on a Nvidia card). I may have found a solution to the USB problem, but am still having problems with the video issue.
But I am just a newbie trying to figure this out as I go along. Let me know what/if you find.
Ken
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Sleep/Suspend/Hibernate
|
chrisndebb |
Using Fedora |
2 |
4th June 2006 05:38 AM |
Current GMT-time: 07:28 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|