LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Xlock closes with no password needed after suspend to ram (https://www.linuxquestions.org/questions/slackware-14/xlock-closes-with-no-password-needed-after-suspend-to-ram-672576/)

dive 09-26-2008 02:59 PM

Xlock closes with no password needed after suspend to ram
 
This is a strange one. I recently bought a Thinkpad T42 to replace my old T21. Pretty much the same setup on both with Slack 12.1

I use exactly the same script to suspend to ram which has an xlock statement in it to require a log in in after resuming. This works fine on the T21 but I find on the T42 xlock will allow access to the desktop just by clicking mouse - ie it doesn't ask for a pass. Stranger still, when I try to test this by suspending and resuming straight away it works fine, but when I suspend and leave the laptop off for a while it doesn't work as it should.

Has anyone else found this problem and have any solution or ideas?

keefaz 09-26-2008 03:09 PM

Did you check the xlock permissions on both system ? (ls -al /usr/bin/xlock)
Same xlock version ? (xlock -version)

dive 09-26-2008 08:13 PM

Yes they are the same

keefaz 09-26-2008 08:23 PM

Maybe a power management issue, like the suspend event does not trigger the xlock call on the Thinkpad T42 ? I never tried something like this, could you tell how you have configured your suspend system ?

dive 09-27-2008 12:22 AM

Code:

dive@DarkerStar(~/scripts) cat suspendlock
#!/bin/sh

killall -q artsd # need to reload sound system & modules
killall -q xfce-mcs-manager # and xfce wm theme

sync # write to disk just in case
echo -n mem > /sys/power/state # suspend

xlock +nolock # testing +nolock setting

recyclemods # script to rmmod & modprobe sound modules
xfce-mcs-manager # restart xfce wm theme
settime # script to set time from ntp server
aplay ~/sounds/chat2.wav # a little ding to let us know we are back

Added some comments so you can see what does what. I just run this script from xfce menu.

dive 09-27-2008 12:39 AM

Quote:

Originally Posted by keefaz (Post 3292952)
Maybe a power management issue, like the suspend event does not trigger the xlock call on the Thinkpad T42 ? I never tried something like this, could you tell how you have configured your suspend system ?

xlock does run - but password is bypassed. I'm trying out the -/+nolock option at the moment.

keefaz 09-27-2008 05:37 AM

What is the output with: cat /sys/power/state on your system ?
(just for checking if mem is available)
Quote:

Originally Posted by dive
Stranger still, when I try to test this by suspending and resuming straight away it works fine, but when I suspend and leave the laptop off for a while it doesn't work as it should.

Could you ellaborate a bit, you mean it doesn't resume after some time ?

dive 09-27-2008 06:06 AM

Theres nothing wrong with the suspension itself - that works fine - it's just xlock isnt working. I am going to try xscreensaver-command -lock to see if that works.

dive 09-27-2008 12:22 PM

xscreensaver-command -lock

works so far

keefaz 09-27-2008 12:45 PM

Glad you found a solution :)
Just to be sure, when you enter:

ls -l /usr/bin/xlock /usr/bin/xscreensaver
... both programs have the same permissions, no ?

dive 09-27-2008 01:28 PM

Yes both perms are the same. I can't explain it unless it's something to do with different kernel versions/hardware.


All times are GMT -5. The time now is 08:57 AM.