This is where I am going to explain the steps I took to configure Slackware 10.1 on my Dell Inspiron 700m laptop. I have found this to be a great laptop, both in general and for Linux.
This page is listed on Linux on Laptops and TuxMobil.
Hardware:
Pentium M Dothan Centrino, 1.6GHz, 2MB Cache, 400MHz FSB
512 MB 333MHz RAM
Intel 855GME chipset with Intel Extreme Graphics 2 and 64 MB shared video memory
12.1” 1280×800 TFT XGA Widescreen Display
40GB Ultra ATA Hard Drive
24x/10x/24x CD-RW and 8x DVD Combo Optical Drive
Integrated 56K capable v.92 Fax modem
Integrated 10/100 Ethernet - Broadcom b44 chipset
Dell 1450 dual band internal wireless (802.11a/b/g, 54 Mbps)
Integrated Firewire port (IEEE 1394)
2 USB 2.0 connectors
Audio jacks: Line-out (external speakers/headphone) and external microphone
Video: 15-pin monitor connector
S-Video/TV Out: 7-pin mini-DIN connector
Secure Digital memory slot
8 Cell Extended Battery
Integrated stereo sound
Sections
Installation:
Installing Slackware 10.1 on this laptop was a breeze. There are many Slackware installation tutorials out there, so I won’t go into detail.
Post-Install Configuration:
A Slackware must-have is the “checkinstall” package. This replaces “make install” step when compiling a program from source. Using checkinstall creates a Slackware package that can then easily installed or removed with the native Slackware “installpkg” and “removepkg” commands. You will also see the package when viewing the list of installed packages in “pkgtool.” Patrick includes checkinstall in the /extra directory on the third CD.
To use “checkinstall,” I mounted the third CD as follows:
mount /dev/cdrom /mnt/cdrom
And went into the /mnt/cdrom/extra/checkinstall directory. I typed:
installpkg checkinstall
and that was that. I unmounted the CD with
umount /mnt/cdrom
and moved on.
Upgrading to the 2.6.12.1 kernel
Although Slackware 10.1 installs a 2.4.29 kernel by default, it does not have many of the kernel options I would want for my 700m, like the Centrino CPU settings, power management, and the like. So, here is how I compiled my own kernel which has worked well on the 700m
I downloaded the 2.6.12.1 kernel source from kernel.org into my home directory and unpacked it. I renamed Patrick’s config file to .config:
mv /usr/src/linux/config ~/linux-2.6.12.1/.config
Then I went into ~/linux-2.6.12.1 directory and typed:
make menuconfig
The config file provided by Patrick was a good start, but after much trial and error I discovered a few modules that I had to include and a few things that needed to be compiled into the kernel rather than modules. Here are some of the kernel settings that I had to include:
Processor
Device Drivers
Graphics Support
Other
Here is my 2.6.12.1 config file. After saving these settings in the config file, I typed:
make bzImage
That compiles the actual kernel. After it was done, it was time to make the modules:
make modules
That step took the longest time. When it was done, I entered:
make modules_install
Now, it was time to copy some files over to the boot directory and set up some symlinks:
cp ~/linux-2.6.12.1/arch/i386/boot/bzImage /boot/vmlinuz-2.6.12.1 cp System.map /boot/System.map-2.6.12.1 cp .config /boot/config-2.6.12.1
Now, I went into the /boot directory and deleted the three symlinks that pointed to the current 2.4.29 kernel files:
rm vmlinuz rm System.map rm config
and then replaced those old symlinks with new ones pointing to the new 2.6.12.1 kernel files:
ln -s /boot/vmlinuz-2.6.12.1 /boot/vmlinuz ln -s /boot/System.map-2.6.12.1 /boot/System.map ln -s /boot/config-2.6.12.1 /boot/config
Almost done. I needed to edit LILO to add an entry for the new kernel:
pico /etc/lilo.conf
Look for this section:
image = /boot/vmlinuz root = /dev/hda6 label = Slackware read-only
The first thing is to fix the “image = /boot/vmlinuz” entry since /boot/vmlinuz now points to the 2.6.12.1 kernel. We need to keep an entry for the 2.4.29 kernel in case the 2.6.12.1 doesn’t boot. So, edit it so it says:
image = /boot/vmlinuz-ide-2.4.29
Then, copy and paste the 4 lines for the 2.4.29 entry (or retype it) directly underneath the 2.4.29 entry like so:
image = /boot/vmlinuz-2.4.29 root = /dev/hda6 label = Linux2.4.29 read-only image = /boot/vmlinuz root = /dev/hda6 label = Linux2.6.12.1 read-only
I had to then re-run LILO to save the changes:
/sbin/lilo
Upon reboot, the 2.6.12.1 kernel should be a LILO menu option and if selected, it should boot normally. At least, that’s what’s supposed to happen. :)
(Here is a link to a post about where and how to compile the kernel.)
After rebooting into the new kernel, I needed to set up the X server. So, I typed:
xorgconfig
and went through the questions listed. For monitor refresh rates, I found that the horizontal sync should be set to 30-60 and the vertical refresh should be to 50-100. The video chipset should be set to the Intel i810 rather than VESA with 64MB of video memory.
These settings will get X Windows going, although not at the native 1280×800 widescreen resolution. To get the 1280×800 widescreen resolution, you need to download and install the 855resolution patch.
I downloaded the file into /usr/local and then extracted the file as follows:
tar -zxvf 855resolution.tar.gz
This created a directory called “855resolution.” I went into this directory and typed:
make checkinstall
which used checkinstall to install the patch. Once installed, I typed:
855resolution -l
Which gave me a list of screen resolutions supported by the BIOS. This patch will replace one of these resolutions with another resolution that you specify. The one listed at 5c is 1920×1440, which is a resolution I will never use. So, using the 855resolution patch to patch the native 1280×800 resolution at 5c, I typed:
855resolution 5c 1280 800
This replaces the 1920×1440 resolution at 5c with 1280×800. However, I wasn’t done just yet. I need to edit the /etc/X11/xorg.conf file to put in this new resolution. After reading through the sources listed below, I determined that I needed to make a few changes in my xorg.conf file. First, I used pico to edit the file:
pico /etc/X11/xorg.conf
There are 2 things that need to be changed. First, in the “Monitor” section, the following needs to be added:
Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 848 -hsync +vsync
Then, in the “Screens” section the “1280×800” resolution needs to be added, so it looks something like this:
Section "Screen"
Identifier "Screen 1"
Device "vidcard"
Monitor "lcd"
DefaultDepth 24
Subsection "Display"
Depth 8
Modes "1280x800" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x800" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
I saved the xorg.conf file and restarted X. The 1280×800 resolution was now working great. Nice! This patch will be lost upon reboot, so I will need to add it to /etc/rc.d/rc.local to have it load each time at boot. See the entry on rc.local below.
Here is my final xorg.conf file.
I configured the kernel to use ALSA but using ?”alsaconf”did not list any sound modules. After Googling around a bit, I found some entries at the LinuxQuestions.org Slackware forum that indicated that the snd-intel8×0m module, which is the modem sound module, conflicted with the regular sound module. The fix is to add this modem module to the blacklist.
pico /etc/hotplug/blacklist
And then add “snd-intel8×0m” to the blacklisted modules. Now, upon reboot, “alsaconf” found my pci soundcard and loaded the appropriate modules. I then used “alsamixer” to unmute the channels and raise the volume. I typed:
alsactl store
to store the settings. Sound now worked fine.
This particular Dell 700m came with a Dell 1450 802.11 a/b/g integrated wireless card. The 700m can also come with other wifi cards, including the Intel 2100/2200 ones which have opensource drivers. Although I could not find any native Linux drivers for this particular card, using the Windows drivers with the NdisWrapper module gets the card working fine. Before you do anything, make sure you find out exactly which wifi card your 700m has, either by using the command “lspci” or by entering your 700m’s service tag into the Dell support site, both of which should give you a run-down of all the componetnts.
Here is how I set up the 1450 wifi card:
First, I had to obtain the Dell drivers. I currently dual-boot this laptop with Windows XP. So, I created a Dell account and downloaded the drivers from the Dell website. I found that the Dell driver file is called “R94827.EXE.” I installed this program which created a folder called “r94827.” The actual driver in this folder is “bcmwl5a.inf.”
I rebooted into Slackware and mounted my windows partition:
mount -t vfat /dev/hda1 /mnt/windows
and then browsed into the r94827 folder. I copied the folder into my home directory on Slackware.
Ok, time to get ndiswrapper. I went to the ndiswrapper’s site and downloaded the latest stable version (1.1 at this time) of the source code into /usr/local. I untarred the file:
tar -zxvf ndiswrapper-1.1.tar.gz
which created a directory called “ndiswrapper-1.1” after the untarring. I went into this directory and did the following:
make distclean make checkinstal
which again used checkinstall to install the Slackware package. Ok, now that it was installed I had to install the windows driver. I went into the r94827 folder (you need all the files in the folder - just copying the .inf file won’t work):
ndiswrapper -i bcmwl5a.inf
Now, to check whether the module and driver loaded, I typed:
ndiswrapper -l
which output the following:
Installed ndis drivers: bcmwl5a driver present, hardware present
I then loaded the module:
modprobe ndiswrapper
So, the module was loaded and the driver was configured. I checked the wireless interface itself:
iwconfig
and saw a “wlan0” interface. Nice. I then typed:
ndiswrapper -m
to add ndiswrapper to the list of loaded modules.
ifconfig wlan0 up
showed me that it was configured but had no IP assigned to it yet. That’s because my router is set to use WPA encryption and so of course my wifi card could not authenticate to get an IP. So, it was time to configure WPA.
The WPA Supplicant script is a little app to enable WPA encryption in Linux. WPA is still in its early stages so there are no nice little GUI apps or anything. All command-line, baby.
Ok, so I went off to the wpa_supplicant site and downloaded the latest stable version of the source code into /usr/local and unpacked it:
tar -zxvf wpa_supplicant-0.3.8.tar.gz
This created a directory called “wpa_supplicant-0.3.8.” Now, reading the README that comes with wpa_supplicant I learned that I had to create a .config file before building this package. The .config file lets you decide what types of drivers or types of encryption you want to include in your wpa_supplicant. The instructions are pretty straightforward. Here is my final wpa_supplicant .config file.
Now that the .config file was created, I built the program:
make
I then copied the two binaries to /usr/local/bin
cp wpa_cli wpa_supplicant /usr/local/bin
According to the wpa_supplicant README, the next step is to create a configuration file with your network settings. They recommend placing this file in /etc although it really could be anywhere. After reading through the sample configuration files, I created a configuration file like this:
pico /etc/wpa_supplicant.conf
Here is what I added to the wpa_supplicant.conf file:
network={
ssid="myessid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="myencryptionkey"
}
Obviously, “myessid” and “myencryptionkey” were actually my true essid and WPA key. Ok, now it was time to test. There are 3 parameters you must pass to the wpa_supplicant script: the driver, the interface, and the location of the configuration file. You can also pass some parameters to tell wpa_supplicant to output debugging messages or to run in the background as a daemon.
To test things out, here is what I typed:
wpa_supplicant -c /etc/wpa_supplicant.conf -D ndiswrapper -i wlan0 -d
The first variable -c tells it where the wpa_supplicant file is. The second variable -D tells it what driver to use. The third variable -i tells it what interface to use and the last variable -d tells it to output debugging messages.
After typing this command, I got a lot of messages which seemed to indicate that the authentication worked. To check, I typed:
iwconfig
and it showed wlan0 as being up and running and associated with my router but still no IP. Ah, I forgot two steps—bring down eth0 and get wlan0 an IP:
ifconfig eth0 down dhcpcd wlan0
That got wlan0 a new IP and now I was surfing wirelessly. The little green “wifi” light on the 700m even lit up—pretty cool. Once everything worked ok, I removed the -d variable and in its place added: -Bw, which tells wpa_supplicant to run in the background and to wait for wlan0 to come up before attempting to negotiate the password. So, now my wpa_supplicant command looks like this:
wpa_supplicant -c /etc/wpa_supplicant.conf -D ndiswrapper -i wlan0 -Bw
I added this to my rc.local file (see below) to have it start on bootup.
The only bummer I found with wpa_supplicant is
that it does
not seem to work if I have my router’s essid set to not
broadcast.
With help from Jouni, the wpa_supplicant developer, I now have wpa working great with the essid broadcast disabled. It turned out that I needed to use ap_scan=2 in the wpa_supplicant.conf. When I first added that, however, it still didn’t work. Then, Jouni pointed me to the comments in the sample wpa_supplicant.conf on his site, which explained that if you use ap_scan=2 with hidden essid’s, you need to specify the encryption algorithm and the group setting variables in the wpa_supplicant.conf file. So, now, my new wpa_supplicant.conf file looks like this:
ap_scan=2
network={
ssid="myessid"
scan_ssid=1
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="myencryptionkey"
}
I had to use TKIP on my router instead of CCMP/AES since I also have an older Apple iBook with does not support CCMP, only TKIP. But, wpa now works great with my essid broadcast disabled.
Boy, this took awhile to figure out. First, I found that I had to make some changes to CPU frequency settings in my kernel. After quite a bit of trial and error, I found that I had to enable these parts of the kernel as follows:
*Power management options (ACPI, APM)
*Power Management support - compiled [ * ]
*CPU Frequency scaling
*proc/acpi/processor/../performance interface (deprecated) - compiled [ * ]
Ok, once I rebuilt the kernel with those modules, I then had to grab and build a couple of items: the cpufrequtils utility (which creates two handy helper apps: cpufreq-info and cpufreq-set) and cpufreqd which is the cpu frequency daemon. Oh, and by the way, cpufrequtils requires sysfsutils to work, so gotta get that too.
After downloading and untarring the apps, I built them in this order: sysfutils, cpufrequtils, and then cpufreqd. They were very simple to compile: just ./configure, make, and checkinstall.
Once they were installed, I then had to modprobe the speedstep module and governors:
modprobe speedstep_centrino modprobe cpufreq_powersave modprobe cpufreq_ondemand modprobe cpufreq_performance
First, I issued the following command:
cat /proc/cpuinfo
and this told me that my CPU was running at full speed (1.6GHz). I then issued this command:
cpufreq-info
and this gave me lots of useful information about my CPU and the available governors. Ok, next it was time to edit the cpufreqd configuration file, which by default is located at /usr/local/etc/cpufreqd.conf. This conf file basically sets out the profiles (i.e. different types of states) and then the rules (i.e. when to use each particular state). The default file is a little confusing, but I found some very helpful Gentoo documentation that included a cpufreqd.conf file used by a Gentoo developer which is much easier to understand. I used that cpufreq.conf file as a starting point. Note that, as the Gentoo doc says, you have to put the minimum and maximum CPU speeds in in khtz, not percentages like the default cpufreq.conf would lead you to believe. One way to find out what your CPU minimum and maximum khtz is to issue this command:
cpufreq-info --hwlimits
Which for me output something like:
minfreq=600000 maxfreq=1600000
By the way, the one thing in the Gentoo doc that did not work for me was the section on compiling the kernel. The kernel settings I listed above I built as modules for the most part. The Gentoo docs says to compile everything in to the kernel, but that did not work for me for some reason.
Ok, so once I had my cpufreqd.conf doc all set up, I just started the daemon:
cpufreqd
The daemon ran in the background and worked! When I took the laptop off AC, the CPU use, which had remained at full speed, dropped down to 600 MHz. Since I like to use CPU throttling all the time, even when connected to AC, I modified my cpufreqd.conf file so the “AC” rule was set to use the “ondemand” governor instead of the “performance” governor.
One more thing: I had to edit my /etc/fstab to mount the /sys virtual filesystem. I added this to fstab:
sysfs /sys sysfs defaults 0 0
It was a chore but I’m glad I got it working. The GNOME CPU monitor applet even works fine and changes when I’m using the ondemand governor as the CPU idles and then ramps up when in use. Cool!
Well, I got Suspend to RAM to work. The big help was the 700m page by Benedek Frank (link below). Basically, I had to download a script called “video_post” and then create two little scripts in the /etc/acpi directory. You can get the script here (it’s called “attachment.cgi” which you can just untar normally and execute “make”). First, I created a script called “lidbtn” and put it in /etc/acpi/events/lidbtn:
event=button/lid action=/etc/acpi/lidbtn.sh
I then created another script in /etc/acpi/lidbtn.sh:
#!/bin/bash lid_state=/proc/acpi/button/lid/LID0/state test -e $lid_state || exit 0 if cat $lid_state | grep closed > /dev/null then echo "lid closed - suspending" #CONSOLE="fgconsole" chvt 1 rmmod ndiswrapper rmmod b44 rmmod ehci_hcd rmmod uhci_hcd echo "mem" > /sys/power/state modprobe i830 /root/emu/video_post #chvt $CONSOLE chvt 1 chvt 7 modprobe ndiswrapper modprobe b44 #/etc/rc.d/rc.network restart else echo "lid opened - resuming" fi
I then “chmod a+x” this lidbtn.sh script to make it executable. I also discovered that I had to modprobe the battery, button, ac, fan, and video modules in order for this to work. I wonder if it would work if I were to compile all those settings into the kernel rather than as modules? If you know, please drop me a line. I’ll have to test it at some point. Compiling those options—battery, button, ac, fan, and video—does work, so they don’t need to be modules and that’s how I have it now.
Anyway, everything seems to work well—when I suspend within X, that is. If I am in my framebuffer console, it will come back from suspend but the video_post won’t refresh the video card and I get no display. Still, this is pretty good. There are some commented lines there as I am still tweaking the script, but it does work as-is. I will keep working on it and will update this if there are any changes.
Ok, after all that, I wanted some of these things to be set up upon each boot. So, I edited my /etc/rc.d/rc.local file to include the following:
/usr/sbin/855resolution 5c 1280 800 /usr/local/bin/wpa_supplicant -c /etc/wpa_supplicant.conf -D ndiswrapper -i wlan0 -Bw dhcpcd wlan0 modprobe speedstep_centrino modprobe cpufreq_powersave modprobe cpufreq_ondemand modprobe cpufreq_performance /usr/local/sbin/cpufreqd
These commands set my 1280×800 widescreen resolution and configure my wlan0 wireless interface with wpa encryption upon each boot. It also loads the speedstep and CPU throttling modules and starts the cpufreqd daemon.
Conclusion
So there ya go. Virtually everything on the 700m is working fine in Slackware. I have not tested the firewire or USB ports but I am pretty sure they work fine. The SD card reader, however, I have read is not supported. Ah, well. There has to be something to mess around with!
Anyway, this is my attempt at recreating the steps I took to configure Slackware 10.1 on my Dell 700m laptop. This worked for me—YMMV. Also, this is a work-in-progress, so this document may be edited in the future.
Please contact me if you have any comments or corrections. Thanks!
References:
Dell 700m on Debian
| $Id: slackware-on-dell-700m.html,v 1.14 2008/06/06 01:25:12 chess Exp $ |
|