LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Putting my computer to sleep (https://www.linuxquestions.org/questions/linux-hardware-18/putting-my-computer-to-sleep-63336/)

computergirl 06-02-2003 10:19 PM

Putting my computer to sleep
 
I have a question about how to put my computer on standby/sleep mode.

Before posting I searched this forum and two others as well as checking on Google. All the info I found seems to be geared to laptops, too difficult to understand, or is outdated. I also checked the man pages but it seems to only refer to how to sleep just one process at a time.

I'm getting to know quite a bit about my hardware so if I can give any more info I'll do my best.

Thank in advance for any and all help.

zmedico 06-03-2003 03:27 AM

In KDE I do this:

su
chmod u+s /usr/sbin/apmd
exit
kcontrol

Then I can adjust the sleep/standby settings in Power Control -> Laptop Battery -> Power Control

computergirl 06-03-2003 11:19 AM

Thanks for the advice, it's sounds very simple.
I actually have a desktop computer though, would your tip work for that too? I really hope so because this would be easiest method I've come across.
Thank you

zmedico 06-03-2003 03:52 PM

Quote:

Originally posted by computergirl
I actually have a desktop computer though, would your tip work for that too?
Um, my computer is on my desktop too. ;)

You have to open a terminal and set "suid root" for the "/usr/sbin/apmd" program, as mentioned above. That allows you to use the gui from the KDE Control Center (kcontrol) to make your power settings as mentioned above.

computergirl 06-03-2003 10:32 PM

I did what you said I typed su to become root then typed in the command chmod u+s /usr/sbin/apmd and hit enter, nothing went wrong, I then typed exit to get out of super user mode and typed kcontrol to launch the kde control center but when I looked at the power control options it was still only giving me the option to adjust my monitor's power settings. Nothing else.

I'm sorry to be taking up your time, and I'm probably just missing something obvious, but if you could give me some more help I'd really appreciate it.
Thank you again.

zmedico 06-04-2003 12:01 AM

Maybe you can install a module for us that enables that feature? I don't know.

rpm -qf `which kcontrol`
kdebase-3.1-13

geoff_f 06-04-2003 01:44 AM

KDE Control Centre->Power Control->Laptop Battery, Power Control Tab says to setuid /usr/bin/apm if you want to be able to choose 'suspend' or 'standby' in the dialog. (Using Mandrake 9.1, same as computergirl). Note the difference: apm, not apmd.

geoff_f 06-04-2003 02:00 AM

OK, just tried it myself - works a charm. After changing /usr/bin/apm, come back to KDE Control Center, the option is immediately available (ie, no need to log out & back in).

For the newbie (like me), perhaps it's easier to open a File Manager in Super User Mode (K->Terminals->Konsole - Super User Mode) enter the root password; navigate to /usr/bin/apm, right-click on the file, select Properties, go to Permissions tab, and put a check in the Set UID box. Click OK.

computergirl 06-04-2003 11:46 AM

Thank you to both of you for trying to help but I stiil haven't been able to get the option to show up in the kde control panel. I'm almost wondering if I need to have something installed or enabled that I don't have currently.

zmedico 06-04-2003 12:28 PM

I just did a search on google for apmd and kcontrol. I found a package called "kdeutils" that seems to have what you need.:

klaptopdaemon: battery and power management, including KControl plugins

rpm -q kdeutils
kdeutils-3.1-4

You can probably get the rpm for kdeutils from your mandrake install cd's, or download it

geoff_f 06-04-2003 08:45 PM

Is apmd running? Open Mandrake Control Center->System->DrakXServices and look at the apmd entry to see if it is running and whether it is loaded at boot. Make sure 'at boot' is checked and click on 'Start' if it is not running.

computergirl 06-04-2003 10:06 PM

I installed kdeutils and that worked to get me the option in the kde control panel but when I opened up the laptop battery module it said

"Your computer doesn't have the Linux APM (Advanced Power Management) or ACPI software installed, or doesn't have the APM kernel drivers installed - check out the Linux Laptop-HOWTO document for information on how to install APM."

So ofcourse I checked out the Linux Laptop How To and I took the chance and installed the apmd software listed. If nothing else at least I now have had the experience of installing something from source. When I installed it everything seemed to go alright but the laptop battery control module is still saying I don't have the right things installed.

Re: finding out if ampd is running, that was one of the first things I checked on. It seems it is checked to start at boot but was not running when I looked so I clicked on start to start it and nothing happened.

Thank you again though

zmedico 06-04-2003 10:59 PM

Quote:

Originally posted by computergirl
laptop battery control module is still saying I don't have the right things installed.
Your probably better off installing the apm stuff as an rpm rather than from source. That may be what the "laptop battery control module" is looking for.

Quote:

Originally posted by computergirl
finding out if ampd is running, that was one of the first things I checked on. It seems it is checked to start at boot but was not running when I looked so I clicked on start to start it and nothing happened.
On my Redhat system I could start that service by one of two ways:

/sbin/service apmd start

or

/etc/rc.d/init.d/apmd start


It's probably similar on your system.

computergirl 06-05-2003 12:02 AM

ok I got rid of the source apmd turns out it hadn't installed properly anyway and I tried the commands you gave me
I tried:

/sbin/service apmd start
and it said it couldn't find the apmd service

I then tried:
/etc/rc.d/init.d/apmd start
and nothing at all happened

I also did something I should have done MUCH sooner I checked to make sure I had apmd installed (If you've lost all patience with me at this point I understand ;)) and I not only have that installed but I also have acpi. So clearly something is wrong with the apmd service and I just can't figure out what it is.

zmedico 06-05-2003 12:08 AM

Maybe you've messed up your apmd installation. You can verify it using "rpm --verify apmd" and if it's bad you should install it again.

To find out where the script is that starts the service, you could do "rpm -ql apmd" It's probably somewhere under /etc


All times are GMT -5. The time now is 08:10 PM.