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 12-09-2008, 11:41 AM   #1
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
slackware-12.2rc1 lid doesn't turn of screen.[solved]


This is not an question it's an solution.

After upgrading to slackware-current (12.2) my screen didn't turn off when i closed my lid, it worked on terminal but not in X.
I use ati as driver in xorg.conf on my compaq Presario 2800 laptop.
I traced it to xf86-video-ati-6.9.0.
It seems that they stripped that part from the driver and it should now be controlled with acpi.

So how did i get it to work?
The first thing i did was that i made an lid.sh script that i placed in /etc/acpi/ (both the radeontool and vbetool worked but not everyone has an driver that works with radeontool so i added vbetool as an alternativ)

Code:
#!/bin/sh
# /etc/acpi/lid.sh
# Turn off light if closed and turn it on if opened.
if [ `grep closed /proc/acpi/button/lid/*/state | wc -l` -ne 0 ];
then
  /usr/sbin/radeontool light off
  #/usr/sbin/vbetool dpms off
else
  /usr/sbin/radeontool light on
  #/usr/sbin/vbetool dpms on
fi
exit 0
Then make it executable 'chmod 755 /etc/acpi/lid.sh'

Now we need to edit /etc/acpi/acpi_handler.sh and add lid to it, right under the power) entry so it looks like this.
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) /etc/acpi/lid.sh
         ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac
Now since we don't want to reboot we send this command
kill -SIGHUP `pidof acpid`
Thats it, i hope it helps someone.
 
Old 12-09-2008, 11:44 AM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Nice. I did a similar thing to get the screen to lock with xscreensaver and suspend to ram when I shut the lid.
 
  


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
laptop screen doesn't turn back on after i close the lid elninio Slackware 5 07-23-2008 09:16 AM
turn lid button of laurentwahl Linux - Newbie 2 06-02-2005 12:45 AM
turn lid button of laurentwahl Linux - Laptop and Netbook 1 05-04-2005 01:28 PM
turn lid button of laurentwahl Linux - General 2 05-01-2005 11:40 AM
ACPI: edit lid.sh to blank screen, turn backlight off, no-suspend ????? Outabux Debian 5 11-15-2004 08:11 AM

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

All times are GMT -5. The time now is 04:01 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