LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-07-2006, 08:21 PM   #1
bl0tt0
Member
 
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 158

Rep: Reputation: 26
ibm-acpi on Slackware


I'm slowly getting Slackware configured on my thinkpad t42, but something I have yet to get working is the power management. I've compiled my own kernel with the ibm-acpi driver built-in, as I understand that this is what allows you to set up the buttons on a thinkpad to put the machine into standby or hibernation, but it still requires some configuring to get it to work right. Can anybody give me a clue as to how I can get this working?

Thank you
 
Old 01-07-2006, 10:58 PM   #2
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
It's been a while since I've configured acpi on my R40, but this page at Think-wiki may have some helpful info.

-geo
 
Old 01-08-2006, 09:26 AM   #3
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
i used apm instead on my thinkpad and it worked well. the only thing i don't have is temperature monitoring, but i couldn't get that to work under acpi anyway. i think it needed the "extras" driver or something, but the temps might not even have worked for R40 with that, according to this: http://ibm-acpi.sourceforge.net/

anyway, apm is very simple. you just make sure it's in the kernel, and put an append line in your bootloader (append="acpi=off apm=on"). start the daemon at boot (/usr/sbin/apmd), and that's basically it. all the FN keys, suspend, suspend to ram, suspend on lid close, screen blanking, kb light, etc. work on mine without any further configuration. gl
 
Old 01-08-2006, 10:57 PM   #4
bl0tt0
Member
 
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 158

Original Poster
Rep: Reputation: 26
Ok, I've managed to make a step forward. I had to fiddle a little bit with the example for configuring ibm-acpi to sleep on lid closure provided by thinkwiki, but it's working now. Though I left out the sleep 5 portion of the line that puts the machine to sleep, as well as the switching to console lines (worked fine without 'em, which is to say only worked when I removed those lines). I'm happy with the sleep function working, but I have yet to get the other buttons working right. A large part of the problem is that I am rather new to linux, and I'm still learning the ins and outs of script writing, much less the variety of commands to do certain things. Can anyone give me a good reference on how to write scripts to control the various events through acpid?
 
Old 01-09-2006, 09:41 AM   #5
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
OK. I am starting to figure out how I got acpi to do what I want. It's been a while and my memory ain't no good.

Quote:
I have yet to get the other buttons working right.
Do you mean the buttons with the little blue icons on them that you use by holding down the Fn key?

If so, you need to let the operating system know that you'd like to use them for acpi functions. You can do this by typing (as root)

Code:
echo enable > /proc/acpi/ibm/hotkey
This line can also be entered into one of the startup scripts in /etc/rc.d. I have it as a line in /etc/rc.d/rc.local. If it's not in a startup script it will have to be run manually every time you boot up, which defeats the point, right?

Then in your /etc/acpi/events directory you can include a script for each button. For example, I have a file that is called "FNF4.conf" that looks like this:

Code:
# With IBM Hotkeys enabled FN+F4
event=ibm/hotkey HKEY 00000080 00001004

action=/usr/local/bin/acpitool -s
The action calls a program called acpitool that is avilable here, which enables me to suspend the system easily. For every button you will have a separate file in /etc/acpid/events called FNFx.conf (where x is the number of the Function button with a blue icon on it).

To get the appropriate HKEY number run
Code:
echo enable > /proc/acpi/ibm/hotkey
and then
Code:
tail -f /var/log/acpid
Then when you press the Fn + other key combinations and you should see the event labels appear.

The same pinciples apply to the other buttons, like the power button. On my system /etc/acpi/events/powerbutton.conf looks like this:

Code:
# Shutdown
event=button/power.*
action=/sbin/shutdown -h now
That way I can turn off the machine cleanly by pressing the power button.

Hope that helps.

-geomatt

Last edited by geomatt; 01-09-2006 at 09:45 AM.
 
Old 01-09-2006, 09:48 AM   #6
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
or, you could just use apm and not have to do any of that. but please, knock yourself out.
 
Old 01-09-2006, 09:59 AM   #7
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
Quote:
you could just use apm and not have to do any of that
You are probably right there, but I seem to remember that there was some reason why apm wasn't working for me and that led me into all of that mess in the first place. I just have no idea what that reason was.

cheers,
-geomatt
 
Old 01-09-2006, 10:23 AM   #8
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
Quote:
Originally Posted by geomatt
You are probably right there, but I seem to remember that there was some reason why apm wasn't working for me and that led me into all of that mess in the first place. I just have no idea what that reason was.

cheers,
-geomatt
acpi is newer, and theoretically probably "better" in the way it handles power management, etc. it doesn't have to rely on the BIOS, so i guess it makes it more efficient or something. so if ACPI works on your particular laptop for everything you need (chart) and you don't mind the hassle of getting it working, that might be the better solution.

i haven't had a single problem with apm, though, and i have seen no perfomance difference or anything like that between the two. the only issue i had is that sometimes after waking my ethernet interface would be locked up, but a simple script to take eth0 down before sleep solved that. like you, i remember there was some reason why acpi didn't work for me, leading me to try apm, but now i have no idea what it was. i think the FN keys weren't working. all that was "automagical" with apm though, and i just never looked back. maybe on my next laptop.
 
Old 01-16-2006, 03:16 AM   #9
bl0tt0
Member
 
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 158

Original Poster
Rep: Reputation: 26
Ok, I'm still hacking away at getting acpi humming on my thinkpad, as I just like learning everything about getting it to work (especially getting good scripts going). I've got a script that I use for both lid events as well as the fn+F4 combo, but I've gotten a strange problem with suspending to RAM while I'm in the console. When I trigger the event, everything seems to go as planned, but then on wake, the screen is completely blank. It seems like the backlight doesn't turn back on. Everything works fine in an X terminal, so I'm wondering where the problem lies. I'm running the console in a Framebuffer, and using the proprietary drivers from ATI on my graphics card (rev 8.20, so the earlier suspend to RAM issues with it are supposedly solved). Can anyone give me an idea of what I can add to the script to get this working?
 
  


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
configuring ibm-acpi on thinkpad bl0tt0 Slackware 0 01-06-2006 04:42 PM
ACPI issue on IBM thinkpad r40e SmellyLlama SUSE / openSUSE 4 04-18-2005 07:04 AM
R40 ibm-acpi module short101 Linux - Laptop and Netbook 2 02-22-2005 05:49 AM
IBM r40, Mandrake 10 and acpi suspend zvono Linux - Laptop and Netbook 5 12-29-2004 11:49 AM
9.2 and IBM ACPI eggoz SUSE / openSUSE 0 12-21-2004 11:21 PM

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

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