Linux on Laptops
|
 |
Installing Gentoo on a Compaq Presario R4000
Last updated: January 13th, 2006
General Hardware Specifications of this ugly thing:
|
Hardware Components
|
Status under Linux
|
Notes
|
| AMD Sempron 3000+ |
Works |
No special procedure required during installation
Some Presarios have AMD64 processors,
though, so check if you should be using Athlon64 in your kernel.
cat
/proc/cpuinfo will tell you if you have a Sempron, an Athlon64, or a
processor Compaq didn't sell with it. :) |
| 15.4" WXGA Display |
Works |
No problems. |
| Keyboard |
Requires Special Configuration |
The onboard keyboard is not AT-based in connection.
I'm not sure what in the kernel I toggled to get it working...toggle
everything in Device Drivers->Input Devices->Nonstandard to get it working. |
| ATI Radeon Xpress 200M |
Works |
X is functional. Framebuffer is functional. See Note 4 for Direct Rendering. |
| 512MB, SDRAM, 2DIMMs |
Works |
The crappy video card leeches RAM from system to use, amount configurable in the BIOS from 32M to 128M. |
| 60 GB PATA Hard Drive |
Works |
DMA only available on kernel 2.6.13 and up, compile in
ATI chipset support. |
| No Floppy Drive |
N/A |
Leave floppy configuration in the kernel if you want USB floppies, though. |
| Realtek 8139 series NIC |
Working |
Note 1 |
| Internal 56k Modem |
Unknown |
No testing done. |
| NEC ND-6500A |
Works? |
Reads data fine, burning works fine. |
| Internal miniPCI Broadcom BCL4306 card |
WIP |
Note 1 |
| ? WHr Lithium-Ion Battery |
Works |
No special procedure required during installation |
| 4 USB 2.0 ports |
Works |
No special procedures required, other than USB support in kernel. |
| 1 Type 1/2 PCMCIA slot |
Working |
Requires additional configuration, Note 3 |
| MMC/SD card reader |
Doesn't work |
SD is really closed-source, and the reader is part of
the PCMCIA setup, so it'd need an extension to yenta to load the firmware to
work
Additionally, the model I'm using lacks such a port, so I can't
test your solutions. |
| S-Video Out |
Untested |
Untested |
| Onboard ATi-based sound card |
Works |
snd-atiixp Note 2 |
| Touchpad |
Works |
Works, may require special configuration for vertical/horizontal bars to have additional functionality. |
This laptop is operating under Kernel version 2.6.15
Basic Installation of Gentoo:
- Needed a 2004.3 LiveCD, 2005.0 didn't detect the keyboard unless
Fn-LShift was held down on boot.
- Installing Gentoo is just following the handbook
- I configured the kernel (I'll post it once I get everything working) manually, as I'm an old geezer who hates
genkernel.
- If you have a Sempron, do not build your kernel for an Opteron/Athlon64.
You'll regret it.
- Rebooted into it, discovered that the keyboard is nonstandard interface;
toggled the nonstandard input options in Input Devices, rebooted.
- Boot
Setting up additional features for Gentoo
- Networking
On the first attempt to install Gentoo on this machine, the installer (not
myself) skipped an unknown number of steps, and somehow ended up with a
kernel which functioned perfectly, save that the network devices were wholly
nonfunctional. A stage 1 reinstall remedied this problem. If you run into
this, and fix it another way, please inform me.
The Broadcom BCM4306 device in this laptop is compatible with the new,
shiny, improbable bcm43xx network
driver, and they have install instructions - however, as of when I tried the
driver (20060105 in portage), I was able to scan and associate with an
access point, but trying to DHCP failed, and using "iwconfig eth1 essid any"
after manually setting the essid hard-hung the kernel.
Oddly enough, sometimes the 8139too driver for the onboard NIC
receives and sends no packets, and I've yet to figure out why.
- Sound
On the first attempt to get sound working, we built the snd-atiixp driver
into the kernel, but only found a dummy mixer on reboot.
On the second attempt, we built it in as a module, loaded it after boot, and
experienced no problems.
David Dewbre informs me that the random problems involved are primarily derived from the soundcard and the modem reporting the exact same identifying data, so depending on which module loads first, sometimes the wrong module loads and then ALSA doesn't know what the fuck.
In other words, YMMV.
- PCMCIA/Cardbus usage:
I got this from the PCMCIA instructions for the R3000 series laptops, which employ a similarly weird
construction.
Basically, the laptop uses AMD64 hardware, regardless of whether or not it
has an AMD64 processor. You get all of the headaches and very little of the
performance. :)
I've been informed that sometimes, r4000 PCMCIA support
works with very little effort, but when it doesn't, I suggest the below
steps.
If you've tried the below instructions for 2.6.13+ and they've not worked, add irqpoll to your kernel options. It fixed the weird "cardbus cards are not supported" I was experiencing.
If you're on kernel 2.6.13 or above, it's easy for you...
Just add pci=assign-busses to your kernel's init line and then make sure
pcmcia is a boot service and you're golden.
I've had problems with this thing using cardbus cards and the 2.6.14 series
of kernels, though, so be warned.
If that doesn't work, or you're on an older kernel, use the below steps:
Configuring the laptop for PCMCIA/Cardbus support is a three-step
process:
- First, you make sure you have emerged pciutils, or pcitools, or whatever
Gentoo is calling it these days. lspci -vv, and look for the thing that says
Cardbus controller.
Look at the number next to primary=, take note of
it.
Do lspci -vv again, and look for devices labeled "PCI bridge".
You want to look for the one where the number after secondary=
is the same as the number you noted above.
Now, take note of the numbers next to the name of the device, and the values next to memory and
I/O (ignore the prefetch value, I mean the other memory value).
Make sure you have hotplug and pcmcia-cs emerged, and go into your
/etc/pcmcia/config.opts, and add the following line next to the other
includes:
include port [a], memory [b]
where [a] is the I/O you noted before [it should be in a set of two
8-character numbers, like this: 00000000-0000afff], and [b] is the
memory number you noted down [same format as the I/O].
- Good, you got to step 2.
This is much easier.
Go into
/etc/conf.d/pcmcia (location varies with distro, I understand Slackware is
/etc/rc.d/rc.pcmcia), and replace any CORE_OPTS= line with the
following:
CORE_OPTS="probe_io=0"
(at this point, you should restart
/etc/init.d/pcmcia...if it wasn't running, it should be a boot
service.)
- I've been informed you can just edit your bootloader configuration and
add "pci=assign-busses" to the options passed to the kernel in order to avoid the
below step. Isn't that easier? :)
In grub, to do this, just add
"pci=assign-busses" to the end of the line that starts with
"root="
- Do not do this unless the above doesn't help:
The fun part.
Look at the number you wrote down as being next to the
name of the PCI bridge from lspci -vv earlier (it should be in the format
0000:00.0, or 0:00.0, or something similar).
As root, input the following command:
setpci -s [c] SUBORDINATE_BUS=[d]
[c] is the numbers next to the bus name, from before, but with only 1
0 to the left of the :, no matter what it was before (IE: if it was
0000:14.4, it becomes 0:14.4); [d] is the hex version of the number
between the : and the . (I've included a quick conversion chart
below)
00 becomes 00
01 becomes 01
02 becomes 02
03 becomes 03
04 becomes 04
05 becomes 05
06 becomes 06
07 becomes 07
08 becomes 08
09 becomes 09
10 becomes 0A
11 becomes 0B
12 becomes 0C
13 becomes 0D
14 becomes 0E
15 becomes 0F
16 means you have problems.
After all of the above, remove your card and put it back in. There are
commands to artificially do this, but they did not function for me.
Now you check lspci for whatever card you have, and see if anything's
found.
If so, add the above setpci line to your system startup script (on Gentoo:
/etc/conf.d/local.start), and restart the PCMCIA service if your cards don't
work.
- Graphics
This was a tricky thing, and it took some real work and about 9 hours
straight of work to figure out.
First of all, do not use any of the 2.6.15-rc kernels. They have a
weird mm/swap.c bug that means that if you use the ati driver with them, X
won't function correctly (killing windows won't work and will cause a
printout of KERNEL BUG ---cut here--- and so on to dmesg, and killing X will
hang the system). This is fixed in 2.6.15 final, however.
Second, leave ATI DRM support in your kernel. Turn it off.
Leave /dev/agpgart in, too.
Next, make sure vesafb isn't built in - if you want framebuffer, use radeonfb.
Fourth, grab any ati-drivers version from portage above 8.16.xx.
Fifth, edit your xorg.conf to use Driver "fglrx", and add the following option:
Option "VideoOverlay" "on".
Sixth, set your DefaultDepth to 24.
Finally, boot into X and enjoy 500 FPS or something. :p
Unresolved issues
- Installing a different miniPCI card:
Don't even think about it. This laptop has a BIOS-mandated list of cards
it accepts, and it returns "Unrecognized wireless device detected. Please remove and
restart." or somesuch on boot if you try it.
I learned this the hard
way. My friend bricked two laptops trying to get around this.
Configuration Files
- My kernel config will go here when I get a chance and get everything
working.
Contact Information
- E-mail: Rincebrain+r4000@gmail.com
- AIM: subtextrocks
Links:
|
Linux on Laptops is copyright © 2005 linux-on-laptops.com
Privacy Statement
Contact us at linuxonlaptops (at) yahoo.com
|
|
|
|
No Warranties: This information is provided "as
is" without any warranty, condition, or representation of any kind,
either express or implied, including but not limited to, any warranty
respecting non-infringement, and the implied warranties of conditions
of merchantability and fitness for a particular purpose. All logos or
trademarks on this site are the property of their respective owner. In
no event shall linux-laptop.net, linux-on-laptops.com, or any
directors, trustees, associates, or employees thereof be liable for any
direct, indirect, special, incidental, consequential or other damages
howsoever caused whether arising in contract, tort, or otherwise,
arising out of or in connection with the use or performance of the
information contained on this web site.