Created: 24-Jul-2006
Last updated: 01-Apr-2009
Author: Guido Flohr (<guido@ imperia.net>)
License: GNU Free Documentation License

Latest changes:

Table Of Content

1 Summary
2 Installation
3 Network Devices
4 Sound
5 Video System
6 Busses
7 Input Devices
8 CPU
9 External Devices
10 Further Readings
11 Copyright/License

1 Summary

I use the Dell Latitude D820 with Gentoo Linux and sometimes (dual-boot) with MS-DOS. All basic features of the notebook work with this setup. I currently use the kernel version 2.6.28-gentoo-r4 (gentoo-sources).

Since the hardware is now relativly old, I do not regularly maintain this document. However, if you find errors or omissions, I will correct it, if you tell me.

Feedback, negative and positive, is welcome.

Due to popular demand, you can now download both my kernel configuration and my X11 configuration. The X11 configuration should be renamed to /etc/X11/xorg.conf (strip the .txt!), the kernel configuration should be renamed to /usr/src/linux/.config.

In the following, actions you have to perform in a root shell are marked like this:

root@hostname # tail /var/log/messages

Things that should be done from the shell of a regular user look like this:

user@hostname $ ls ~
Hardware
Type Vendor Model Data State
Hard Drive Hitachi HTS72108, Rev: MC40 80 GB, 7200 r/pm works out of the box as /dev/sda
DVD RW Sony DVD+ RW DW-Q58A works with tweaks and hacks
Network card Broadcom Corp. NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02) Gigabit works with tg driver
WLAN Intel Corp. PRO/Wireless 3945ABG (rev 02) Tri-mode 802.11a/b/g works with most routers
Soundcard Intel SigmaTel STAC9200 - works with hda-intel driver
Graphics card nVidia Quadro NVS 120 M 512 MB RAM works with proprietary nVidia driver
Bluetooth ? ? - not yet tested
USB Controller Intel 82801G (ICH7 Family) 4 controllers works out of the box
PCMCIA (CardBus Bridge) O2 Micro ? - not yet tested
Firewire (IEEE1394) O2 Micro ? - not yet tested
Modem ? ? Onboard Modem 56k V.92 with RJ11 connector Not yet tested
Keyboard Dell - German keyboard layout works out of the box
Mouse/Touchpad Alps AlpsPS/2 ALPS GlidePoint - can be tweaked
CPU Intel T2400 1.83 GHz can be tweaked
Smart Card Reader ? ? - not yet tested
Firewire (IEEE1394) O2 Micro ? - not yet tested
IrDA ? ? - not yet tested

2 Installation

I followed the normal installation instructions. I had problems with the network card though. I ran "net-config eth0" as advised in the installation docs and it detected the network card but did not set the IP address, routing and DNS via DHCP. I configured the network manually:

  root@hostname # ifconfig eth0 192.168.6.2 netmask 255.255.255.0 up
  root@hostname # route add default gw 192.168.6.1
  root@hostname # echo "nameserver 192.168.6.1" >/etc/resolv.conf

Your milage may vary.

If you have never had S-ATA disks, you may be happy to know, that they appear as SCSI, not as IDE disks. That means, the hard drive will most probably be /dev/sda, not /dev/hda.

3 Network Devices

3.1 Ethernet Card

The built-in ethernet card works with the "tg" driver. Kernel config:

  Device Drivers  ⇒
    Network device support ⇒
       Ethernet (1000 Mbit)  ⇒
       <*> Broadcom Tigon 3 support

Compile and install the new kernel, and reboot. If you have a DHCP server in your network, the following should do for you:

  root@hostname # ln -sf net.lo /etc/init.d/net.eth0
  root@hostname # rc-update add net.eth0 default
  root@hostname # /etc/init.d/net.eth0 start

If you are not always connected to a wired network, you should reduce the DHCP timeout in /etc/conf.d/net:

  dhcpcd_eth0="-t 5"

5 seconds is enough for me. But if you often miss a lease, you should experiment with the value.

3.2 WLAN

My WLAN works with most routers. I used to have a Netgear router that basically worked (I could connect from Windows) but not from Linux. The thing was dodgy anyway, I replaced it with a Linksys device, and now everything works here.

You probably have to re-compile your kernel. I'm not sure whether all choices below are correct or optimal, but I got wireless working with this setup.

  --- Networking support
  ... 
  [*]   Wireless  --->
  {M}     Improved wireless configuration API
  [*]       nl80211 new netlink interface support
  [*]     Old wireless static regulatory definitions
  -*-     Wireless extensions
  [*]       Wireless extensions sysfs files
  <M>   Generic IEEE 802.11 Networking Stack (mac80211)
  -*-   Generic IEEE 802.11 Networking Stack (DEPRECATED)
  ...
  <M>     IEEE 802.11 WEP encryption (802.1x)
  <M>     IEEE 80211i CCMP support
  <M>     IEEE 802.11i TKIP encryption

Turn on generic WLAN support:

  Device Drivers  ⇒
    Network device support  ⇒
      Wireless LAN  ⇒
        [*] Wireless LAN (IEEE 802.11)
        ...
        <*>   Intel PRO/Wireless 2100 Network connection
        [*]     Enable promiscuous mode
        [*]     Enable full debugging  output in IPW2100 module.
        ...
        <M> Intel Wireless Wifi Core
        ...
        <m> Intel PRO/Wireless 3945ABG/BG Network Connection 

We need a number of cryptographic modules:

  Cryptographic API  ⇒
    ...
    -*-   Cryptographic algorithm manager
    ...   
    -*-   CBC support
    ...
    {*}   ECB support
    ...
    <M>    PCBC support
    ...
    {*}   Michael MIC keyed digest algorithm
       SHA224 and SHA 256 digest algorithm
    ...
          *** Ciphers ***
    -*-   AES cipher algorithms
    <*> AES cipher algorithms (i586)
    ...
    <*> ARC4 cipher algorithm

Compile and install the new kernel, and reboot.

With one router (D-Link D-300) I had problems connecting. It turned out that the kernel I configured did not scan any APs beyond channel 11. It is well possible that this is because I selected the old static regulatory definitions (see above) in my kernel config. If you run into the same problem, try to change the channel of your wireless router to something below 11 or load the module cfg80211 with the option "ieee80211_regdom=EU". Other choices apart from EU are US (the default I think) or JP.

If you want to check, whether this fixes your problem, try the following:

root@hostname # /etc/init.d/net.wlan0 stop
root@hostname # rmmod iwl3945
root@hostname # rmmod mac80211
root@hostname # rmmod cfg80211
root@hostname # modprobe cfg80211 ieee80211_regdom=EU
root@hostname # modprobe mac80211
root@hostname # modprobe iwl3945
root@hostname # /etc/init.d/net.wlan0 start
root@hostname # iwlist scan

Now check, whether the scan shows your AP. If it does make the change permanent. In Gentoo you have to create a file "/etc/modprobe.d/cfg80211":

# This is /etc/modprobe.de/cfg80211
option cfg80211 ieee80211_regdom=EU

Now update /etc/modprobe.conf with this command:

update-modules

The next tiem the module is loaded, it will be loaded with the appropriate option.

A quick start guide for setting up WLAN with WPA-PSK:

  root@hostname # emerge net-wireless/wireless-tools
  root@hostname # emerge net-wireless/wpa_supplicant

Enable wpa_supplicant for eth1, in /etc/conf.d/net:

modules=("wpa_supplicant")
wpa_supplicant_eth1="-Dwext"
wpa_timeout_eth1="10"

Edit /etc/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=2

network={
        ssid="essesseidi"
        psk="my secret passphrase"
        priority=2
        pairwise=TKIP
        group=TKIP
        proto=WPA
        key_mgmt=WPA-PSK
}

Replace "essesseidi" with your network ESSID, and "my secret passphrase" with your pass phrase. Fire up the interface:

  root@hostname # ln -s net.lo /etc/init.d/net.wlan0
  root@hostname # /etc/init.d/net.wlan0 start

Depending on your local setup, your network device maybe eth1 instead of wlan0.

Refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 or http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup for better information.

3.3 Bluetooth

Not yet tried.

3.4 Modem

Not yet tried. What is a modem, btw? ;-)

4 Sound

Other resources report that there are issues with certain ALSA versions and the kernel module hda-intel in kernel 2.6.16. I used alsa-utils 1.0.11 with kernel (gentoo-sources) 2.6.16-r13 and things worked flawlessly here.

Kernel configuration:

  Device Drivers  ⇒
    Sound  ⇒
      <M> Sound card support
        Advanced Linux Sound Architecture  ⇒
          <M> Advanced Linux Sound Architecture
	  <M>   Sequencer support
	  ...
	  <M>   OSS Mixer API
	  <M>   OSS PCE (digital audio) API
	  [*]   OSS Sequencer API
	  ...
	  [*]   Support old ALSA API
	        PCI devices  ⇒
	        < > ATI IXP AC97 Controller
	        ...
	        <M> Intel HD Audio
       Open Sound System  ⇒
         < > Open Sound System (DEPRECATED)

In brief: Enable sound card support, enable ALSA plus the sequencer (optional) and mixer support, and select your sound card "Intel HD Audio". The "ATI IXP AC97" is probably enabled in the configuration but you do not need it. Disable the deprecated OSS (Open Sound System). After compiling and installing the new kernel, and rebooting, proceed with the installation of support packages:

  root@hostname # emerge alsa-utils

You do not need to run alsaconf! It is sufficient to install the init script:

  root@hostname # rc-update add alsasound boot
  root@hostname # /etc/init.d/alsasound start

Ignore verbose output about missing configuration, and enjoy. You may have to unmute, try "alsamixer", navigate to "Master" and "PCM", press M to unmute. Pitfall: If you run alsamixer on the virtual console of the Latitude D820, the output is maybe garbled, because of the terminal emulation. Run "alsamixer" in a graphical terminal emulator like xterm or the Gnome terminal in that case.

See http://www.gentoo.org/doc/en/alsa-guide.xml for better information. By the way, that document recommends using loadable modules, and not compile them into the kernel. I didn't bother to check out whether this is necessary.

5 Video System

Like with most nVidia hardware, you have two options for supporting your video hardware. If you can make do without 3D acceleration, or if you are a GPL purist, you can use the open source "nv" driver. In all other cases you have to swallow the bitter pill of the nVidia closed source drivers. GPL purists generally do not need lengthy howtos, and I will therefore describe the proprietary version.

5.1 Drivers

The built-in support for the nVidia card conflicts with the proprietary drivers. Turn everything off:

  root@hostname # grep -i nvidia /usr/src/linux/.config
  # CONFIG_AGP_NVIDIA is not set
  # CONFIG_FB_NVIDIA is not set

Disable it, in case one of the configuration options has been set:

  Device Drivers  ⇒
    Graphics Support  -->
      <*> Support for frame buffer devices
      ...
      < > nVidia Framebuffer Support
      < > nvidia Riva support

FIXME: I am not completely sure that the above is really needed.

You need to set a number of options:

  Processor type and features  ⇒
    ...
    [*] MTRR (Memory Type Range Register) support
    
  Device Drivers  ⇒
    Character Devices  ⇒
      ...
      <*> /dev/agpgart (APG Support)

The currently stable versions (1.0.6629) of the nvidia drivers, did not work for me. When trying to load the nvidia kernel module, there were error messages about missing symbols. The recent version (1.0.8762) works here though with kernel (gentoo-sources) version 2.6.16-r13, now with 2.6.17-r4. In order to use the latest version, unmask the two packages in /etc/portage/package.keywords:

  # Missing symbols.
  media-video/nvidia-kernel ~x86
  media-video/nvidia-glx ~x86

Now download and install the source and binaries of all proprietary evil:

  root@hostname # emerge media-video/nvidia-kernel
  root@hostname # update-modules
  root@hostname # modprobe nvidia

Some people say that every time you compile a new kernel you have to repeat the above procedure, i. e. re-emerge the package "nvidia-kernel". I cannot verify that. I have re-compiled my kernel several times since I have installed the nVidia kernel drivers, and everything still works fine here, the driver loads ("modprobe nvidia") and obviously works.

I had a problem after using that kernel configuration when I activated removal of kernel modules. As soon as I started xdm, the screen was black. I am not sure, whether the module removal feature was the culprit but if you have the same problem ssh to your machine, and compile a new kernel:

  Loadable module support  ⇒
    [*] Enable loadable module support
    [ ]   Module unloading

Don't forgot to re-emerge "nvidia-kernel"!

5.2 X11 Configuration

For X11 you need a separate driver:

  root@hostname # emerge media-video/nvidia-glx

Now edit /etc/X11/xorg.conf. Change the "Driver" line in section "Device":

  Section "Device"
          Identifier  "Card0"
	  Driver      "nvidia"
	  VendorName  "nVidia Corporation"
  EndSection

Look for the section module, and make sure that "glx" is loaded, and "dri" is not:

  Section "Module"
          ...
	  Load "glx"
	  ...
	  #Load "dri"
	  ...
  EndSection

You will sometimes read that you have to load a module "GLCore". That module no longer exists.

Then go to the section "Screen":

  Section "Screen"
          Identifier "Screen0"
	  Device     "Card0"
	  Monitor    "Monitor0"
	  DefaultDepth 24
	  SubSection "Display"
	          Viewport 0 0
		  Depth 1
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
	  SubSection "Display"
	          Viewport 0 0
		  Depth 4 
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
	  SubSection "Display"
	          Viewport 0 0
		  Depth 8 
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
	  SubSection "Display"
	          Viewport 0 0
		  Depth 15 
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
	  SubSection "Display"
	          Viewport 0 0
		  Depth 16 
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
	  SubSection "Display"
	          Viewport 0 0
		  Depth 24
		  Modes "1920x1200" "1680x1050" "1440x900" "1280x1024" "1280x800" "1280x720" "1024x768" "800x600" "720x480" "640x480"
	  EndSubSection
  EndSection

Note that the maximum resolution I was able to use - no matter what color depth - is 1680x1050, not 1920x1200 like the above configuration suggests. See http://math.umh.ac.be/an/D820/#nvidia for a source stating that 1920x1200 would actually work. You will also find a much more detailed and advanced xorg.conf configuration file on that site: http://math.umh.ac.be/an/D820/xorg.nvidia.conf.

You should also enable the nVidia OpenGL backend for hardware 3D acceleration:

  root@hostname # eselect opengl nvidia set

After restarting the X server, try out the 3D stuff:

  user@hostname ~ $ glxgears
  10792 frames in 5.0 seconds = 2158.393 FPS
  10591 frames in 5.0 seconds = 2118.176 FPS
  10641 frames in 5.0 seconds = 2128.013 FPS

If the performance on your machine is a lot worse, there must be something wrong.

The Gentoo nVidia guide has a lot more information: http://www.gentoo.org/doc/en/nvidia-guide.xml. You will also find a wealth of information in the documentation from nVidia that is installed in /usr/share/doc/nvidia-glx-* and /usr/share/doc/nvidia-kernel-*.

5.4 Console configuration

To be written: Replace the ugly 80x25 character console with something nicer.

6 Busses

6.1 USB

No problems, unless you have terribly misconfigured your kernel.

6.2 PCMCIA (CardBus bridge)

Not yet tested, but should work with the Yenta driver.

6.3 Firewire (IEEE 1394)

Never needed, never tested.

7 Input Devices

7.1 Keyboard

Works out of the box. My keyboard has a German layout (qwertz). In /etc/X11/xorg.conf:

  Section "InputDevice"
          Identifier "Keyboard0"
	  Driver "kbd"
	  Option "XkbLayout" "de"
  EndSection

For the console I edited /etc/conf.d/keymaps:

  KEYMAP="de-latin1"

You can find more keymaps in the directory tree in /usr/share/keymaps/i386.

7.1 Mouse/TouchPad

I pretty much followed the instructions on http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad. In brief, you have to do the following:

You need at least kernel version 2.6.11 and you need to turn on event interface support:

  Device Drivers ⇒
    Input device support ⇒
      <*> Event interface

Compile and install the kernel, and reboot. If everything went fine you should now have three character special files /dev/input/event0, /dev/input/event1, and /dev/input/event2. Now install the X11 synaptics driver:

  root@hostname # emerge xf86-input-synaptics 

The package "synaptics" contains the X11 driver for Synaptics and Alps touchpads, and some useful tools. Next find out what the kernel knows about your touchpad:

  user@hostname $ cat /proc/bus/input/devices
  ...
  I: Bus=0011 Vendor=0002 Product=0008 Version=6337
  N: Name="AlpsPS/2 ALPS GlidePoint"
  P: Phys=isa0060/serio1/input0
  S: Sysfs=/class/input/input2
  H: Handlers=mouse1
  B: EV=f
  B: KEY=420 0 70000 0 0 0 0 0 0 0 0
  B: REL=3
  B: ABS=1000003
  ...

Select the section that contains "AlpsPS/2" in the Name field, and look at the Handlers field. In my case it says "mouse1". That means that the device file /dev/input/mouse1 is our mouse. A very simple but working setup for our touchpad would look like this in /etc/X11/xorg.conf.

  Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mouse1"
        Option      "ZAxisMapping" "4 5 6 7"
  EndSection

If you want fancier stuff, stay tuned. Edit /etc/X11/xorg.conf and go to the section "ServerLayout".

  Section "ServerLayout"
          Identifier      "Guido's Default Configuration for Dell Latitude D820"
          Screen        0 "Screen0" 0 0
          InputDevice     "Mouse0" "CorePointer"
          InputDevice     "Keyboard0" "CoreKeyboard"
          InputDevice     "TouchPad" "AlwaysCore"
  End Section

The last line in the section with "TouchPad" is the one I added. Now go to the bottom of /etc/X11/xorg.conf and add a new device section there:

  Section "InputDevice"
         Driver "synaptics"
         Identifier "TouchPad"
         Option "Device" "/dev/input/mouse1"
         Option "Protocol" "event"
         Option "LeftEdge" "130"
         Option "RightEdge" "840"
         Option "TopEdge" "130"
         Option "BottomEdge" "640"
         Option "FingerLow" "7"
         Option "FingerHigh" "8"
         Option "MaxTapTime" "180"
         Option "MaxTapMove" "110"
         Option "EmulateMidButtonTime" "75"
         Option "VertScrollDelta" "20"
         Option "HorizScrollDelta" "20"
         Option "MinSpeed" "0.60"
         Option "MaxSpeed" "1.10"
         Option "AccelFactor" "0.030"
         Option "EdgeMotionMinSpeed" "200"
         Option "EdgeMotionMaxSpeed" "200"
         Option "UpDownScrolling" "1"
         Option "CircularScrolling" "1"
         Option "CircScrollDelta" "0.1"
         Option "CircScrollTrigger" "2"
         Option "SHMConfig" "on"
         Option "Emulate3Buttons" "on"
 EndSection

In the unlikely case that your Latitude doesn't have the touchpad at /dev/input/mouse1 (remember the output of /proc/bus/input/devices!) change the line accordingly. IMPORTANT! Turning the option "SHMConfig" on is a security risk if you are working in a true multi-user environment, i. e. when other people have access to your machine during your X session. All local users can change parameters of the touchpad then. I don't think that this risk will contribute to global heating or cause a war but you should be warned.

Restart the X server, and feel the difference. As you can see, the synaptics driver understands a wealth of options that control its behavior. Please try "man 5 synaptics" for more information. If you want to tweak the options, you should try the program "synclient" that also comes with the synaptics driver. If you have set the shared memory configuration option on, you can then change parameters in the already running X server.

After some time, you may be unhappy with the touchpad because while typing into the keyboard, the ball of your thumb often touches the touchpad, and the mouse pointer moves around unintentionally. It is even worse when the current input window loses the focus. The program "syndaemon" that comes with the synaptics X11 driver solves this problem in a simple yet elegant way. You can start it either on the command line:

  user@hostname $ syndaemon -d -i 0.5 

Now, whenever you start typing, the touch pad gets temporarily disabled until you're done typing. The arguments "-i 0.5" reduce the default time to re-enable the touchpad after the last keystroke from the default of 2 seconds to 0.5 seconds. With two seconds you will often have the impression that your mouse has died. Try "man syndaemon" for more options.

Alternatively you can try to autostart it with your X session. For Gnome, go to Desktop ⇒ Preferences ⇒ Sessions, choose the tab "Startup Programs" and add the command "/usr/bin/syndaemon -d -i 0.5". You can also start the program syndaemon as a regular daemon with "/etc/init.d/syndaemon start" but I would not recommend it, because it should be up to the user if she wants to disable the touchpad while typing or not. If you still prefer the system wide solution, add start options for syndaemon in /etc/conf.d/syndaemon.

There is another touchpad issue in Mozilla or Firefox. When using the touchpad, you will often go back or forth one page in the browser, because Mozilla misinterprets some gestures. In order to fix that, you first have to stop all instances of your browser and locate your prefs.js file. You can find all of them in a shell:

  user@hostname $ find ~ -name prefs.js

In every file you find add the following lines with your favorite editor:

  user_pref("mousewheel.horizscroll.withcontrolkey.action", 3);
  user_pref("mousewheel.horizscroll.withcontrolkey.numlines", 1); 
  user_pref("mousewheel.horizscroll.withcontrolkey.sysnumlines", true);
  user_pref("mousewheel.horizscroll.withnokey.action", 0);
  user_pref("mousewheel.horizscroll.withnokey.numlines", 1);
  user_pref("mousewheel.horizscroll.withnokey.sysnumlines", true);
  user_pref("mousewheel.horizscroll.withshiftkey.action", 1);
  user_pref("mousewheel.horizscroll.withshiftkey.numlines", 1);
  user_pref("mousewheel.horizscroll.withshiftkey.sysnumlines", true);

Alternatively, you can edit these configuration values in a running browser at the pseudo URI "about:config". Right-click in the window, and insert the values with the context menu that show up.

It looks like a bug in Mozilla resp. Firefox, that these values are initially wrong, but there are compatibility issues with the MS-DOS versions of the browser, and the problem cannot be solved automatically at the moment.

8 CPU

8.1 HyperThreading

The Intel CPU comes with HyperThreading. Although a single processor machine, to the operating system it looks like a dual processor box. To get the most out of it, you should set some kernel options:

  Processor type and features  ⇒
    Processor family  ⇒
      (X) Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon 

Enable hyperthreading with:

  Processor type and features  ⇒
    [*] Symmetric multi-processing support
    (8)   Maximum number of CPUs (2-255)
    [*]   SMT (Hyperthreading) scheduler support 

In order to benefit from these features you should also edit your /etc/make.conf:

  CFLAGS="-O2 -march=pentium4 -pipe"
  CHOST="i686-pc-linux-gnu"
  MAKEOPTS="-j3"

8.2 ACPI

FIXME: To be written.

8.3 CPU Scaling

CPU scaling or CPU throttling adapts the frequency of your CPU to the current computing requirements. That saves energy resp. battery power, and also improves the lifetime of the hardware because of the lower heat emission.

The Linux kernel supports multiple "governors" (strategies for scaling the CPU power). The "performance" governor always selects the maximum performance, "userspace" allows userspace programs to change the frequency, "powersave" minimizes the power consumption by selecting the minimum frequency, "ondemand" switches between the available frequencies depending on the current system load. The "conservative" governor does the same as the "ondemand" governor, but instead of jumping between frequencies, it gradually increases or decreases the frequency. The "conservative" governor should therefore the ideal governor for mobile hardware like the Dell Latitude, but I - personally - prefer "ondemand" because with "conservative" I had stability problems. Maybe pure coincidence, but "ondemand" does the job for me as well.

In order to enable it, we have to configure and compile a new kernel:

  Power management option (ACPI, APM) ⇒
    CPU Frequency Scaling ⇒
      [*] CPU Frequency scaling
      [ ]   Enable CPUfreq debugging
      <*>   CPU frequency translation statistics
      [ ]     CPU frequency translation statistics details
            Default CPUfreq governor (performance) ⇒
      ---   'performance' governor
      <*>   'powersave' governor
      <*>   'userspace' governor for userspace frequency scaling
      <*>   'ondemand' cpufreq policy governor
      <*>   'conservative' cpufreq governor
      ...
      <*>   Intel Enhanced SpeedStep
      [*]     Use ACPI tables to decode valid frequency/voltage pairs
      [*]     Built-in tables for Banias CPUs
      ...

I have turned off all cpu frequency scaling options not shown here. Compile and install the new kernel, and reboot. Then cd to the directory /sys/devices/system/cpu. You should see two directories "cpu0" and "cpu1". If you have only one directory, you haven't turned on the SMP features of the kernel (see section Hyper Threading above). In each directory you find a subdirectory "cpufreq" with several files that show the current cpu frequency scaling. Some of the files are writable and can be used to change the current state.

We want to switch to conservative cpu frequency scaling, and therefore issue the following commands as root:

  root@hostname # echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  root@hostname # echo ondemand >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

If you want to make the change permanent, also insert the above two lines into the file /etc/conf.d/local.start, so that they will get executed at each boot.

Now do a "cat /proc/cpuinfo". You should see that the current frequency is lower (probably at 1 GHz) than the maximum frequency (1.83 GHz). Gnome users can add the "CPU Frequency Scaling Monitor" if they want to watch the current cpu frequency. Please note that you have to add two instances of the applet (and configure "cpu1" for the second) if you want to watch both CPUs.

9 External Devices

9.1 DVD/R+W

This device caused me a lot of headache. Without tweaks and hacks reading works, writing DVDs does not work. Burning an audio CD of 70 minutes takes 22 minutes with cdrecord and the system load increases to 1.5-2.0. Burning DVDs does not work at all (fails with input/output error).

In order to get it running I had to manually patch the kernel sources. In /usr/src/linux/include/libata.h change the line (approx. 47) reading

#undef ATA_ENABLE_PATA     /* ...

to

#define ATA_ENABLE_PATA 1 /* ...

Remember, that you have to patch that line every time you install new kernel sources and compile a new kernel! Since this is obviously not supported by the kernel developers, you should play fair and pass this information along with any bug reports you may file.

I also changed my kernel configuration a little, although I am not sure how much of this is really necessary. But since every test costs me one blank DVD for burning, I did no further investigation on the topic and just accepted it:

  Device Drivers  ⇒
    SCSI device support ⇒
    ...
      <*> SCSI CDROM support
      ...
      <*> SCSI low-level drivers ⇒
        ...
        <*>Serial ATA (SATA) support
        ...
          <*> Intel PIIX/ICH SATA support

The only "real" change here was to enable SCSI cdrom support, although I doubt that this is really necessary. The other options are a must anyway, because without general support for SATA or the Intel ICH7 chipset, the kernel wouldn't detect your hard disk.

After compiling and installing the new kernel, I also added options to my relevant kernel line in /boot/grub/menu.lst. Append to the line that begins with "kernel" the options:

   combined_mode=libata libata.atapi_enabled=1

I don't know whether these optiosn are really needed but I read it somewhere. If you boot with these kernel options your device no longer appears as the ide device /dev/hdc but instead as /dev/sr0. This is usually not an issue for you, because the relevant symbolic links /dev/cdrom and /dev/dvd are created automatically.

Remember that patching kernel sources is not recommended, and expect problems with it. However, I already run this kernel without any problems for almost half an hour, and for the first time, I could successfully burn a DVD under Linux with the latitude D-820.

9.2 Smart Card Reader

Could not be tested so far.

9.3 IrDA

Could not be tested so far.

10 Further Reading

You can find more information here:

11 Copyright/License

Copyright (C) 2006-2009 by Guido Flohr, all rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found at http://www.gnu.org/licenses/fdl.txt.

Linux On Laptops TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones