HowTo

Debian Linux Install on Dell Latitude D830

Installing Linux on the Dell Latitude D830 is a fairly pain free experience, with some messing around needed to get audio working properly (although this will be fixed in the ALSA drivers version 1.0.15 and therefore Linux kernel 2.6.23). Note: I used Sid/Unstable for the installation because I like the balance between stability and new stuff. If you use an older distribution, some of the hardware may not be fully supported.

Suspend/resume (both suspend-to-ram and suspend-to-disk) using the in kernel uswsusp works without any hitches, and installing the splashy package allows the majority of the boot/shutdown/hibernation messages to be hidden behind a splash screen.

The Hardware

The Dell Latitude D830 in question has the following hardware with the following status:

HardwareStatus
Intel(R) Core(TM) 2 Duo Processor T7500 (2.2GHz)
Integrated 2MB/4MB ON-DIE L2 Cache, 800MHz FSB
Works
Both cores recognised out of the box. VMX Virtualisation (VT extensions) can be enabled in the BIOS.
2GB (2x1GB) 667MHz DDR2 SDRAM Works
All memory recognised out of the box.
Intel SATA IDE Controller Works
Recognised by ata_piix module. AHCI can be turned on in the BIOS although this is untested.
Integrated UMA Base Intel(R) Graphics Media Accelerator X3100 (i965GM) Works
Open drivers with 3D acceleration. See notes below.
Integrated Broadcom Gigabit Ethernet Works
Uses in kernel tg3 driver.
Integrated Modem Untested
Intel HD Audio Controller Works
ALSA drivers 1.0.14 contains a bug. See below.
Dell(TM) TrueMobile(TM) 360 Bluetooth Module Works
Tested using the kbluetooth system and a file transfer to a bluetooth mobile phone.
Intel(R) PRO/Wireless 3945 (802.11 a/g) Works
Uses ipw3945 driver and closed regulatory daemon. See notes below.
Hotkeys Partially Working
Volume control keys can be configured but some Fn keys do not generate scancodes.

For more details the output of lspci

00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 02)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2)
00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 02)
00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation Mobile SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
03:01.0 CardBus bridge: O2 Micro, Inc. Cardbus bridge (rev 21)
03:01.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

Display - X3100 & Xorg

At the time of installation X.org 7.3 had just hit Debian Sid, so without any xorg.conf X11 started with the correct resolution and drivers. However, to configure Compiz-Fusion/Beryl a full xorg.conf is required. Importantly, note the use of "XAANoOffscreenPixmaps" "true" in the Device section, without which Compiz won't work correctly. Unfortunately, this line is the only reason for having an xorg.conf at all.


Section "Device"
        Identifier "Generic Video Card"
        Driver     "intel"
        Option     "monitor-TV" "TVOutput"
        Option     "DRI"   "true"
	Option	   "XAANoOffscreenPixmaps" "true"
EndSection

Update (2007-11-07): The X.org 7.3+3 in Debian Sid also works with minimal X.org config files. You can easily generate one by deleting the old /etc/X11/xorg.conf and then running

# dpkg-reconfigure xserver-xorg

However, for posterity I will attach it here, with the modification made to enable Compiz/Beryl.

Update (2007-12-01): xserver-xorg-video-intel 2:2.2.0-1 introduces EXA acceleration as the default rather than the older XAA. The EXA acceleration currently has poor performance with glyph (font) rendering so it is possible to revert to the old XAA rendering method using


Section "Device"
        Identifier "Generic Video Card"
        Driver     "intel"
        Option     "monitor-TV" "TVOutput"
        Option     "DRI"   "true"
	Option	   "AccelMethod" "XAA"
	Option	   "XAANoOffscreenPixmaps" "true"
EndSection

This is especially important if running a composited window manager. Here is the full xorg.conf.

Audio - Intel HDA

A bug in the ALSA drivers 1.0.14 prevents the auto-detection of the sound card, this fix is in CVS so should be available with the next release of the drivers. However, the patch above does not apply to the Debian supplied ALSA source so you need this patch

diff -ru a/alsa-kernel/pci/hda/patch_sigmatel.c b/alsa-kernel/pci/hda/patch_sigmatel.c
--- aalsa-kernel/pci/hda/patch_sigmatel.c	2007-10-08 21:29:47.000000000 +1000
+++ b/alsa-kernel/pci/hda/patch_sigmatel.c	2007-10-08 21:16:48.000000000 +1000
@@ -2224,7 +2224,7 @@
 		return -ENOMEM;
 
 	codec->spec = spec;
-	spec->num_pins = 14;
+	spec->num_pins = 12;
 	spec->pin_nids = stac9205_pin_nids;
 	spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
 							stac9205_models,

To use the patched driver you need to download alsa-source and module-assistant, unpack the source and patch and then build using module-assistant. It would go something like this.

# aptitude install module-assistant alsa-source
# m-a prepare
# cd /usr/src
# tar -xvjf alsa-driver.tar.bz2
# cd /usr/src/modules/alsa-driver
# patch -p1 < patch_sigmatel_d830.patch
# m-a -O build alsa
# m-a install alsa

Alternatively, you can use the package I built for the 2.6.22 kernel, or the source tarball with the patch already applied.

Update (2007-11-19): The 2.6.23 version of the Linux kernel has a more correct update than the patch above and therefore there is no need to install the alsa-source package or perform any compilation if you are using this (or later?) kernel version. The git commit with the fix is here.

Wireless - Intel PRO/Wireless 3945

To enable the wireless networking, it is necessary to install the ipw3945 modules and regulatory daemon. The modules are in ipw3945-modules-kerneltype and the regulatory daemon is ipw3945d. Make sure the non-free repository is enabled to install the daemon.

The ipw3945 card works perfectly with NetworkManager, however, in order for the wireless switch to work correctly, it's necessary to perform the following steps

# aptitude install libsmbios-bin
# ln -s /usr/sbin/dellWirelessCtl /usr/bin/dellWirelessCtl
# modprobe dcdbas

The second step in the process is to fix an issue where hal is looking for /usr/bin/dellWirelessCtl rather than /usr/sbin/dellWirelessCtl. This problem may be fixed at some point in the future. In addition, this fix will only work until you reboot. To make it permanent, add dcdbas to /etc/modules

Hotkeys

To make the volume keys work on, the following scancodes might be useful

  • Mute Volume - 160
  • Decrease Volume - 174
  • Increase Volume - 176

I usually map these to F13, F14 and F15 using the following .xmodmaprc

keycode 160 = F13
keycode 174 = F14
keycode 176 = F15

and then use the KDE settings to map the keys to functions. Alternatively, you can try using keytouch an application with a bunch of default configurations for hotkeys. The Dell Latitude D800 keyboard seems to match the scancodes on the D830.

Hardware (BIOS) Clock

There is an issue with the hardware clock that has the effect of creating a noticeable pause on boot and can lead to some time discrepancy issues. The fix is to add an additional parameter to the hwclock program. When invoking hwclock from the command line, simply add the argument --directisa.

In order to fix the issue when hwclock is called when booting and shutting down, the files /etc/init.d/hwclockfirst.sh and /etc/init.d/hwclock.sh need to be edited. Find the line that starts with HWCLOCKPARS and replace it with

HWCLOCKPARS=--directisa

Relatively Simple Remote Assistance over VNC

I was looking for a simple way of providing remote assistance to someone on a Linux machine, in this particular instance Ubuntu, and here is what I've come up with.

The first step is to make sure that you have ssh access to the machine in question. There's heaps of tutorials on the web for this, but the easiest way is to just install the openssh-server

# apt-get install openssh-server

and edit the config file /etc/ssh/sshd_config. You might need to change the port to prevent it being blocked by ISP's and switch off root logins. Don't forget to fix your firewall rules to allow access as well.

You'll also need some way of actually finding the box on the net, so set up something like DynDNS so that you can easily find the box on the web. ddclient is a good client to dynamically update, and if on dial-up you can set it so that it triggers whenever a connection is made. It's probably a good idea to make sure all the SSH side of things are working now, as the rest can be done remotely via SSH.

The idea of providing remote assistance is to allow both users access at the same time, so in order to do this we'll use x11vnc. So on the machine you want to provide assistance to,

# apt-get install x11vnc

Finally, on your machine, make sure you have the vncviewer installed,

# apt-get install xvncviewer

Once this is done, it's time to start assisting by running

ssh -L 5900:localhost:5900 user@hostname 'x11vnc -localhost -display :0'

making sure to replace user and hostname appropriately. If you changed the port SSH is working on earlier, you might also need the -p port option.

Then, run

xvncviewer localhost

and you should get a display of what the other person sees.

Syndicate content