Installing Debian on a Santa Rosa laptop

This page wants to be a memo of the steps necessary to install Debian on a Santa Rosa laptop. Santa Rosa is the newly released (May 2007) platform for Intel based laptops.

This page is still work in progress. Feel free to add comments or questions, I'll try to answer them as fast and accurately as I can.

My laptop

I bought my laptop at this address: http://www.littlebit.ch They assemble laptops on personal specifications, and it is possible to buy machines without operating system. I bought the Sepia X35 (http://www.littlebit.ch/notebook/sepia_x35/sepia_x35.cfm). It is a 13.3" ultraportable (or at least highly portable) with the following configuration:

Judging from the amount of Asus branded CDs I got in the box, the OEM is Asus. If I listen to the asus-laptop module, this is a rebranded Asus Z37e.

Here are the outputs of lspci and lsusb. {{{$ lspci -v 00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile Integrated Graphics Controller (rev 03) (prog-if 00 [VGA])

00:02.1 Display controller: Intel Corporation Mobile Integrated Graphics Controller (rev 03)

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #4 (rev 03) (prog-if 00 [UHCI])

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #5 (rev 03) (prog-if 00 [UHCI])

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI #2 (rev 03) (prog-if 20 [EHCI])

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) (prog-if 00 [Normal decode])

00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03) (prog-if 00 [Normal decode])

00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03) (prog-if 00 [Normal decode])

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03) (prog-if 00 [Normal decode])

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #1 (rev 03) (prog-if 00 [UHCI])

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #2 (rev 03) (prog-if 00 [UHCI])

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI #3 (rev 03) (prog-if 00 [UHCI])

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI #1 (rev 03) (prog-if 20 [EHCI])

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3) (prog-if 01 [Subtractive decode])

00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 03)

00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03) (prog-if 8a [Master SecP PriP])

00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 03) (prog-if 01 [AHCI 1.0])

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)

01:00.0 Ethernet controller: Marvell Technology Group Ltd. Unknown device 4364 (rev 12)

02:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02) (prog-if 01 [AHCI 1.0])

03:00.0 Network controller: Intel Corporation Unknown device 4229 (rev 61)

06:01.0 ?FireWire (IEEE 1394): Ricoh Co Ltd Unknown device 0832 (rev 05) (prog-if 10 [OHCI])

06:01.1 Generic system peripheral [0805]: Ricoh Co Ltd ?R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)

06:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 12)

06:01.3 System peripheral: Ricoh Co Ltd ?R5C592 Memory Stick Bus Host Adapter (rev 12)

{{{$ lsusb Bus 007 Device 003: ID 05e3:0503 Genesys Logic, Inc. # Webcam Bus 007 Device 001: ID 0000:0000 Bus 006 Device 001: ID 0000:0000 Bus 005 Device 004: ID 0b05:1712 ASUSTek Computer, Inc. # Bluetooth Module Bus 005 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 001 Device 003: ID 147e:2016 # Fingerprint reader Bus 001 Device 001: ID 0000:0000 Bus 002 Device 003: ID 0000:0000 Bus 002 Device 001: ID 0000:0000}}}

Right now my /etc/modules looks like this: {{{# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored.

loop sbp2

# Generated by sensors-detect on Tue Jul 10 18:03:51 2007 # I2C adapter drivers

i2c-i801

# Chip drivers

eeprom

# Warning: the required module coretemp is not currently installed # on your system. For status of 2.6 kernel ports check # http://www.lm-sensors.org/wiki/Devices. If driver is built # into the kernel, or unavailable, comment out the following line.

coretemp

# Intel stuff

intel-agp drm i915

# Wireless

iwl4965

# Cpufreq

acpi-cpufreq cpufreq_stats cpufreq_powersave cpufreq_conservative cpufreq_ondemand cpufreq_userspace

# Asus stuff

asus-laptop}}}

Debian Etch Installation

Judging from the amount of scary reports I read before actually receiving the laptop, I was ready to perform a debootstrap installation from a LiveCD with a kernel > 2.6.21. Truth is, all I had to do to install Etch on the machine has been to setup the SATA drive to "IDE" mode, as opposed to "AHCI" mode, that is supported only > 2.6.19. Etch installation went without a hitch with the graphical d-i. After the first reboot I had a system with these characteristics:

To have this laptop perform at 100% I'd suggest to upgrade to unstable or at least to enable backports in order to have a newer kernel and X.org 1.3 with the new intel driver. Please read further for these topics.

I have installed the AMD64 port.

Upgrade to Sid

After the installation of Etch I upgraded to Sid in order to have a newer kernel and the full intel graphics. I installed linux-image-2.6.22rc5-AMD64 and upon the reboot I switched back the SATA drive to "AHCI". The system booted without problems in the new mode. I haven't tested booting the 2.6.18 Etch original kernel to see if it works. The upgrade to Sid went pretty smoothly, nothing to report here.

Intel Graphics GMA965 X3100

Intel released an X.org driver for the X3100 graphic chipset at its website http://www.intellinuxgraphics.org. The driver is already packaged in Lenny and Sid so there is no need for manual compilation. To enable full 3D just follow this procedure:

Upgrade to newest xserver-xorg

This can be handled through synaptic or apt-get without problems. The versions in Sid are xserver-xorg-video-intel (2:2.1.0-2), xserver-xorg (7.2-5).

Upgrade libmesa to 7.0

If you try to enable DRI on the X3100 using Mesa 6.5 you will crash your system, requiring a hard reset. You will have to install Mesa 7.0: the Debian packages entered unstable on 10/08/2007.

Modify /etc/X11/xorg.conf

The easiest way to describe this is to publish my xorg.conf. Please note the parts related to the TV output: they are *essential* otherwise you'll get a weird effect with the drawn screen not filling the monitor.

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/X11R6/lib/X11/fonts/misc"
        FontPath        "/usr/share/fonts/X11/cyrillic"
        FontPath        "/usr/X11R6/lib/X11/fonts/cyrillic"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/Type1"
        FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
        FontPath        "/usr/share/fonts/X11/75dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"
        # path to defoma fonts
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load    "i2c"
        Load    "bitmap"
        Load    "ddc"
        Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "vbe"
EndSection

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "ch"
        Option          "XkbVariant"    "de"
EndSection

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizScrollDelta"      "0"
        Option          "SHMConfig"             "on"
EndSection

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "intel"
        BusID           "PCI:0:2:0"
        Option "monitor-TV" "TVOutput"
        Option  "CacheLines"    "32768"
        Option  "DRI"   "true"
EndSection

Section "Monitor"
        Identifier      "Color LCD"
        Option          "DPMS"
        HorizSync       28-64
        VertRefresh     43-60
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Generic Video Card"
        Monitor         "Color LCD"
        DefaultDepth    24
        SubSection "Display"
                Depth           1
                Modes           "1280x800"
        EndSubSection
        SubSection "Display"
                Depth           4
                Modes           "1280x800"
        EndSubSection
        SubSection "Display"
                Depth           8
                Modes           "1280x800"
        EndSubSection
        SubSection "Display"
                Depth           15
                Modes           "1280x800"
        EndSubSection
        SubSection "Display"
                Depth           16
                Modes           "1280x800"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1280x800"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Synaptics Touchpad"
EndSection

Section "DRI"
        Mode    0666
EndSection

Section "Monitor"
    Identifier "TVOutput"
    Option "Ignore" "true"
EndSection

Section "Extensions"
        Option  "Composite"     "Enable"
EndSection

My xorg.conf is setup to use compiz. If you're not interested in this, just comment out (or delete) the Section "Extensions".

Additional info about the X3100 video card

Intel WiFi 4965

Intel released a driver at http://www.intellinuxwireless.org. The driver (iwlwifi) uses the new mac80211 subsystem that landed in the linux kernel >= 2.6.22. The 2.6.22-rc5 in Sid supports that. If you're using a kernel older than 2.6.21 you might want to refer to the good documentation on the Intel website. The installation of the driver can be broken down to three steps:

mac80211

First prepare the compilation by installing linux-headers and build-essential, then make a link needed by the driver:

$ sudo apt-get install linux-headers-`uname -r` build-essential
$ sudo ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/source

Now get the mac80211 files and prepare the driver compilation

{{{$ wget http://intellinuxwireless.org/mac80211/downloads/mac80211-9.0.2.tgz $ tar -xzvf mac80211-9.0.2.tgz $ cd mac80211-9.0.2 $ sudo make patch_kernel}}} At this point it's time to compile the module

Update: I have found that this route, albeit it works, leads to a fairly instable driver that gave me a few panics here and there. I have then decided to build a kernel and this has given me a much more stable machine (no more kernel panics so far). See the Power Saving section if you don't know how to compile a kernel "The Debian Way".

iwlwifi

{{{$ wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-0.1.1.tgz $ tar -xzvf iwlwifi-0.1.1.tgz $ cd iwlwifi-0.1.1 $ make $ sudo make install}}}

microcode

{{{$ wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-4965-ucode-2.14.4.tgz $ tar -xzvf iwlwifi-4965-ucode-2.14.4.tgz $ sudo cp iwlwifi-4965-ucode /lib/firmware}}}

Now the driver and the microcode are installed and it's time to load the module{{{$ sudo depmod -a $ sudo modprobe iwl4965}}} At this point my NetworkManager applet detected the 4 wireless networks I have around my house and I connected to an open network just by clicking its icon. I haven't tested WEP/WPA encrypted networks because I have no such setup available. Please note that the development of this driver is very active so the files I linked here might be outdated pretty fast. Visit the intel website from time to time to upgrade the driver.

Power Saving

As of now, my laptop uses about 20W of power while not doing anything particularily stressing (i.e. watching a movie, casual web browsing). This means that the standard 55Wh battery that comes with the laptop lasts about 3 hours, which is not that bad I guess. Nonetheless I'd like to extend that.

Intel's utility Powertop suggests to enable CONFIG_NO_HZ in the kernel, but it is not available on AMD64 yet. There is a set of patches maintained by Thomas Gleixner that allow you to enable this option. Here's a quick howto: {{{$ sudo apt-get install linux-source kernel-package $ cd /usr/src $ wget http://www.tglx.de/projects/hrtimers/2.6.22/patch-2.6.22-hrt6.patch # Or get the appropriate one for the kernel version you're installing $ tar -xjvf linux-source-2.6.22.tar.bz2 $ cd linux-source-2.6.22 $ patch -p1 < ../patch-2.6.22-hrt6.patch $ cp /boot/config-2.6.22-1-amd64 .config $ make oldconfig # Answer the remaining questions, say "y" to CONFIG_NO_HZ $ make-kpkg --initrd kernel_image $ sudo dpkg -i ../linux-image-2.6.22-hrt6_2.6.22-hrt6-10.00.Custom_amd64.deb}}}

Now reboot, and try it out.

Webcam and Fingerprint reader

I am not particularily interested on the Fingerprint reader, so I didn't even bother looking for info about it. Maybe people at the Thinkfinger project can help out: http://thinkfinger.sourceforge.net/

A driver for the webcam is in its early stages, but works for me. Find it here:

http://sourceforge.net/projects/gl860

Acknowledgments

The trickiest parts were resolved thanks to these pages: