Help - Search - Members - Calendar
Full Version: Suspend When Closing Display
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
daniel3000
Hello,

when I close the zaurus, it does not suspend (pdaXrom 1.1.0beta3).
How can this be configured?
I'd like it to suspend when closing, except when mplayer or xmms are running.
Is this possible?

Thanks a lot
daniel
fiferboy
I would like to know this as well, along with how to make it so it will not auto-suspend when connected to the network. All these features are available in Cacko/Sharp ROMs, does anybody know how they are achieved?
desertrat
QUOTE(daniel3000 @ Aug 30 2006, 04:57 PM)
when I close the zaurus, it does not suspend (pdaXrom 1.1.0beta3).
How can this be configured?

There is a tiny switch on the hinge recess, this gets depressed when the screen/lid is closed (both in landscape and portrait mode). The keycode for this switch (on c3100) is 110, you'll just have to map it to do something useful.
fiferboy
Okay, I figured out the suspend when closed part. Edit /etc/sysconfig/clamshell/closed.d/100x11scr (on my C1000) and change the line AFTER

CODE
closed() {
(line 13 on my C1000)

to

CODE
/usr/bin/apm -s


This worked for me, and I haven't had any problems yet (although I haven't tested it yet.

Let me know if it works for you. Also, if anybody knows how to disable suspend on network connect, let me know.

Thanks.
ZDevil
QUOTE(fiferboy @ Aug 30 2006, 09:54 PM)
Okay, I figured out the suspend when closed part.  Edit /etc/sysconfig/clamshell/closed.d/100x11scr (on my C1000) and change the line AFTER

CODE
closed() {
(line 13 on my C1000)

to

CODE
/usr/bin/apm -s


*


Do you mean adding this line or replacing "/usr/X11R6/bin/xset s activate" by this line? Just want to make sure first to avoid any undesirable results. Thanks! smile.gif
daniel3000
QUOTE(ZDevil @ Aug 31 2006, 09:27 AM)
Do you mean adding this line or replacing "/usr/X11R6/bin/xset s activate" by this line? Just want to make sure first to avoid any undesirable results. Thanks!  smile.gif
*


Well, I guess the xset command should be removed.
xset s activate is the command to activate the screensaver.
On the Zaurus it switches off the backlight (try it!)
Indeed, when closing the Z the screen goes off, but the Z stays active.

So if you keep the xset line, the screen would probably be switched off after you resumed the machine, which is not what you want.

daniel
daniel3000
Now how can we check in that scipt, if some music player or network action is running so

xset s activate

is executed instead of apm -s in such situations?

A simple ps | grep xmms is too weak, as when a player is running it does not mean it is playing...

Checking audio / network device locks?
Checking for data streams over these devices?

Any ideas?

Maybe we could even enhance that mode by letting the HDD LED blink when the lid is closed but the Z does not suspend. Can this be achieved in some way?

daniel
ZDevil
QUOTE(daniel3000 @ Aug 31 2006, 09:56 AM)
QUOTE(ZDevil @ Aug 31 2006, 09:27 AM)
Do you mean adding this line or replacing "/usr/X11R6/bin/xset s activate" by this line? Just want to make sure first to avoid any undesirable results. Thanks!  smile.gif
*


Well, I guess the xset command should be removed.
xset s activate is the command to activate the screensaver.
On the Zaurus it switches off the backlight (try it!)
Indeed, when closing the Z the screen goes off, but the Z stays active.

So if you keep the xset line, the screen would probably be switched off after you resumed the machine, which is not what you want.

daniel
*



Hmm. Just tried that tweak. Nothing happened. Screen doesn't go off when closed (w/ and w/o AC supply). Any hint?
daniel3000
QUOTE(ZDevil @ Aug 31 2006, 10:33 AM)
Hmm. Just tried that tweak. Nothing happened. Screen doesn't go off when closed (w/ and w/o AC supply). Any hint?
*


Different result here:

Without the tweak, screen goes off when closed and on again when opened (instantly! No delay when opening, so it is not obvious that the screen was off when you open it).

With the tweak, the Z really suspends when I close it.
However, when I open it and press On/Off or any other key, nothing happens.
I cannot turn it on anymore. unsure.gif
Also a connected USB hub doesn't show light on its LED, so the Z is really still off, not only its screen.

Any hint? biggrin.gif

daniel
fiferboy
QUOTE(daniel3000 @ Aug 31 2006, 12:36 AM)
QUOTE(ZDevil @ Aug 31 2006, 10:33 AM)
Hmm. Just tried that tweak. Nothing happened. Screen doesn't go off when closed (w/ and w/o AC supply). Any hint?
*


Different result here:

Without the tweak, screen goes off when closed and on again when opened (instantly! No delay when opening, so it is not obvious that the screen was off when you open it).

With the tweak, the Z really suspends when I close it.
However, when I open it and press On/Off or any other key, nothing happens.
I cannot turn it on anymore. unsure.gif
Also a connected USB hub doesn't show light on its LED, so the Z is really still off, not only its screen.

Any hint? biggrin.gif

daniel
*




When I close the Zaurus, it takes a few seconds (~10) to fully suspend. If I wait for this to fully happen before turning the power on, it generally works without problems. If I try interrupting this, it is very hard to actaully get to turn on (although I have had it happen once after trying several cycle of on/off). Try waiting for the full suspend before powering up.
daniel3000
QUOTE(fiferboy @ Aug 31 2006, 01:46 PM)
When I close the Zaurus, it takes a few seconds (~10) to fully suspend.  If I wait for this to fully happen before turning the power on, it generally works without problems.  If I try interrupting this, it is very hard to actaully get to turn on (although I have had it happen once after trying several cycle of on/off).  Try waiting for the full suspend before powering up.
*



Ah, now I seem to have found the problem:
I have waited long enough.
But: This happens only when I have the USB hub with RF mouse connected during suspend and resume. So maybe it is a power issue.
Only strange that it doesn't happen when I hit OnOff instead of closing / opening the lid.

However, although I have commented out the xset s activate line, the screen goes blank once after I switch the Z on after the suspend.
Does this happen to you, too?

I think I wil go back to the xset -s variant, as this one works reliably, keeps players going, and it is only a small step to do a suspend in addition: Just hit the OnOff button while closing the lid.
Something I can get used to without any problem.
And should I forget: No big deal, as if the backlight is switched off, power drain is minimal and battery should last for many hours. And auto-suspend should suspend it anyway after some minutes.

daniel
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.