[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apm / standby


I have two queries regarding apm on my laptop:

After a certain amount of time of inactivity, I get the following error:

apm: set display standby: Unable to enter requested state

Any ideas where this error comes from?

Second thing, since the X servers cannot restore properly after a suspend,
I want to tell my laptop to go to vt1 (`chvt 1`) just before it is
suspended or enters sleep mode, if it is currently in X. I tried to play
with `tty`, comparisons, ||, && and `chvt 1` in a bash script in
/etc/apm/event.d, but due to my lack of a solid understanding of
comparisons/"if statements" in bash scripts I was unable to get it working
correctly. I suppose I should also have checked the first parameter... at
the moment my laptop switches to vt 1 at any event, even pluggin in/out
the power...

What the script says at the moment is:

case $( /usr/bin/tty ) in
 (*) chvt -t1 ;;

Should there be a type of "break" statement as in C/C++ case statements,
or is there something else I did wrong? Or is my approach to a solution
completely wrong?

I think this should be included in the apmd package, probably as an
option, that is disabled by default. Should I submit a wishlist bug
report? In the mean time, how do I fix it up?

Hugo van der Merwe

Reply to: