HP Pavilion dv1245cl
From Superk
|
|---|
Time for Something New
When my old(er) laptop, a ThinkPad A31 started developing some strange video problems it became time to think seriously about a replacement laptop. While I really do think the ThinkPad series of laptops is the ideal brand for a Linux techie like myself, price is always an issue. I decided to look around and keep my options open. While there were some really interesting deals on IBM's used/refurbished laptops page, the thought of buying used intimidated me as well as the thought of buying a new model sight unseen. I decided it would be more practical to consider some other brands in addition to IBM hardware.
Buying the HP Pavilion
I had spent a lot of time researching online various different models of laptops and their respective compatibility issues with Linux (running Linux is an absolute necessity for me) as well as talking with friends about their opinions on hardware.
Finally we had a day to go to the local stores and actually have a chance to put my hands on some laptops. Unfortunately IBM ThinkPads aren't available in any of our local computer stores (that I know of) so I had to explore some other models. After looking at various models in CompUSA and some other places, we finally stopped by Sam's Club to see what deals they had available. That's where this model came from. They had a display model that was on clearance but still under full warranty and with a 30 day return policy on it. The price was right so I decided to give it a shot. Worse case I can bring it back and start the search all over again.
First Impressions
The first order of business on this new laptop was to pop in a Linux LiveCD and get an initial feel for how it would handle Linux in general. I had a copy of Ubuntu LiveCD lying around so I used that. Fortunately, everything came up just fine. I was especially impressed with the fact that the built-in wireless was even supported (it's an Intel 2200BG chipset that is supported by the ipw2200 module in the 2.6 series of the Linux kernel). There are some caveats, but over all they seemed to be fairly minimal.
I decided I was fairly confident this laptop would suit my needs nicely so I proceded to get the laptop ready for a Linux installation. I used a copy of Partition Magic I had to resize the Windows XP Home partition to 15GB and use the remaining ~65GB of space for Linux. So far so good!
The Obligatory lspci Output
0000:00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02) 0000:00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02) 0000:00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02) 0000:00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) 0000:00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) 0000:00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03) 0000:00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03) 0000:00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03) 0000:00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03) 0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83) 0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03) 0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03) 0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03) 0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03) 0000:00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03) 0000:02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 0000:02:06.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05) 0000:02:09.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller 0000:02:09.2 FireWire (IEEE 1394): Texas Instruments OHCI Compliant IEEE 1394 Host Controller 0000:02:09.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller 0000:02:09.4 0805: Texas Instruments PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller
Getting Things to Work
There are some odd features of this laptop that take some monkeying around with to get working properly. This is a list of some of the items I've succussfully got working:
Widescreen LCD
The display of this laptop is a widescreen ratio which means the resolution horizontally is exaggerated as compared to a normal monitor or LCD screen. The resulution provided by this particular laptop is 1280x768 and is, unfortunately, not supported by XFree86 natively. There is, however, somthing that can be done about it.
| UPDATE |
|---|
Installing an X window system (I like Fluxbox):
# apt-get install x-window-system fluxbox fluxconf xfonts-artwiz mdetect xresprobe hicolor-icon-theme 855resolution |
First it is necessary to install a special program that modifies the BIOS in RAM (doesn't mess anything up permenantly - ever) called 855resolution. This program takes another resolution (1024x768 by default) and manipulates it to display 1280x768 appropriately. Once configured properly it can be run prior to X starting and provide the proper video mode and resolution. Debian provides this program in a apt-gettable package.
# apt-get install 855resolution ... # 855resolution -l (list the available video modes the chipset provides) ... Mode 7c : 1280x768 8 bit/pixel Mode 7d : 1280x768 16 bit/pixel Mode 7e : 1280x768 24 bit/pixel
| UPDATE |
|---|
| The 855resolution package has been succeeded by 915resolution, however it should support the same functionality. |
Next it is necessary to edit the 855resolution configuration file in /etc/default/855resolution as follows:
MODE=7e XRESO=1280 YRESO=768
It is also necessary to edit the XFree86 configuration file and add in an appropriate Modeline for the new resolution:
Section "Monitor"
Identifier "LCD Monitor"
HorizSync 20-90
VertRefresh 50-100
DisplaySize 230 138
ModeLine "1280x768" 81.59 1280 1280 1384 1688 768 769 774 791
EndSection
Section "Screen"
Identifier "LCD Screen"
Device "i855GM"
Monitor "LCD Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x768" "1024x768" "800x600" "640x480"
EndSubsection
EndSection
After rebooting, X should be using the proper screen resolution now.
CPU Throttling
The dv1245cl is equipped with a Pentium M 1.7GHz CPU that is fully capable of CPU throttling. This is a very important aspect to extending battery life. To enable it in Debian, it's necessary to install a couple things.
However, before installing any packages, it's necessary to enable the CPU throttling features of the CPU in the kernel by loading two modules; cpufreq_userspace & speedstep-centrino. These two modules can be added into the top of the list of modules in /etc/modules so they load at boot time. In the meantime, they can be loaded manually.
# modprobe cpufreq_userspace # modprobe speedstep-centrino
Once the proper modules are loaded, additional tools are useful for handling the CPU throttling automatically. The laptop-mode-tools & powernowd packages should be installed along with any dependencies they have.
# apt-get install laptop-mode-tools powernowd hdparm ...
Both laptop-mode and powernowd basically run fine out of the box, but they can also be configured to suit personal preferences. I like to modify the powernowd startup script by adding the '-m2' switch which controls the throttling profile of powernowd (drops very quickly when CPU is idle and then slowly steps up the CPU as demand increases - other profiles include the opposite as well as full-on/full-off).
Suspend to RAM
Getting the laptop to suspend to RAM requires modifying a few things. I try to outline those things here, but I'll have to return and elaborate when time permits.
XFree/X.org Configuration
The following needs to be added to the XFree/X.org configuration files in order to enable the VBE Restore feature of the video card. As I understand it, this is what allows the video card to suspend/resume on ACPI events.
Section "Device"
Identifier "i855-1"
Driver "i810"
BusID "PCI:0:2:0"
Screen 0
Option "VBERestore" "true"
EndSection
| Note the Option "VBERestore" "true" line that was added. |
ACPI Suspend Script
The following script is what I currently use to put my laptop to sleep (suspend to RAM) when the lid is closed.
#!/bin/bash
test -f /usr/sbin/laptop_mode || exit 0
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
chvt 12
rmmod uhci_hcd ehci_hcd usbhid
echo mem > /sys/power/state
else
sleep 2
modprobe uhci_hcd
modprobe ehci_hcd
modprobe usbhid
# chvt 7
fi
The line, "echo mem > /sys/power/state" is the one actually doing the work here. It tells ACPI which state it should be in. ACPI reads the state file and puts itself into the proper state as requested.
| There is a problem with resume as the lid status never seems to change back to 'open' in /proc/acpi/button/lid/*/state so the 'else' portion of the script above never actually runs. |
| UPDATE |
|---|
| New Suspend Script fixes issues noted above
A friend of mine pointed me towards a great sleep/suspend script that both takes care of the problems in resuming an X session when the laptop returns from sleep/suspend as well as logging some extremely useful information about how much battery power was lost during sleep/suspend. You will need to update /etc/acpi/actions/lm_lid.sh to run the script (obviously change /root/sleep.sh in the script below to match the path to the sleep script on your system).
#!/bin/bash
test -f /usr/sbin/laptop_mode || exit 0
# lid button pressed/released event handler
/usr/sbin/laptop_mode auto
#!/bin/bash
test -f /usr/sbin/laptop_mode || exit 0
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/root/sleep.sh
else
sleep 2
chvt 7
fi
Another useful program that I've found is the acpitool package. This program provides a lot of useful information about the state of ACPI on the given system. It also provides access utilities to ACPI features of various laptops that might not otherwise be available (ie, special hardware buttons, etc.) |
Kernel Boot Parameters
It may be necessary to define the location of your swap partition in the Kernel Boot Parameters for Suspend to RAM to use as it's disk image (place to dump memory to for persistence). It seems I do not have this enabled on my current configuration, but I remember having it previously. If needed, simply add resume=/dev/hda3 (where hda3 would be replaced by your swap partition) to the kernel line of the grub boot setup:
title Debian GNU/Linux, kernel 2.6.12-1-686 root (hd0,4) kernel /vmlinuz-2.6.12-1-686 resume=/dev/hda3 root=/dev/hda6 vga=0x317 ro noapic nolapic initrd /initrd.img-2.6.12-1-686 savedefault boot
Debian understands a bit of 'magic' in it's grub configuration that allows you to define global parameters before defining the boot options. If you wish to use the resume parameter in a global manner, simply add it above the boot options as:
# resume=/dev/hda3
| Keep the hash - this is not a comment!. |
Multimedia Keys & Remote Control
Since the dv1245cl is primarily geared towards multimedia, it has many keys and even a remote control to handle the various multimedia functions. Below are listings of the keycodes required for setting up something like xmodmap to handle the keys and assign them to specific functions (for instance, this very useful ALSA commandline volume adjustment script).
| Multimedia Keycodes | |
|---|---|
| Keycode | Function |
| 114 | Rewind |
| 153 | FastForward |
| 160 | Mute |
| 162 | Play/Pause |
| 164 | Stop |
| 174 | Volume Down |
| 176 | Volume Up |
| Remote Control Keycodes | |
| Keycode | Function |
| 22 | Up Arrow /w Tail |
| 37 | Printer Button |
| 55 | FastForward/Rewind |
| 98 | Up Arrow |
| 100 | Left Arrow |
| 102 | Right Arrow |
| 104 | Down Arrow |
| 108 | Ok |
| 144 | Rewind |
| 153 | FastForward |
| 160 | Mute |
| 162 | Play/Pause |
| 174 | Volume Down |
| 176 | Volume Up |
| 222 | Power |
| e001 (remap to 129) | i Button |
| e00b (remap to 139) | Camera Button |
| e008 (remap to 134) | Film Reel Button |
| Many thanks to the Gentoo Wiki for these codes. |
Sound
It turns out that the modem built into this laptop can really wreak havoc with getting sound to work in Debian. It is necessary to disable the modem's driver by blacklisting it from being loaded. Add the following:
# echo "snd_intel8x0m" >> /etc/hotplug/blacklist
Once that has been added, reboot and all should work well.
| Be sure to see the Major Problems Section below for the more major sound issues with Debian & this laptop. |
Wireless
It's necessary to compile the ipw2200 kernel module in order for wireless to work in Debian. The ipw2200 driver is available in the contrib branch of the Debian repositories. Add 'contrib' to the /etc/apt/sources.list file as follows and run apt-get update to include the ipw2200 driver:
deb ftp://mirrors.kernel.org/debian/ unstable main non-free contrib deb-src ftp://mirrors.kernel.org/debian/ unstable main non-free contrib ... # apt-get update ... # apt-cache search ipw2200 ieee80211-source - Source for the 802.11 (wireless) network stack for Linux ipw2200-source - Source for the ipw2200 driver
It's important to install both the ipw2200-source and the ieee80211-source packages. These source tarballs will be installed into /usr/src where it is necessary to go and build the modules. Untar the two source packages in the /usr/src directory. They will create a new directory called modules/.
# tar -zxvf ieee80211-source.tar.gz ... # tar -zxvf ipw2200-source.tar.gz
From within the /usr/src directory run the module-assistant utility to build the modules.
| You will need your kernel's header files & the necessary tools for building modules installed at this point. Install these packages: module-assistant, linux-headers-2.6.12-1-686 (for stable, this would be kernel-headers-2.6.8-11 or similar). |
# module-assistant build ieee80211
Follow the on-screen instructions to build the module. When it's finished it will take you back to the command line where its possible to install the module.
# module-assistant install ieee80211
Repeat the same procedure for the ipw2200 module.
Next it is necessary to get the appropriate firmware for the modules to load. For my kernel this appeared to be the 2.4 version of the ipw2200 firmware. The firmware can be found here: ipw2200 firmware. Once you have this firmware, untar the files into the /usr/lib/hotplug/firmware directory.
/usr/lib/hotplug/firmware # tar -zxvf ~/ipw2200-fw-2.4.tgz
Finally add the module into the /etc/modules file so that it's installed on bootup.
# echo "ipw2200 led=1" >> /etc/modules
That's it! Simply modprobe the module at this point and your wireless is ready to configure and use. Make sure you have the wireless toggle button on before you install the module or it will fail (you can toggle it if it fails to load and reload it -- you should see the LEDs light up and blink if it loads properly).
# modprobe ipw2200 led=1
Some Problems
Unfortunately there were some issues that do aggrevate me somewhat with this laptop. I focus entirely on the Linux side of things since I use Windows very rarely anymore. Here are some issues I found:
- LEDs - Unfortunately some of the LED indicator lights appear to be software driven and do not work under Linux. The most notable of these LEDs is the Wireless indicator. This laptop has the very handy feature of being able to literally disable the wireless card in order to save battery life when it is not needed. The functionality of this button continues to work under Linux, but there is no LED indicator to tell you when the card is actually on or not. This means it is necessary to use trial & error to find out if the card is enabled and able to connect. If you can't connect, try pressing the wireless button and connect again. The wireless connection LED just below the LCD screen also doesn't function.
| UPDATE |
|---|
Actually the LEDs for the wireless do indeed work! I just learned there is an optional parameter that can be fed to the ipw2200 module to enable them. By appending a led=1 to the modprobe line, it enables both LEDs though in a somewhat unexpected manner. Instead of the wireless button LED being either on or off depending on it's position, it seems to work in an identical fashion as the connection indicator LED; displaying a connection rather than whether the card is enabled or not.
# modprobe ipw2200 led=1 |
- Media Card Reader - This card reader is another really handy feature of this laptop that (as far as I can tell) does not work under Linux at all. I did some research and experimentation with module loading, but nothing seemed to work. Note that all I have available is a Sony Memory Stick from my Sony Clie TH-55 PDA which may have other issues that cause it to be unreadable in Linux. I'd like to revisit this card reader in the future and attempt to get it to work. One other issue with the card reader that is OS independed is that it doesn't support CompactFlash cards which seems like a major oversight to me.
- S-Video Out - This just does not seem to be supported in Linux whatsoever. Too bad really considering the nice multi-media aspects of this laptop. After lots of research there just doesn't seem to be a solution to this at this time.
- VGA Out - I've only had marginal success with this feature. There are some utilities that do mirror the LCD output to the VGA port, but because of the widescreen ratio of the laptop LCD running at the odd resolution of 1280x768, the mirrored output on a conventional 4:3 monitor will cut off the right portion of the display. Another irritation is the apparent inability to use the VGA out as a second display with Xinerama. It seems that mirroring the display is the best I can get.
| UPDATE |
|---|
| i855crt Project shows some promise, but it's still not the kind of functionality I was looking for. I hope to revisit this soon. |
- QuickPlay buttons - Unfortunately the two QuickPlay buttons are not available to Linux for remapping. I was hoping to be able to use these to open programs like MPlayer or XMMS or something.
Major Problems
This may be entirely my problem, but I've been thoroughly unable to install Debian Sarge on this laptop. There are some issues during boot up that cause the system to halt. The initial part of the installation goes just fine, it's only after trying to boot the new install that the halt occurs. I'm sure I'm not doing something correctly or there is some small trick I need to do to get things to play nice, but at this point it has relegated me to using Ubuntu exclusively on this laptop (again, this is strange considering Ubuntu is a variant Debian distribution - why does one work and not the other?).
Because of my personal preference to run a purely Debian proper distro (yes, it's a political thing), I intend to continue work on this in the future. Hopefully I'll have better news to report.
| UPDATE |
|---|
| I'm very happy to announce there is some great news in the regard! It's actually not such a huge problem to get Debian to work on this laptop at all. It just takes some mucking around that is more an annoyance than difficult.
It turns out that the OSS drivers that Debian comes standard with are not compatible with the hardware included in this computer. Therefore, when booting up a new Debian install the kernel will 'oops' (or hang) loading the OSS drivers. Unfortunately the solution to this is hardly elegant, but it does work. It is necessary to edit the grub boot line labelled kernel and add the init=/bin/sh parameter. This parameter will allow the system to boot up to the absolute bare minimum configuration that allows for editing of some things on the root partition. kernel /vmlinuz-2.6.8-1-386 root=/dev/hda1 ro init=/bin/sh Once the system has booted, remount the root partition so it is read-write: # mount -o remount,rw / Add two of the sound modules causing the problem and the discover module to the hotplug blacklist: # echo i810_audio >> /etc/hotplug/blacklist # echo discover >> /etc/hotplug/blacklist # echo snd_intel8x0m >> /etc/hotplug/blacklist Then it is necessary to find the i810_audio.ko module and rename it to something else: # cd /lib/modules/2.6.8-1-386/kernel/sound/oss # mv i810_audio.ko old_i810_audio.ko Now reboot the computer with a ctrl-alt-del and boot the new Debian installation. Finish the base-install and be sure to install alsa. ALSA will disable the OSS configuration that is built into the kernel and work properly with the hardware. It's very important to also run alsaconfig after ALSA is installed and before rebooting! # apt-get install alsa ... # alsaconf (and follow the on screen prompts) Once ALSA is properly installed and configured, reboot again and the system should boot without any problems at all. It is necessary to go back and rename the i810_audio.ko module back to what it is supposed to be when everything is fixed otherwise instead of being blacklisted and the system booting properly, it will fail to be loaded which ends up being a fatal error. With ALSA setup, Debian won't try to use OSS anymore. |
Conclusion
Overall this laptop is serving me very well and I'm quite happy with it. Tech support has been fairly useful even (though I still have not been able to get the QuickPlay restoration CD's that were missing when I purchased it. I've managed to get the Windows XP Home restoration CD, the Software & Drivers CD and the Microsoft Works CD (yippee), but not the QuickPlay which is what I keep asking for. It's not a huge deal for me though. Linux is running very smoothly (well, Ubuntu) including even ACPI support which surprised me. All other features seem work well and the form factor (thin & only 5 lbs!) are fantastic! Battery life runs me about 2.5-3 hours depending on my network connection & screen brightness, etc.
Todo's
- Fix USB Resume - Need to add USB resume functionality to my ACPI sleep/resume scripts.
- Fix X Resume - Currently on resume from sleep, the computer resumes to a blinking text cursor in the top left rather than coming back to my running X session.
- Sudo & root path - In Debian, sudo does not run things with root's path (ie, including /sbin or /usr/sbin) so commands outside the user's path have to be run with an absolute path.
- Fixed! HP 4p SCSI Scanner - XSane isn't seeing it despite some (I thought appropriate) udev custom rules that should make it work.
| UPDATE HP 4p SCSI Scanner & XSane Problem |
|---|
| Turned out to be a permissions problem. |
Stay tuned for some updates on my usage of this laptop in the future!
See Also
- i810(4) Man Page - From the X.org configuration documentation.
--Bkrein 00:08, 30 Aug 2005 (CDT)
- HP Pavilion dv1000t Installation Notes - Thanks Jeremy for this info!
--Bkrein 15:15, 24 June 2006 (CDT)
