Dell Latitude D620 & Gentoo Linux

Dell Latitude D620 & Gentoo Linux

(updated: 2008.12.08)

Setting up Dell notebooks under Linux is pretty easy. At least there were no significant prolems so far with 2 different Dell notebooks I have.

  1. My Hardware
  2. X-Windows, Video
  3. Sound Card
  4. WiFi
  5. Bluetooth
  6. Kernel
  7. Hybernate

My Hardware

It seems that even within same model, hardware configurations can vary a lot - different WiFi, Video and CPUs could be found on same notebook models. At least, this is very true for Dell, what makes it more difficult for O/S vendors to recognize and setup all required drivers for specified model.

lspci:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)
03:01.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller (rev 40)
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

Most significant for Linux are:

  • Video Card: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300]
  • WiFi Card: Intel Corporation PRO/Wireless 3945ABG Network Connection

Sound Card

To set up soundcard the following kernel module has been enabled:

Device Drivers  --->  Sound  --->
       <*> Sound card support         
          Advanced Linux Sound Architecture  --->
             PCI devices  --->

<M> Intel HD Audio                                                      
[ ]   Build hwdep interface for HD-audio driver                         
[*]   Build Realtek HD-audio codec support                              
[*]   Build Analog Device HD-audio codec support                        
[*]   Build IDT/Sigmatel HD-audio codec support                         
[*]   Build VIA HD-audio codec support                                  
[*]   Build ATI HDMI HD-audio codec support                             
[*]   Build Conexant HD-audio codec support                             
[*]   Build C-Media HD-audio codec support                              
[*]   Build Silicon Labs 3054 HD-modem codec support                    
[*]   Enable generic HD-audio codec parser                              
[ ]   Aggressive power-saving on HD-audio

The following is added to /etc/conf.d/modules:

modules_2_6="${modules_2_6} snd-hda-intel"
module_snd_hda_intel_args_2_6="model=ref"

modules_2_6="${modules_2_6} snd-usb-audio"
module_snd_usb_audio_args_2_6=""

X windows, Video, 1440x900 screen

So far, attempt to work on "nv" X driver was not fully successfull - there were a few problems with rendering, small artefacts after window movements, etc. So I've decided to use 'nvidia' commercial drivers.

So, every time when I come to office, or when connect external monitor at home, I first copy the appropriate xorg.conf (cp /etc/X11/xorg.conf.dom2 /etc/X11/xorg.conf) and then restart xdm (/etc/X11/xdm restart). I have found that Option "UseEdidDpi" does not work properly in nvidia drivers, so had to set it manually for single head mode. If you need to connect some other external monitor with different resolution, you can use one of provided configuration files, but replace the resultion.

A note about lid. On this notebook, when lid is closed, screen still stays on. I've tried a few combinations of 'vbatool' to turn the screen off - no success. So, decided to turn off DPMS using NVidia driver.

At first, install sys-power/acpid. Then, add those lines to /etc/acpi/lid.sh:

if grep -q open /proc/acpi/button/lid/LID/state
then
       XAUTHORITY=/var/gdm/\:0.Xauth /usr/bin/xset -display :0.0 dpms force on
else
       XAUTHORITY=/var/gdm/\:0.Xauth /usr/bin/xset -display :0.0 dpms force off
fi

And add /etc/acpi/events/lid with the content:

events/lid:action=/etc/acpi/lid.sh %e

Intel Corporation PRO/Wireless 3945ABG WiFi WPA connection

As far I know, different WiFi cards could be included in D-620. Mine, according the lspsi is "Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)". To enable it, first compile support for this card in kernel:

  Networking  --->   Wireless  --->                                            

     {*} Improved wireless configuration API                                
      [*]   nl80211 new netlink interface support                           
      -*- Wireless extensions                                               
      <M> Generic IEEE 802.11 Networking Stack (mac80211)                   
            Rate control algorithm selection  --->                          
      [ ]   Enable mac80211 mesh networking (pre-802.11s) support           
      -*-   Enable LED triggers                                             
      [ ]   Enable packet alignment debugging                               
      [ ]   Enable debugging output                                         
      <*> Generic IEEE 802.11 Networking Stack (DEPRECATED)                 
      [ ]   Enable full debugging output                                    
      <*>   IEEE 802.11 WEP encryption (802.1x)                             
      <M>   IEEE 802.11i CCMP support                                       
      <M>   IEEE 802.11i TKIP encryption                                    
Device Drivers -> Network device support ->  Wireless LAN  ---> 

 [*] Wireless LAN (IEEE 802.11)

When driver is compliled, load it with 'modprobe iwl3945'. In my

case, wlan1 device appears, so I can configure it in /etc/conf.d/net. Typical configuration for WPA enabled connection:

essid_wlan1="any"
modules="wpa_supplicant"

Then, emerge net-wireless/wpa\supplicant and generate wpa\supplicant.conf part by using /etc/wpa\supplicant.conf

alex@avk ~ $ wpa_passphrase mynetwork mypassword                                        11:15:38
network={
        ssid="mynetwork"
        #psk="mypassword"
        psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35
}
alex@avk ~ $

Include this statement to your wpa\supplicant.conf, and start network interface by: /etc/init.d/net.wlan1 start.

Update 2008.12.08: make sure you use kernel 2.6.27 or later. This kernel fixes issue with hanging out connections.

 

Bluetooth adapter

emerge net-wireless/bluez-utils net-wireless/bluez-libs net-wireless/kdebluetooth

Start it with:

/etc/init.d/bluetooth start

Add to system boot scripts:

rc-update add bluetooth default

As a frontend to bluetooth utils I am using 'kbluetooth' program. For a RFID / ppp / G3 connections I've set up /etc/bluetooth/rfcomm.conf where you can tie specific device to a bluetooth serial device.

Kernel

For those who are interested in complete solution, here is my recent .config.

Hybernate

Althrough the most recent approach (s2ram, s2disc) does not work with this notebook, the standard kernel feature Hybernate to disk works excellently.Enable it in kernel, and then simple command sudo echo disk > /sys/power/state will hybernate for you. Tested with kernel 2.6.27 - works fine. I have developed script, which I add to key 'Hybernate' in icewm, so pressing Sleep button asks me if I want to Hybernate now.

 

alex@avk ~ $ cat ~/bin/sleep.sh                                                         07:53:38
#!/bin/bash

echo Sleep now \?
select YN in Yes No
do 
    if test "${YN}" = 'Yes'
    then
        sudo echo disk > /sys/power/state
        break
    else
        if test "${YN}" = 'No'
        then
        break
        else
        echo Sleep now\? '1=yes, 2=no' ?
        continue
        fi
    fi
done
echo

echo Done.

Comments

Comments powered by Disqus