LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-26-2008, 02:59 PM   #1
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
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?
 
Old 09-26-2008, 03:09 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Did you check the xlock permissions on both system ? (ls -al /usr/bin/xlock)
Same xlock version ? (xlock -version)
 
Old 09-26-2008, 08:13 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Yes they are the same
 
Old 09-26-2008, 08:23 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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 ?
 
Old 09-27-2008, 12:22 AM   #5
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-27-2008, 12:39 AM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
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.
 
Old 09-27-2008, 05:37 AM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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 ?
 
Old 09-27-2008, 06:06 AM   #8
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-27-2008, 12:22 PM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
xscreensaver-command -lock

works so far
 
Old 09-27-2008, 12:45 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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 ?
 
Old 09-27-2008, 01:28 PM   #11
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz explain Suspend to Disk and Suspend to Ram pkhera_2001 Linux - Newbie 2 02-18-2008 07:23 AM
suspend to ram problem. ghostofsin Debian 1 03-21-2007 02:59 PM
Suspend to RAM (S3) not working BCarey Linux - Laptop and Netbook 10 11-21-2006 06:18 PM
suspend to ram works at last!!!! jwn7 Linux - Laptop and Netbook 4 03-31-2005 06:42 AM
Xlock / Xlock more with enterprise authentication yasir15 Linux - Software 0 04-20-2004 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration