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 10-29-2008, 04:39 PM   #1
bl0tt0
Member
 
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 178

Rep: Reputation: 62
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, 02:03 AM   #2
robel
Member
 
Registered: Oct 2008
Location: Norway
Distribution: Slackware
Posts: 77

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, 02:05 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

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/acpi_handler.sh:

Code:
#!/bin/sh
 # Default acpi script that takes an entry for all actions
 
 IFS=${IFS}/
 set $@
 
 case "$1" in
   button)
     case "$2" in
       power) /sbin/init 0
          ;;
         lid) su dive -c /home/dive/scripts/suspendlock
          ;;
       *) logger "ACPI action $2 is not defined"
          ;;
     esac
     ;;
   *)
     logger "ACPI group $1 / action $2 is not defined"
     ;;
 esac
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 02:15 AM.
 
Old 10-31-2008, 02:26 AM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

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.
 
  


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

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

All times are GMT -5. The time now is 12:15 AM.

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