Linux - Laptop and NetbookHaving 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: The Glorious People's Republic of Austin
Posts: 178
Rep:
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?
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
Location: The Glorious People's Republic of Austin
Posts: 178
Original Poster
Rep:
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?
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.
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.
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.
Location: The Glorious People's Republic of Austin
Posts: 178
Original Poster
Rep:
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.