.hp tx2020eo and ubuntu 8.04.

HP Pavilion tx2000 series laptop runnign Ubuntu 8.04 - My collection of Howtos


!!NOTE!!
These howtos apply only to version 8.04 of ubuntu, and this page is discontinued due to fact, that i don't have this machine anymore.
!!NOTE!!



In early summer 2008, i started forum thread about my machine, tx2020eo from tx2000 series.
Original thread is at the finnish ubuntu forums, and finally i got everything working on this powerful, but still realistic size laptop.

Please forgive me that this howto isn't at the bleeding edge of being up to date, but all described maneuvers work and are usable.
I'm trying my best to keep this accurate and even remotely up to date :)

-----------------------------------------------------


First, The basic specs of my tx2020:

AMD 2ghz Turion 2X64 TL-60
HP motherboard w/ nForce chipset
2Gb 677mhz memory - 2x1gb combs (thought it was 800mhz :( ... )
nVidia Geforce 6150 Go
12'' Wide TFT-display with Wacom Penabled Active Digitizer touchscreen and 1280x800 resolution
LightScribe DL DVD-+RW Drive
Broadcom 4328 (rev 03) chipset wlan
160Gb HDD. (newer ones have 250Gb...)
Mine was shipped with two different batteries and small HP remote controller that fits in minipci card slot.

Expansion ports: 3x USB2.0, Expansion Port3? ,S-video out, VGA-out, RJ-45 network, mini-PCI card-slot,
Modem port, SD/MMC/XD card reader.
Other worth mentioning: Pen for wacom and some multimedia keys.

-----------------------------------------------------


So. To main "article" - This is my *extended* translation of the original finnish post.

Originally translated on 20.06.2008 - Updated 23.09.2008

This brand and make of HP's relatively mobile laptop seems to be popular nowadays,
so i decided to start a thread to guide others and maybe even to help myself to get everything workin'.

Quote from a friend of mine; "Of course it'll work!" -M. Kulma

-----------------------------------------------------


Right now, all guides and howto's apply to 64bit version of Ubuntu 8.04 LTS.
Note, that i'm running Gnome Desktop environment, so some commands may refer to that...

Before getting to the guides,
I'd like to list everything that worked straight out-of-the-box:

-Display Drivers - Ubuntu DLs and installs working nVidia driver with few clicks.
-Multimedia Keys - Basicly everything works fine except "rotate" and "setup" buttons on side of display.
-Touchpad - Wacom touchpad works "ootb".
-Ethernet - nVidia's 10/100 LAN work'd fine
-Bluetooth - Out-of-the-box = ootb.
-Suyin Webcam - ootb.
-Sound Recording - ootb.
-Fingerprint reader - Works, but FPrint software isn't ready enough for real use.
-Hibernate - Works.
-Remote control - Works fine. Without few later described dead keys though...
-Multimedia keys (well... um.. most of them..)

-----------------------------------------------------


Things i haven't tested yet:

-?
-Internal Modem - Have nothing to test it with/I found no use for this whatsoever.

-----------------------------------------------------


Problems after basic install:

-Sounds - HP's general problem with linux, mute-button's firmware thinks it's on all the time.
-WLAN - Ubuntu 8.04 is supposed to work with BCM cards by default, but it doesn't.
-Lid - Screen doesn't wake up after opening lid.
-Suspend - Screen doesn't wake up after suspend.
-Screen rotation - Needs to be configured with XRandR.
-Wacom Touchscreen with Pen - Needs installation of patched linuxwacom driver.
-Lightscribe - Binary linux drivers/software can only be found for 32bit systems.
-External display - Needs nVidia drivers and some configgin'. (Here's copy of my message that i've sent to few of you...)
-Dead buttons - No real explanation found yet...

-----------------------------------------------------


Guides & HOWTO's on this page:
-1.- Sounds (or configuring mute-button to work)
-2.- WLAN - Using BCM4328 adapter with NDISWrapper
-3.- Rotating the screen
-4.- Using Wacom Active digitizer with pen
-5.- The Suspend and the Lid
-6.- Lightscribe in 64bit system
-7.- Getting (most of) dead keys to work while lid is down
-8.- Fingerprint reader wit FPrint (for testing it)
-9.- My conf-files

These are in very random order.
Even though this article is about running Ubuntu in this machine,
most of these *may* be suitable for other distributions as well.
Heck, some of these *may* even apply to other laptops with same hardware specs.

But as always, take my advice: if you don't know what you're doing, don't do it.
And one more thing before we begin; i suggest to run "sudo apt-get update && sudo apt-get upgrade"
before doing anything.

-----------------------------------------------------


-1.- Sounds (or configuring mute-button to work):

As i said, the reason sound doesn't work, is that firmware of the button thinks that
mute is on all the time after install. Fix is simple:

1. Open alsa-base configuration file:
gksu gedit /etc/modprobe.d/alsa-base

2. Add this as last row of file:
options snd-hda-intel model=hp

Save, and after boot sounds work properly. Or you can just restart alsa..

-----------------------------------------------------


-2.- WLAN - Using BCM4328 adapter with NDISWrapper:

Like stated, ubuntu claims to work ootb with BCM adapters. That would be great, but it doesn't work.
We'll need ndiswrapper to get it working properly. And here's how to do it:

1. Blacklist wrong modules and install NDISWrapper:
echo 'blacklist bcm43xx' | sudo tee -a /etc/modprobe.d/blacklist
sudo apt-get install ndiswrapper-utils-1.9
mkdir ~/bcm43xx; cd ~/bcm43xx

2. Get and install drivers:
wget http://myspamb8.googlepages.com/R151517-pruned.zip
unzip R151517-pruned.zip

3. Configuring NDISWrapper (and it's WPA-supplicant) can be done like this:
sudo ndiswrapper -i bcmwl5.inf
ndiswrapper -l
sudo depmod -a
sudo modprobe ndiswrapper
sudo cp /etc/network/interfaces /etc/network/interfaces.orig
echo -e 'auto lo\niface lo inet loopback\n' | sudo tee /etc/network/interfaces
sudo ndiswrapper -m
echo 'ndiswrapper' | sudo tee -a /etc/modules
echo 'ENABLED=0' | sudo tee -a /etc/default/wpasupplicant

4. Remove and add modules to get right ones running:
sudo rmmod b43
sudo rmmod b44
sudo rmmod b43legacy
sudo rmmod ssb
sudo rmmod ndiswrapper
sudo modprobe ndiswrapper
sudo modprobe ssb
sudo modprobe b44
Now you should see available wireless networks

5. Getting NDISWrapper to start at boot:
echo -e '#Hardy ssb/ndiswrapper workaround, added' `date` '\ninstall ndiswrapper modprobe -r b43 b44 b43legacy ssb; modprobe --ignore-install
ndiswrapper $CMDLINE_OPTS; modprobe ssb; modprobe b44;' | sudo tee -a /etc/modprobe.d/ndiswrapper
Now you have working WLAN.

I've heard reports that this also works with newer bcmwl6.inf driver, but it works fine with bcmwl5.inf,
so this howto will stay as it is (at least for now).

-----------------------------------------------------


-3.- Rotating Screen

Ok. This is supported by XRandR of X, and it needs some configuring to get it working properly.

1. First we have to install wacom-tools and edit xorg.conf to have XRandR enabled.
sudo apt-get install wacom-tools
gksudo gedit /etc/X11/xorg.conf


Add "Option "RandRRotation"  "on"" to display driver options, as shown below;
Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
Option "RandRRotation"  "on"
EndSection


Now you should get rotation to work with following commands:
xrandr -o left
xrandr -o right
xrandr -o inverted
xrandr -o normal

And these commands to get the mouse cursor to follow rotations:
xsetwacom set "TabletPCStylus" Rotate CW
xsetwacom set "TabletPCStylus" Rotate HALF
xsetwacom set "TabletPCStylus" Rotate CCW
xsetwacom set "TabletPCStylus" Rotate NONE

2. Using a shell scprit to rotate both 90 degrees clockwise at a time with one button
This script was written by user mgonber from finnish ubuntu forums. Thanks.
Open empty textfile and paste these contents to it:
#!/bin/bash

#Uncomment next line to use script on 6.06 (Dapper Drake) (and comment later one):
#rotation="$(xrandr -q | grep 'Current rotation' | cut -d' ' -f4)"

#This line is for use with 8.04 (Hardy Heron):
rotation="$(xrandr -q --verbose | sed -n '2 {p;q}' | cut -d' ' -f5)"

case "$rotation" in
    normal)
        xrandr -o right
        xsetwacom set "TabletPCStylus" Rotate CW
        ;;
    right)
        xrandr -o inverted
        xsetwacom set "TabletPCStylus" Rotate HALF
        ;;
    inverted)
        xrandr -o left
        xsetwacom set "TabletPCStylus" Rotate CCW
        ;;
    left)
        xrandr -o normal
        xsetwacom set "TabletPCStylus" Rotate NONE
        ;;
esac


Save textfile in your home folder as ".rotation.sh" and change it's permissions to executable.
Now you can test if everything is go by commanding ~/.rotation.sh

3. As last task, we'll bind quickplay-button with Xmodmap to run the script.
Yes, quickplay, because "original" rotation-button doesn't give any keycode. aka. doesn't work

Once again, open empty text-file and and paste this to it:
keycode 237 = XF86Launch0
keycode 205 = XF86Launch1

Keycode 237 is button with DVD-logo on it and 205 is Quickplay-button.
(You can always check if it's correct by using xev)
Save file as ".Xmodmap" in your home folder.

Gnome should detect and run xmodmap in next startup automatically.
Then i used GConf editor to bind commands so, that compiz understands them.
(you can find equilevant place for metacity, if that's your choice of window manager)

The right place to bind these is Apps> Compiz> General> AllScreens> Options> in GConfEditor.
Find lines that say run_command*_key and change them to match the example:
Name                        Value
run_command0_key      XF86Launch0
run_command1_key      XF86Launch1

On same page, find lines that say command0 and command1. Change to match the example:
Name                        Value
command0        elisa
command1             ~/rotation.sh

With these examples, pressing Quickplay button runs the script that rotates screen and mouse cursor 90 degrees at a time.
(I added the command elisa to start "Elisa, the open media center" by pressing DVD-button,
but you can tell it to do what you want)
If you run into problems while binding keys, there's amazing howto at Gentoo's Wiki,
which should help you to understand how xmodmap works, if needed.

-----------------------------------------------------


-4.- Using Wacom Active Digitizer with pen

Ok.Right now, this one needs patched LinuxWacom driver. Note that everytime that kernel or X
is updated you'll have to install the driver again.
(if you're just updating to new kernel build, go straight to part 5, cd to ~/linuxwacom and do it from 'sudo rmmod wacom' to 'sudo modprobe wacom' - Assuming that you didn't remove your linuxwacom folder.)

So shall we?...

1.We'll need suitable compiling environment, so:
sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev cpp-3.4 f2c fort77 g77 tcl tcl-dev tclx8.4 tclx8.4-dev tk tk-dev input-utils xserver-xorg-input-wacom xserver-xorg-input-evdev gawk mawk ncurses-base ncurses-bin libncurses-dev
I'm not sure if everything is needed, but this way it'll work properly.

2. Make sure you're at home and get the driver sources and patch:
cd ~
wget http://internap.dl.sourceforge.net/sourceforge/linuxwacom/linuxwacom-0.7.9-11.tar.bz2
wget -O usbtx2000z.patch http://linuxwacom.pastebin.com/pastebin.php?dl=f3d5b9e73


3. Untar driver sources and patch it:
tar xjvf linuxwacom-0.7.9-11.tar.bz2
cd ~/linuxwacom-0.7.9-11
patch -p1 < ../usbtx2000z.patch

4. Configure build:
./configure --enable-wacom
You can compare your output to mine, just to make sure that you got a working module.
Here's link to my output as text...

5. Build, install and remove older settings:
make
sudo make install
sudo rmmod wacom
sudo cp src/2.6.24/wacom.ko /lib/modules/2.6.24-21-generic/kernel/drivers/input/tablet/wacom.ko
sudo depmod -e
sudo modprobe wacom
sudo rm /usr/local/bin/xsetwacom

6. Edit Xorg.conf:
sudo gedit /etc/X11/xorg.conf

Add these lines to the beginning of the file:
Section "InputDevice"
Identifier "TabletPCStylus"
Driver "wacom"
Option "ForceDevice" "ISDV4"
Option "Type" "stylus"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/by-id/usb-Tablet_ISD-V4-event-mouse"
Option "Button2" "3" # make side-switch a right button
Option "TopX" "225"
Option "TopY" "122"
Option "BottomX" "26365"
Option "BottomY" "16488"
EndSection

Section "InputDevice"
Identifier "TabletPCStylus2"
Driver "wacom"
Option "ForceDevice" "ISDV4"
Option "Type" "stylus"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/wacom"
Option "TopX" "01429"
Option "TopY" "01150"
Option "BottomX" "25300"
Option "BottomY" "15300"
EndSection

Section "InputDevice"
Identifier "TabletPCStylus3"
Driver "wacom"
Option "ForceDevice" "ISDV4"
Option "Type" "eraser"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/by-id/usb-Tablet_ISD-V4-event-mouse"
EndSection

(I got my calibration close enough with these Top & Bottom option values.)

And change "server layout" and "modules" to match the example:
Section "ServerLayout"
Identifier "Default Layout"
  screen "Default Screen"
Inputdevice "Synaptics Touchpad"
Inputdevice     "TabletPCStylus"
        Inputdevice     "TabletPCStylus2"
        Inputdevice     "TabletPCStylus3"
EndSection
Section "Module"
load "wacom"
Load "glx"
EndSection

Next time you reboot, pen should work fine. Touch works too, but not so well...

-----------------------------------------------------


-5.- The Suspend and the Lid

Suspend is easy to get working right. Add "noapic nolapic irqfixup" to your menu.lst.
To get ubuntu automatically to add these options to new kernel everytime grub is updated:
Edit the menu.lst, and find "# defoptions=quiet splash" and change it to:
# defoptions=quiet splash noapic nolapic irqfixup
Note, that the line stays commented with "#"

After adding defoptions, you can run "sudo update-grub" to automatically add options to all kernels.

It works after next bootup.

Or. You can do it manually:
gksudo gedit /boot/grub/menu.lst
Find the line that points to kernel in use and change it from:
kernel /vmlinuz-2.6.24-19-generic root=UUID=3038efdc-5e7f-4752-93b9-552670e33c89 ro quiet splash
to
kernel /vmlinuz-2.6.24-19-generic root=UUID=3038efdc-5e7f-4752-93b9-552670e33c89 ro quiet splash noapic nolapic irqfixup

---
Configuring lid to make the screen wake up when you open it:
1. Edit acpi-support -file
sudo gedit /etc/default/acpi-support

2. Find "POST_VIDEO=" and change it to:
POST_VIDEO=false

I'm using Compiz, so i had to untick "Sync to VBlank" from advanced compiz settings.
Also i had to change battery settings to "do nothing". This way screen doesn't stay blank.

-----------------------------------------------------


-6.- Lightscribe in 64bit system

Native linux drivers and software are made by the manufacturer only for 32bit systems, so we'll need to be clever.

1. Set up environment for installing 32bit software and making conversions:
sudo apt-get install ia32-libs fakeroot alien

2. Get driver and LaCie's labeler:
wget http://download.lightscribe.com/ls/lightscribe-1.12.37.1-linux-2.6-intel.deb
wget http://www.lacie.com/download/drivers/4L-1.0-r6.i586.rpm

3. Install driver in forced mode:
sudo dpkg -i --force-architecture lightscribe-1.12.37.1-linux-2.6-intel.deb

4. Convert .rpm to .deb and install
fakeroot alien -t 4L-1.0-r6.i586.rpm
fakeroot alien 4L-1.0-r6.i586.tgz
sudo dpkg -i --force-architecture  4L-1.0-r6.i586.deb

(Check Your Filenames!!!)

5. Make symlink, so path recognizes the driver:
sudo ln -s /usr/lib/liblightscribe.so.1 /lib32/liblightscribe.so.1

6. Test it with commands:
4L-cli enumerate
4L-gui


My output for enumerate is:
Using /etc/lightscribe.rc
Drive path: /dev/sr0
Usable: 1
Full name: Slimtype DVD A DS8A1H WH66 149
Model: DVD A  DS8A1H  
Manufacturer: Slimtype
Capabilities: monochrome
Drive inner radius: 21700
Drive outer radius: 58700

If enumerate gives same output, your ready for labeling.

-----------------------------------------------------


-7.- Getting (most of) dead keys to work while lid is down

With Omnibook & HP scripts, you can avoid killing all the keys when you turn your screen to tablet-mode.
Mr. Ahlskog wrote small guide in english.
I'll update this for easier one, once i get to it...

-----------------------------------------------------


-8.- Fingerprint reader with FPrint (For testing)

To get AES fingerprint reader to work, you'll need repo that contains FPrint.
echo -e "# Fingerprint reader support (fprint)\ndeb http://ppa.launchpad.net/madman2k/ubuntu hardy main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list

Then, install needed packages:
sudo apt-get update
sudo apt-get install fprint-demo libfprint-dev libfprint0 libpam-fprint


You'll need to be in plugdev group to use your fingerprint reader:
sudo usermod -a -G plugdev $USER
groups | grep plugdev #Make sure you get output at this point!
sudo chgrp -R plugdev /dev/bus/usb/

Now you're ready to test it. Run "fprint-demo" to do so.

I'm not going to guide how to change password prompts to accept finger swiping, because fprint is not
ready for everyday use. I'll add that when it is.

-----------------------------------------------------


-9.- My conf files

You can view my xorg.conf here.
You can view that rotation script here.

-----------------------------------------------------


In conclusion:
Everything works fine ecxept those two buttons and touch (which works, but not properly).
Personally, i recommend Ubuntu to replace Vista on this particular machine.
It'll need more work, but you'll get much faster machine,
and you'll save up to 40gb of your diskspace.

--



Further things/smaller faults i've noticed:
-Processor scaling likes to stay in 2GHz on AC power without apparent reason. (I guess this is more like a feature than a bug)
-After many screen rotations and using the pen a lot, touchpad's scroll-panel dies from time time. (not always though)

-----------------------------------------------------


So. I guess thats it.
More reading you can find by just googling "tx2000". There are numerous sources and forum posts about this machine these days.

-----------------------------------------------------


Changelog:
2008-06-26 - Changelog added, few corrections to language.
2008-07-28 - Update to match latest kernel build, few corrections to typos.
2008-08-15 - Update to match latest kernel build, added few pointers.
2008-08-23 - Added missing build environment dependencies for touchscreen, added few pointers.
2008-09-23 - Added what i mean by "some configgin'" on external dispalys, integrated howto to site.
2009-04-27 - Added notes about end of project, integrated to new site theme.

-----------------------------------------------------


Linux On Laptops


Theme by N.Design Studio and Ben Swift. Page is WordPress powered.