View previous topic :: View next topic |
Author |
Message |
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Wed Aug 27, 2003 7:24 pm Post subject: shortcut to put ibook to sleep? |
|
|
In OS X, I can hit ctrl-m, hit the down arrow a few times, then hit enter on the go to sleep option.
in linux, I can run snooze on the command line as root, but:
Is there an easy way to just click on something or maybe a hot key to put my ibook to sleep? (without closing the lid)
I see that klaptop can use /usr/sbin/apm to suspend, but it doesn't seem to support pmud.
a setuid root perl script which runs 'snooze' (added to my menu or kicker or even just the mini-commandline history) could work but I was wondering if anybody had come up with something nicer. _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
rojaro l33t
Joined: 06 May 2002 Posts: 732
|
Posted: Wed Aug 27, 2003 8:09 pm Post subject: |
|
|
yes, there is. you can define special keyboard requests in /etc/inittab and assign programs to react. check the inittab man page (look for kbrequest). _________________ A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970) |
|
Back to top |
|
|
soebbi Tux's lil' helper
Joined: 30 Mar 2003 Posts: 93 Location: Stadtlohn, Germany
|
Posted: Wed Aug 27, 2003 8:22 pm Post subject: |
|
|
My iBook goes to sleep when i press the Power-button. Have you tried that? _________________ "Even though Mac Users may be only 10% of market, always remember we are the top 10%"
- Douglas Adams |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Wed Aug 27, 2003 8:24 pm Post subject: |
|
|
the power button works for me! it can't get any more convenient then that. thanks! _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
Lycander Guru
Joined: 10 Apr 2003 Posts: 468
|
Posted: Wed Aug 27, 2003 8:30 pm Post subject: |
|
|
Are you using pbbuttonsd? The default action for a quick single press of the power button is to go to sleep, as soebbi says. In /etc/pbbuttonsd.conf is where you specify what button to press and a delay before it happens, which is important because holding power button down too long and you know what happens
BTW pbbuttonsd can takeover for pmud. _________________ * Blessing /dev/hda2 with holy penguin pee |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Wed Aug 27, 2003 8:56 pm Post subject: |
|
|
I'm still running both pmud and pbbuttonsd. in my /etc/pbbuttonsd.conf file, I found these lines:
Code: |
SleepKey = 116
SleepKeyDelay = no ; yes = dangerous, if the power key is used to trigger sleep
|
I just give the button a firm press but don't hold it down at all.
as a test, I just shut pmud down, and everything seems to work still. now I'm wondering why I was running pmud at all? _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Thu Aug 28, 2003 5:13 am Post subject: |
|
|
some pmud observations: without pmud, gtkpbbuttons continues to work on resume.
but, if pmud isn't running, my ibook won't suspend when I close the lid. it will suspend if I push the power button though.
so I guess I will continue to run pmud too. _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
Lycander Guru
Joined: 10 Apr 2003 Posts: 468
|
Posted: Thu Aug 28, 2003 5:50 am Post subject: |
|
|
As far as I can tell, pmud is not running on my iBook, I think you know my hardware by now
I check System Monitor/KSysGaurd (process tree) no pmud process found. Then did:
# /etc/init.d/pmud status
* status: stopped
Look in /etc/power.conf and make sure -k or -K are not specified in PMUD_FLAGS at the bottom after the instructions. Mine is just set to -a (enable apmd compatibility mode).
Then in /etc/pbbuttonsd.conf at the bottom where it says "replace_pmud" I set it to "yes". This needs to be set in order for pbbuttonsd to take over power management for you. And then my iBook sleeps when I close the lib, wakes up when lid opens. Hope this helps. _________________ * Blessing /dev/hda2 with holy penguin pee |
|
Back to top |
|
|
cselkirk Apprentice
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Fri Aug 29, 2003 12:47 pm Post subject: |
|
|
zojas wrote: | now I'm wondering why I was running pmud at all? |
Basically pmud has better support for events, /etc/pwrctl-local can not only change cpu-frequency scaling, load and unload modules, adjust brightness .. it can also restart pbbuttonsd on wake <wink>
pbbuttonsd, has 'Script_ProfChanged=' but it's simply not as flexable. _________________ cn=cselkirk,dc=xs4all,dc=nl |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Fri Aug 29, 2003 12:50 pm Post subject: |
|
|
My experiment with running just pbbuttonsd didn't work out too well. half the time it won't suspend when I close the lid, so I plan to go back to running both pmud & pbbuttonsd _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Wed Mar 16, 2005 8:39 pm Post subject: |
|
|
Hi I hope someone can help me. I have a new G4 iBook and pbbuttonsd running. The iBook goes to sleep after a certain time, it also goes sleep when I close the lid. But I can't get ANY keys working. I got all keycodes with showkey, and they're right in pbbuttonsd.conf, but they just don't work. I'm really stuck. Is there anything in the kernel that I might have forgotten?
Tom |
|
Back to top |
|
|
|