LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-26-2005, 05:13 PM   #46
robert2513
Member
 
Registered: Oct 2004
Posts: 35

Original Poster
Rep: Reputation: 15

Ok, got some interesting things to report on this post.

First off, to answer your question, yes the /proc/acpi/button/lid/LID/state is reporting the correct state of the lid button.

After I added the set -x and set +x to lidbtn.sh and ran it, the following was displayed:
Code:
[robert@localhost ~]$ su
Password:
[root@localhost robert]# cd /etc/acpi
[root@localhost acpi]# ./lidbtn.sh
++ cat /proc/acpi/button/lid/LID/state
++ awk '{print $2}'
+ state=open
+ logger $'\342i' 'LID state open'
+ '[' open = closed ']'
+ /usr/sbin/radeontool light on
+ set +x
[root@localhost acpi]#
Now comes the strange part. I

When I pressed down on the lid button, and ran the script again, the screen shut off. When I released the lid button, nothing happened. In order for me to turn the screen on (without restarting) I typed ./lidbtn.sh, hit enter, and the screen turned on again.

Thinking that maybe the lid was not pressing down on the lid button when it was closed, I attached a USB keyboard to the laptop and closed the lid. The screen stayed on until I typed ./lidbtn.sh, then it shut off. When I opened the lid, again, it did not turn on so I just ran the script again.

I hope i explained everything clearly. if not, just let me know.
By the way, thanks for helping with this problem again.
 
Old 08-27-2005, 12:35 AM   #47
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
Okay,

First, your welcome.

Second, Is the file /etc/acpi/events/lidbtn owned by root/root?

There is one other place to look for output about what is going on. The logger bit in the lidbtn.sh script writes to the system log. But there should be a acpid log in /var/log. Check there to see what it is saying everytime the button is pushed. Mine says this with the set -x stuff in there:

[Fri Aug 26 10:29:02 2005] starting up
[Fri Aug 26 10:29:02 2005] 2 rules loaded
[Fri Aug 26 10:38:35 2005] exiting
[Fri Aug 26 10:49:45 2005] starting up
[Fri Aug 26 10:49:45 2005] 2 rules loaded
[Fri Aug 26 10:53:21 2005] received event "button/lid LID 00000080 00000001"
[Fri Aug 26 10:53:21 2005] executing action "/etc/acpi/lidbtn.sh"
[Fri Aug 26 10:53:21 2005] BEGIN HANDLER MESSAGES
++ cat /proc/acpi/button/lid/LID/state
++ awk '{print $2}'
+ state=closed
+ logger -i 'LID state closed'
+ '[' closed = closed ']'
+ /usr/sbin/radeontool light off
+ set +x
[Fri Aug 26 10:53:21 2005] END HANDLER MESSAGES
[Fri Aug 26 10:53:21 2005] action exited with status 0
[Fri Aug 26 10:53:21 2005] completed event "button/lid LID 00000080 00000001"
[Fri Aug 26 10:53:24 2005] received event "button/lid LID 00000080 00000002"
[Fri Aug 26 10:53:24 2005] executing action "/etc/acpi/lidbtn.sh"
[Fri Aug 26 10:53:24 2005] BEGIN HANDLER MESSAGES
++ cat /proc/acpi/button/lid/LID/state
++ awk '{print $2}'
+ state=open
+ logger -i 'LID state open'
+ '[' open = closed ']'
+ /usr/sbin/radeontool light on
+ set +x
[Fri Aug 26 10:53:24 2005] END HANDLER MESSAGES
[Fri Aug 26 10:53:24 2005] action exited with status 0
[Fri Aug 26 10:53:24 2005] completed event "button/lid LID 00000080 00000002"
[Fri Aug 26 11:01:29 2005] exiting

The only thing I can think of is that this event is not being seen by acpid. I would check ownership.
I was looking around and some peoples event lines differ. The acpid site says to enter is like it says in the acpid log. So maybe try and change it to:
event=button/lid
or
event=button/lid*

Good luck with all of that.
 
Old 08-28-2005, 05:33 PM   #48
robert2513
Member
 
Registered: Oct 2004
Posts: 35

Original Poster
Rep: Reputation: 15
Yes, the file is owned by root / root.

While checking the log file /var/log/acpid, I found something that I think may be causing the problem. Here is a bit of the log:

[Fri Aug 26 17:09:08 2005] action exited with status 0
[Fri Aug 26 17:09:08 2005] completed event "button/lid LID 00000080 00000001"
[Fri Aug 26 17:09:11 2005] received event "button/lid LID 00000080 00000002"
[Fri Aug 26 17:09:11 2005] notifying client 2678[0:0]
[Fri Aug 26 17:09:11 2005] executing action "/etc/acpi/lidbtn.sh"
[Fri Aug 26 17:09:11 2005] BEGIN HANDLER MESSAGES
++ cat /proc/acpi/button/lid/LID/state
++ awk '{print $2}'
+ state=open
+ logger $'\342i' 'LID state open'
+ '[' open = closed ']'
+ /usr/sbin/radeontool light on
Radeon hardware not found in lspci output.
+ set +x
[Fri Aug 26 17:09:11 2005] END HANDLER MESSAGES

The part I put in bold is the part that I found interesting. What could this mean? I checked the hardware browser in Gnome (since I'm not sure how to view that information in the command line) and under video cards, it has listed ATI Technologies Inc RV350 [Mobility Radeon 9600 M10].
 
Old 08-28-2005, 07:32 PM   #49
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
That is very confusing. It works fine if you run the script separately. I don't know what could be causing your problem. To list that stuff as is said just type lspci in a console. Something weird is happening.

I am curious to find out what this is referring to.

[Fri Aug 26 17:09:11 2005] notifying client 2678[0:0]

Mine doesn’t make mention of this at all.

Other than that I don’t know.
 
Old 08-28-2005, 09:21 PM   #50
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Just to make sure here is the state for the lid changing from open to close to open?

To me it sounds like there is only one input detected but something down the line in acpi is not resetting. I have a similiar issue. I detect the lid button but it never changes state. It always says open. So I ended up creating three scripts to do this the fisrt is the main script that is either has the contents of the last two. What it does is flip flop back and forth.

Look over a back reply in this post here. http://www.linuxquestions.org/questi...99#post1383299

Brian1
 
Old 08-31-2005, 05:45 PM   #51
robert2513
Member
 
Registered: Oct 2004
Posts: 35

Original Poster
Rep: Reputation: 15
Started school this week and the past couple of days have been hectic. Thats reason I have not posted back for awhile.

Anyway, heres what I've done since my last post. I performed a clean install of Fedora, created the two scrpits, lidbtn and lidbtn.sh and installed radeontool. Still no luck with the screen shutting off. I rechecked the log and this what it said;

Code:
[Wed Aug 31 17:42:23 2005] starting up
[Wed Aug 31 17:42:23 2005] 1 rule loaded
[Wed Aug 31 18:00:04 2005] client connected from 2842[0:0]
[Wed Aug 31 18:00:04 2005] 1 client rule loaded
[Wed Aug 31 18:08:16 2005] exiting
[Wed Aug 31 18:08:16 2005] starting up
[Wed Aug 31 18:08:16 2005] 2 rules loaded
[Wed Aug 31 18:08:18 2005] received event "button/lid LID 00000080 00000001"
[Wed Aug 31 18:08:18 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:08:18 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:08:18 2005] END HANDLER MESSAGES
[Wed Aug 31 18:08:18 2005] action exited with status 255
[Wed Aug 31 18:08:18 2005] completed event "button/lid LID 00000080 00000001"
[Wed Aug 31 18:08:20 2005] received event "button/lid LID 00000080 00000002"
[Wed Aug 31 18:08:20 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:08:20 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:08:20 2005] END HANDLER MESSAGES
[Wed Aug 31 18:08:20 2005] action exited with status 255
[Wed Aug 31 18:08:20 2005] completed event "button/lid LID 00000080 00000002"
[Wed Aug 31 18:08:23 2005] received event "button/lid LID 00000080 00000003"
[Wed Aug 31 18:08:23 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:08:23 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:08:23 2005] END HANDLER MESSAGES
[Wed Aug 31 18:08:23 2005] action exited with status 255
[Wed Aug 31 18:08:23 2005] completed event "button/lid LID 00000080 00000003"
[Wed Aug 31 18:08:23 2005] received event "button/lid LID 00000080 00000004"
[Wed Aug 31 18:08:23 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:08:23 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:08:23 2005] END HANDLER MESSAGES
[Wed Aug 31 18:08:23 2005] action exited with status 255
[Wed Aug 31 18:08:23 2005] completed event "button/lid LID 00000080 00000004"
[Wed Aug 31 18:12:24 2005] exiting
[Wed Aug 31 18:12:24 2005] starting up
[Wed Aug 31 18:12:24 2005] 1 rule loaded
[Wed Aug 31 18:12:26 2005] received event "button/lid LID 00000080 00000005"
[Wed Aug 31 18:12:26 2005] completed event "button/lid LID 00000080 00000005"
[Wed Aug 31 18:12:30 2005] received event "button/lid LID 00000080 00000006"
[Wed Aug 31 18:12:30 2005] completed event "button/lid LID 00000080 00000006"
[Wed Aug 31 18:16:21 2005] exiting
[Wed Aug 31 18:17:49 2005] starting up
[Wed Aug 31 18:17:49 2005] 2 rules loaded
[Wed Aug 31 18:17:54 2005] client connected from 2577[0:0]
[Wed Aug 31 18:17:54 2005] 1 client rule loaded
[Wed Aug 31 18:27:20 2005] received event "button/lid LID 00000080 00000001"
[Wed Aug 31 18:27:20 2005] notifying client 2577[0:0]
[Wed Aug 31 18:27:20 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:27:20 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:27:20 2005] END HANDLER MESSAGES
[Wed Aug 31 18:27:20 2005] action exited with status 255
[Wed Aug 31 18:27:20 2005] completed event "button/lid LID 00000080 00000001"
[Wed Aug 31 18:27:20 2005] received event "button/lid LID 00000080 00000002"
[Wed Aug 31 18:27:20 2005] notifying client 2577[0:0]
[Wed Aug 31 18:27:20 2005] executing action "/etc/acpi/lidbtn.sh"
[Wed Aug 31 18:27:20 2005] BEGIN HANDLER MESSAGES
Radeon hardware not found in lspci output.
[Wed Aug 31 18:27:20 2005] END HANDLER MESSAGES
[Wed Aug 31 18:27:20 2005] action exited with status 255
[Wed Aug 31 18:27:20 2005] completed event "button/lid LID 00000080 00000002"
It still says "Radeon hardware not found in lspci output." and the thing TFMegatron pointed out "Notifying Client."

I checked lspci and the following entry was there:

01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]

I am going to try installing the ATI driver for my Radeon video card sometime soon and see what happens. Hopefully that will correct the problem (keeping fingures crossed) and as far as the notifiying client thing, I will have to look into that as well.

Brian1: Yes the lid is changing from open to close.
Code:
[robert@localhost acpi]$ cat /proc/acpi/button/lid/LID/state
state:      open
[robert@localhost acpi]$ cat /proc/acpi/button/lid/LID/state
state:      closed
[robert@localhost acpi]$
I'll also try your scrpits as well.
 
Old 08-31-2005, 09:18 PM   #52
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
That is odd about the lspci problem. I did some searching. Here is possibly something of interest?

Quote:
Re: Some things that used to work in FC3 but don't in FC4: ACPI

--------------------------------------------------------------------------------

From: Matthew Saltzman <mjs ces clemson edu>
To: For users of Fedora Core releases <fedora-list redhat com>
Subject: Re: Some things that used to work in FC3 but don't in FC4: ACPI
Date: Wed, 29 Jun 2005 09:43:47 -0400 (EDT)

--------------------------------------------------------------------------------

On Tue, 28 Jun 2005, Matthew Saltzman wrote:


The ACPI scripts for my Thinkpad don't work as they used to. For example, the script I use to turn off the backlight touches or removes a file to indicate whether the backlight is on or off. In FC4, the script is apparently not allowed to touch the file in either /etc/acpi/actions (where it used to) or even in /var/tmp (where I changed it to).

Also, radeontool appears to fail to detect the Radeon in lspci when run form the script, but it works fine when run from the command line as root.
The error is different from the one that usually occurs when running radeontool as non-root, which is "can't open /dev/mem Are you root?"
This error is "Radeon hardware not found in lspci output."

This issue also affects my suspend script, which is not permitted to write to /proc/acpi/sleep.

Any ideas what's going on here?
To follow myself up:

As I kind of suspected, this is an SELinux issue--turn off enforcing mode and everything works as expected. So how can I give these scripts access to the files they need to touch/write to?


Thanks.


--
Matthew Saltzman
Did more looking around on SELinux enforcing mode.

Quote:
Q: How do I temporarily turn off enforcing mode without having to reboot?

A: This situation usually arises when you can't perform an action that is being prevented by policy. Run the command setenforce 0 to turn off enforcing mode in real time. When you are finished, run setenforce 1 to turn enforcing back on.

sysadm_r role required
You must issue the setenforce command with the sysadm_r role; to do so, use the newrole command. Alternately, if you switch to root using su -, you gain the sysadm_r role automatically.


Q: How do I turn system-call auditing on/off at boot?

A: Add audit=1 to your kernel command line to turn system-call auditing on. Add audit=0 to your kernel command line to turn system-call auditing off.

System-call auditing is off by default. When on, it provides information about the system-call that was executing when SELinux generated a denied message. This may be helpful when debugging policy.

I am sure it wouldn't be very secure but I suppose you could add this to the top and bottom of the lidbtn.sh script to take care of the auditing problem.

setenforce 0
setenforce 1

I would check into this as well. I am not familiar with FC so I don't know what this SELinux is, but the problem seems to be inline with yours. So I am not much help. Sorry

Good luck.

Quote:
Q: How do I get status info about my SELinux installation?

A: As root, execute the command /usr/sbin/sestatus -v. For more information, refer to the sestatus(8) manual page.
 
Old 09-09-2005, 04:36 PM   #53
robert2513
Member
 
Registered: Oct 2004
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
. . .So I am not much help. Sorry
Actually, TFMegatron, you were a BIG help once again. I played around with SELinux and checked a couple Fedora forums and it appears that others are having similar probelms and this is the suggested solution.

Now the LCD screen shuts off like it's suppose to.

Thanks again.
Robert2513
 
Old 09-09-2005, 06:43 PM   #54
TFMegatron
Member
 
Registered: May 2004
Distribution: Debian Sid, Windows XP Pro
Posts: 47

Rep: Reputation: 15
Good job. Glad to be of some help.
 
  


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
LCD screen and X demiurge Linux - Software 3 03-29-2005 07:26 AM
How to get laptop LCD to shut off deviant03 Linux - Hardware 0 01-25-2005 06:39 AM
LCD screen minm Linux - Newbie 3 07-24-2004 06:47 PM
blurry lcd screen fobius Linux - Hardware 3 06-18-2004 01:48 AM
Unable to configure screen resolution for 15.2" LCD screen in Fedore Core 1 schu Linux - Newbie 3 01-02-2004 05:39 PM

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

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