Gentoo Linux on the Dell Inspiron 5150

Linux Installation and Compatibility Overview

by Nalin Singapuri
Update: 1/09/04:
Though there is a good wealth of information on linux compatibility later in this document I would like to vent to those considering purchasing this laptop. My 5150, as of tomorrow (1/10/04) is 6 months old. In that time my system has been exchanged twice, my power supply twice, and my motherboard once, resulting in a significant amount of downtime and inconvience. As might be expected, this is rather disappointing and regretable, and the series of problems and lack of solutions has affected not only my personal purchases from Dell, but also those made on behalf of my employer.
Due to the number of problems with my system, I have contacted and have exhasted every avenue provided by Dell for consumer complaints with a simple request...replace the series of malfunctioning laptops they have shipped me with a single new machine, or allow for a full refund on the system (this request was made at a time when my machine was yet again, broken). Even this simple request they are unwilling to accomidate, and as such I am on the verge of pursuing legal action. I cannot and would not reccomend this (or any other) Dell branded laptop to anyone, if your are browsing for compatibility information prior to purchasing, I would most strongly urge you to visit other vendors, such as IBM, or look into "barebones laptop kits" such as those provided by asus. I can handle a lot of things...indian tech support works for me, one or two problems are acceptable, but downtime a hair under 20% with ground shipping on a yet again broken laptop really streches my patience, and I urge potential buyers to weigh this and similar dell issues into their decision before purchase.

Update: 11/03/03:
Many of the disorginized updates have been consolidated to removed to eliminate clutter.  From now on I will try to update this page approximately once per month and merge prexisting updates into the general text, because I find that this is a resource (geared towards and used) for doing initial installations.

  1. Preface
    This document attempts to provide compatibility information and limited installation guidance for the Dell Inspiron 5150.  Use all content at your own risk.  Contributions are welcome, as are questions and request for help on specific issues, though I ask the latter be done only after throughly reading this document and googling relevant information.  A lot of this material is recycled and/or adapted from compatibility information about other dell models [], and now also from the handful of users who seem to have embraced the Inspiron 5150 and installed on it.  Other resources are listed later in this document.  Please direct all e-mail enquires to nsingapu_AT_cs_DOT_du_DOT_edu.
  2. Summary
    The following lists compatibility with various kernel versions I have tried as they are named withing gentoos portage package manager.  Currently the development sources work great and information below has been updated to be more current for 2.6.  2.4 (information) is now a bit stale, in particular gentoo sources are outdated and now have the same level of general compatibility as ac.  The package names below are in general specific to 2.4 kernels.  Note that Gentoo, being a compile from scrach distribution, at the time of this writing required atleast one 2.4 series kernel to make some packages, but this is rapidly evolving to allow for a system with out the legacy kernels.
    Please note that this guide has been compiled over the better part of a year and quite ungracefully mixes 2.4 and 2.6 specific steps.  Generally this is because I was unfamiliar with installtaion of 2.6 when parts of this guide were written, and am too lazy to update the relevant parts.  For gentoo (or other distro) users, the gentoo linux forums now contain a wealth of information which I have omitted.
    Purple indicates a gentoo linux package name

    Turquoise indicates a module name

    * indicates Supported

    ? indicates No/Limited Expirience - Generally Unknown

    - indicates unsupported

    Hardware Resource/Feature
    ac-sources (2.4.22-pre6-r1)
    gentoo-sources (2.4.20-r5) development-sources (2.6.0-test6)

    video (ATI Mobility Radeon 9000)
    2.4:xfree, xfree-drm, radeon (from xfree drm)
    2.6:xfree, radeon (from kernel)
    s-video out ?

    2.4:alsa-drivers, intel8x0

    reported to be working conexant based modem
    (I cannot compile the conexant drivers, perhaps due to gcc version, so info on this would be helpful)
    ethernet (broadcom 4400)
    2.4:bcm4400 or b44 (not in all kernels)

    keyboard special keys
    i8k (limited functionality, not necessarily needed)
    2.4:builtin support
    Update 8/05/03
    2.6:Synaptics will work per these instructions

    acpi (see comments below)
    events (using acp
    id scripts)






    generally untested, but seems to report accurately

    power and lid, the "i" button seems to be bios implemented (no xev output)



    info only, 18k has better info (supports all 3 states rather then boolean) but is unable to control fan



    ac: throttling/information only, no performance setting
    dev: its gone (perhaps replaced by cpufreq, as now cpufreq has options to enable this depricated interface)

    Update 10/07/03: possibly outdated here
    ac: Lists states [1,5] but only recognizes 1 and 5 and only 5 is fully functional
    dev: Same as above but without X (4) swsusp will shutdown and reboot, and recognizes (3) but not fully functional
    thermal zone


    ? (if memory serves its not patched in)
    Update 10/07/03: possibly outdated here
    script below incorperates it, itsd picky about the string which sets it and tends to scale slightly off from what you echo to it

    i8k (limited functionality)
    ac: can read state but not all keyboard events cannot particular fan)
         If someone can confirm this it would be appreciated
    dev: same but catches all getable keyboard events (ie does not catch eject, crt/lcd, brightness)

    lspci does list items on my mini-pci modem so I assume it to be working

    requires arguments to CORE_OPTS
    Broadcom TrueMobile 1400
    Update: 11/14/03
    Reported working with third party drivers
    Requires proprietary third party drivers.  I did not purchase and do not own this card, nor would I install such drivers (if I did own the card) as in my opinion such these drivers will limit incentive for companies to develop native linux drivers, there was quite a lively slashdot discussion about this theory.

  3. Installation of gentoo:
    This installation guide is rather short and assumes that the reader is concurrently using the Gentoo Docs referenced.  A word on gentoo:  It is not for the feint of heart, I went to gentoo after a several year on again off again deal with redhat.  I found it great in that I learned linux, as opposed to learning about linux.  I found it shitty in that I have (and on a number of occasions have exercised) the power to severly screw up my system.  Its a good learning tool, its a great distro if you want current packages, a decent level of stability, and one of the bext and most freindly support forums out there, but the installation is UGLY, if you have never used linux I do not recomend gentoo, get your feet wet and then try it out, but many would argue otherwise.   Perhaps you will disreguard my warning and thank them later, or hate them later...whatever, just be forwarned.  In the spirit of open source feel free to adapt the information herein to whatever the hell you want to install on your machine, just dont flame me with that repetitve anonymous slashdot post about gentoo ("the gentoo zealot translator" or something to this effect)...thanks!

         Update 10/07/03: No longer necessary as of gentoo 1.4 official release (not rc).  Obviously the instructions below are dated, kept for the benifit of those trying other distros with similar circumstances, use the gentoo install guide for gentoo
         CD-R containing the Knoppix Linux Distrubution
         CD-R containing the file bcm4400-1.0.1.tar.gz (google it), preferably extracted and compiled.
         Update 10/07/03: This is what you need now
         CD-R containing the Gentoo Linux Distrubution
         High speed internet connection
         Set bios to boot from cd-rom before booting from hard disc, boot knoppix
         As root, insmod /path/to/bcm4400.o; pump -i eth0
         Install as outlined in the Gentoo Linux Alternative Installation Guide and the Gentoo Linux x86 Installation Guide (the latter is referenced by the former)
         Notes/Appended information on the gentoo linux installation instructions specific to your hardware:
         Use the hdparm string given in the begining of the x86 installation guide on all boots, it speeds up disk access (~4mb/s to ~23mb/s)
         Update 10/07/03:
         Now running reiserfs, with 2.6.0test6 and better boots at approx same speed as ext3 with better times after boot and no slowdown at boot for periodic checks that ext3 does.  Also I received a replacement machine frome dell to correct some screen and acadaptor issues I had, the second time around I left windows intact due to ugly battery life ~2hrs with a lot of acpi and custom stuff done as described below.  The updated bios on the new machine, which allows one to specify battery and ac screen brightness, has minorly improved on this but the battery time is still undesireable at best

         For partitioning, I used cfdisk and completely wiped out the ntfs partition.  Here is the patition sizes I used and corresponding mount points:
    Part Type
    FS Type
    [Mount Point]

    Dell Utility
    Linux ext3


    Linux ext3 1019.94

    Linux ext3 8192.38

    Linux ext3 2048.10

    Linux ext3 2048.10

    Linux ext3 8192.38

    Linux ext3 1019.94

    Free Space

         The sizes, particularly those of /home and /opt are highly dependant on a given system (or rather how such a system is used, for instance different distros use opt differently, gentoo uses it to hold open office, unreal tournament, ut2003, and i believe a splattering of smaller programs such as rar and unrar.  Some distros throw kde in opt (suse?)).  Adjust to your taste, or omit them entirely, I use them only to enhance security and allow for more resuable space with multiple distributions.  Minimally you should have a 3 partitions, a boot of ~32-64mb, swap space which is about double the size of the ram (or double the amount of ram which you will intend to purchase), and a single partition of approx 4gb or larger.
         With cfdisk, one does not need to specify the partition types, use the ext3fs -j or alternatives appropriate to the desired filesystem to initialize the disk type.
         Leave the hdc1 partition intact (and bootable dosent hurt), it is supposed to have some functionality necessary for suspend/restore and is difficult to restore.  The bootable flag will force you to accept the licence agreements for all included software, though I have backed the contents of the drive up (it mounts as fat16 if memory serves) and thus have accepted them only temporarily so that I reserve the right to pursue a windows refund as I tend not to accept a licence agreement which grants a corperation the right to hack into my system).  An aside here, some calls to dell tech support revealed that the Dell Utility partition is necessary for system diagnostics
         In knoppix if preservation of the ntfs partition is desired you can try ntfsresize from the command line.  I have not used this utility, please consult man page for help.  In this case you definately should not delete the Dell Utility partition, as it is necessary for windows suspend

    My /etc/make.conf file is available here.  You will notice I have enabled the pentium4 arcitecture which is commented as unstable in the file, I did this after finding independent sources which attested to its stability, and have had no hard crashes other then those inspired by loss of power or acpi testing.  This gem is the beautiful thing behind gentoo, I cannot stress enough, if you are doing a stage one install customize this to your liking.

         compiling the kernel

         After testing the kernels listed above, I settled upon the ac-sources as they had both acpi support and a workin ethernet driver.  A .config file optimized for the manner in which I have chosen to setup my hardware is available here.  The 2.6 series would not bee a bad choice if you can get ethernet and the mouse driver working. Update 10/07/03: 2.6 works for daily use, 2.4 is still necessary to build a lot of packages
         my /etc/modules.autoload is available here for 2.4 and here for 2.6

    I appended "echo 0 > /proc/acpi/processor/CPU0/throttling" to /etc/conf.d/local.start.  This allows the processor to start at full load, and will reduce the time necessary in order to compile and install gentoos packages.  I will at some future point write a script to handle bootup throttling in a manner which encompasses the ac adaptor state.

    Install packages specific to your sysem.  There are a number of good guides available from gentoo on things such as desktop, alsa, printing and the like, with much of the content below I assume you are following an applicable guide.
  4. Sound - alsa drivers
    I used the gentoo alsa-drivers package, and the alsa guide.  Using the intel8x0 driver sound is functional but a bit scratchy, especially when the cpu is throttled.
  5. Graphics - xfree-drm
    I have used xfree using xconfig (your guess on the hsync and vsync is as good as mine, I repeatedly contacted dell for these values to no avail) to get x working as outlined in the gentoo desktop configuration guide.
    The gentoo 3d acceleration guide and the xfree-drm drivers will significantly boost performance, use the radeon driver.  There is one caveart here, compile agpgart as a module, add the following to a file within the /etc/modules.d directory (i used /etc/modules.d/aliases) and run update-modules
    alias /dev/agpgart      agpgart
    #options agpgart        agp_try_unsupported=1
  6. ACPI
    As previously mentioned ACPI support is rather specific to the kernel you choose to use, with the ac-sources I get a bootable sysem with some level of support, this was also the case with the development sources.
    Specifically, I got good read support for all the apci drivers.  Write support to /proc/acpi/sleep and /proc/acpi/processor/CPU0/performance did not function correctly.  Sleep states 1 through 5 are available, 1 suspends but will not resume, 2-4 do nothing, and 5 works correctly.  Performance lists two states but placing the computer in state 1 does not work and sometimes freezes the machine.  /proc/acpi/processor/CPU0/limit only functions when throttling is set and performance is not altered, probably due to the performance problem.
    As an aside, with the 2.6 series kernel, /proc/acpi/processor/CPU0/info states that performance is not available, and if memory serves lists only a subset of the sleep states, so I suspect that the non-working acpi functionalities are due to bios bugs that have been noticed but not handled in the most recent acpi implementations.
    I have implemented relatively good power management using the functioning acpi stuff along with the cpu-freq module, and the acpid package to respond to acpi events.
    Update 7/29/03:
    have completed a very alpha acpid script, it is available here it optionally uses /dev/speech (created by speechd, it basically pipes stuff to festival) to ouput events and status using text to speech and is relatively configurable.  Basically it allocates 3 power states, queries ac adaptor and screen to see which one to use, and runs user defined programs which generally correspond to some method of saving power in the battery powered howto (I believe I got everything but logging in there, I dont know how to do logging changes on the fly but suspect its very distro dependent).  To use acpid you need to create event files in the /etc/acpi/events directory, tail -f the /var/log/acpid file to get the event names, and expand on their default event as necessary.  Also the script can be run standalone, i run it twice at boot (once in case I dont enter x, and the second time optional when entering x to set dpms and brightness).  Anyway, use it expand upon it, whatever, but please contribute any useful changes back to me so that I can incorperate them.  Sooner or later I will put up my event scripts, im still working on getting the tts to an adequate but not annoying level (the wow factor last only a good week)  
  7. Suspend
    Minimal sucess (no x, likely due to dri) with swsusp.  Looking for a patched or patch for a radeon driver which will allow for hibernation while X is running
    Other suspend states are largely unsupported, seems to be issues with the bios (perhaps I should have kept windows around so that I could have better tested this).  A buddy of mine bought this laptop at same time as me, he exclusively uses windows and has reported that windows suspend display the symptoms im getting, mainly it looks as if the laptop bios is shitty
    Update 10/07/03: The BIOS is indeed shitty.  There are a number of bios version varying extremely in both functionality and look one is blue gui and lacking all but the most basic tweaks.  The other that I have used is black text based and contains better functionality.  There have been a number of people who have contacted me with random errors that I cannot repeat that have eventually been narrowed down to BIOS bugs or problems that upgrading the BIOS fixes
  8. Special keys
    Update 7/30/03:
    The dev kernels i8k seems to get all the hotkeys except those implemented by bios (see notes above for the particulars).  Though I am not 100% sure the ac kernels did not, I dont believe they caught the hotkeys (frankly I know I tested them some number of times and they did not work, but forget which kernel(s)).  If someone could test this (for ac-sources) by running modprobe i8k; xev and then pushing function+key for the various keys (it displays output if it gets them) Ill update the information here.
    Anyway, to get the function keys working, you have one of several options, the one that I prefer most is a program called lineakd, as I have found with other hotkey enabled keyboards that this program has a great level of support for different boards.  If you want support now or for some other program you basically need to you find keycodes using xev as above (xev gives 2 or more "paragraph sized" events per keypress, somewhere in the last paragraph should be the string keycode XXX, you want the XXX), and bind these to programs within the configuration of lineakd or hotkeys or some program of your choice.  Below are the keycodes I got but they may be regionally specific, ie a non-us laptop may get a different set of codes.
    Anyway, add the following somewhaere within lineakd.def, I put it in immediately after the i8k definition (which we will not use because it has media stuff and no suspend)
       brandname = "Laptop/notebook"
       modelname = "Dell Inspiron 5150"
         suspend                    = 223
         sysreq                     = 111
         volumeup                   = 176
         volumedown                 = 174
         mute                       = 160
       [END KEYS]
    [END DI5150]
    # end Dell Inspiron 8xxx Laptop

    Then as your day to day user, run lineakd -c DI5150
    edit ~/.lineak/lineakd.conf and add the commands you want to execute.  For instance, volume down, if you have aumix (works with alsa or oss i beleive), could be aumix -v -5.   Since volume up and down are the extent of my keymapping I will omit my conf file until I have something non-embarassing in there (ie until the magical suspend deity looks favorably upon me)
    Update 8/3/03
    The pcmcia-cs package is a bit of a pain to get going with the 2.6 series kernel and with this laptop, as it wont compile with the native kernel, and after you change the kernel to allow for compilation, it will lock up the maching when it probes io_ports.  This section is tentative, as I am working on a more automated solution, but the contents contained here got my pcmcia up provided I manually run a few commands at boot.  Heres what I did to get pcmcia operating:
    1.  (Specific to development kernel 2.6.0_test2 and perhaps other 2.6 kernels)  Modify the file  /usr/src/linux/include/scsi/scsi.h lines  228-230.  They should look like this:

    typedef struct scsi_lun {
         u_int8_t  scsi_lun[8];
     } ScsiLun;

    emerge (or install from source) the pcmcia-cs package, (step 2 may be needed before the emerge)
    2.  rebuild your kernel.  Include (use modules when indicated here, as some of them need custom options so they dont freeze when loaded.  2.4 kernels have a differnt tree structure but the options are all in there)
    bus options->
       [*] ISA
          <*> PCMCIA
          <M> yenta-socket
       pci hotplug->
          <*> hotplug
    networking support->
          [*] wireless
          --------mabye needed, not sure but seems to work---------------
          <M> Hermes chipset
          <M>    Prism 2.5
          <M> Hermes PCICIA
    3.  edit /etc/conf.d/pcmcia.  Change pcic so that 'PCIC="yenta_socket"'.  Change the core_opts so that 'CORE_OPTS="probe_io=0"' (I think you can get away with less restrictive core opts, but this does not seem to affect functionality with my PCMCIA devices, more information on this soon).
    4.  lsmod, make sure that pcmcia_core, ds, and yenta_socket are not listed, if they are reboot as pcmcia_core cannot be removed
    5.  After boot you have to manually load the pcmcia init script...why? because if you modprobe any of the drivers they load the underlying drivers and then the CORE_OPTS is ignored.  So you need to start the pcmcia, it will fail due to lack of yenta_socket (can someone please tell me why the '/sbin/modprobe $PCIC $PCIC_OPTS 2> /dev/null' from /etc/init.d/pcmcia seems to be ignored!), but loads pcmcia_core with the CORE_OPTS. 
    You can then modprobe yenta_socket, and then start pcmcia again and it will succeed.  I know it is a pain, im working on a more automated method of starting PCMCIA so hopefully there will be an update soon.  Incedentally I am fairly sure you could do it by setting core opts up in /etc/modules.d, but I am trying for a solution where the options are set in one and only one place, Ideally it would only involve loading yenta_socket within pcmcia
    6.  Your card should be recoginised and configured automagically, in my case it is a netgear ma401 (dell has a supported mini-pci 80211.b ~$40, i think it is the truemobile 1150, but when I bought my machine was not available in the configurator.  I want to save my mini-pci slot until g or something faster is supported under linux, and thus have opted for something which is more cross platform and which wont be yet another peice of useless hardware when I upgrade that mini-pci slot).  For wireless cards the iwconfig in the wireless-tools package can be used to set encryption and the like.  I will omit any reveiw of the cards performance as wireless is not my forte, but I will say I got this card because it was one of mabye three compatible ones carried by frys (I was in a hurry), and there were a number of linux users who attested to its range.
    Update 8/5/03
    After veiwing a 5150 hint on PCMCIA here and searching the gentoo forums for some help, I decided to try disabling only a limited range of the io probing (removing the 0x800-0x8ff from the "include port" line of the /etc/pcmcia/config.opts file).  This solves the problem rather elegantly as it does not depend on loading the core module with special options and thus pcmcia can be started on boot if desired.  To do this, ignore the core_opts in step 3, add yenta_socket, to modules.autoload, and rc-update pcmcia. 
  10. More to come...
    Update 10/07/03
     As one might suspect from the decreasing frequency of updates there might not be more to come...sorry folks but work has hit me like a brick, ohh the student life was so good to me...I will try not to turn into the totally delenquent maintainer but no promises
  11. A word on my machine (11/03/03):
    So mabye you hav'nt bought it yet and are just curious as to the compatibility level or whatever...I figured id throw a few words in for you just because you stuck around through some odd months of compiled non-sensicle ramblings.  First, I am biased, I love the machine, I despise the fact that dell sent me out a broken one, replaced it a month later with a refurb that broke again, and then confined me to my desktop for two weeks while they fixed it...that to me does not speak of quality and I regret going cheap on the extended warrenty.  That said overall I have been impressed with their level of tech support, other the the five minute ("moron message") hold, their techs are very willing to work with you if you have some level of technical competence.  They could give a shit that you dont have a bootable windows partition and you managed to fry your diagnostic partition (I preserved this one so I suspect that it needs the ntfs partition as the primary bootable one), which is not the level of support I have found in the past with systems provided by even IBM. With the aforementioned two week return they offered and got manager approval to send me out a replacement motherboard and let me switch it out, but I decided against it at the last moment.  Before that when there was some ambiguity as to what the problem was they got manager aproval to disreguard what their system said and send me out an ac adaptor (the short was in the motherboard after all).  Overall they seem to work with you, and say "your running linux, thats ok."
    Linux compatibility wise the bios and acpi, like that in many of Dells offerings, sucks.  It is technically flawed, it does not work well with linux, or rather with the kernels which were in circulation when I bought the machine, because it suffers from a broken DSDT which I am not comfortable with updating or fixing, as well as minor (and major) bugs in some of the bios versions.  Other then this and the lack of drivers for the onboard (mini-pci) 802.11g card, the compatibility of this machine is good.
    Its a hackers machine in that one can disassembly it down to the motherboard with a single screwdriver and without breaking any warrenty voiding seals, you could quite easily (provided you found one) install a replacement screen yourself, or almost any other single component (I balked on the motherboard because the rep seemed ambiguous as to whether it would void my warrenty).  This is in stark contrast to the archaic p90 thinkpad that is my last portable, which was best investiged with the blunt end of a crowbar.
    Overall I am impressed with the machine and think it to be a very economical way to get a high end processor, on a generally upgradable machine, but wouldnt mind not needing that "award winning dell tech support" as often as I seem to have needed them.  I dont think that with the month wait I put in upfront while they manufactured the damn thing, this would be so much to ask for.
    One other note here for those who have yet to purchase, one can save themselves a good chunk of change by using a number of sites (no affiliation). archives coupons for dell home and sb, in my case I think they saved me approximately $100. gives 3% cashback of some dell purchases (you have to enter dells site through their portal, they get a commission on the sale and give a portion of that commision back to you after 3 months), and also has forums where with a bit of diligence one can find a dell small business 10% off one time use coupon.