Setting up Debian (AMD 64 port) on the HP 8510w

History

Last updated: 04 May, 2008.
macerl at telkomsa dot net

Introduction

The following is a brief description of what you need to do to get a working Debian (AMD 64 port) Lenny system on the HP 8510w. This page was written partly to document what I've done so far to set up my HP nx8510w, so that I have something to reference should I need to do it again, and partly to help out other users who might find this information useful.

Installing Lenny

I started with a Lenny beta net install image which I fetched from www.debian.org/devel/debian-installer on or around March 25, 2008 and it worked very well, indeed. I chose the default non-graphical installation method. Then I did the following:

Setting up X.org

Installing the NVIDIA drivers

When I installed the NVIDIA drivers the package nvidia-glx was in unstable. So, I temporarily added an unstable repository to my /etc/apt/sources.list and updated the package lists with

# aptitude update

Then, as per the instructions under the section Use module-assistant at the Debian wiki, we issue an

# aptitude install module-assistant gcc nvidia-kernel-common

followed by

# module-assistant update

then

# module-assistant prepare

and finally

# module-assistant auto-install nvidia

If that all succeeded -- and it should -- we need to install the nvidia glx package (from unstable in this case)

# aptitude install nvidia-glx

Configuring X.org

The last step in the procedure is to update your /etc/X11/xorg.conf to use the NVIDIA driver. To my suprise, the default /etc/X11/xorg.conf installed when I installed the latest xorg from unstable was remarkably empty (apart from some section markers). Despite this X worked perfectly, starting up in the natural resolution of the LCD which is 1920x1200. To update this rather empty /etc/X11/xorg.conf I, following the recommendations at the Debian Wiki, issued an

# aptitude install nvidia-xconfig
# nvidia-xconfig

Done! You should now have a working /etc/X11/xorg.conf which will use the NVIDIA drivers. As fine tuning I added a section for the touchpad as follows.

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

and added this to the ServerLayout section:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Synaptics Touchpad"
EndSection

Configuring X.org to use an external VGA device

Since I use my laptop for presentations this is important to me. After a bit of interactive on the fly experimentation with the nvidia-settings program and after reading the NVIDIA README I settled upon the following stanza, adapted to my needs. The portions in red refer to the relevant TwinView settings.

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "NvAGP" "0"
    Option         "TwinView"
    Option         "TwinViewOrientation" "Clone"
    Option         "AllowGLXWithComposite" "true"
EndSection

With an external monitor attached I can issue a Ctrl-Alt-Backspace to restart X.org. Then I use the KrandRTray (Resize and rotate) KDE application to set a common resolution suitable for the external device.

Configuring X.org for compiz fusion

With the poweful NVIDIA Quadro FX 570M under the hood, who could resist giving compiz a whirl. Sadly, at the time of writing, when a window loses focus it also loses its window decoration, which is a bit of a showstopper. Nevertheless, to get compiz going you need to update/add the following sections, coloured red, to your /etc/X11/xorg.conf

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "NvAGP" "0"
    Option         "TwinView"
    Option         "TwinViewOrientation" "Clone"
    Option         "AllowGLXWithComposite" "true"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option          "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Depth       24
        Modes      "1920x1200" "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection


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


To get compiz to start automatically when KDE starts add

export KDEWM="compiz"

to your ~/.bash_profile.

Setting up wireless ethernet

Basic setup

As mentioned above, you will need at least a 2.6.24 kernel for the iwlwifi Intel Wireless 4965 module (iwl4965). (You can build the necessary module for earlier kernels but I won't cover that. You can Google ;-). With a 2.6.24 kernel all you will need to do is to install the necessary firmware:

# aptitude install firmware-iwlwifi

Network manager

Before we reboot, its also useful to install network-manager to manually/interactively connect to wireless network:

# aptitude install network-manager-kde

After a reboot you should have a working wireless network!

WPA supplicant: automatic connections

If you prefer not to use network manager then you can do things manually as follows. I use wpa-supplicant to connect to my encrypted network. First install wpa-supplicant

# apt-get install wpasupplicant

To configure wpasupplicant for roaming mode I followed the instructions in /usr/share/doc/wpasupplicant/README.modes.gz and copied the file /usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.template to /etc/wpa_supplicant/wpa_supplicant.conf. Next I edited it so that it looks something like (omitting comments)


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


### Associate with any open access point
###  Scans/ESSID changes can be done with wpa_cli
network={
        key_mgmt=NONE
}

### Home network
network={
        ssid="the-name-of-my-home-network"
        key_mgmt=WPA-PSK
        psk="mycleverpassphrase"
}

The first network={..} block will associate with any open wireless network. The second is customised to my home network. Add networks as appropriate.

Then, I edited /etc/network/interfaces so that my wlan0 stanza looks like:

allow-hotplug wlan0
iface wlan0 inet manual
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

Now, each network={...} block in your /etc/wpa_supplicant/wpa_supplicant.conf can (I did not do this in the above segment) be given a unique logical identifier by assigning a string to the id_str variable, for example id_str="my_home_network". For each such logical network/interface you must supply the necessary configuration code in /etc/network/interfaces. This allows wpa_supplicant to perform per network initialisation tasks, such as assigning an IP address to your card via DHCP when associating with your home network, whilst setting up a fixed IP for your work network, say. In this example you will have lines similar to the following in your /etc/network/interfaces file

# id_str="my_home_network"
iface my_home_network inet dhcp

#id_str="my_work_network"
iface my_work_network inet static
   ...
   ...

If you omit to set the id_str logical identifier in a network={...} block in /etc/wpa_supplicant/wpa_supplicant.conf then it defaults to, surprisingly ;-), default. In my case I set my IP address via DHCP both at home and at work and hence it is not necessary to distinguish between these cases. For my purposes the single line defining the default configuration method suffices

# this behaviour is used if no matching id_str is found in wpa_supplicant.conf
iface default inet dhcp

My entire wireless network configuration in /etc/network/interfaces looks something like

allow-hotplug wlan0
iface wlan0 inet manual
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

# this behaviour is used if no matching id_str is found in wpa_supplicant.conf
iface default inet dhcp

Much more complicated setups can be implemented. As always read the wpa_supplicant docs.

Firewire

Haven't checked this yet.

Bluetooth

Bluetooth works fine. Just install kdebluetooth.

SD card reader

Still a work in progress. Not working so far :-(.

Fingerprint reader

Haven't really tried. Don't know if I really care.

Suspend

I got some ideas from the following Ubuntu forum entry. Note, however, that that Ubuntu forum entry refers to a 32 bit kernel. In debian agp support is compiled into the 64 bit kernel and hence things are marginally different.

For me the solution, using the NVIDIA driver, was the following. First, edit your /etc/default/acpi-support and change only the following entries to the values given

# /etc/default/acpi-support

SAVE_VBE_STATE=false

POST_VIDEO=false

Secondly, add the following (marked in red) to your /etc/X11/xorg.conf. (Since the Quadro 570M is a PCI express card you don't need AGP support.)

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "NvAGP" "0"
    Option         "TwinView"
    Option         "TwinViewOrientation" "Clone"
    Option         "AllowGLXWithComposite" "true"
EndSection

Thirdly, blacklist the intel_agp module by adding the following line to your /etc/modprobe.d/blacklist

blacklist intel_agp

Finally remove (comment out) the nvidia module from /etc/hibernate/blacklisted-modules.

You should now be ready to hibernate. Try it out with

# hibernate

If that works, then try hibernating to ram (sleep). Unfortunately s2ram doesn't know anything about the HP 8510w and hibernate-ram aborts letting you know as much. The way around this is to force it to hibernate to ram. To do this edit the file /etc/hibernate/ususpend-ram.conf and uncomment the line containing the option USuspendRamForce so that it reads

## if needed, pass the -f option to s2ram
USuspendRamForce yes

Save the file and you should be good to go. Issue an

# hibernate-ram

I then set my laptop to go to sleep on a lid close by doing the following

# mv /etc/acpi/lid.sh /etc/acpi/lid.sh.ORIG

and then replacing the original /etc/acpi/lid.sh with the following file, which calls /etc/acpi/sleep.sh

#!/bin/sh

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    /etc/acpi/sleep.sh
fi
[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post

Volume control keys

Credit for some of the ideas goes to http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys. First, create a file called .Xmodmap in your $HOME directory containing the following:

! The settings below enable the volume up, down and mute keys on the
! HP 8510w. All we have to do is set up this .Xmodmap file. Nothing else
! in KDE

keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume

To test your .Xmodmap file execute the following:

$ xmodmap ~/.Xmodmap

Now press any of the three top right hand "buttons" on your laptop (the ones with the loudspeaker icons on them). If you are using KDE then they should work immediately (I don't use gnome anymore, so I don't know what the result would be). Upon pressing either of the volume up or down keys, a window overlay should briefly appear giving you the volume expressed as a percentage of maximum. If the mute key is pressed the orange LED should light and a window overlay with "Mute On" should appear briefly (this toggles the current mute state of course).

If you use Gnome then there may be more that you need to do. See the link http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys.

To get your .Xmodmap executed automatically each time you start X, do the following, which is specific to KDE. Create a file called Xmodmap in your ~/.kde/Autostart directory, containing

#!/bin/sh

[ -f $HOME/.Xmodmap ] && /usr/bin/xmodmap $HOME/.Xmodmap

Make it executable with

$ chmod +x ~/.kde/Autostart/Xmodmap

and your volume control keys should be set automatically every time you log in to KDE.