LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-16-2005, 08:45 AM   #1
RBJohns
LQ Newbie
 
Registered: Nov 2004
Posts: 27

Rep: Reputation: 15
Inspiron 8500 LID switch with ACPI


I am running on a Dell Inspiron 8500. I have ACPI enabled in the kernel (2.6.11-gentoo-r8) and installed. I have found some scripts that allow me to turn off the display when the lid on the laptop is closed. The only problem is that I need to restart the ACPI service as root, and leave the xterm window open for the lid switch to function properly. If I do not restart the service the switch does not work, if I restart the service, but then close the xterm window or exit out of root, then the switch does not work. This is the post that I have been using for the scripts and the instructions: http://forums.gentoo.org/viewtopic-t...500+acpi.html. It appears that others are having this same issue as well. I have tried this command as root: "xhost +localhost" as instructed from this link: http://forums.gentoo.org/viewtopic-t...500+acpi.html, but I still have the same problem. I appreciate any assistance in this.
 
Old 05-19-2005, 01:30 PM   #2
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
What video card does the 8500 use?
 
Old 05-19-2005, 01:35 PM   #3
RBJohns
LQ Newbie
 
Registered: Nov 2004
Posts: 27

Original Poster
Rep: Reputation: 15
nVidia GeForce 4 64mb AGP 8x
 
Old 05-19-2005, 01:51 PM   #4
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
These links are bad, could you post the lidbtn scipts you are using? Possibly also do this and tell me the output. Trying pushing the lid button and post the that output also.

cat /proc/acpi/button/lid/LID/state
 
Old 05-19-2005, 02:47 PM   #5
RBJohns
LQ Newbie
 
Registered: Nov 2004
Posts: 27

Original Poster
Rep: Reputation: 15
This is the "/etc/acpi/lid.sh" script that I have:

#!/bin/sh

# /etc/acpi/lid.sh
# This script shuts off the screen when the lid-switch is pressed.
# And turns it on when it is lifted.

grep -r close /proc/acpi/button/lid/LID/state

if [ $? -eq 0 ]; then
/usr/X11R6/bin/xset dpms force off
else
/usr/X11R6/bin/xset dpms force on
fi


And this is my "/etc/acpi/events/default" script:

# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.

# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button power.*
#action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/default.sh %e



And the "/proc/acpi/button/lid/LID/state" works fine ("open" when the lid is open and "closed" when the lid is closed)
 
Old 05-19-2005, 03:02 PM   #6
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
you should change

event=.*
action=/etc/acpi/default.sh %e

to

event=button[ /]lid.*
action=sh /etc/acpi/lid.sh

as seen here

http://gentoo-wiki.com/Inspiron_8500
 
Old 05-19-2005, 04:33 PM   #7
RBJohns
LQ Newbie
 
Registered: Nov 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Sorry, I left off one line from my "/etc/acpi/events/default" script. I was connecting via SSH from work. Here is the complete script:


# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.

# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button power.*
#action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/default.sh %e


event=button[ /]lid.*
action=sh /etc/acpi/lid.sh


I have the changes that you specified already in there. Should I just delete the "event=.*" block?
 
Old 05-19-2005, 05:11 PM   #8
RBJohns
LQ Newbie
 
Registered: Nov 2004
Posts: 27

Original Poster
Rep: Reputation: 15
I commented out the generic "event=.*" block but the problem still remains. I must restart the ACPI service as root, and I cannot log out of the root terminal. If I close the terminal window or I type "exit" to get back to my user, the lid switch does not kill the display. When I am under my name, the ".../button/LID/lid/state" file still works (it shows open when the lid is open and closed when the lid is closed), but the display does not turn off.
 
Old 05-21-2005, 11:17 AM   #9
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
I am wondering if this is a problem with Xauthority. Try to run the xset command in a console as root. Before I found the radeon tool for my laptop I also had the same problem. If it is the same problem you should see this error.

laptop:/home/tfunicron# xset dpms force off
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xset: unable to open display ":0.0"


I have been searching around to try and find a solution for this. Although giving root authority to X while you are logged in as yourself will be unsecure. I am trying to see if maybe you could run the command with an "su 'username' -c at the start. This would switch to you run the command and then switch back to root after it is done. Also since the xhost +localhost doesn't work for you I would remove it because that is also unsecure. xhost -localhost. If you do not get this error then I am sorry because I have no idea what is going on. Good luck.

I just tried it on my laptop as root and it seemed to work for me. So try this and just run it in the console.

su 'your username' -c xset dpms force off

Also do you have dpms enabled in your /etc/XF86Config-4
You should have:

Option "DPMS" "True"
 
  


Reply


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
slack 10.1 acpi lid blanking issue... o2_sparx Linux - Laptop and Netbook 9 07-01-2005 01:57 AM
screen stays on when lid shut, inspiron 9300 exodist Linux - Laptop and Netbook 4 04-30-2005 11:50 PM
Inspiron 9100 with ati 9700 screen not shutting off with lid TFMegatron Linux - Laptop and Netbook 0 12-04-2004 04:07 AM
lid close generates no acpi event mannyzen76 Linux - Laptop and Netbook 0 02-22-2004 12:37 AM
Is about ACPI for Dell Inspiron 8500 laptop chico58 Linux - Software 1 11-28-2003 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 06:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration