View previous topic :: View next topic |
Author |
Message |
hadees Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 17 Dec 2003 Posts: 137
|
Posted: Thu Jan 08, 2004 6:58 pm Post subject: Is there a guide to using ACPI? (mabey on the T40p) |
|
|
I have been looking around the forums and doing alot of searching and i don't see a whole lot on this. I am not new to linux but i have never used ACPI before and i am not sure what to do. I own a Thinkpad t40p and installed everything in my 2.6 kernel (they are built in not modules) and i emerged the acpid daemon, started it and added it to start at boot time, but now what? So here are my few questions hopfully someone can answer for me
1. how do i then connect my Fn+F4 to make my laptop go to sleep or how do i get my Fn+F12 to suspend to disk?
2. How do i get my computer to do speed steping or for that matter how do i know if it is working.
3. How do i get my computer to go to sleep when the computer lid closes?
4. What is the diffrence between ACPI and APM (and thus do i really need ACPI)
5. How do i find out how much battery is left, i thought it was acpi -v but i get command not found
6. I heard about throttling the cpu, if it is what i think it is i want to do this because the computer is gets really hot some times and i want it to cool down so it doesn't get damaged
7. Is it true that because of speed steping a small process can take longer to do? ans there a way to then force the computer to run at full speed to get a process down as fast as possible?
8. If ACPI does all the power stuff for my computer does that mean i should disable that in my bios
Thats it and if anyone else can add anything they think might be usefull and if you own a Thinkpad t40 or t40p feel free to include anything else related to the laptop as i still need to get the madwifi drivers working and it isn't going well
Thanks
Hadees |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jetblack Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/357474726400fdeb311e49.jpg)
Joined: 15 Jan 2003 Posts: 340 Location: Evanston, IL, USA
|
Posted: Thu Jan 08, 2004 7:59 pm Post subject: Re: Is there a guide to using ACPI? (mabey on the T40p) |
|
|
hadees wrote: | I have been looking around the forums and doing alot of searching and i don't see a whole lot on this. I am not new to linux but i have never used ACPI before and i am not sure what to do. I own a Thinkpad t40p and installed everything in my 2.6 kernel (they are built in not modules) and i emerged the acpid daemon, started it and added it to start at boot time, but now what? So here are my few questions hopfully someone can answer for me |
Wow, these are some big questions. I'll try to answer what I can
First off, have a look at /proc/acpi and see what you've got under there. You should have directories for the different ACPI functionality that you included in your kernel. If something is missing that you think should be there, then you may be having some ACPI issues. For example, when I ls /proc/acpi, I get:
Code: | ls /proc/acpi
ac_adapter
alarm
battery
button
debug_layer
debug_level
dsdt
embedded_controller
event
fadt
fan
info
power_resource
processor
sleep
thermal_zone |
Secondly, you'll want to install acpid (emerge acpid). This is a daemon that intercepts acpi events. After you emerge it, check out /etc/acpi/default.sh. This is a script that it uses to intercept the events. You should see it print messages to /var/log/messages and /var/log/acpid when it receives ACPI events. There is a thread here where people have contributed some scripts to handle various events.
Finally, check out acpi.sourceforge.net for some good documentation on ACPI, Of particular interest to you will be the sleep states and processor states topics.
hadees wrote: | 1. how do i then connect my Fn+F4 to make my laptop go to sleep or how do i get my Fn+F12 to suspend to disk? |
If these keys generate keycodes from X, then you should be able to use xmodmap to connect them to events. If not (if they are ACPI keys), then they may generate events that are captured by acpid. Either way, you'll need to captuere the event and then echo the appropriate value to /proc/acpi/sleep to get the system to suspend. Check that Sleep States document for more details.
Also, a lot of people (myself included) have reported trouble with suspend (and especially with waking up from suspend). You may want to search the forums for ACPI suspend - related threads.
hadees wrote: | 2. How do i get my computer to do speed steping or for that matter how do i know if it is working. |
If you're using a 2.6 kernel, then compile speedfreq into your kernel. To check if it's working, cat /proc/cpuinfo with the ac adapter plugged in and unplugged. You should see the processor speed change. You can also manuall adjust the speed by writing to /proc/cpu/performance (assuming it's there) as described in the Performance states document above.
hadees wrote: | 3. How do i get my computer to go to sleep when the computer lid closes? |
Similar to the buttons. The lid closing will generate an event, which can be captured by acpid. When you receive the event, echo the appropriate sleep state number to /proc/acpi/sleep.
hadees wrote: | 4. What is the diffrence between ACPI and APM (and thus do i really need ACPI) |
From the Intel ACPI FAQ
Quote: | Q1. What is ACPI?
A1.
ACPI stands for the Advanced Configuration and Power Interface specification. ACPI defines hardware and software interfaces that enable OS-directed configuration and Power Management (OSPM) to enumerate and configure motherboard devices, and manage their power. ACPI, in conjunction with OSPM, replaces APM and PNPBIOS, as well as the MultiProcessor (MPS) specification. ACPI 1.0 was released in December of 1996. The ACPI 2.0 Specification has been released and is available for download from the ACPI Web site.
Q2. What was wrong with APM?
A2. Using APM, the BIOS controlled power management without the knowledge of the operating system. For example, the user would configure screen and hard drive idle values in the BIOS setup program, and when these were exceeded, the BIOS would turn off the screen, or spin down the hard drive. There were three major flaws with APM.
* Power management policy had to be re-implemented for each platform, and therefore tended to be buggy.
* The BIOS had an incomplete picture of the platform's actual usage, which led to imperfect power management.
* The BIOS didn't have enough room to implement a sophisticated power policy.
|
hadees wrote: | 5. How do i find out how much battery is left, i thought it was acpi -v but i get command not found |
cat /proc/acpi/battery/BAT0/state
hadees wrote: | 6. I heard about throttling the cpu, if it is what i think it is i want to do this because the computer is gets really hot some times and i want it to cool down so it doesn't get damaged |
check /proc/acpi/processor/CPU0/throttling. Write to it as specified in the Processor states page at acpi.sourceforge.net
hadees wrote: | 7. Is it true that because of speed steping a small process can take longer to do? ans there a way to then force the computer to run at full speed to get a process down as fast as possible? |
No idea
hadees wrote: | 8. If ACPI does all the power stuff for my computer does that mean i should disable that in my bios |
I don't think you need APM in your BIOS if you're using ACPI. I imagine that it could interfere with (or subvert) ACPI, but I'm not sure if you'd have to compile APM support into your kernel to actually see a problem. So, not sure.
I hope that helps. It's kind of the quick overview, so please let me know if anything is unclear. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hadees Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 17 Dec 2003 Posts: 137
|
Posted: Fri Jan 09, 2004 2:49 pm Post subject: |
|
|
Thanks for all the help
I do have another question though, do you happen to know what exactly is the diffrence between PowerNowd and Speedfreq
I think they are the same thing and so i am not sure which one to use
thanks
Hadees |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jetblack Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/357474726400fdeb311e49.jpg)
Joined: 15 Jan 2003 Posts: 340 Location: Evanston, IL, USA
|
Posted: Fri Jan 09, 2004 3:18 pm Post subject: |
|
|
I haven't used Powernowd, but from that page, it sounds like it's intended for CPUs that have more than two speeds available (Intel's centrinos, for example, typically only support two frequencies). It sounds like PowerNow is an AMD thing, so my hunch would be that if you've got an Intel processor, you should use Speedfreq, and if you've got an AMD, you should try PowerNowd. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steel300 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/14580812044137b3935a0c2.gif)
Joined: 10 Jul 2003 Posts: 1155
|
Posted: Fri Jan 09, 2004 3:26 pm Post subject: |
|
|
PowerNow is AMD's power management interface. It is ACPI comliant, but with added features for the AMD series _________________ Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Wildhoney n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Quake3/quake3_sarge_blue.gif)
Joined: 08 Mar 2003 Posts: 66 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NiXZe Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/109044482146d3d5ba6c84a.png)
Joined: 22 May 2003 Posts: 77 Location: Uppsala Sweden
|
Posted: Fri Jan 09, 2004 5:58 pm Post subject: |
|
|
In my T40p i've got almost everything working perfectly.
1. these keys (most of them anyway) are acpi events... the damn power button don't create one too *grrr*
2. check my /etc/acpi/default.sh http://www.usdata.cjb.net/~NiXZe/T40p/default.sh for some ideas
3. see2
4. already to good answared
5. emerge acpi and acpid then you will find out with acpi -V (as an extra note please post your output of cat "/proc/acpi/battery/BAT0/*"
Code: | alarm: 3175 mWh
present: yes
design capacity: 71280 mWh
last full capacity: 63500 mWh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 3175 mWh
design capacity low: 200 mWh
capacity granularity 1: 1 mWh
capacity granularity 2: 1 mWh
model number: IBM-08K8201
serial number: 1058
battery type: LION
OEM info: SONY
present: yes
capacity state: ok
charging state: charging
present rate: 3649 mW
remaining capacity: 61920 mWh
present voltage: 12499 mV
|
the acpi command seams to take the presentage from "last full capacity"/"remaining capacity"
6. see answer 2 you will have to emerge speedfreq (ACCEPT_KEYWORDS="~x86" since it is masked) and also dont forget to start the deamon (why not start it right at boot) i also modified the /etc/init.d/speedfreq script some (http://www.usdata.cjb.net/~NiXZe/T40p/speedfreq) to get it to work good with the laptop
7. see answer 2 you can also use speedfreq -p dynamic to make the cpu go up in speed if it is havily loaded
8.you don't want the bios to interfear with your linux settings do you?
AND my kernel config for 2.6.1-rc1 (development sources) http://www.usdata.cjb.net/~NiXZe/T40p/t40p.config
i dont have the FIR irda working.... or more correctly it didnt work directly and i didn't care since i got the bluetooth working instead... and then for the wlan just do an emerge madwifi-driver (also masked)
Suspend to disk worked with almost the same config on my old laptop (Compaq Armada M700) however i haven't edited lilo to suport it yet...
well that's it i guess... happy T40p:ing ![Wink ;)](images/smiles/icon_wink.gif) _________________ What? Where? Oh! this one, it's Gentoo.
If you don't have anything constructive to say, you might want to consider staying quiet instead.
To many destructive comments, which in no way will help making the Gentoo community better. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|