PDA

View Full Version : Compaq Presario 700 series + acpi howto



dirgotronix
11-14-2003, 04:05 PM
Alright! I spent a good deal of time trying to get acpi at least somewhat working on my Presario 710US, and finally found the problem!

I installed knoppix with the 2003-11-03 release, which was using kernel 2.4.22-xfs according to uname -r. Since I don't feel like being experimental, I decided to stick with the same kernel. So, I apted the source:

# apt-get install kernel-tree-2.4.22 acpi apcid
# cd /usr/src ; tar -jxvf kernel-source-2.4.22.tar.bz2

This puts the source tree in /usr/src/kernel-source-2.4.22 and grabs the packages needed for acpi. Next, I grabbed the latest acpi patch from acpi.sourceforge.net:

# wget http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.4.22/acpi-20031002-2.4.22.diff.bz2
# cd /usr/src/kernel-source-2.4.22
# bunzip2 -c ../acpi-20031002-2.4.22.diff.bz2
# patch -p1

This patches the kernel for acpi support. Since I don't use XFS, I didn't bother grabbing the xfs patch that the default kernel uses.

Next up, to configure the kernel.

# make menuconfig

When you're in there, go to the bottom to load your old configuration (the one that knoppix uses) from /usr/src/linux/.config . Then (here's the sneaky part) go into the "Processor type and features," and make sure you select Athlon/Duron/K7! If you leave it at pentium/pentiumII it will not boot with acpi on. After you switch that around, exit from that menu, go to "General Setup," head to the bottom to "ACPI Support," and select everything except "Off By Default" and "Debug Statements". You don't need the ASUS and Toshiba bits, but I left them in for the heck of it.

Exit out, save your config. Now we get to have the fun time of compiling the kernel!

# make dep && make clean bzImage modules modules_install

This goes through the nice long process of compiling the kernel (takes around 20-30 minutes if you're not doing anything else on the laptop.) Once that's done, you need to move the new bzImage to /boot, so:

# cp arch/i386/boot/bzImage /boot/kernel-2.4.22

Next up, configure lilo to boot to the new kernel:

# kwrite /etc/lilo.conf

this is if you're in X, of course, you're welcome to use any console based editors.

Scroll down a bit until you see "delay=20" and comment it out by adding a # in front of it. Slightly below that is the following:

#message=/boot/bootmess.txt
#prompt
#single-key
#delay=100
#timeout=100

I uncommented prompt, delay, and timeout. This will give you a menu to select which kernel to boot to, which is handy when you're debugging to make sure your kernel works (lest you have to boot to the knoppix cd to fix it!)

Scroll down a bit to the append line, you need to edit it a bit, mine looks like this:

append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=off acpi=on nomce noapic"

This turns off apm and turns on acpi. You can't have the two working together, it causes ... problems.

Next up, adding the new kernel and changing the old one, here's my list, changes in bold:

<pre>default=2.4.22-acpi

image=/boot/vmlinuz-2.4.22-xfs
label=2.4.22-xfs
initrd=/boot/initrd.gz
read-only

image=/boot/kernel-2.4.22-acpi
label=2.4.22-acpi
read-only</pre>

I like having useful names in lilo, so I changed the labels to suit my taste.

Save it, run /sbin/lilo to install the new configuration, and reboot! Everything should work and you should have a new entry in /proc with /proc/acpi, and your battery meter should actually be useful in kde.

From what I can tell, following those instructions, processor speed stepping works, as my fan is very quiet right now and the laptop isn't burning me, as well, /proc/acpi/processor/CPU0/throttling states that my laptop is currently at state T7 or 37% speed. I haven't tested suspend/hibernate yet, but I'll update if those don't work and I get them working.

Hope this is of help to someone, I know I spent days searching around on google for info on this laptop to get acpi to work.

dirgotronix
11-15-2003, 09:12 PM
Alright, so I found out that suspend and hibernate don't work like that, but following the instructions at http://swsusp.sf.net/ I managed to get hibernate to work. The only problem that I've found with hibernating, however, is that the sound card doesn't come back up, and I can't rmmod the modules because they say they're busy.

I'll see what it takes to get that fixed, probably just some configuration of swsusp.

Also somewhat related, I was wondering if the tv-out worked in linux, and I found a package to control it like in windows!

# apt-get install s3switch

That program allows you to change the output (crt, lcd, ntsc, ntscj, pal) and defaults to all three.