i've got a strange problem featuring vlock (or more precise cehtehs
laplock.sh) and my sleep script (basically a echo mem >
/sys/power/state). The thing is, when sleeping you would want to lock
the screen. But as soon as my locking script runs echo mem >
/sys/power/state does not work anymore. In most cases it leaves a
"zombie" echo (state S+ but does not do anything) and sys/power/state
will tell you that the "device or resource is busy".
Normally both laplock and suspend work - just as soon as laplock is
active the echo does not work anymore.
After returning from Laplock and killall -9'ing that echo the laptop
goes to suspend. The problem here is that it wont wake up again
properly. Sysrq works, but the screen wont show anything, the backlight
wont come to live again.
Dario Ernst <usenet@nebuk.de> told comp.sys.laptops.thinkpad:
>i've got a strange problem featuring vlock (or more precise cehtehs
>laplock.sh) and my sleep script (basically a echo mem >
>/sys/power/state). The thing is, when sleeping you would want to lock
>the screen. But as soon as my locking script runs echo mem >
>/sys/power/state does not work anymore. In most cases it leaves a
>"zombie" echo (state S+ but does not do anything) and sys/power/state
>will tell you that the "device or resource is busy".
This is a complete guess on my part, since I don't use "laplock" (and I
use Fedora's pm-suspend to suspend my ThinkPad which does a whole bunch
of stuff besides messing with /sys/power/state).
Anyway. I notice your laplock script uses "vlock -a" to lock
the console. One of the things this command does is prevent the
kernel from being able to switch VTs. I wonder if that's what is
stopping the suspend from working (although to be honest I didn't
think /sys/power/state handled VT switches by itself). One way to
find this out is to remove the "-a" argument from the script and see
if that starts it working. Everything else that vlock does seems
completely innocent to me.
It seems to me it doesn't matter whether the console is locked while
the machine is sleeping - only when it wakes up from sleep - so I might
suggest doing the vlock just after the "echo mem > /sys/power/state" so
that it locks as soon as you wake the machine up.
--
---- Ian Collier : imc@comlab.ox.ac.uk : WWW page below
------ http://users.comlab.ox.ac.uk/ian.collier/imc.shtml
On 2007-04-30, Ian Collier <imc@comlab.ox.ac.uk> wrote:
> It seems to me it doesn't matter whether the console is locked while
> the machine is sleeping - only when it wakes up from sleep - so I might
> suggest doing the vlock just after the "echo mem > /sys/power/state" so
> that it locks as soon as you wake the machine up.
I tried that at first, the problem was - as i wrote - that the screen
would blank and not come to live again. I had to reboot the box using
Sysrq.
However now that you wrote i tried again: source `which laplock` after
the echo line in susp.
Works like a charm - don't ask me why. Simply invoking the script blanks
the screen, but source works.