Back to "R2D2s Elektronikprojekte Linux On Laptops

Debian-Linux on HP Compaq NX7400 (RH387EA)

This docoment describes the configuration for the NX7400 submodel RH387EA, but most other submodels have at least similar hardware, so this document should be usefull for them too. If you have any comments, additions or hints please email me at hermann ( a t ) physiklaborant.de.

Update 2007-12-14:

Update 2007-04-21: Update 2007-03-07: Update 2007-02-27:

Hardware details

DescriptionWorksComments
Processor
Intel Celeron M 430Yes
Graphics
Intel 945GM/GMA 950Yes
Screen 1280x800 Widescreen YesSetting console resultion
Backlight dimming YesThe Fn+F9, Fn+F10 keys work. ACPI also.
3D-Acceleration YesConfiguration
External monitorUntested
Sound
Intel High Definition Audio ControllerYes2.6.19 is broken
SpeakerSee notesDepends on kernel version
Input
Synaptics TouchpadYes
KeyboardYes
Network
Broadcom 4400 10/100BaseT Ethernet Yes
Broadcom 4311 54MBit WLAN YesWith ndiswrapper
BluetoothUntestedDrivers are loaded correctly.
ModemUntested
Power managment
Suspend to Disk Yes
Suspend to RAMYes
Accu runtimeToo low
Drives
HDD 80GB/75GiB(FUJITSU MHV2080B) YesRequires kernel 2.6.19 for suspend.
Poineer DVR-K17 YesDVD+-R/RW (DVD-RAM?)
Misc
PCMCIAYesTested with a Prism II WLAN card.
USBYes
FirewireUntested

lspci-Listing

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and
             945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 
             945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML 
             Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) 
             High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) 
              Serial ATA Storage Controller AHCI (rev 01)
02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
02:0e.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
10:00.0 Network controller: Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (rev 01)

Graphics

Console resolution

Grub detects the 1280x800 modes as 0x160 to 0x163, but when I pass them to the kernel the system doesn't boot. You can enable it with the vga=0x360 kernel parameter.

3D-Acceleration

By default the X server uses the "vesa" driver which of course doesn't provide 3d acceleration. In /etc/X11/xorg.conf you should change
Section "Device"
...
        Driver          "vesa"
        BusID           "PCI:0:2:0"
EndSection
to
Section "Device"
...
        Driver          "i810"
        BusID           "PCI:0:2:0"
EndSection
UPDATE: You can also use debian's debconf to do this job for you:
# dpkg-reconfigure -plow xserver-xorg
The package xserver-xorg-video-i810 has to be installed. libgl1-mesa-glx and libgl1-mesa-dri are also required for most software.

Backlight brightness

After loading the video module the backlight can be adjusted via /proc/acpi/video/C080/C13C/brightness. The following levels are available:
nx7400:/proc/acpi/video/C080/C13C# cat brightness
levels:  100 51 30 37 44 51 58 65 72 79 86 93 100
current: 30
30 is the lowest level, 100 the brightest.

After this module is loaded nothing changes at first. But the first time you echo something to brightness the Fn+F9/F10 keys no longer change the backlight brightness, but instead create ACPI events:

Key pressedacpid -d reports
Fn+F9 (Down)received event "video C13C 00000087 00000000"
Fn+F10 (Up) received event "video C13C 00000086 00000000"
This could be used to create a script that controls brightness in software.

Sound

The soundcard support is added in 2.6.16 (but only lineout works) and broken in 2.6.19:
KernelversionWorks?
2.6.16No *)
2.6.17Yes
2.6.18Yes(reported by David Karafiat)
2.6.19Only with the patch below.
2.6.20Yes
2.6.21Yes
*) In 2.6.16 only the lineout works, however the internal speakers don't work.
diff -u a/hda/patch_si3054.c b/hda/patch_si3054.c
--- a/hda/patch_si3054.c  2006-12-13 14:53:57.000000000 +0100
+++ b/hda/patch_si3054.c  2006-12-05 14:39:20.000000000 +0100
@@ -243,7 +243,7 @@

        if((val&SI3054_MEI_READY) != SI3054_MEI_READY) {
                snd_printk(KERN_ERR "si3054: cannot initialize. EXT MID = %04x\n", val);
-               return -EACCES;
+               /* return -EACCES; */
        }

        SET_REG(codec, SI3054_GPIO_POLARITY, 0xffff);

Input

Touchpad

The touchpad works with the basic installation, but to use more advanced features you should add the following section to your /etc/X11/xorg.conf:
Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        #Option         "Device"                "/dev/psaux"
        Option          "Device"                "/dev/input/event0"
        Option          "Protocol"              "auto-dev"
        Option          "HorizScrollDelta"      "0"
        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

Keyboard

The "Insert", "Home", "Page Up/Down" keys are in a unusual position, but you get used to it pretty fast. The left shift key is a bit to small.

Key definitions are loaded by /etc/init.d/hotkey-setup start at boot, but are lost after suspend to disk or ram. You should add something like this to your /etc/hibernate/common.conf:

OnResume 20 /etc/init.d/hotkey-setup start
There are some special keys:
Key Description Keycode Comment
Fn+F3 Sleep button 223
Fn+F4 Switch monitor None function not tested
Fn+F6 No offical function 146
Fn+F8 Battery 241
Fn+F9 Backlight down None/ACPI*) handled by hardware
Fn+F10 Backlight up None/ACPI*) handled by hardware
Fn+ESC No offical function 159
Mute Mute sound 160 led is handled by sound driver
Volume Volume down 174
Volume Volume up 176
Wlan Wlan on/off None key and led handled by driver
*)
See chapter about backlight control

Fn+F11 also generates a key press event (scancode: e033), but no keycode is assigned. You can assign your own by calling

setkeycodes e033 <keycode>
The best place to add this is probably /usr/share/hotkey-setup/hp.hk.

Network

10/100 MBit LAN

Works with driver b44, the interface is called eth0.

54 MBit WLAN

With ndiswrapper and the windows-driver there is no difficulty setting up the connection.

Starting with kernel 2.6.20 the bcm43xx driver includes support for the BCM4311. However it is broken and you have to apply the matching patch from ftp://lwfinger.dynalias.org/patches/. The connection however seems less stable than with ndiswrapper. For example setting rate to 54M is not possible. Best results are with 36M. On the mailing list it is reported that there are still problems with tx-signal strength.

For those who want to try out the wireless-dev kernel: It can be downloaded using git from the following address: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-dev.git Update 2007-12-14: bcm43xx is long merged to the mainline kernel.

Power managment

Suspend to disk

Suspend to disk works with the default suspend system and software suspend 2. See below for notes about "i8042".

Suspend to ram

Suspend to ram works with uswsusp version 0.6 (available in unstable). Version 0.3 did not work! The kernel must be compiled with i8042 as a module. If it is compiled in your keyboard will not work afterwards. You put the computer to suspend2disk by running
# hibernate -F /etc/hibernate/ram.conf
Note: As i8042 is blacklist it is removed both during suspend to disk and suspend to ram. For suspend to disk a new problem arises: You can't abort it because your keyboard is disabled. So it is probably a good idea to remove i8042 from the blacklist and add lines like this to your /etc/hibernate/ram.conf:
OnSuspend 95 modprobe -r i8042
OnResume  95 modprobe    i8042
Problems left: Sometimes the touchpad's scrollfunction does not work after suspend to ram. Don't use low numbers for the "ordering"-value, otherwise the scrollfunction and other touchpad features might not work after resume. Update 2007-03-31: The problem sometimes still exists. I'm not sure why this happens, but there is an easy workaround: Switch to console and back. Update 2007-12-14: xserver-xorg-video-intel version 2:2.1.1-1 turns on backlight after standby, others need Fn+F9 or F10 pressing to get it working again.

Accu runtime

The accu runtime is too low. It's only 2.7h-3h compared to more than 3.5h when running windows. I'm currently trying to power down the soundcard and the 3D functions of the graphicscard when they aren't used. The problem is that the /sys/devices/.../power/state doesn't work with PCI express hardware. I think setpci should be able to put must unused devices to sleep (NIC, Firewire, PCMCIA, etc.) but I couldn't find information how to do this and I don't want to damage my hardware (setpci is a very low level tool!).

Drives

HDD

The disk doesn't wake up after suspend with kernels before 2.6.19 in default mode. A workaround is to disable "Native SATA mode" in BIOS.

Performance:

hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:        1512 MB in  2.00 seconds = 756.14 MB/sec
 Timing buffered disk reads:  110 MB in  3.01 seconds =  36.49 MB/sec
nx7400:/home/r2d2#

DVD

"cdrecord dev=/dev/scd0 -prcap" listing:
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'PIONEER '
Identification : 'DVDRW   DVR-K17 '
Revision       : '1.05'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Drive capabilities, per MMC-3 page 2A:

  Does read CD-R media
  Does write CD-R media
  Does read CD-RW media
  Does write CD-RW media
  Does read DVD-ROM media
  Does read DVD-R media
  Does write DVD-R media
  Does read DVD-RAM media
  Does write DVD-RAM media
  Does support test writing

  Does read Mode 2 Form 1 blocks
  Does read Mode 2 Form 2 blocks
  Does read digital audio blocks
  Does restart non-streamed digital audio reads accurately
  Does support Buffer-Underrun-Free recording
  Does read multi-session CDs
  Does read fixed-packet CD media using Method 2
  Does not read CD bar code
  Does not read R-W subcode information
  Does read raw P-W subcode data from lead in
  Does return CD media catalog number
  Does return CD ISRC information
  Does not support C2 error pointers
  Does not deliver composite A/V data

  Does play audio CDs
  Number of volume control levels: 256
  Does support individual volume control setting for each channel
  Does support independent mute setting for each channel
  Does not support digital output on port 1
  Does not support digital output on port 2

  Loading mechanism type: tray
  Does support ejection of CD via START/STOP command
  Does not lock media on power up via prevent jumper
  Does allow media to be locked in the drive via PREVENT/ALLOW command
  Is not currently in a media-locked state
  Does not support changing side of disk
  Does not have load-empty-slot-in-changer feature
  Does not support Individual Disk Present feature

  Maximum read  speed:  5540 kB/s (CD  31x, DVD  4x)
  Current read  speed:  5540 kB/s (CD  31x, DVD  4x)
  Maximum write speed: 11080 kB/s (CD  62x, DVD  8x)
  Current write speed: 11080 kB/s (CD  62x, DVD  8x)
  Rotational control selected: CLV/PCAV
  Buffer size in KB: 2000
  Copy management revision supported: 1
  Number of supported write speeds: 4
  Write speed # 0: 11080 kB/s CLV/PCAV (CD  62x, DVD  8x)
  Write speed # 1:  8310 kB/s CLV/PCAV (CD  47x, DVD  6x)
  Write speed # 2:  5540 kB/s CLV/PCAV (CD  31x, DVD  4x)
  Write speed # 3:  3324 kB/s CLV/PCAV (CD  18x, DVD  2x)

Supported CD-RW media types according to MMC-4 feature 0x37:
  Does write multi speed       CD-RW media
  Does write high  speed       CD-RW media
  Does write ultra high speed  CD-RW media
  Does write ultra high speed+ CD-RW media

Links

Guide by Bill Giannikos