Help - Search - Members - Calendar
Full Version: Closing Lid Setting
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > Debian
jpmatrix
what is the defalut behaviour of closing the lid on debian zaurus ?
doest it suspend or does it just shut the screen off ?
where could we set that behaviour ?

dlj0
QUOTE(jpmatrix @ Dec 3 2007, 06:05 AM) *
what is the defalut behaviour of closing the lid on debian zaurus ?
doest it suspend or does it just shut the screen off ?
where could we set that behaviour ?


Mine doesn't even seem to shut the screen off, and I have had numerous instances where, carrying the machine in my pocket, something will touch the button and it will wake up, and drain the battery.

I would definitely want a suspend-on-closed option.
jpmatrix
QUOTE(dlj0 @ Dec 3 2007, 03:24 PM) *
QUOTE(jpmatrix @ Dec 3 2007, 06:05 AM) *
what is the defalut behaviour of closing the lid on debian zaurus ?
doest it suspend or does it just shut the screen off ?
where could we set that behaviour ?


Mine doesn't even seem to shut the screen off, and I have had numerous instances where, carrying the machine in my pocket, something will touch the button and it will wake up, and drain the battery.

I would definitely want a suspend-on-closed option.


definitely!
and (like angstrom) a ask-code-on-resume would be great too smile.gif in case we loose the Zaurus....
flux
unfortunatly, for the moment, the "key" for when you're closing the lid isn't mapped... (try xev, and press it, you'll see). it's an issue a friend of mine dealed some years ago with his new keyboard, which had keys that wasn't map either.
I'll check my irclog, and i'll post it there... if someone wants to try, he'll have a begin. Sorry, i don't have the time to do it now myself... If no ones does, maybe i'll check in some weeks.
2or0
If you install zaurusd package, you can set the behaviour of closing the lid. It is very simple.
In /etc/zaurusd/hinge-close.d/00-backlight-off, replace "${ZD_BINDIR}/bl off" with "apm -s" to suspend Z when you close the lid.
jpmatrix
QUOTE(2or0 @ Dec 3 2007, 08:49 PM) *
If you install zaurusd package, you can set the behaviour of closing the lid. It is very simple.
In /etc/zaurusd/hinge-close.d/00-backlight-off, replace "${ZD_BINDIR}/bl off" with "apm -s" to suspend Z when you close the lid.


many thanks to point out the direction!
however i have no bl script in /usr/bin
is it tied to display-brightness.sh ?
flux
ok... pb solved...
make an add in the wiki... then, i'll give it to you guys !
2or0
QUOTE(jpmatrix @ Dec 3 2007, 12:14 PM) *
QUOTE(2or0 @ Dec 3 2007, 08:49 PM) *
If you install zaurusd package, you can set the behaviour of closing the lid. It is very simple.
In /etc/zaurusd/hinge-close.d/00-backlight-off, replace "${ZD_BINDIR}/bl off" with "apm -s" to suspend Z when you close the lid.


many thanks to point out the direction!
however i have no bl script in /usr/bin
is it tied to display-brightness.sh ?


The command "bl" is in gpe-conf package. You can turn on or off the screen with bl which is slightly different from display-brightness.sh. tongue.gif
speculatrix
not sure if this helps, but I hacked up some scripts to blank/dim and unblank/undim the display for Angstrom... some notes here:
http://lists.linuxtogo.org/pipermail/angst...une/000312.html
flux
http://www.oesf.org/index.php?title=1-For_Debian_EABI

item 8 "closing lid setup"
citro
Hi, any idea why zaurusd works on icewm but not on xfce4? Is there anything I have to change?

the screen rotates while using icewm as the window manager by swiveling the lid, but when I use xfce4 in the same system it doesn't. any ideas? I have both window managers (icewm and xfce4) installed in eabi in my C3200. I tried both my own from scratch installation as per Q17 on the wiki as well as using the rootfs from Zdevil and I get the same results.

Thanks...
dlj0
QUOTE(citro @ Dec 5 2007, 01:48 PM) *
Hi, any idea why zaurusd works on icewm but not on xfce4? Is there anything I have to change?

the screen rotates while using icewm as the window manager by swiveling the lid, but when I use xfce4 in the same system it doesn't. any ideas?


I had a slightly different reaction. I couldn't get the change in script to take effect, then I realized that zaurusd was not running. When I got it running, it rotated the screen (a second time, since I start the server with the angle set), but the size of windows in each screen seemed to presume the opposite orientation, so it was not usable. I have gotten rid of the screen-rotate settings -- well, using the machine with the "portrait mode" where the keys are hidden is kinda pointless without a virtual keyboard, anyway -- but kept the "closed" settings, so now it automatically suspends when I close the screen --- should help with accidental re-activation, but it doesn't. If you hit the suspend/resume key with the machine suspended, and the lid closed, it starts up and stays up, even with zaurusd running and apm -s the command for when the lid is closed. Close it again and it suspends.
jpmatrix
QUOTE(dlj0 @ Dec 6 2007, 02:22 AM) *
-- well, using the machine with the "portrait mode" where the keys are hidden is kinda pointless without a virtual keyboard, anyway --


solution for that (virtual keyboard) is here :

http://www.oesf.org/forum/index.php?showtopic=24993

jpmatrix
what is the difference between

echo 1 > /sys/class/backlight/corgi-bl/power

and

apm -s

?

is it a low sleep instead of deep sleep ? smile.gif
speculatrix
QUOTE(jpmatrix @ Dec 6 2007, 03:26 PM) *
what is the difference between

echo 1 > /sys/class/backlight/corgi-bl/power

and

apm -s

?

is it a low sleep instead of deep sleep ? smile.gif


the "echo" line turns off the power to the backlight.. this is separate to the brightness control which has the bug where setting backlight to minimum can cause it to go off - probably a hardware problem and a different setting again!

I put both backlight off and minimum brightness in my screen-close script so that you can leave the Z running in as low power mode as possible yet play mp3s etc.
jpmatrix
QUOTE(speculatrix @ Dec 6 2007, 05:34 PM) *
QUOTE(jpmatrix @ Dec 6 2007, 03:26 PM) *
what is the difference between

echo 1 > /sys/class/backlight/corgi-bl/power

and

apm -s

?

is it a low sleep instead of deep sleep ? smile.gif


the "echo" line turns off the power to the backlight.. this is separate to the brightness control which has the bug where setting backlight to minimum can cause it to go off - probably a hardware problem and a different setting again!

I put both backlight off and minimum brightness in my screen-close script so that you can leave the Z running in as low power mode as possible yet play mp3s etc.


ok
thanks for this great news! i try it right now!
jpmatrix
QUOTE(speculatrix @ Dec 6 2007, 05:34 PM) *
echo 1 > /sys/class/backlight/corgi-bl/power


it seems this is in fact a directory with "wakeup" in it
i guess we should read :

echo 1 > /sys/class/backlight/corgi-bl/power/wakeup

i try!
jpmatrix
QUOTE(jpmatrix @ Dec 6 2007, 08:36 PM) *
QUOTE(speculatrix @ Dec 6 2007, 05:34 PM) *
echo 1 > /sys/class/backlight/corgi-bl/power


it seems this is in fact a directory with "wakeup" in it
i guess we should read :

echo 1 > /sys/class/backlight/corgi-bl/power/wakeup

i try!


no luck.
there's also a /sys/class/backlight/corgi-bl/bl_power but i've permission denied trying to echo in it....
any help?
dlj0
QUOTE(jpmatrix @ Dec 6 2007, 02:04 AM) *
QUOTE(dlj0 @ Dec 6 2007, 02:22 AM) *
-- well, using the machine with the "portrait mode" where the keys are hidden is kinda pointless without a virtual keyboard, anyway --


solution for that (virtual keyboard) is here :

http://www.oesf.org/forum/index.php?showtopic=24993


OK, I have it all set up and running correctly, though I did have to install a catalan config file (english was not available....). OK, since I will probably learn some Catalan next Spring anyway, I guess that is good. But weird.

However, every time I re-boot or login, I have to re-start /etc/init.d/zaurusd in order to straighten out the screen. There is some sort of error message on the screen if I kill the X server about Xlib. If I had to guess I would say that I need to run the zaurusd script after the X server starts, but that is not the way it happens.

I could straighten out the server by replacing the angle option on the call to the server --- currently it is exec /usr/bin/Xfbdev -screen 480x640 "$@" but was exec /usr/bin/Xfbdev -screen 480x640@270 "$@" before I re-instituted zaurusd. But this it not available for the xdm screen, and not when I first login, either. I have to start the daemon again, even though it is in /etc/rc2.d

Any clues? Where in the start order is your /etc/rc2.d/S**zaurusd (that is, what goes where the ** is)? Does this all work for someone? In order to get the shifted screen for the closed mode, I need to fix this.
jpmatrix
QUOTE(dlj0 @ Dec 7 2007, 06:14 AM) *
However, every time I re-boot or login, I have to re-start /etc/init.d/zaurusd in order to straighten out the screen. There is some sort of error message on the screen if I kill the X server about Xlib. If I had to guess I would say that I need to run the zaurusd script after the X server starts, but that is not the way it happens.


yes, i've same problem and when i try to load it after X loads i've some permission problems, although login to X with root...
i'm thinking about replacing our whole /etc/zaurusd directory with the one from latest angstrom...as i run angstrom kernel...

citro
QUOTE(jpmatrix @ Dec 6 2007, 02:44 PM) *
QUOTE(jpmatrix @ Dec 6 2007, 08:36 PM) *
QUOTE(speculatrix @ Dec 6 2007, 05:34 PM) *
echo 1 > /sys/class/backlight/corgi-bl/power


it seems this is in fact a directory with "wakeup" in it
i guess we should read :

echo 1 > /sys/class/backlight/corgi-bl/power/wakeup

i try!


no luck.
there's also a /sys/class/backlight/corgi-bl/bl_power but i've permission denied trying to echo in it....
any help?


the correct command is

echo 0 > /sys/class/backlight/corgi-bl/brightness

this will turn off the backlight... then when you open the lid again, simply press Fn+4 to increase the bright.
jpmatrix
little problem : when you close the lid outside of X, the screens shut off. but when you open it again it remains dark smile.gif
any way to correct that ?
LinuxGadget
Strange blink.gif , it's working perfectly on my Z.

(using echo 31 >/sys/class/backlight/corgi-bl/brightness in /etc/zaurus.d/hinge-landscape/00-backlight-on and /etc/zaurus.d/hinge-portrait/00-backlight-on )

QUOTE(jpmatrix @ Dec 13 2007, 06:58 PM) *
little problem : when you close the lid outside of X, the screens shut off. but when you open it again it remains dark smile.gif
any way to correct that ?

scottlfa
Indeed, on mine too.
jpmatrix
QUOTE(LinuxGadget @ Dec 18 2007, 06:53 PM) *
Strange blink.gif , it's working perfectly on my Z.

(using echo 31 >/sys/class/backlight/corgi-bl/brightness in /etc/zaurus.d/hinge-landscape/00-backlight-on and /etc/zaurus.d/hinge-portrait/00-backlight-on )

QUOTE(jpmatrix @ Dec 13 2007, 06:58 PM) *
little problem : when you close the lid outside of X, the screens shut off. but when you open it again it remains dark smile.gif
any way to correct that ?



yeah yeah, i took the zaurusd directory from angstrom and it apparently needs some tweaking wink.gif
i'm about to succeed in that wink.gif
LinuxGadget
In addition: zaurusd wasn't starting on my Z while booting, so i did ln -s /etc/init.d/zaurus.d /etc/rc2.d/S31zaurusd cool.gif


QUOTE(jpmatrix @ Dec 18 2007, 10:14 PM) *
QUOTE(LinuxGadget @ Dec 18 2007, 06:53 PM) *
Strange blink.gif , it's working perfectly on my Z.

(using echo 31 >/sys/class/backlight/corgi-bl/brightness in /etc/zaurus.d/hinge-landscape/00-backlight-on and /etc/zaurus.d/hinge-portrait/00-backlight-on )

QUOTE(jpmatrix @ Dec 13 2007, 06:58 PM) *
little problem : when you close the lid outside of X, the screens shut off. but when you open it again it remains dark smile.gif
any way to correct that ?



yeah yeah, i took the zaurusd directory from angstrom and it apparently needs some tweaking wink.gif
i'm about to succeed in that wink.gif


scottlfa
apt-get install rcconf

The app allows you to easily set what startup services will run, zaurusd is not usually set to start at boot. I think it runs when X is triggered and closed down when you exit it. I could be wrong though. The app though is very useful.
LinuxGadget
Great rolleyes.gif , been looking for sysv-rc-conf laugh.gif (i'm running sidux on my box)

QUOTE(scottlfa @ Dec 19 2007, 02:19 AM) *
apt-get install rcconf

The app allows you to easily set what startup services will run, zaurusd is not usually set to start at boot. I think it runs when X is triggered and closed down when you exit it. I could be wrong though. The app though is very useful.

gojira
QUOTE(dlj0 @ Dec 4 2007, 01:24 AM) *
I have had numerous instances where, carrying the machine in my pocket, something will touch the button and it will wake up, and drain the battery.


yeah, me too. is there any way to poll the hinge switch to see if the lid is closed? then it'd be easy to test on resume and just suspend again
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.