LinuxQuestions.org
Help answer threads with 0 replies.
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 08-25-2005, 07:47 PM   #16
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171

and to restart acpi, you just enter /etc/rc.d/rc.acpid restart (assuming you made rc.acpid executable and started it to begin with -- I don't think it comes enabled by default).
 
Old 08-25-2005, 07:51 PM   #17
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Jackson1995
and to restart acpi, you just enter /etc/rc.d/rc.acpid restart (assuming you made rc.acpid executable and started it to begin with -- I don't think it comes enabled by default).
Replying to your previous post, How do I know the name of the modules in order to modprobe them? nothing about acpi is loaded when i used "lsmod".

Last edited by houler; 08-25-2005 at 07:53 PM.
 
Old 08-25-2005, 08:39 PM   #18
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
Code:
modprobe battery
modprobe lid
modprobe button
Then, see if you see those modules when you do "lsmod." I am no acpi expert here, so I'm sort of guessing. I have acpi working and my 700m suspends when I push the button or close the lid and I believe you need to get acpi working for the screen to blank as well.
 
Old 08-25-2005, 08:52 PM   #19
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
modprobe lid
FATAL: Module lid not found.

The rest loaded successfully.

I did modprobed "button" and "battery" , and I also did "rc.acpid restart". The lid button still doesn't seem to function.
 
Old 08-25-2005, 09:19 PM   #20
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
I would recommend that you re-compile your kernel and compile all those acpi options into the kernel rather than as modules.
 
Old 08-26-2005, 12:01 AM   #21
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Jackson1995
I would recommend that you re-compile your kernel and compile all those acpi options into the kernel rather than as modules.
I did just that and it still doesn't work. Where do I go from here?
 
Old 08-26-2005, 09:48 AM   #22
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
If you have chmod the rc.acpid script so it is executable and you have restarted acpi and there is still no event in /var/log/messages when you close the lid or push the button, then I'm fresh out of ideas.

This guys says it should work with the default kernel in Slack 10:
http://www.pocketace.net/pocketace.p...s&ar=slackware

You may also want to look at this guy's Debian/600m page under "power management":
http://guilds.net/machines/600m/

Otherwise, I would just go to linux-laptop.net and read the other 600m pages for other distros and see how they configure acpi. It looks like there are more than 10 different pages on the 600m so there should be some good info there.

Sorry I couldn't be more help.
 
Old 08-26-2005, 10:54 AM   #23
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
I just recompiled kernel 2.6.12.5 on my lap (using slackware, of course, 10.1 by the way)
isn't the same brand (it's a hp pavilion zv5200) but might help a lot if you recompile everything associated with acpi / suspend built-in the kernel. Some few kbytes more or less... disk space isn't like a problem, is it?
 
Old 08-26-2005, 11:47 AM   #24
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Jackson1995
If you have chmod the rc.acpid script so it is executable and you have restarted acpi and there is still no event in /var/log/messages when you close the lid or push the button, then I'm fresh out of ideas.

This guys says it should work with the default kernel in Slack 10:
http://www.pocketace.net/pocketace.p...s&ar=slackware

You may also want to look at this guy's Debian/600m page under "power management":
http://guilds.net/machines/600m/

Otherwise, I would just go to linux-laptop.net and read the other 600m pages for other distros and see how they configure acpi. It looks like there are more than 10 different pages on the 600m so there should be some good info there.

Sorry I couldn't be more help.
Actually you've been alot of help. You actually stepped up to the plate and atleast tried, for that, I Thank You.

Well, I followed raska's idea and re-compiled the kernel with all the power management options compiled into the kernel.

I think we're getting somewhere. I pressed the "lid switch" and it popped up in /var/log/messages, giving me a:

Code:
Logger: ACPI action lid is not defined
Soo close, Someone please help, I have no idea where to go from here.

*EDIT* I did a search on google (duh), and found a couple of acpi scripts, I'll try those out and report how it goes.

Last edited by houler; 08-26-2005 at 11:56 AM.
 
Old 08-26-2005, 12:21 PM   #25
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
also, my questions is, why doesn't the 2.4.* default kernel, that is packed in the Slackware 10.1 cd, have this "action lid is not defined" message? I mean it just works. However, In the 2.6 Kernel...

Last edited by houler; 08-26-2005 at 12:24 PM.
 
Old 08-26-2005, 01:01 PM   #26
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
Ah, yes, now you are indeed getting somewhere since you get that message in /var/log/messages. ACPI is indeed working and it recognizes when you close your lid. It just does not know what to do.

As you suggest, you will need to work on your acpi scripts.

As to your other question, I believe the 2.4.x kernels do not use acpi, but instead use apm, the older power management function. And apm might not output an event in /var/log/messages (not sure).

Keep plugging away and keep posting. You'll get it working, no doubt, and this thread may help someone else out in the future.
 
Old 08-26-2005, 01:08 PM   #27
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
One more thing:

You will need to do 2 things in /etc/acpi -- first, you need to have a short text file defining the event and pointing to a script to blank the screen and second you will need a script to blank the screen.

So, for example, it might be something like this: In /etc/acpi/events create a text file called "blank" and put in it:

Code:
event=button/lid
action=/etc/acpi/blank.sh
Then, in /etc/acpi create a script that will blank the screen. I have a script to suspend to ram and here is what it looks like:

Code:
#!/bin/bash
lid_state=/proc/acpi/button/lid/LID0/state

test -e $lid_state || exit 0
if cat $lid_state | grep closed > /dev/null
then echo “lid closed - suspending”
chvt 1
rmmod ndiswrapper
rmmod b44
rmmod ehci_hcd
rmmod uhci_hcd
echo “mem” > /sys/power/state
modprobe i830
/root/emu/video_post 
chvt 1
chvt 7
modprobe ndiswrapper
modprobe b44
modprobe ehci_hcd
modprobe uhci_hcd
else echo “lid opened - resuming”
fi
(Yours will be very different as mine suspends to ram and then has to execute video_post to wake up the video since the video doesn't wake up on a 700m, but that might give you the gist of what you need to do.)

Call your script "blank.sh" and make it executable.

Last edited by chess; 08-26-2005 at 01:10 PM.
 
Old 08-26-2005, 04:59 PM   #28
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Jackson1995
Ah, yes, now you are indeed getting somewhere since you get that message in /var/log/messages. ACPI is indeed working and it recognizes when you close your lid. It just does not know what to do.

As you suggest, you will need to work on your acpi scripts.

As to your other question, I believe the 2.4.x kernels do not use acpi, but instead use apm, the older power management function. And apm might not output an event in /var/log/messages (not sure).

Keep plugging away and keep posting. You'll get it working, no doubt, and this thread may help someone else out in the future.
You're right, I switched to APM and disabled ACPI in my kernel, and by switching, I've accomplished my objective, to blank the screen by pressing the button. Thanks Jackson1995.

I switched back to ACPI, and now I'll be playing around with some ACPI, scripts. Maybe I can get that Blank Screen working with ACPI soon.
 
Old 08-26-2005, 05:43 PM   #29
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Original Poster
Rep: Reputation: 30
well I got it to work. The lid button now works with acpi. For those of you looking for a remedy, here is the link that I found, in our very own linuxquestions.org forum:

http://www.linuxquestions.org/questi...t=acpi+scripts

The post was made by: TFMegatron , it's about 7-8 posts down
 
Old 08-27-2005, 07:51 AM   #30
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 731

Rep: Reputation: 171Reputation: 171
Excellent! Thanks for posting the fix.
 
  


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
Sytem hang when I close laptop lid Rosewing Linux - Laptop and Netbook 0 09-18-2005 02:11 PM
screen stays on when lid shut, inspiron 9300 exodist Linux - Laptop and Netbook 4 04-30-2005 10:50 PM
APM monitor shut off/closing lid and not suspending psycovic23 Linux - Hardware 1 07-22-2004 12:43 AM
Will not startup after lid is closed WindowsVeteran Linux - Laptop and Netbook 1 03-24-2004 08:59 PM
closing laptop lid causes display to go crazy disciple061 Linux - Laptop and Netbook 0 03-20-2004 12:48 AM

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

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