XMLTagsEditHistoryDiscussion

Slamd64 12.0 installation on a Hewlett-Packard dv6000

Hardware

Extra stuff

Notes

Hardware configuration

Wireless card

Driver installation
  1. Install firmware. Fetch the tarball (should be available at this page). Untar it, and copy the firmware to a proper location
   cp iwlwifi-3945.ucode /lib/firmware
  1. Install driver. The driver can be downloaded from the same page of the firmware. To build and install it unpack the tarball, cd into the created directory, and run the commands make make install
System configuration

To enable the wireless card the module iwl3945 must be loaded

 modprobe iwl3945
WPA and wpa_supplicant

The wireless card has been tested on this laptop in open access points (no security) and on WPA. To use WPA, wpa_supplicant must be configured. Since it is shipped on Slamd64 by default, the only thing left was to edit its configuration file. See here for documentation about configuring and running it.

Ethernet card

modprobe e100

Sound

alsaconf. <Enter>. <Enter>. <Enter>. ALSA rules!

Video

The xorgsetup program did a great job creating a good xorg.conf file. You might want to check the screen resolution to adjust it properly; right here X is working at 1280x800px.

VideoBeam

The video card has a VGA output, which can be used to connect another monitor or a videobeam. This port works properly on Linux with the intel driver, requiring only a small modification to the /etc/X11/xorg.conf file, to indicate the maximum available area for all the screens

Virtual 2000 2000

This line must be added on the "Display" subsection of the "Screen" section. After editing your xorg.conf file should look like this

 Section "Screen"
   ...
   SubSection "Display"
       Viewport   0 0
       Depth     24
       Virtual 2000 2000
   EndSubSection
 EndSection

Note that you must place the line on the "Display" subsection that matches the color depth taht you are using (in this example, 24 bits).

To enable this video output you can use the xrandr program. First you should check which video devices are available. Execute the command xrandr -q to see this. Once the videobeam is connected, you should see something like this

TODO
TODO
TODO

Notice that the info above tells you what modes (resolutions) are available for each screen. You have two choices to arrange them:

  1. Cloned (each screen shows the same content)
  2. Separated (each screen covers a different part of the available space (the Virtual setting on X's config file.)).

To clone the screens use this command

xrandr --output LVDS --mode 1024x768 --output VGA --mode 1024x768

Note that this will "deform" the laptop screen, to make it fit 1024x768. To get separated screens, use this command

xrandr --output LVDS --mode 1280x800 --output VGA --mode 1024x768 --below LVDS

This will create two screens with the specified resolution on each one of them, placing the space of the external screen (VGA) below of the laptop's logical screen. That's pretty obvious, I hope.

The only (solvable) issue is that this

xrandr --output LVDS --mode 1280x800 --output VGA --mode 1280x1024 --below LVDS

will not work. You will get an error message similar to

xrandr: screen cannot be larger than 2000x2000 (desired size 2540x1024)

This happens because of the Virtual setting on the xorg.conf file (it can't fit the desired space). You can increase it to cover the needed area, but there is (always) a catch: if the size goes beyond 2048x2048, you'll lose DRI support. In other words, it will affect 3D performance (and that useless compiz thingie, if you use it). Intel cards seems to have a maximum of 2048x2048px (see here).

TV Output

The most simple setup to get the TV output working is to clone the video output with this

xrandr --output LVDS --mode 1024x768 --output TV --mode 1024x768

Once you are done using the TV you can restore the screen to its normal state with this

xrandr --output LVDS --mode 1280x800 --output TV --off
Notes

The TV port is s-video with 7 pins, and many TVs (at least around here) receive only RCA video connectors (A.K.A. composite video). The problem with this is that most s-video ↔ RCA converters use an s-video port of 4 pins. If you use these, you still have video, but no color XD. Make sure of getting a proper 7 pin s-video to RCA converter.

When testing the video output with the battery charger connected the video output stopped working. Unplugging it fixes the issue. Yet, there are reasons to believe the culprit is the AC outlet.

Check the man page. xrandr allows many nifty things, like rotating, applying offsets to the screens, and other things.

Links

Card reader (SD/MMC)

modprobe sdhci
modprobe mmc_block

After loading these modules, each time you insert a card a new device in /dev will be created, most likey named mmcblk3, with another device (the partition) called mmcblk3p1 (for MMC cards... :) ). You can change these names through udev, though.

Links

Video camera

Microphone

Worked out of the box.

Hibernation

The goal of this configuration is to have software suspend (both to memory and to disk) working with the following setup

At the time of writing this document (Feb 01, 2008), there are 3 options to get hibernation on Linux

The chosen option was swsusp, since it doesn't require any kernel patching/recompilation, and it is enabled on the kernel selected at install time (2.6.22.8). To see if your kernel supports software suspend, see its config. file (/proc/config.gz) and check that it has the following flags enabled

CONFIG_SOFTWARE_SUSPEND=y
CONFIG_SUSPEND_SMP=y

Regardless of the suspend system chosen, enabling software suspend on Linux comes down to do this

  1. Configure the chosen suspend system
  2. Make proper scripts to suspend to memory and to disk.
  3. Enable ACPI events for the power button and the laptop lid.
  4. Configure acpid so it runs these scripts in response to the proper events.

Other than checking if swsusp support is compiled into the kernel, the only thing needed to use swsusp is to indicate the swap partition which will be used to write everything when suspending to disk. To do this is necessary to pass the parameter resume=/dev/your_swap_partition. To pass this parameter every time the /etc/lilo.conf must be edited to add the append = "resume ..." option; the section to boot Linux should look like this (in this case the swap partition is located at /dev/sda2)

image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/myvg/root
  label = Linux
  append = "resume=/dev/sda2"
  read-only

Don't forget to re-run Lilo after modifying /etc/lilo.conf.

The scripts for suspending to disk and memory are really simple. The suspend-to-memory script is this (let's call it lid.sh)

#!/bin/bash
echo -n mem > /sys/power/state

and the suspend-to-disk script is (let's call it pwrbtn.sh)

#!/bin/bash
echo shutdown > /sys/power/disk; echo disk > /sys/power/state

On the ACPI side, both the power button and the lid events depend on a kernel module. Executing

modprobe button

enables the detection of both of these events. The final step is to connect the events to the proper scripts. To do so you have to create a couple of files in the /etc/acpi/events directory. The first one (lid) contains this

event=button[ /]lid.*
action=/etc/acpi/actions/lid.sh

The second one (pwrbtn) contains this

event=button[ /]power
action=/etc/acpi/actions/pwrbtn.sh

Both of the scripts for suspending to RAM and to disk must be copied to the specified locations (/etc/acpi/actions/...) and made executable.

One special caveat is that ACPI comes (in slamd64) with a default handler for all the events, which is configured to shut down the system when pressing the power button. To disable this edit the /etc/acpi/acpi_handler.sh file (the /etc/acpi/events/default file binds all the events to this script) and comment out the case statement for the power option. It should look like this after commenting the option

#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
 #     power) /sbin/init 0
 #        ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac

After this you should restart acpid (/etc/rc.d/rc.acpid restart) and then you'll be ready to go, with software suspend enabled.

Links

Battery

It is necessary to load some kernel modules

modprobe battery #to get bat. capacity info.
modprobe ac #to see if the AC charger is connected
modprobe video #to be able to change the brightness of the screen
modprobe thermal #to check temperature

You can play now on /proc/acpi/* with cat to get a lot of info. KDE will put an icon in the system tray to show the amount of battery charge available, and wether you are connected to the battery charger or not.

Extras

Multimedia keys

The laptop has a row of multimedia keys on top of the keyboard; all of them but two (the ones associated with the Quick Play functionality). To enable them we used the xbindkeys program. It allows you to check the keycodes of the multimedia keys, and it also allows binding each of these keys to a particular command/program/script. A guide for it (a bit outdated, yet still correct, and in spanish) can be found here.

Remote controller

The remote controller uses infrared signals to communicate with the laptop. A really pleasant sursprise is that the keys of the remote controller are mapped directly to key events, without the need for special software, and most important, regardless of the operating system. They work out of the box in Linux.

The arrow keys match the 'event' of pressing the arrow keys on the keyboard. The OK key of the remote matches the <Enter> key, the up and down ones match themselves to the PgUp and PgDn keys, respectively. This alone is good enough to control the laptop during a presentation. In addition, the remote has multimedia keys matching the multimedia keys of the keyboard; The good thing is that, since they match these keys, all the procedures for associating an action to each multimedia key will work in the same way with the remote controller.

Keyboard

To enable dead keys to write accented chars (mostly iso8859-1), it is necessary to edit the /etc/X11/xorg.conf file, in the section InputDevice, to add the line Option "XkbVariant" "alt-intl". It should look like this:

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option       "XkbModel"   "pc105"
    Option       "XkbLayout"  "us"
    Option       "XkbVariant" "alt-intl"
EndSection

Touch Pad

The touchpad works fine with the configuration generated by xorgsetup; however, scrolling wasn't enabled, so it is necessary to install the synaptics driver. The slackbuild for creating the Slackware package can be obtained at http://slackbuilds.org/repository/12.0/system/synaptics/

The only problem when trying to install the driver is that X will not find it; the slackbuild was written for Slackware, and in Slamd64 the location of the X drivers is different. It is necessary to modify the slackbuild script and change the line that copies the .so driver, from

$PKG/usr/lib64/xorg/modules/input/synaptics_drv.so

to

$PKG/usr/X11/lib/modules/input/synaptics_drv.so

Once the package is properly installed, the X config file (/etc/X11/xorg.conf) must be edited. The "InputDevice" section must be changed to this (taken from synaptics INSTALL file):

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "synaptics"
        Option      "ZAxisMapping" "4 5 6 7"
        Option        "Device"        "/dev/psaux"
        Option        "Protocol"      "auto-dev"
        Option        "LeftEdge"      "1700"
        Option        "RightEdge"     "5300"
        Option        "TopEdge"       "1700"
        Option        "BottomEdge"    "4200"
        Option        "FingerLow"     "25"
        Option        "FingerHigh"    "30"
        Option        "MaxTapTime"    "180"
        Option        "MaxTapMove"    "220"
        Option        "VertScrollDelta" "100"
        Option        "MinSpeed"      "0.09"
        Option        "MaxSpeed"      "0.18"
        Option        "AccelFactor"   "0.0015"
        Option        "SHMConfig"     "on"
EndSection

After this is necessary to restart X.

Last update: 2008-02-23 (Rev 13718)

svnwiki $Rev: 12966 $