Linux on Dell D600

From Smop.co.uk

Jump to: navigation, search

This details how I've configured Debian Linux on my Dell D600.

Installed Debian sarge, then used "dpkg --get-selections" (on my old laptop) and "dpkg --set-selections" and apt(-get,itude) with a few diffs to intelligent install all the packages I used to use (pruned to get rid of some old packages).

Then I installed a new 2.6.12 kernel from Debian.

Setup hdparm to speedup hard disk and CD-ROM. Currently you need to add "piix" to /etc/mkinitramfs/modules otherwise you <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336103">won't be able to turn on DMA</a> (and suffer terrible disk performance as a result).

Installed CUPS for printing.

Contents

USB mouse

I have a docking station at work with a USB mouse and monitor hooked up to it. Let's deal with those one at a time. Firstly for the USB mouse I initially used the "usbmouse" module but upon recompiling my kernel I discovered that the recomended module is actually usbhid - usbmouse is for mice which dont conform to the standards.

Then ensure programs use /dev/input/mice rather than /dev/psaux (mice combines all the mice together - i.e. trackpoint, trackpad and external mouse).

X windows

After upgrading to X.org I then needed to setup the screen in quite an unusual way. The laptop can do 1400x1050, but I wanted to run the monitor at 1600x1200. A number of people know about the Ctrl-+/- key combo that picks a different resolution (but the virtual desktop size stays the same - e.g. changing from 1600x1200 gives you a scrolling window 800x600 in size.

Well there is a better way - the Xrandr extension (rotate and resize). This changes the resolution of the virtual screen (and the window you view through). The tool you use to do this is "xrandr". Then use "MetaModes" to select how to tie resolutions on the monitor to those on the LCD.

The full xorg.conf is at the end of this article.

I use the open source radeon driver - the alternative closed source fglrx driver whilst slightly faster (1232 fps in glxgears vs 1099 for radeon - pageflip provided a big boost), I had lockups with some 3D screensavers. Note that you should uninstall fglrx-drivers if you use the radeon driver as fglrx-driver diverts the GL libraries.

One issue at the moment is that it doesn't use the dual-head mode unless a monitor is plugged in when X starts up. This means that if I reboot at home, then I have to restart X at work. What a pain. I'd also like to detect the monitor so that I can automatically resize to 1600x1200 when plugged in to a monitor and 1400x1050 when no such monitor is plugged in.

initramfs

For a while now I've had to hack mkinitrd in order to cope with the fact that I have a non-devfs system. Well, for some reason that no longer worked, but during my investigations I was very happy to discover that mkinitramfs now exists in Debian and it also looks like a much cleaner and extensible package. initramfs is the replacement for initrd - basically it's alot cleaner and far less hacky. Well, I found <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335801">one bug</a> with the package which I worked around (patch ntegrated into new release less than 8 hours later!) Later on I found that wasn't quite enough and did a <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336936">second patch</a> which fixes suspend to disk.

Now originally the plan was to tack initramfs onto the end of the kernel image, but it looks like that has changed to involve some last minure linking instead. Fortunately you can also supply it just like an initrd.

wireless

Oh _lovely_ - a windows only Broadcom wireless chipset. Fortunately ndiswrapper works a treat - as does wpa_supplicant (using -D ndiswrapper). So now I can use wireless with WPA-PSK encryption.

xorg.conf

Section "Files"
        FontPath        "unix/:7100"                    # local font server
        # if the local font server has problems, we can fall back on these
        FontPath        "/usr/lib/X11/fonts/misc"
        FontPath        "/usr/lib/X11/fonts/cyrillic"
        FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/Type1"
        FontPath        "/usr/lib/X11/fonts/CID"
        FontPath        "/usr/lib/X11/fonts/Speedo"
        FontPath        "/usr/lib/X11/fonts/100dpi"
        FontPath        "/usr/lib/X11/fonts/75dpi"
EndSection

Section "Module"
        Load    "GLcore"
        Load    "bitmap"
        Load    "dbe"
        Load    "ddc"
        Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "record"
        Load    "speedo"
        Load    "type1"
        Load    "vbe"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "PS/2"
        Option          "Emulate3Buttons"       "true"
EndSection
Section "InputDevice"
        Identifier      "Generic Mouse"
        Driver          "mouse"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/input/mice"
        #Option         "Protocol"              "ImPS/2"
        Option          "Protocol"              "ExplorerPS/2"
        Option          "Emulate3Buttons"       "true"
EndSection

Section "Device"
        Identifier      "ATI onboard"
        Driver          "radeon"
        #Driver         "fglrx"
        Screen          0
        # without these we get the LCD refresh rates
        # which stop us using 1600x1200
        Option          "CRT2HSync" "25-115"
        Option          "CRT2VRefresh" "50-160"
        Option          "MetaModes" "1400x1050-1400x1050 1400x1050-1600x1200"
        # Speedstep for Radeon (PowerPlay)
        Option          "DynamicClocks" "on"
        # NB: need CONFIG_FB_RADEON (see dmesg) for console equivalent
        Option          "AGPMode" "4"
        # FastWrite causes lockups (and doesn''t speed things up anyway)
        #Option         "AGPFastWrite" "true"
        #stop 10s blank screen when starting X?
        #Option         "UseFBDev" "true"
        # for Xv (see radeon(4) - can now be swapped in s/w)
        #Option         "OverlayOnCRTC2" "true"
        # should speed up 3D
        Option          "EnablePageFlip" "true"
EndSection

Section "Device"
        Identifier      "ATI external"
        Driver          "radeon"
        #Driver         "fglrx"
        Screen          1
EndSection

Section "Monitor"
        Identifier      "LCD"
        HorizSync       28-50
        VertRefresh     43-75
        Option          "DPMS"
EndSection

Section "Monitor"
        Identifier      "VMPro510"
        #HorizSync      28-130
        #VertRefresh    43-160
        HorizSync       27-115
        VertRefresh     50-160
        Option          "DPMS"
EndSection

Section "Screen"
        Identifier      "ScreenLCD"
        Device          "ATI onboard"
        Monitor         "LCD"
        DefaultDepth    24
        SubSection "Display"
                Depth           16
                Modes           "1400x1050" "1600x1200" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1400x1050" "1600x1200" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           32
                Modes           "1400x1050" "1600x1200" "800x600" "640x480"
        EndSubSection
EndSection

Section "Screen"
        Identifier      "ScreenCRT"
        Device          "ATI external"
        Monitor         "VMPro510"
        DefaultDepth    24
        SubSection "Display"
                Depth           16
                Modes           "1600x1200" "1400x1050" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1600x1200" "1400x1050" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           32
                Modes           "1600x1200" "1400x1050" "800x600" "640x480"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "ScreenLCD"
        Screen          "ScreenCRT" Above "ScreenLCD"
        InputDevice     "Generic Keyboard"
        #InputDevice    "Configured Mouse"
        InputDevice     "Generic Mouse"
EndSection

Section "DRI"
        Mode    0666
EndSection
Personal tools