laclasse
03-08-2003, 11:00 AM
Linux Install Guide for Sager/Clevo/Eurocom/Alienware/Promedion 56XX and 888X series.
__________________________________________________________________________________ ___
Disclaimer:
All manipulations and instructions in the following are not issued or garranteed by any computer hardware vendor or manufacturer, therefore it is understated that all of these will be the entire solely responsability of the personn performming them, and that, in ANY situations, I will never be liable for things such as data loss and hardware damage. Do this at your own risks.
Note: I wrote this document after owning the laptop for just a month. So please feel free to correct me. Any efficient addition will be published, and the dark points could be lit up by any one who wishes to contribute. The goal is to make the machine use 100% of what it has been sold as and for, this running free/GPL'd Operating Systems.
1)Hardware Specifications:
The laptops covered are the 5660 series sagers and clones, as well as the 8886/7 sager series and clones. Some laptops will have an Hyper Threading able bios, and some not. Some could be upgraded, and some not. The point is not there. The sagers laptops and clones are already very fast performing machines under linux. I own a non HT one, and am very happy with it. In this section i will concentrate on what is important to know to make linux perform and use all the capabilities of the machine. The type or brand of RAM for example isn't important as long as it works.
First thing to do on a linux/unix machine, a lspci: here it is on my sager 5660 :
00:00.0 Host bridge: Intel Corp. 82845 845 (Brookdale) Chipset Host Bridge (rev 11)
00:01.0 PCI bridge: Intel Corp. 82845 845 (Brookdale) Chipset AGP Bridge (rev 11)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio (rev 02)
00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [Radeon Mobility 9000 M9] (rev 01)
02:04.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
02:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:07.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller
02:0a.0 USB Controller: VIA Technologies, Inc. USB (rev 50)
02:0a.1 USB Controller: VIA Technologies, Inc. USB (rev 50)
02:0a.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51)
Yes from there, having the info, and the actual real 'ie not translated' pci info, let's work our way.
The chipset is a Brookdale Intel i845E (HT suppport). It is connected to a SouthBridge ICH3M, which provides no less than firewire, 5.1 6 channel ac97codec based audio, dual ata100 ide channels, 4x USB 2.0, modem and ethernet. I believe the chipset/setup is the same on all models, regardless of their options and processor speed.
The VGA controller is as publicised an ATI Radeon 9000 mobility ( M9 ) with 64/128 Meg DDR SDRAM. It connect to the AGP intel Bridge and is 4 x able.
The Sound Chipset is a Intel 82801CA-ICH3 connected to a Avance Logic ALC200/200P rev 0 chip. This gives us digital spdif/optical 5.1 out, as well as one capture, one headphone. It is a good sound chipset, only somewhat limited by the speakers quality found on laptop. I have a simple 2.1 Cambridge SoundWorks speaker set, and it rocks. Note that one of the hardware flaws/design of the intel8x0 chipsets was the non ability to output at lower than 48000 Hertz by default, where 16 bit sound expects/works at 44100 Hertz. Majority of software mixers nowadays allow resampling, so it is not a problem anymore.
The SMBus is the hardware sensors bus, this is were the sensors of your motherboards reports to, like temperature, fans states, ram states etc ...Honestly i haven't fool around them yet, but will very soon.
The cardbus pcmcia port 02:07.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller, worried me, until i used the kernel drivers of 2.4.21-pre4 (now pre5) kernel. Then i successfully made my 3com lan card work, using the 3c95x and serial_cs modules.
The integrated ethernet is a Realtek 8139C chipset, not the newest 8139C+. Somehow, this is the weakest device in term of quality of the whole notebook. They are cheap, small and somehow reliable, still i would have loved to see a 3com or an Intel eepro chipset on these machines.
The modem appears to be a Conexant chipset, but being directly attached to the ICH3M SouthBridge, it is listed as :
00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
All my effort to make this work have failed, this is a genuine 'WIN Modem'. Hope someone will get it working soon.
FireWire is a Texas Instrument powerless mini connector, bizarelly not using the integrated firewire channel on the SouthBridge. This deviced works properly, I just lack a IEEE 1394 device to test it fully.
The USB is supplied by Via, the hcd 2.0 USB hub as well. There is 4 USB 2.0 ports on this machine, all backward compatible to the old slow USB 1.1. This means you can connect basically anything being USB.
2) Power management:
These machines have the great performance of a full blown Pentium 4 478 pins, desktop models. Not having a mobility chip means we gonna have to limit the processor in the way it consummes energy. Advanced Power Management is the old way (APM). Advanced Control Programmable Interface ( ACPI ) is the new way of doing it, and our P4 has enhanced support for it. So a few kernel patches will be needed.
3) Kernel Configuration:
First of all, i want to stress how important it is to recompile your own kernel, for your needs. The major of vendors will have very good kernels, but they might not cover exactly all your needs, or have too much. Keeping the kernel small is one of my goal. A vanilla kernel from www.kernel.org is a good starting point. Then visit the sourceforge acpi pages and get the patches for acpi support and acpi software suspend for the kernel version you are planning to use.
Consider that patching source code is tricky, usually the patches do refer to a particular kernel version, and i will advise not to mix and match. Pay particular attention to the patches your are downloading.
This guide is not a how to on kernel compilation so i won't devellop the subject, just get yourself a kernel HOW TO at the www.tldp.org linux Documentation Project. Compiling a kernel is great as it does gives you an inside to as how powerful, versatile and modular a linux kernel is. Especially when we will shifting towards the 2.6 generation of kernels, and even more support to new hardware is added.
If you have never done it, it will takes you a few tries to get it right.
__________________________________________________________________________________ _
Patching the kernel ...
After seeing a lot of people wondering, here is a short description of the steps needed to patch a kernel source tree.
Note that these instructions are valid for a 'VANILLA' kernel, i mean a plain kernel source downloaded from www.kernel.org or one of the mirror. I cannot give instructions for 'Vendor' kernels such as RH, Mandrake or SuSE. Why ?
1) Cause i don't use them
2) Cause it has proven difficult to find out the exact patches appplied by the vendors.
So, first download a kernel source from www.kernel.org or a mirror. The latest is 2.4.20.
Once the file linux-2.4.20.tar.gz is on your hdd, put it anywhere ( your home dir is fine ), and untar/decompress it with
$ tar -xvzf linux-2.4.20.tar.gz
( or tar -xvjf linux-2.4.20.tar.bz2 if ya download the bzip2 file )
==> This will last for a while, and produce lots of output, showing you what is getting de compressed and where. The whole decompressed source is 274 megs or so, so plan some space.
Then go and download the patches you need. www.google.com/linux , enter kernel patches as a search string, you will find a lot. The patches can be anything from .patch, to .txt to .diff extensions. Note that a lot of them are compressed, like "patch.kernel-2.4.20.diff.gz "
In this case you have to :
$ gzip -d patch.kernel-2.4.20.diff.gz
$
Now the patch will have lost his .gz extension.
Next we are gonna apply the patch:
$ pwd
/home/user
$ ls
linux-2.4.20 linux-2.4.20.tar.gz patch.kernel-2.4.20.diff
$ cd linux-2.4.20
$ patch -p1 < ../patch.kernel-2.4.20.diff
( lots of output, watch out for :
Hunk Succeed IF ya have a lot of Hunk Failed at blAHBLAH...that doesn't look too good. Once patch is successfull, apply the others ( if so ), then make xconfig and you will see the new options of your patches ( acpi, Preemptive Kernel, Lock Break for the preemptive kernel, ACPI options, ACPI suspend etc ......).
__________________________________________________________________________________ __
Here is my current kernel configuration file for a 2.4.20 kernel patched with:
- 2.4.21-pre5 patch
- preemptible kernel ( preempt-kernel-rml-2.4.21-pre1-1.patch )
- acpi ( acpi-20030228-2.4.21-pre4.diff )
- acpi suspend ( patch-acpi-acpi20030228-swsusp19 )
You can see/save/dll the my configuration by clicking here (http://activate.kicks-ass.org/~laclasse/KernelConfig_2.4.21-pre5.txt)
Note that i do not have IDE cdrom support, iinstead i have scsi emulation and scsi cdrom support built in the kernel, and that is what you want if you want to burn cds.
As well, i have in my /etc/lilo.conf the following statement: append="idebus=66 iide0=autotune ide1=autotune"
This sets a defaulft bus speed of 66 Mhz for pio / non dma modes, as well as letting the kernel tune the ide channels in the best way possible.
4) Graphic Video Drivers
Making the ATI M9 working accelerated has proven to be a difficult point, as no current distribution, at the time of writing, detects it properly. Maybe Slackware 9.0rc2 with XFree 4.3.0 does. Not tested yet.
Instead majority of distro automated configuration tool of the X server will assign a generic 'vesa' driver, wich is fine for 2D, but no 3D hardware acceleration.
As well lets clarify the fact that the 9000 R250 Desktop chipset ant the R250 mobility M9 chip are very similar. Indeed the ati drivers work for both. The mobility chip adds power saving futures to the card.
ATI provides extended instructions on how to install these drivers on www.ati.com , click the 'Find a Driver' links, then enter Linux/XFree as operating system, and Radeon 9000 Pro as product. This will bring you to a page where you will find 2 differents packs, one for older 4.1.x XFree86 versions, one for 4.2.x ones. Download the one you need, "X -version" in a terminal will help you identify your current running version.
On the same page, there a Driver Release Note, as well as an "Driver installation Notes". I will STRONGLY recommend to print/copy them both for a later reference.
The install of the package should be FORCED, as stated in the site instructions.
ATI provides a few extra tools: fglrxinfo will give the similar less detailled information as glxinfo:
laclasse@screamer:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon 9000/Mobility Fire GL 8800 Prototype DDR Pentium 4 (SSE2)
OpenGL version string: 1.3.3477 (X4.2.0-2.5.1)
laclasse@screamer:~$
fglrxconfig will help you configure the server and save the file as /etc/X11/XF86Config-4.
Finally, fgl_glxgears will launch the ati demonstration of the pBuffer extension of the OpenGL library, and counts the number of Frames per second in the rotating gears cube.
Main thing to archieve is to enable the Direct Rendering of the display. You can check it by issuing the command "glxinfo | grep rendering" in a terminal, after launching the X server. This will insure that all is fine and dandy, and that 3D hardware acceleration is avalaible.
Here is more detail on the driver install itself.
http://sagerforums.com/forums/showt...=&threadid=1555
5) Sound
I currently use the Alsa modules ( www.alsa-project.org )in their latest version, 0.9rc8a. DO NOT USE the alsa stable branch ( 0.5 ) as it is deprecated, and WILL NOT work. I believe Mandrake comes with Alsa, and a few other should have the option avalaible. I install mine by hand and compile the sound modules on the machine.
3 packs are essential: alsa-driver, alsa-libs and alsa-tools.
Decompress / untar them all in a directory of your choice, then go to the alsa-driver drirectory. I use these options:
$ ./configure --with-kernel=/where/your/kernel/sources/are --with-cards=intel8x0 --with-sequencer=yes --with-oss=yes =with-isapnp=auto
A "./configure --help" will give you all extra compilation options or optimization avalaible by the package.
There is a good alsa How To on the main project site, so please read it, as it can be little confusing. Once again the performance resulting is worth the time spent on it. Alsa gives me digital out control, plus depth and center/bass settings. Cool, i have a red laser light coming out of my SPdif out port ;)
6) Earlier experiments:
Here is some comment made earlier, and i thought it was of interest.
After several kernels being compiled and tried, here are the conclusions of 4 days work. I own a 5600D Clevo/Sager/Pr omedion, specs as follow: P4 2.4, 512 DDR 1 slot, ati 9000 Mobility 64 DDR, 1400x1050 TFT, 40 gigs HDD, DVD/CDRW Combo, floppy.
This is a true exploration throught hardware. The first thing i would like to bring is the design: My machine is built around a 82845 845 (Brookdale) Chipset labelled i845E by Intel connected to a ICH3M Southbridge. The ICH3M southbridge is a implementation for ata100 on ultra mobiles systems, and is adapted to mobile pentium III processor.
Next is the fact that the i845E chipset is supposed to be connected to a ICH4 chipset, as it is shown in the manufactu rer design here http://www.intel.com/design/chipsets/845e/index.htm?iid=ipp_desk_chip+prod_845e&
Is it a special implementation on our laptops ? If yes where is it documented ? These questions have made me consider a hardware flaw, but i am not sure.
I have compiled and run successfully 2.4.18, 2.4.20, 2.4.20 with preempt, ide, acpi,acpi-swsp patches in the stable category, and 2.5.54, 2.5.62 in the devel category.
I'm currently running a 2.4.21-pre4 kernel, with the latest acpi patches. This is running of my choice distro, Debian/GNU Linux Sid Testing/Unstable.
With this i am glad to say that:
1) USB 2.0 works :
ehci-hcd 02:0a.2: VIA Technologies, Inc. USB 2.0
ehci-hcd 02:0a.2: irq 5, pci mem e091fc00
usb.c: new USB bus registered, assigned bus number 3
ehci-hcd 02:0a.2: USB 2.0 enabled, EHCI 0.95, driver 2002-Dec-20
2) Firewire modules are loading
Module Size Used by Tainted:
ohci1394 17512 0 (unused)
ieee1394 34060 0 [ohci1394]
ohci1394: $Rev: 693 $ Ben Collins <bcollins@debian.org>
ohci1394_0: OHCI-1394 1.1 (PCI): IRQ=[11] MMIO=[e0204000-e02047ff] Max Packet=[2048]
ieee1394: SelfID completion called outside of bus reset!
ieee1394: Host added: Node[00:1023] GUID[0000000000140816] [Linux OHCI-1394]
Unfortunately no firewire device, so maybe someone could try it.
3) Sound : I use Alsa 0.9rc7 compiled from source with this options:
./configure --with-cards=intel8x0 --with-sequencer=yes --with-oss=yes --with-isapnp=auto --with-kernel=/home/laclasse/linux-2.4.21-pre4
I have compiled the OSS intel kernel drivers as modules, and i would recommend anybody to install Alsa. There is a huge performance boost on all sound apps, games as well. Doc to compile and download of source packages can be found at http://www.alsa-project.org
4) DMA transfers on the ICH3M Southbridge are a problems to me. I bet they are a problem to anybody cause i suspect a hardware flaw as commented earlier
First on normal kernels (2.4.18 to 2.4.20 unpatched):
ICH3M: IDE controller at PCI slot 00:1f.1
PCI: Disabling device 00:1f.1 due to ressources collisions
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda: pio, hdb: pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc: pio, hdd: pio
So this is of interest, as the we can see that the IDE controller is in pio mode and not DMA.
at this point i run # hdparm -t /dev/hda
Timing buffered disk reads: 64 MB in 3.49 seconds = 18.33 MB/sec
Now according to http://www.intel.com/support/graphics/linux/udma.htm , this is a burst pio mode. Not DMA. I challenge ANYBODY to go in the bios of their Sager/Eurocom/Alienware/Promedion/Clevo 5600D and manage to CHANGE the default [pio/dm a2] to UDAM5, as the chipset should support, and as advertised.
Then i run a 2.4.21-pre4 pre patched with the latest hedrix ide-patches, ide-2.4.20-pre5-ac4 and here is thbe difference :
ICH3M: IDE controller at PCI slot 00:1f.1
PCI: Enabling device 00:1f.1 (0005 -> 0007)
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda: pio, hdb: pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc: pio, hdd: pio
:cry: Halas still no DMA enabled. Off course the hardisk reports
hda: host protected area => 1
hda: 78140160 sectors (40008 MB) w/2048KiB Cache, CHS=4864/255/63, UDMA(100)
I then made a script to run at boot :
#!/bin/bash
hdparm -c1d1X69 /dev/hda ;
hdparm -u1 -k1 /dev/hda ;
echo "Forcing DMA and 32bit transfert ......................done" ;
echo "Enabling ATA 100 Mode
................................done" ;
As well i have append="idebus=66 ide0=autotune ide1=autotune" in /etc/lilo.conf. So i get
Kernel command line: BOOT_IMAGE=Linux-2.4.21pre ro root=301 idebus=66 ide0=autotune ide1=autotune
ide: Assuming 66MHz system bus speed for PIO modes
now a hdparm -t /dev/hda reads :
Timing buffered disk reads: 64 MB in 3.43 seconds = 18.66 MB/sec
Well wasn't worth the patches. Note that i am using a 25 % throttle on the p4 at all times, because playing RtCW in linux for 2 hours without has brought the lappy to 89 Celcius, and i will not recommend it. The acpi patches to whatever kernel you are running are essential. Get them here http://sourceforge.net/projects/acpi
and you can try the software suspend here
http://sourceforge.net/projects/swsusp
After the ACPI is successful, you can control the processor throttle, limit temperature, as well as checking the temperature. There is a gkrellm patch to monitor the temperature throught acpi at http://gkacpi.sourceforge.net
You can see the throttling states by issuing
#cat /proc/acpi/processor/CPU0/throttlingstate count: 8
active state: T2
states:
T0: 00%
T1: 12%
*T2: 25%
T3: 37%
T4: 50%
T5: 62%
T6: 75%
T7: 87%
As you can see i use a 25 % throttle. you can change that by doing :
# echo -n 0 > /proc/acpi/processor/CPU0/throttling
#
this will set your processor at 100 %, no throttle.
...to be completed and continued.
__________________________________________________________________________________ ___
Disclaimer:
All manipulations and instructions in the following are not issued or garranteed by any computer hardware vendor or manufacturer, therefore it is understated that all of these will be the entire solely responsability of the personn performming them, and that, in ANY situations, I will never be liable for things such as data loss and hardware damage. Do this at your own risks.
Note: I wrote this document after owning the laptop for just a month. So please feel free to correct me. Any efficient addition will be published, and the dark points could be lit up by any one who wishes to contribute. The goal is to make the machine use 100% of what it has been sold as and for, this running free/GPL'd Operating Systems.
1)Hardware Specifications:
The laptops covered are the 5660 series sagers and clones, as well as the 8886/7 sager series and clones. Some laptops will have an Hyper Threading able bios, and some not. Some could be upgraded, and some not. The point is not there. The sagers laptops and clones are already very fast performing machines under linux. I own a non HT one, and am very happy with it. In this section i will concentrate on what is important to know to make linux perform and use all the capabilities of the machine. The type or brand of RAM for example isn't important as long as it works.
First thing to do on a linux/unix machine, a lspci: here it is on my sager 5660 :
00:00.0 Host bridge: Intel Corp. 82845 845 (Brookdale) Chipset Host Bridge (rev 11)
00:01.0 PCI bridge: Intel Corp. 82845 845 (Brookdale) Chipset AGP Bridge (rev 11)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio (rev 02)
00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [Radeon Mobility 9000 M9] (rev 01)
02:04.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
02:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:07.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller
02:0a.0 USB Controller: VIA Technologies, Inc. USB (rev 50)
02:0a.1 USB Controller: VIA Technologies, Inc. USB (rev 50)
02:0a.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51)
Yes from there, having the info, and the actual real 'ie not translated' pci info, let's work our way.
The chipset is a Brookdale Intel i845E (HT suppport). It is connected to a SouthBridge ICH3M, which provides no less than firewire, 5.1 6 channel ac97codec based audio, dual ata100 ide channels, 4x USB 2.0, modem and ethernet. I believe the chipset/setup is the same on all models, regardless of their options and processor speed.
The VGA controller is as publicised an ATI Radeon 9000 mobility ( M9 ) with 64/128 Meg DDR SDRAM. It connect to the AGP intel Bridge and is 4 x able.
The Sound Chipset is a Intel 82801CA-ICH3 connected to a Avance Logic ALC200/200P rev 0 chip. This gives us digital spdif/optical 5.1 out, as well as one capture, one headphone. It is a good sound chipset, only somewhat limited by the speakers quality found on laptop. I have a simple 2.1 Cambridge SoundWorks speaker set, and it rocks. Note that one of the hardware flaws/design of the intel8x0 chipsets was the non ability to output at lower than 48000 Hertz by default, where 16 bit sound expects/works at 44100 Hertz. Majority of software mixers nowadays allow resampling, so it is not a problem anymore.
The SMBus is the hardware sensors bus, this is were the sensors of your motherboards reports to, like temperature, fans states, ram states etc ...Honestly i haven't fool around them yet, but will very soon.
The cardbus pcmcia port 02:07.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller, worried me, until i used the kernel drivers of 2.4.21-pre4 (now pre5) kernel. Then i successfully made my 3com lan card work, using the 3c95x and serial_cs modules.
The integrated ethernet is a Realtek 8139C chipset, not the newest 8139C+. Somehow, this is the weakest device in term of quality of the whole notebook. They are cheap, small and somehow reliable, still i would have loved to see a 3com or an Intel eepro chipset on these machines.
The modem appears to be a Conexant chipset, but being directly attached to the ICH3M SouthBridge, it is listed as :
00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
All my effort to make this work have failed, this is a genuine 'WIN Modem'. Hope someone will get it working soon.
FireWire is a Texas Instrument powerless mini connector, bizarelly not using the integrated firewire channel on the SouthBridge. This deviced works properly, I just lack a IEEE 1394 device to test it fully.
The USB is supplied by Via, the hcd 2.0 USB hub as well. There is 4 USB 2.0 ports on this machine, all backward compatible to the old slow USB 1.1. This means you can connect basically anything being USB.
2) Power management:
These machines have the great performance of a full blown Pentium 4 478 pins, desktop models. Not having a mobility chip means we gonna have to limit the processor in the way it consummes energy. Advanced Power Management is the old way (APM). Advanced Control Programmable Interface ( ACPI ) is the new way of doing it, and our P4 has enhanced support for it. So a few kernel patches will be needed.
3) Kernel Configuration:
First of all, i want to stress how important it is to recompile your own kernel, for your needs. The major of vendors will have very good kernels, but they might not cover exactly all your needs, or have too much. Keeping the kernel small is one of my goal. A vanilla kernel from www.kernel.org is a good starting point. Then visit the sourceforge acpi pages and get the patches for acpi support and acpi software suspend for the kernel version you are planning to use.
Consider that patching source code is tricky, usually the patches do refer to a particular kernel version, and i will advise not to mix and match. Pay particular attention to the patches your are downloading.
This guide is not a how to on kernel compilation so i won't devellop the subject, just get yourself a kernel HOW TO at the www.tldp.org linux Documentation Project. Compiling a kernel is great as it does gives you an inside to as how powerful, versatile and modular a linux kernel is. Especially when we will shifting towards the 2.6 generation of kernels, and even more support to new hardware is added.
If you have never done it, it will takes you a few tries to get it right.
__________________________________________________________________________________ _
Patching the kernel ...
After seeing a lot of people wondering, here is a short description of the steps needed to patch a kernel source tree.
Note that these instructions are valid for a 'VANILLA' kernel, i mean a plain kernel source downloaded from www.kernel.org or one of the mirror. I cannot give instructions for 'Vendor' kernels such as RH, Mandrake or SuSE. Why ?
1) Cause i don't use them
2) Cause it has proven difficult to find out the exact patches appplied by the vendors.
So, first download a kernel source from www.kernel.org or a mirror. The latest is 2.4.20.
Once the file linux-2.4.20.tar.gz is on your hdd, put it anywhere ( your home dir is fine ), and untar/decompress it with
$ tar -xvzf linux-2.4.20.tar.gz
( or tar -xvjf linux-2.4.20.tar.bz2 if ya download the bzip2 file )
==> This will last for a while, and produce lots of output, showing you what is getting de compressed and where. The whole decompressed source is 274 megs or so, so plan some space.
Then go and download the patches you need. www.google.com/linux , enter kernel patches as a search string, you will find a lot. The patches can be anything from .patch, to .txt to .diff extensions. Note that a lot of them are compressed, like "patch.kernel-2.4.20.diff.gz "
In this case you have to :
$ gzip -d patch.kernel-2.4.20.diff.gz
$
Now the patch will have lost his .gz extension.
Next we are gonna apply the patch:
$ pwd
/home/user
$ ls
linux-2.4.20 linux-2.4.20.tar.gz patch.kernel-2.4.20.diff
$ cd linux-2.4.20
$ patch -p1 < ../patch.kernel-2.4.20.diff
( lots of output, watch out for :
Hunk Succeed IF ya have a lot of Hunk Failed at blAHBLAH...that doesn't look too good. Once patch is successfull, apply the others ( if so ), then make xconfig and you will see the new options of your patches ( acpi, Preemptive Kernel, Lock Break for the preemptive kernel, ACPI options, ACPI suspend etc ......).
__________________________________________________________________________________ __
Here is my current kernel configuration file for a 2.4.20 kernel patched with:
- 2.4.21-pre5 patch
- preemptible kernel ( preempt-kernel-rml-2.4.21-pre1-1.patch )
- acpi ( acpi-20030228-2.4.21-pre4.diff )
- acpi suspend ( patch-acpi-acpi20030228-swsusp19 )
You can see/save/dll the my configuration by clicking here (http://activate.kicks-ass.org/~laclasse/KernelConfig_2.4.21-pre5.txt)
Note that i do not have IDE cdrom support, iinstead i have scsi emulation and scsi cdrom support built in the kernel, and that is what you want if you want to burn cds.
As well, i have in my /etc/lilo.conf the following statement: append="idebus=66 iide0=autotune ide1=autotune"
This sets a defaulft bus speed of 66 Mhz for pio / non dma modes, as well as letting the kernel tune the ide channels in the best way possible.
4) Graphic Video Drivers
Making the ATI M9 working accelerated has proven to be a difficult point, as no current distribution, at the time of writing, detects it properly. Maybe Slackware 9.0rc2 with XFree 4.3.0 does. Not tested yet.
Instead majority of distro automated configuration tool of the X server will assign a generic 'vesa' driver, wich is fine for 2D, but no 3D hardware acceleration.
As well lets clarify the fact that the 9000 R250 Desktop chipset ant the R250 mobility M9 chip are very similar. Indeed the ati drivers work for both. The mobility chip adds power saving futures to the card.
ATI provides extended instructions on how to install these drivers on www.ati.com , click the 'Find a Driver' links, then enter Linux/XFree as operating system, and Radeon 9000 Pro as product. This will bring you to a page where you will find 2 differents packs, one for older 4.1.x XFree86 versions, one for 4.2.x ones. Download the one you need, "X -version" in a terminal will help you identify your current running version.
On the same page, there a Driver Release Note, as well as an "Driver installation Notes". I will STRONGLY recommend to print/copy them both for a later reference.
The install of the package should be FORCED, as stated in the site instructions.
ATI provides a few extra tools: fglrxinfo will give the similar less detailled information as glxinfo:
laclasse@screamer:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon 9000/Mobility Fire GL 8800 Prototype DDR Pentium 4 (SSE2)
OpenGL version string: 1.3.3477 (X4.2.0-2.5.1)
laclasse@screamer:~$
fglrxconfig will help you configure the server and save the file as /etc/X11/XF86Config-4.
Finally, fgl_glxgears will launch the ati demonstration of the pBuffer extension of the OpenGL library, and counts the number of Frames per second in the rotating gears cube.
Main thing to archieve is to enable the Direct Rendering of the display. You can check it by issuing the command "glxinfo | grep rendering" in a terminal, after launching the X server. This will insure that all is fine and dandy, and that 3D hardware acceleration is avalaible.
Here is more detail on the driver install itself.
http://sagerforums.com/forums/showt...=&threadid=1555
5) Sound
I currently use the Alsa modules ( www.alsa-project.org )in their latest version, 0.9rc8a. DO NOT USE the alsa stable branch ( 0.5 ) as it is deprecated, and WILL NOT work. I believe Mandrake comes with Alsa, and a few other should have the option avalaible. I install mine by hand and compile the sound modules on the machine.
3 packs are essential: alsa-driver, alsa-libs and alsa-tools.
Decompress / untar them all in a directory of your choice, then go to the alsa-driver drirectory. I use these options:
$ ./configure --with-kernel=/where/your/kernel/sources/are --with-cards=intel8x0 --with-sequencer=yes --with-oss=yes =with-isapnp=auto
A "./configure --help" will give you all extra compilation options or optimization avalaible by the package.
There is a good alsa How To on the main project site, so please read it, as it can be little confusing. Once again the performance resulting is worth the time spent on it. Alsa gives me digital out control, plus depth and center/bass settings. Cool, i have a red laser light coming out of my SPdif out port ;)
6) Earlier experiments:
Here is some comment made earlier, and i thought it was of interest.
After several kernels being compiled and tried, here are the conclusions of 4 days work. I own a 5600D Clevo/Sager/Pr omedion, specs as follow: P4 2.4, 512 DDR 1 slot, ati 9000 Mobility 64 DDR, 1400x1050 TFT, 40 gigs HDD, DVD/CDRW Combo, floppy.
This is a true exploration throught hardware. The first thing i would like to bring is the design: My machine is built around a 82845 845 (Brookdale) Chipset labelled i845E by Intel connected to a ICH3M Southbridge. The ICH3M southbridge is a implementation for ata100 on ultra mobiles systems, and is adapted to mobile pentium III processor.
Next is the fact that the i845E chipset is supposed to be connected to a ICH4 chipset, as it is shown in the manufactu rer design here http://www.intel.com/design/chipsets/845e/index.htm?iid=ipp_desk_chip+prod_845e&
Is it a special implementation on our laptops ? If yes where is it documented ? These questions have made me consider a hardware flaw, but i am not sure.
I have compiled and run successfully 2.4.18, 2.4.20, 2.4.20 with preempt, ide, acpi,acpi-swsp patches in the stable category, and 2.5.54, 2.5.62 in the devel category.
I'm currently running a 2.4.21-pre4 kernel, with the latest acpi patches. This is running of my choice distro, Debian/GNU Linux Sid Testing/Unstable.
With this i am glad to say that:
1) USB 2.0 works :
ehci-hcd 02:0a.2: VIA Technologies, Inc. USB 2.0
ehci-hcd 02:0a.2: irq 5, pci mem e091fc00
usb.c: new USB bus registered, assigned bus number 3
ehci-hcd 02:0a.2: USB 2.0 enabled, EHCI 0.95, driver 2002-Dec-20
2) Firewire modules are loading
Module Size Used by Tainted:
ohci1394 17512 0 (unused)
ieee1394 34060 0 [ohci1394]
ohci1394: $Rev: 693 $ Ben Collins <bcollins@debian.org>
ohci1394_0: OHCI-1394 1.1 (PCI): IRQ=[11] MMIO=[e0204000-e02047ff] Max Packet=[2048]
ieee1394: SelfID completion called outside of bus reset!
ieee1394: Host added: Node[00:1023] GUID[0000000000140816] [Linux OHCI-1394]
Unfortunately no firewire device, so maybe someone could try it.
3) Sound : I use Alsa 0.9rc7 compiled from source with this options:
./configure --with-cards=intel8x0 --with-sequencer=yes --with-oss=yes --with-isapnp=auto --with-kernel=/home/laclasse/linux-2.4.21-pre4
I have compiled the OSS intel kernel drivers as modules, and i would recommend anybody to install Alsa. There is a huge performance boost on all sound apps, games as well. Doc to compile and download of source packages can be found at http://www.alsa-project.org
4) DMA transfers on the ICH3M Southbridge are a problems to me. I bet they are a problem to anybody cause i suspect a hardware flaw as commented earlier
First on normal kernels (2.4.18 to 2.4.20 unpatched):
ICH3M: IDE controller at PCI slot 00:1f.1
PCI: Disabling device 00:1f.1 due to ressources collisions
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda: pio, hdb: pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc: pio, hdd: pio
So this is of interest, as the we can see that the IDE controller is in pio mode and not DMA.
at this point i run # hdparm -t /dev/hda
Timing buffered disk reads: 64 MB in 3.49 seconds = 18.33 MB/sec
Now according to http://www.intel.com/support/graphics/linux/udma.htm , this is a burst pio mode. Not DMA. I challenge ANYBODY to go in the bios of their Sager/Eurocom/Alienware/Promedion/Clevo 5600D and manage to CHANGE the default [pio/dm a2] to UDAM5, as the chipset should support, and as advertised.
Then i run a 2.4.21-pre4 pre patched with the latest hedrix ide-patches, ide-2.4.20-pre5-ac4 and here is thbe difference :
ICH3M: IDE controller at PCI slot 00:1f.1
PCI: Enabling device 00:1f.1 (0005 -> 0007)
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda: pio, hdb: pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc: pio, hdd: pio
:cry: Halas still no DMA enabled. Off course the hardisk reports
hda: host protected area => 1
hda: 78140160 sectors (40008 MB) w/2048KiB Cache, CHS=4864/255/63, UDMA(100)
I then made a script to run at boot :
#!/bin/bash
hdparm -c1d1X69 /dev/hda ;
hdparm -u1 -k1 /dev/hda ;
echo "Forcing DMA and 32bit transfert ......................done" ;
echo "Enabling ATA 100 Mode
................................done" ;
As well i have append="idebus=66 ide0=autotune ide1=autotune" in /etc/lilo.conf. So i get
Kernel command line: BOOT_IMAGE=Linux-2.4.21pre ro root=301 idebus=66 ide0=autotune ide1=autotune
ide: Assuming 66MHz system bus speed for PIO modes
now a hdparm -t /dev/hda reads :
Timing buffered disk reads: 64 MB in 3.43 seconds = 18.66 MB/sec
Well wasn't worth the patches. Note that i am using a 25 % throttle on the p4 at all times, because playing RtCW in linux for 2 hours without has brought the lappy to 89 Celcius, and i will not recommend it. The acpi patches to whatever kernel you are running are essential. Get them here http://sourceforge.net/projects/acpi
and you can try the software suspend here
http://sourceforge.net/projects/swsusp
After the ACPI is successful, you can control the processor throttle, limit temperature, as well as checking the temperature. There is a gkrellm patch to monitor the temperature throught acpi at http://gkacpi.sourceforge.net
You can see the throttling states by issuing
#cat /proc/acpi/processor/CPU0/throttlingstate count: 8
active state: T2
states:
T0: 00%
T1: 12%
*T2: 25%
T3: 37%
T4: 50%
T5: 62%
T6: 75%
T7: 87%
As you can see i use a 25 % throttle. you can change that by doing :
# echo -n 0 > /proc/acpi/processor/CPU0/throttling
#
this will set your processor at 100 %, no throttle.
...to be completed and continued.