Head - 4momo.de Head - 4momo.de
! ARCHIVE (outdated) - New URI blog.4momo.de
! ARCHIV (veraltet) - Neue URI blog.4momo.de

Navigation

Home
Web-Log
About
Suche
Kontakt
Impressum

Kategorien

Mich
Das Netz
Much Other

RSS-Feed

RSS-Feed
Trenner

Suchfunktion

Trenner
by Moritz Beller

Valid HTML 4.01

Valid CSS

Valid RSS 0.91

ArchLinux on notebook HP nx6110 — The Definite Guide

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones In the following, I will give you an introduction into how to get an HP nx6110 EK106ES to work with the GNU/Arch Linux operating system. I have tried and been as in-depth as was possible, always explaining why to do a certain thing. I want my readers to gain their own experiences and get used to the basic ideas and concepts of Linux. Both hardware and software will change, but knowledge -- among logic and intelligence -- is a good that is of utmost importance for more than just simply computers. This document was written with the idea of sustainability in mind -- it should be useful for other Linux distributions as well. I have been specific, when it need be, for example with providing well-drafted configuration file snippets or installation commands. I don't expect every Linux user to understand the following, but with enough efforts and a little aptitude you are going to understand most of it easily. Finally, I encourage my readers to use the comment feature at the bottom of the page to give me some feedback.

Overview of the components (Index)

Pentium m (features)works nicely
recommended: ondemand kernelspace scaler
usbworks nicely
tested with: usb sticks, mp3 player, ipod, several canon cameras
touchpad works nicely
use with: synaptics
displayworks nicely
use with: 915resolution
i915gmworks nicely
use with: latest xorg-7
wlanworks nicely
recommended: ndiswrapper
tested with: ndiswrapper (128 bit WEP), bcm43xx (still buggy)
DVD burnerworks nicely
tested with: CD, CD-rw, DVD
bluetoothworks nicely
tested with: Michael Meder's Motorola V525
audioworks nicely
use with: alsa
firewireseems to work (as lspci reports)
not yet tested
softmodemnever tried to get it to work

Bios Update

Depending on yours machine's manufacturing date you may not have the latest BIOS installed. New firmwares offer superior fan controll and provide for a better key management (faster reactions to key pressing, that is). The pre-installed Microsoft Operating System is just about perfectly suitable for the task of an easy BIOS flash. Make sure you got the latest firmware (F.0C) installed before you start partitioning your hard drive. You can check up on this in your BIOS via pressing F10 at POST.

Arch Installation on the nx6110

Get yourself an Arch Install CD. I recommend you download only the "Basic Installation CD", since most packages of the big ISO will probably have become outdated as of the days when the ISO was created.

Basically, Arch Linux is Gentoo Linux plus a database of 7000 pre-built binary packages (Arch fans will heavily disagree at this point). Arch has the very goal of making nothing more complicated than is absolutely necessary and it succeeds in following its goals. Even though some people will get horrified when they are told they'd have to configure every piece of software themselves, Arch does so well in making this process as transparent as possible, you will probably consider it a nice insight into how the program works rather than a time-wasting nuisance.

The installation was all easy and quite straight forward. Having been a Lilo enthusiast for years, I suggest choosing grub now, for two reasons:
- grub has the larger set of features
- grub does not expect you to run a "boot loader update" command every once in a while you happen to change its configuration file (which can result in a lot of work with lilo) or build a new kernel

First boot on HP's nx6110

Should you have a dhcp-server set up to which your computer is connected, you may now want to update your package manager's database.

pacman --sync --refresh

It is also wise to perform an update over all installed packages, for security matters:

pacman --sync --update

Reboot issues with notebook

Even though the shutdown -h now command works out of the box, the nx6110 will hang when issuing a reboot (kernel version 2.6.15.2). Fortunately, Linux supports several reboot modes that can be manually altered in the bootloader's config. Append reboot=b to the kernel line in menu.lst for the appropriate kernel entries.

Kernel Compilation: Make your own!

I experienced heavy a disappointment when I first booted arch from the nx6110's hard drive: A system booting ever-so-slow I hadn't seen in a while. It took more than one minute to actually see the log in prompt. This was way too much, let alone the fact there was absolutely no extra-stuff like wireless and X installed yet.

Forget about Arch's preinstalled kernel. Go build your own! This is neither difficult nor time consuming, but reduced my booting time to, lo and behold!, 20 secs (including POST procedure). My kernel is not in any way minimalistic -- I have all the features which I can make use of compiled in. I like monolithic kernels very much, for both security and time reasons. Seldom compile something as a module and you may also reach that magical 20 secs. Another hint is to make service loading parallel. This can be done in /etc/rc.conf. Just put an at before the names of the services in the array on the last line of the file.

After downloading your kernel archive file from kernel.org (in this case 2.6.15.2), unpack the thing in /usr/src and create a symlink to the actual kernel directory:

ln -s /usr/src/linux-2.6.15.2 /usr/src/linux

To get DRI support with Intel's built-in graphic chip 915GM, switch on

> Device Drivers, Character Devices, /dev/agpart (AGP support)
> Device Drivers, Character Devices, Intel 440LX/BX/GX, I8xx and E7x05 chipset support
> Direct Rendering manager
> > Intel 810
> > Intel 830M, 845G (...) -> 915

You'll also need to run synaptics for the touchpad -- the driver requires PS/2 mouse and Event Handling interface (evdev) to be included. You can find these under Devices, Input Devices.

ACPID, a daemon for ACPI events

This is a tiny piece of software that allows for ACPI event handling. acpid comes in handy for suspend2, as well.

pacman -S acpid

Don't forget to start acpid automatically with help of /etc/rc.conf as mentioned above.

Battery saving CPU frequency governor

In order to make use of the Pentium M's tremendous power saving features, you'll have to compile the according so called frequency governor into your kernel. I recommend the use of the ondemand governor which reacts to CPU intensive tasks quite fast and smoothly, even for AC powered systems. Your CPU will produce less heat, thereby saving itself from overheating and reducing the need of a fan. /etc/rc.local is executed on runlevel 3 (aka multi user). At this point of the boot process all important services that we need in order to set the processor's frequency have been started.

# The ondemand cpu frequency scaler serves our purposes best
echo -n "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

If you need extraordinarily much processing power, you may load other frequency scalers like "performance", as well.

Software Suspend: Saving battery time

hibernation does work with the nx6110, it just needs a bit of extra work to set it up. Download the suspend2 patch and apply it to the kernel.

cd /usr/src/linux && /path/to/untared/suspend2/apply

Compile in the options as mentioned in the suspend2 howto.

You'll also need the hibernate scripts from suspend2.net, as well. Having installed all correctly, /usr/sbin/local/hibernate works fine for me.

Suspend to ram is a bit more tricky, since the graphic card won't be recognised on resume unless you have an X server running. If you really don't use one, you could give vbetools a try. Meanwhile, just having X running during hibernate -F /etc/hibernate/ram.conf does work without any problems.

If your wireless link isn't reestablished on power up, call /etc/rc.d/network restart & as root.

Wireless Network

Finally, there are native Linux drivers for Broadcom's bcm43 card series available. I did test them, but they still turned out to be a little lame and the connection quality was quite bad. I experienced many connection losses. As long as they are under such heavy a development, ndiswrapper seems to be the better solution.

It's not this easy to get ndiswrapper to work with our own kernel, but still fairly manageable (at least for you, dear reader, as I will provide you with all the knowledge that is necessary).

pacman -S ndiswrapper-bin
mkdir /lib/modules/2.6.15.2
ln -s /usr/src/linux /lib/modules/2.6.15.2/build
pacman -S cvsup
abs
cd /var/abs/extra/network/ndiswrapper
makepkg
ndiswrapper -i /path/to/windows/inf/file
cd /usr/src/linux
pacman -S ndiswrapper
modprobe ndiswrapper

Add ndiswrapper to load at start up by placing it in the modules array at the beginning of /etc/rc.conf.

To automatically connect to your favourite Wlan, edit rc.conf such that wlan0="dhcp" and INTERFACES=(lo wlan0 eth0)

Edit /etc/conf.d/wireless:

wlan_wlan0="wlan0 mode managed essid YourEssid [key restricted YourKey]"
WLAN_INTERFACES=(wlan0)

Sound support

It's easy to store your sound volumes on shutdown. Just put alsa to the Daemons array at the end of your rc.conf file.

pacman -S alsa-utils alsa-oss

Shortcuts come in quite handy when adjusting the sound volume on the nx6110, as it doesn't share the nx6125's superior box layout with additional extra keys. I have set up right_STRG+ä to increase volume, right_STRG+ö to decrease volume and right_STRG+# to mute the audio output completely.

In order to get sound, your user has to be in the sound group: gpasswd -a USERNAME audio (cf. the Arch Wiki)

Graphics card 915GM

As the nx6110 EK106ES has the new Sonoma technology, xorg versions below 6.8.2 will not function with it correctly. Since the release of xorg-7 DRMI can be enabled, which is a speed boost. You have two choices: Either go for the stable xorg-6-8.2R6 or be brave and try the new xorg-7, as I did.

To install xorg-6 simply type pacman -S xorg.

At the date of writing this document, xorg-7 remained still in testing state, so that you have to uncomment your /etc/pacman.conf to use testing repositories. Once you've done so, run a

pacman -Sy xorg-server xf86-video-i810 xf86-input-mouse xf86-input-keyboard xterm aterm

as root in order to install the modularised new X server version. According to your needs, it cannot hurt to issue the

pacman -S xorg-fonts-75dpi xorg-fonts-100dpi xorg-fonts-type1

command, as well. xorg-7 writes a wrong /usr/share/X11/xdm/Xservers file by default. It's just empty. Put

:0 local /usr/bin/X

in there and xdm et all (gdm, kdm) will again start working. Trying to start them without the above mentioned file editing will give you a repeated 5 minutes respawn initd error. KDE versions below 3.5.1.1 are causing troubles to load with xorg-7, though.

The nx6110's video bios reports wrong values to the X server. It's not possible to use its native resolution of 1400x1050 pixels. You can override these wrong entries, though. Go get 915resolution source files from Steve Tomljenovic and make install them. Afterwards, type 915resolution 5c 1400 1050. You'll probably want that to be automatically executed every boot time, so put it somewhere in both your rc.local and /etc/hibernate/hibernate.conf. xdpyinfo | grep dimensions should then report dimensions: 1400x1050 pixels (301x232 millimetres).

Writing an xorg.conf

To use the i915 hardware accelerated driver, set a device section up that uses the X server's i810 driver (which is actually capable of supporting i915GM chipsets as well):

Section "Device"
Identifier "Card0"
Driver "i810"
# BusId "PCI:0:2:1"
VendorName "All"
BoardName "All"
EndSection

Section "DRI"
Mode 0666
EndSection
making use of the touchpad -- synaptics

Don't forget to use xorg's synaptics driver which is designed to better support the touchpads of notebooks. Load it as a module in xorg.conf and change the driver line of your mouse to load synaptics after you have done

pacman -S synaptics

and, if you are on Xorg-7,

mv /usr/X11R6/lib/modules/input/synaptics_drv.o /usr/lib/xorg/modules/input/

since Pacman puts the synaptics driver in the wrong directory. I really missed a third mouse button, because I often need to select some text and utilise X's excellent copy-and-paste functionality which is associated to the third mouse button. I've put an entry in my xorg.conf that functions in exact the same way as a third mouse button: Tap the according touchpad region (Top-left corner in this case) twice and synaptics will emulate a third mouse button! Some of you might want to give the new testing/synaptics versions > 0.14.4-3, which are already designed for Xorg-7, a try. They allow for disabling horizontal scrolling.
Depending on your personal preferences, you will also probably have to adjust the entry mouse acceleration. Here is the relevant section of my xorg.conf:

Section "InputDevice"
# Synaptics:
Identifier "Touchpad"
Driver "synaptics"
# Option "Device" "/dev/input/mouse0"
Option "SendCoreEvents" "true"
Option "SHMConfig" "on"

# User customized stuff
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 "HorizScrollDelta" "0" # this disables horizontal scrolling
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.16"
Option "AccelFactor" "0.0018"
Option "TapButton1" "1"
Option "TapButton2" "1"
Option "TapButton3" "1"
Option "LTCornerButton" "2"
#Option "LBCornerButton" "0"
#Option "RTCornerButton" "0"
#Option "RBCornerButton" "0"
Option "LeftRightScrolling" "0" # this *should* disable leftrightscrolling
EndSection

For me, font caching didn't work out of the box. I had to regenerate the index via fc-cache -vf, as most fonts turned out to show up as small rectangles on the screen.

Power requirements

Linux does its job quite well. I measured a power consumption in Linux console from 28.86 to 29.12 Watt which is little below WinXP's when idle (31.00 Watt). Even when running X, Linux can absolutely compete with Windows (31.00 Watt to 33.08 Watt). Interestingly, the power consumption even depends on such minor things as the background picture!
Linux's ondemand driver seems to react a little faster and more battery friendly if the CPU is extensively used, though. Wireless needs 3 Watt, so turning it off will indeed increase your accu time by ten to 15 minutes.

An effective trick is to lower the display's brightness by three times pushing the "darker button". This saves you another 2.5 Watt, while the display remains fairly readable.
With everything configured as above, my laptop nx6110 needs 28 seconds from the moment in which I pressed the power button to show up the graphical login manager.

Moritz Beller | Kategorie: Much Other | 11. Februar 2006 | 23:06

8 Kommentar(e)

Kommentare

Hi,
> KDE versions below 4.5.1.1 are causing troubles to load with xorg-7, though.
I think you would say 3.5.1.1, right?

bye

DaniDoni | 20. März 2006 | 13:04
4momo.de Trenner - Schreibmaschine

Great review!
I use arch on similar hardware and I´m really happy, that I switched from Gentoo. As you use a Pentium M it is possible for you to undervolt your CPU and save more battery power (and what´s even more important: keep your pc cooler).

I use it and I´m damn happy I did; it needs a custom kernel however, the tutorial is here:
http://gentoo-wiki.com/HOWTO_Undervolt_a_Pentium_M_CPU

Bastardo | 18. April 2006 | 15:03
4momo.de Trenner - Schreibmaschine

OK, I have tried several distros with this laptop and there is 1 consistant problem... THE FAN !!! no matter which one I use they do not seem to recognize the system fan, and therefore it never turns on... thus overheating the computer... which if you did not know is not a good thing.

When someone figures this problem out please post it here.

Tha Billdozer | 11. May 2006 | 22:05
4momo.de Trenner - Schreibmaschine

In general, fan managemant works just perfect with ArchLinux and every other Linux distribution that I tried out. It's a bit of problem with hibernate, for acpid randomly occupies 100% cpu time after a HD poweroff resume.

Moritz Beller | 11. May 2006 | 23:18
4momo.de Trenner - Schreibmaschine

could you post your kernel config? thanks!

nz | 29. May 2006 | 0:28
4momo.de Trenner - Schreibmaschine

TO Tha Billdozer

Try:
echo 30 > /proc/acpi/thermal_zone/TZ1/polling_frequency

every 30 seconds will be checked if speed of fan is according to /proc/acpi/thermal_zone/TZ1/trip_points

the setting of the trip_points:
echo -n "102:100:100:80:65:50:40" > /proc/acpi/thermal_zone/TZ1/trip_points

TO Moritz
thanks for your review. I use arch on nx6110 too.
How did you set up right_STRG+something to manage volume?
I have set up the suspend device to swap and it solved the problem with 100% cpu after resume.

Filip | 7. Juni 2006 | 14:06
4momo.de Trenner - Schreibmaschine

nz: Sure. You can get a copy of my kernel configuration here.

Filip: Some time ago, I wrote an article in the "Definite Guide" series that might be helpful to you, even though it mainly deals with so-called "Hot Keys". Depending on your window manager, you can also configure those key combinations a lot easier (eg. KDE). Your last line is very interesting, but I am unable to actually figure out what I'd have to alter in the suspend2 configuration file in order to "set up the suspend device to swap", as you say. Would you be so nice as to paste-in the regarding lines? Thanks!

Moritz Beller | 8. Juni 2006 | 19:02
4momo.de Trenner - Schreibmaschine

Sorry, the cpu 100% issue does not depend on swap. I think It s caused by acpid. The acpid deamon listens the file /proc/acpi/event . After suspend2 this file becames unreadable. The solution I have known not using acpid. but then I can t use power button and lid button. So I have set up Fn+F3 like suspend to disk and Fn+F6 like poweroff.

Filip | 10. Juni 2006 | 12:30
4momo.de Trenner - Schreibmaschine
Right is     

Kein HTML erlaubt, der Zeilenumbruch wird in <br> umgewandelt.


Arrow 4momo.de, (c) 2003, 2004, 2005, 2006 by Moritz Beller