Sunday, December 30, 2007

Linux install on HP 6910p using Ubuntu 7.10 (Gutsy)

I have installed Ubuntu 7.10 (Gutsy) on my HP 6910p, there where a couple gotchas although most should be gone by Ubuntu 8.04 (Hardy) or a more recent Linux distribution. Most of the issues can be resolved by updating to more recent versions of the affected software.

HP 6910p specification:



CPU: Intel Core 2 Duo T7700 (2.4Ghz)
Display: 14.1" WXGA+ 1440x900
GPU: AMD/ATI Radeon X2300
RAM: 2GB (2x1GB)
Harddisk: 120GB 7200rpm Hitachi 7k200 Travelstar
Optical Drive: MultiBay II DVD SM DL
Wireless: Intel Pro/Wireless 4965 a/b/g/n, Bluetooth, Infrared
Ports/slots: 3xUSB 2.0; MultiBay II; Intel 82566MM 10/100/1000 Lan; Modem; S-Video out; VGA out; Firewire; Audio in; Audio out; internal microphone; SD/MMC card reader; Smart Card Reader; Type I/II PC Card Reader; SIM card slot; Docking connector; Second battery connector.
Other: Finger print reader, Touch stick with 2 buttons, Touch pad with 2 buttons, Volume up – down, Volume mute, Presentation, Wireless, HP Info Centre touch sensitive buttons.

lspci output:

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)
00:03.0 Communication controller: Intel Corporation Mobile PM965/GM965 MEI Controller (rev 0c)
00:03.2 IDE interface: Intel Corporation Mobile PM965/GM965 PT IDER Controller (rev 0c)
00:03.3 Serial controller: Intel Corporation Mobile PM965/GM965 KT Controller (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc M64-S [Mobility Radeon X2300]
02:06.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b9)
02:06.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b9)
02:06.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 03)
02:06.3 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 20)
02:06.4 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 10)
10:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)


Installation


Installation of Ubuntu 7.10 (Gutsy) went fine, however some of the hardware was not running. Most notably Gutsy is unable to identify the GPU. X will be configured with the basic VESA driver and configured to run on a low resolution. After the installation I had to do some fixing to most of the hardware run, here are the solutions that I have found out.

Wireless



My 6910p came with a Intel 4965 wireless card, Gutsy was able to detect it. For some reason my wireless card would not function properly, its unable to proceed in scanning the network. There is no notable error on syslog or dmesg. I was able to run it once only using the live cd while Ubuntu was installing. Intel 4965 should have been supported out of the box on Gutsy, but mine did not run maybe because its revision (rev 61). I had to update the drivers from http://www.intellinuxwireless.org and rebuild the linux-ubuntu-modules package.

Here is how I made it to work.

1. Download the linux-ubuntu-modules source package

sudo apt-get source linux-ubuntu-modules-`uname -r`

2. Edit the iwlwifi download script to fetch the latest drivers from http://www.intellinuxwireless.org
cd linux-ubuntu-modules-2.6.22-2.6.22/ubuntu/wireless/iwlwifi
edit the BOM script file, set the correct versions and fix the firmware move, here is my diff:

@@ -4,10 +4,10 @@
# only need to do this when you are updating from one version
# if iwlwifi to the next.
#
-IVER=1.1.0
-MVER=10.0.0
-FW3945_VER=2.14.4
-FW4965_VER=4.44.17
+IVER=1.2.23
+MVER=10.0.4
+FW3945_VER=2.14.1.5
+FW4965_VER=4.44.1.20

if [ ! -f iwlwifi-${IVER}.tgz ] ; then wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-${IVER}.tgz; fi
if [ ! -f mac80211-${MVER}.tgz ] ; then wget http://intellinuxwireless.org/mac80211/downloads/mac80211-${MVER}.tgz; fi
@@ -24,13 +24,13 @@
# Note the '-1' in the new firmware file name.
#
tar xzf iwlwifi-3945-ucode-${FW3945_VER}.tgz
-mv iwlwifi-3945-ucode-${FW3945_VER}/iwlwifi-3945.ucode ../../../ubuntu-firmware/iwlwifi/iwlwifi-3945-1.ucode
+mv iwlwifi-3945-ucode-${FW3945_VER}/iwlwifi-3945-1.ucode ../../../ubuntu-firmware/iwlwifi/iwlwifi-3945-1.ucode
rm -rf iwlwifi-3945-ucode-${FW3945_VER}

#
# Note the '-1' in the new firmware file name.
#
tar xzf iwlwifi-4965-ucode-${FW4965_VER}.tgz
-mv iwlwifi-4965-ucode-${FW4965_VER}/iwlwifi-4965.ucode ../../../ubuntu-firmware/iwlwifi/iwlwifi-4965-1.ucode
+mv iwlwifi-4965-ucode-${FW4965_VER}/iwlwifi-4965-1.ucode ../../../ubuntu-firmware/iwlwifi/iwlwifi-4965-1.ucode
rm -rf iwlwifi-4965-ucode-${FW4965_VER}

3. Run the update script so it will fetch and patch the files.

./MUNGE

4. Rebuild the linux-unbuntu-modules, then reinstall the package.

fakeroot debian/rules binary-modules-generic
dpkg -i ../linux-ubuntu-modules-2.6.22-14-generic_2.6.22-14.37_i386.deb


Now my wireless is working flawlessly.

UPDATE: updated iwlwifi to newer version and step #4

Video



Gutsy will not detect the Radeon X2300 and will configure X with just the standard vesa driver. I have decided to use radeonhd driver because of 2 reasons:

1. fglrx currently has a problem with suspend, see Ubuntu issue 121653
2. radeonhd supports xrandr

Here is how I got radeonhd running.

1. Install the xserver-xorg-video-radeonhd from universe

sudo apt-get install xserver-xorg-video-radeonhd

2. Unfortunately the version is still old on Gutsy, Hardy has the working one. I had to manually update and install from source. Download the radeonhd tarball and follow the install instruction and overwrite the files from the debian package.

I was able to run xrandr, but its not that stable on the external display. Based from the radeonhd wiki I believe it can be fixed by updating X and xrandr. For now I just logoff to shutdown X and login again. I am trying to backport the Hardy deb package.

UPDATE: I have now resolved the xrandr re-enable of the external display. The basic fix is to explicitly specify the CRTC via --crtc switch of xrandr. My later blog entry explains it further.

Another solution is to grab the Hardy deb packages, this is what I did recently.

1. Edit the file /etc/apt/sources.list find all "gutsy" and replace with "hardy"
2. Get the newer packages

sudo apt-get update
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg-video-radeonhd
sudo apt-get install libxrandr2
sudo apt-get install xserver-xorg-input-synaptics

3. Revert the file /etc/apt.sources.list find all "hardy" and replace with "gutsy"
4. Update apt so it points back to gutsy packages
sudo apt-get update


If you need 3D support, then fglrx is the only way. Just go install on the menu "System->Administration->Restricted Drivers Manager" and use "ATI accelerated graphics driver".

UPDATE: I am able to change the brightness when I switch to the console screen. I think this will be fixed on the later versions, its a documented issue with radeonhd on some video cards. Its a bit annoying but I don't change the brightness much so its ok. Ambient light sensor also has the same problem, function keys only works on the console.

Suspend and Hibernate



Suspend and hibernate works once I have edited "/etc/default/acpi-support". I have set the following:

SAVE_VBE_STATE=false
POST_VIDEO=false

Sometimes resume takes a while, it takes about 20 secs after to resume after suspending. Resume also sometimes does not work, however after setting

DOUBLE_CONSOLE_SWITCH=true

My resume has been successful all of the time.

Splash screen and virtual terminals



The splash screen and virtual terminals does not work. I was only able to make either work, but not both.

To make the virtual terminals work, I disabled the splash screen:

1. Edit /boot/grub/menu.lst
2. Change the defoptions=[your custom kernel params] splash to defoptions=[your custom kernel params] nosplash
3. Change the "kernel /boot/vmlinuz-[your kernel] root=UUID=[your UUID] ro quiet splash" to "kernel /boot/vmlinuz-[your kernel] root=UUID=[your UUID] ro quiet splash"

To make the splash screen work, but with no working virtual terminals:

1. Edit /etc/usplash.conf

xres=1024
yres=768

2. Edit /boot/grub/menu.lst
3. Add "vga=791" to "defoptions=[your custom kernel params] splash vga=791" and your kernel
"kernel /boot/vmlinuz-[your kernel] root=UUID=[your UUID] ro quiet splash"
4. Update your initramfs

sudo update-initramfs -u -k `uname -r`

The above work around is discussed here:
https://answers.launchpad.net/ubuntu/+question/2299
http://ubuntuforums.org/showthread.php?p=1541970

Harddisk Power management



I am unfortunate that my harddisk (Hitachi 7k200 Travelstar HTS722012K9SA00) is one of those affected by too aggressive power management. This issue is discussed here https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

The workaround that reduced my Load_Cycle_Count

1. edit /etc/laptop-mode/laptop-mode.conf:

LM_AC_HD_IDLE_TIMEOUT_SECONDS=300
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=300
CONTROL_HD_POWERMGMT=1
BATT_HD_POWERMGMT=128

2. edit /etc/default/acpi-support:

ENABLE_LAPTOP_MODE=true
SPINDOWN_TIME=60

3. edit /etc/acpi/power.sh:
Changed "$HDPARM -B 1 /dev/$drive 2>/dev/null" to "$HDPARM -B 128 /dev/$drive 2>/dev/null"

UPDATE: lowered the apm value when on battery, check my later post for the additional script.

Fingerprint reader


UPDATE: It works, just needed to install fprint. Read my later post for some more details.

Audio



UPDATE: The microphone works perfectly, the thing is, its is at the Capture level 0 by default. Go in your sound config panel, Capture tab and set Capture at e.g. 60%. - by Alexander

Bluetooth


UPDATE: Bluetooth works. I had to install "gnome-bluetooth" since I want my laptop to be the server. You can stop the bluetooth service. "/etc/init.d/bluetooth stop" and use update-rc.d to stop it permanently.

Summary



Ubuntu 7.10 (Gutsy) will not able to run HP 6910p right of the box. With some work it will be able to do it. Ubuntu Hardy should be able to resolve most if not all of the issue. For now I am pretty happy with the laptop as most of it now works. Items I wish to work on the future:

  1. hard disk accelerometer
  2. 3G broadband

40 comments:

Unknown said...

Jun,
is your bluetooth and fingerprint reader working. I have a similiar laptop (8710w), but can't get these 2 items working.

Any ideas will be much appreciated.

Marius

Jun said...

Marius,

Yes bluetooth works. I had to install "gnome-bluetooth" since I want my laptop to be the server. Fingerprint reader I don't know yet, there are reports of other HP business line laptop able to make it work. Maybe I will try it out.

Jun

Rajesh said...

Hi,

Can you tell me, whether you were able to set widescreen resolutions such as 1440x900 or 1280x800 after installing the ATI drivers.

--Rajesh

Jun said...

Hi Rajesh,

Both radeonhd and fglrx driver can drive the monitor 1440x900. I am currently using radeonhd because of xrandr, so its easy for me to use the docking station with dvi. I can just issue the xrandr and my desktop is bigger with the windows on the extended desktop going back to it.

Jun

fly3rman said...

Card Reader (sd cards) still doenst work, right?

Jun said...

I haven't tried to make it work yet. It seems it has been detected, when i load sdhci module.

I tried the fingerprint reader, it does work. I just downloaded the packages here:

http://www.madman2k.net/comments/105

I just used the fprint_demo app, it does work. I haven't put it into pam yet.

Jim Marion said...

Jun,

I have a Dell Latitude D630 with the Intel Pro 3945ABG. When I connected to certain wireless networks, my laptop would lock up and my caps lock and scroll lock buttons would start blinking. By following your wireless steps 1-3, I was able to resolve the issue. Thank you very much for posting your resolutions!!!!!!

Jun said...

Jim,

Glad it helped you out. Yay! for open source.

Michael said...

I can't seem to get my microphone working. I get some weird pipeline errors in my sound options when I try to enable it. Any ideas?

kiemlo said...

A couple of small questions regarding 6910p...

Are you able to change LCD brightness using function keys? It seems they change /proc/acpi/video/.../brightness, but display brightness actually remains the same. Ambient Light Sensor doesn't seem to work neither. I'm using radeonhd driver at the moment.

Is there a way to get the Info hotkey to work? Or to light up WLAN LED? Presentation key works fine.

Thanks!

Jun said...

Hi Michael,

Not sure, my mic worked w/o problems. I do loose sound after about 20x suspend-resume.

Jun said...

PK,

I am able to change the brightness when I switch to the console screen. I think this will be fixed on the later versions, its a documented issue with radeonhd on some video cards. Its a bit annoying but I don't change the brightness much so its ok. Ambient light sensor also has the same problem, function keys only works on the console.

Not sure about the info light/button, maybe it can be mapped with the gnome key mapping? My WLAN LED works fine it activates and deactivates the light and antenna.

kiemlo said...

For now I'll stick to fglrx, but will keep an eye on radeonhd driver.

OTOH the WLAN led issues on 2.6.24 (I'm using Ubuntu 8.04 beta) are known and worked on.

Just like with my previous laptop, you never know what next kernel revision breaks or fixes ;-)

fly3rman said...

My wlan and other buttons works fine.
Microphone not working :/ (hardy)
and sometimes wlan module crashes (microcode error) :/
and card reader still doesnt work!

Jun said...

thanks pk and fly3rman for the updates.

kiemlo said...

Back to the Info button... If you start "showkey" (from the console, not under X), does it print keycodes for the Info button? It doesn't on my 6910p.

If so, what BIOS rev. do you have? I have F.0A and wonder if it's worth upgrading to F.13.

Jun said...

Hi PK,

I tried to use xev and the info button does not register anything. Wow first time I saw something that does not register.

I am running F.10, didn't bother updating to F.13 since its doesn't really fix anything. Maybe I will update to the next bios if it does fix things. F.10 looks to have fixed a couple of things.

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

- Adds the date and time in F10 Setup.

- Fixes issue where the LED on the Power Button Board
remains on after inserting the battery.

- Fixes issue where the notebook fails to resume from
Standby mode when Serial ATA (SATA) is set to
non-SATA in F10 Setup.

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

Unknown said...

Jun,
how much time are you getting out of the battery? When my battery is fully charged, all I get is about 2 hours... seems a bit low to me.

Everything else works (except for the sd card). Great tutorial.

Jun said...

I also get only 2 hours from the 6910p. My old nx8220 gets a lot more, maybe because the 6910p is only 6 cell is more power hungry. Windows seems to be better, but not much... 2.5 hours. Try to install powertop from Intel, that may help.

I am glad it has helped you.

Unknown said...

I am already using powertop, and it tells me I use between 24 and 30 Watts, while the processor usually spends less than 10 ms in state C3 which is absolutely suboptimal. I think I'll try and recompile the kernel with more powersaving modules and options.

kiemlo said...

No need to recompile the kernel, just switch to powersave CPU scaling policy and, if you have ATI graphics, consider using fglrx drivers until radeonhd gets power management support. My KDE-based Ubuntu draws 17-21 W and a standard battery lasts about 2.5 hrs.

As for SD card reader - Linux has all the necessary drivers, but there seem to be some problems with the hardware. Kernel disables reader's IRQ soon after boot and it becomes inoperative. I might have a look at this some time, it might be a hardware's fault or a kernel bug.

Marcel Almeida said...

is there a way to enable/disable bluetooth and wireless individually like using the windows driver ?

Jun said...

PK,

Interesting power saving note, maybe I should switch back to fglrx now that the suspend problem is sorted out.

Yeah the SD card reader is a bit puzzling, my other HP dv6000 laptop works just fine and its also a Ricoh chipset.

marcel,

Not aware of it. You can probably unload the drivers. I believe you can configure it not to be open if you are more afraid of security.

Maybe its time for me to upgrade to Hardy. Very busy at the moment though. Anyone has upgraded to Hardy?

Jun said...

Marcel,

You can stop the bluetooth service. "/etc/init.d/bluetooth stop" and use update-rc.d to stop it permanently. This is what I apparently did for my machine, I just found out today since I wanted to transfer stuff from the phone and my bluetooth was missing.

Unknown said...

The microphone works perfectly, the thing is, its is at the Capture level 0 by default. Go in your sound config panel, Capture tab and set Capture at e.g. 60%.

Jun, can you update your 6910p FAQ with all the last details that kept flowing into your comments for a while?

Your blog is in the 3 first hits on Google for "6910p".

Jun said...

Alexander,

I have now updated the blog as best as I can. Thanks for the tip/info.

mizu said...

I'm new to Ubuntu, got a HP 6910p installed Hardy => awesome! No problems with wireless suspend/hibernate works with Your tricks, too (big thanks). On my other laptop I use gentoo and used compiz: it's a fantastic eyecandy but with the fglrx-suspend bug it converts my laptop useless as a mobile device.

Just one annoying bug with Hardy and bluetooth: you cannot copy files TO your BT device with Nautilus just with "File push" one-by-one, as far as I know this bug is being investigated.

Card reader isn't working either:(

Unknown said...

Does anybody got to work HSDPA modem (SIM slot under battery)?? I tried bind Sierra module to it, but without success...

Jun said...

Sorry I haven't got a chance to run it.

fly3rman said...

card reader works under newest fedora.
the device was only every 2nd boot there but it worked ...

mizu said...

My SD card reader doesn't work. Without BT filesharing and non-working cardreader I cannot send many files to my PDA. Hm..

Anyway Ubuntu is perfect for me (even in a MS office enviroment).

Jun said...

mizu,

BT works please read the update above and some posts.

Rick said...

Thanks for this! Suspend not working was driving me crazy. Works great now thanks to your post.

Unknown said...

>card reader works under
>newest fedora.
>the device was only every
>2nd boot there but it worked ...

It works without any problem on
Debian lenny (kernel 2.6.24, AFAIR).

fly3rman said...

installed lenny, doesnt work for me,
can you uname -ar?
ill use amd64 (64bit on intel) ..
not even a dmesg when insert a card

Anonymous said...

Hi! I have this problem...

I install Kubuntu, and my wireless doesn't work...the coneccttion appears, but never really connect, with Ubuntu it's ok...

Jun said...

Sorry not using Kubuntu, hopefully someone here is. Its surprising that it doesn't work as it should use the same drivers.

Maybe the equivalent Network Manager on KDE needs to be configured and the proper WPA or WEP is not being used?

kiemlo said...

I think it's a problem with KDE Network Manager which is (as of KDE 4.2) known to be lacking functionality and buggy - to sum up: useless.

I'd suggest to disable KDE's network applet and install network-manager-gnome instead. I've been using such a combination for a long time without any problems.

Sumant said...

I install it in my campaq v2000. But my mic and sound not working.
plz help me.


Recently I just came across a good article on "100 Linux Tips and Tricks"
Here is its link.

Jun said...

Hi Sumant,

You might be better of looking at one of the guides at tuxmobil here.

http://tuxmobil.org/compaq.html