Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-29-2008, 05:39 PM   #1
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 158

Rep: Reputation: 26
kscreensaver no longer locks screen on suspend to ram in 12.1

The subject pretty much says it all.

I upgraded my installation from 12.0 to 12.1 on a thinkpad t42p, and now the screen doesn't lock when I close the lid. I never used the acpi functions built into kde before, because I found some custom scripts that worked just fine. In 12.0, the screen would lock on a lid event, but now it opens back up to my desktop. Has anyone else had this issue. If so, how did you fix it?
Old 10-31-2008, 03:03 AM   #2
Registered: Oct 2008
Location: Norway
Distribution: Slackware
Posts: 72

Rep: Reputation: 19
I think you need a key event for the lid close key and do something like this:

echo mem > /sys/power/state

I had to do a echo 3 > /proc/sys/kernel/acpi_video_flags in rc.local in order to be able to restore the screen from a suspend to memory.
Old 10-31-2008, 03:05 AM   #3
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,391

Rep: Reputation: Disabled
I've just been looking into doing this. I usually run a script manually but to have the script run when the lid is closed you need to edit /etc/acpi/

 # Default acpi script that takes an entry for all actions
 set $@
 case "$1" in
     case "$2" in
       power) /sbin/init 0
         lid) su dive -c /home/dive/scripts/suspendlock
       *) logger "ACPI action $2 is not defined"
     logger "ACPI group $1 / action $2 is not defined"
The lid line points to my script which contains the suspend commands and xscreensaver command (rather than kscreensaver). You need the su -c or xscreensaver will complain and go into an endless loop saying it can't open display.

Of course you will also need to turn off the thinkpad lid option in kde control centre to use the acpi handler or there will be conflicts I should imagine.

Hope it's useful for you.

Last edited by dive; 10-31-2008 at 03:15 AM.
Old 10-31-2008, 03:26 AM   #4
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,391

Rep: Reputation: Disabled
By the way, I looked at kde options but couldn't find any option to start kscreensaver after resuming, so I imagine they have changed that. If there is a way I would also like to know because I've noticed that xlock doesn't work on resume on my T42 so I had to use 'xscreensaver-command -lock' with a while loop to make sure that no user commands/programs are executed until a pass is entered, which is a completely untidy hack.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:23 AM
screen brightness funny after suspend-to-ram samwise17 Slackware 6 11-17-2007 05:42 AM
Another suspend-to-RAM problem coldsalmon Linux - Laptop and Netbook 16 08-14-2006 10:57 PM
blank screen on suspend to RAM recovery bl0tt0 Slackware 3 04-27-2006 11:19 AM
suse pro 9.1: no longer boots after kernel upgrade (X locks up) abelikoff SUSE / openSUSE 18 03-02-2005 11:22 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:17 PM.

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