Installing Linux on the HP Pavilion 3190

jp lewis

One line summary: Linux works, a power-management crash issue that seems to be resolved, X is not accelerated but may be in the future.

The HP Pavilion 3190 is a low/midrange laptop introduced in winter 99. I picked this machine mostly for it's speed, screen, and looks. In appearance the machine somewhat resembles the recent (slightly curved) Mac G3 laptops, a nice change from the `russian dump truck' (compaq/toshiba) school of industrial design. (In fact I wanted to get one of the G3s -- equivalent cost, better speed, keyboard -- but I run the linux/intel version of Matlab which of course does not run under linuxppc.)

Related models 3110 and 3150 have the usual less processor/memory/speed, smaller screen, no DVD. This Pavilion series is evidently most closely related to the Omnibook XE, and my linux installation started from the XE installation description on the Linux Laptop home page.

Summary of Linux issues:

An install of RedHat 6.1 was painless. Dual boot (W98), 24bit 1024x768 X display, pcmcia ethernet, APM all work with no kernel recompilation! (What a change...I've been using linux since Slackware 3, which took me a full two weeks to get working).

On the down side:

Dual boot

The machine comes with a 274meg save-to-disk hibernate partition (type 0xa) and a windows partition. I originally purchased the Macmillian version of Mandrake6.1, which comes with a version of PartitionMagic. After doing the built-in windows defrag, I installed this partition magic and successfully shrunk the Win partition to 1G. The Mandrake install went ok, but at one point I decided to check its statement about being optimized for pentium... the compilation flags this dist uses (-O6, many others) spooked me a bit, probably unnecessarily, but for the kernel I want stability over speed. So I switched to Redhat6.1.

Bios

No bios changes were needed to get the machine running under Linux. This machine uses the LBA(?) large disk mode and you can't change it. I did change the APM lid-down action from "lcd off" to "suspend" -- previously it turned the LCD off when the lid came down, but I didn't know what to do to turn it back on!!

Linux install

A recent distribution (the equivalent of RH6.1 or better) will be needed to support the Frame buffer graphics.

Since the Pavilion's graphics chip is not supported, however, the new GUI-based install in RH6.1 did not work (I believe it dies with something like "Fatal server error - no valid modes found"). This problem will likely apply to Caldera and other modern distributions as well. RedHat still allows the vga-based installation (present in RH through version 6) by typing "text" at the install prompt.

Using text/vga mode, the install went smoothly until the X configuration came up. I selected a "unsupported" card and "Laptop 1024x768" as the monitor type. The install tried several probes which failed, and then it dumped out with an unsurprising "unable to configure X" message.

X, XF86_FBDev

You may want to read about FB installs. Start with the Omnibook XE linux laptop page, the /usr/doc/HOWTO/Framebuffer-HOWTO, and/or the vesa guide

You need the XF86_FBDev driver

In the rpm/package selection part of the install I selected custom and went through everything; I found this driver (from memory) at the bottom of the package list. The package list was also buggy -- it wouldn't open up the X hardware related packages until I scrolled around somehow. In any case, this is the needed driver; grab it from the CD if you don't get it during the initial install.

Do

  cd /etc/X11
  ls -l X
  rm X
  ln -s ../../usr/X11R6/bin/XF86_FBDev X

Modify /etc/X11/XF86Config

Add these entries to /etc/X11/XF86Config. I assume that the amount of videoram on the card is irrelevant as long as the FBdev driver is used? Seems to work the same regardless of whether it is indicated or not.

Both the 16bit and 24bit entries below seem to work, but adding several Display subsections seemed to break things. Thus I leave the 24bit one commented out as shown.

Section "Device"
    Identifier  "My Video Card"
    VendorName  "Unknown"
    BoardName   "Unknown"
    #VideoRam    4096
EndSection


# seems like the fbdev cannot have multiple Display sections, gets confused?

Section "Screen"
    Driver      "FBDev"
    Device      "My Video Card"
    Monitor     "LCD Panel 1024x768"
    Subsection "Display"
        Modes       	"1024x768" 
	Depth		16
	Modes		"default"
    EndSubsection
EndSection

# uncomment for 24bit mode
#Section "Screen"
#    Driver      "FBDev"
#    Device      "My Video Card"
#    Monitor     "LCD Panel 1024x768"
#    Subsection "Display"
#        #Modes       "1024x768" 
#	#Depth		32
#	Depth		24
#	Modes		"default"
#        ViewPort    0 0
#    EndSubsection
#EndSection

Modify /etc/lilo.conf

To use framebuffer graphics /etc/lilo.conf must be modified. The important line is the VGA=791. Since I did not need a different kernel, I simply copied the existing stuff, gave it a different 'label' field, added the entries for VGA=791 (16 bit) and VGA=792 (24bit), and set the 'default' to point to the new label. If things don't work You can boot without FB graphics by using the previous 'linux' label at the lilo prompt.

For the lower-end 3150,3110 models the VGA line will be different.

Run /sbin/lilo as root when this edit is done.

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux-fbdev16

image=/boot/vmlinuz-2.2.12-20
	label=linux-fbdev16
	VGA=791
	initrd=/boot/initrd-2.2.12-20.img
	read-only
	root=/dev/hda5

image=/boot/vmlinuz-2.2.12-20
        label=linux-fbdev
        VGA=792
        initrd=/boot/initrd-2.2.12-20.img
        read-only
        root=/dev/hda5

image=/boot/vmlinuz-2.2.12-20
        label=linux
        initrd=/boot/initrd-2.2.12-20.img
        read-only
        root=/dev/hda5

A forthcoming accelerated graphics driver?

The FAQ on the Silicon Motion web site says: "Silicon Motion's products presently support many operation systems, but implementation and support are a choice of the system Original Equipment Manufacturer (OEM). An Alpha Linux driver has been provided to our OEM's, and you may contact your notebook's OEM for additional information."

Also, an ASUS notebook listing on the LL home page mentions the existence of a (as yet buggy) driver, see http://www.mat.univie.ac.at/~gerald/laptop/asus.html

It crashed!?

The machine crashed about once a day for the first few days. The screen froze but the hard disk light remained on and it sounded like the disk was spinning. I can honestly say that my previous hitachi notebook never crashed *once* in 18 months of near-daily use (including programming), so this isn't ok.

I suspected either the FBdev stuff or else some interaction with APM, based on reading several other laptop experiences. I believe that each crash occurred either while suspending (usually) or trying to resume from a suspend. Also, the first suspend or hibernate-to-disk generally worked; it was only on the second or third (or fourth) suspend that it hung.

I re-read the entry on the Sony F series laptops on the LL home page. This talks about freezes following a suspend/resume under RH 6.1. On those machines the nascent USB support interferes with APM. The HP machine appears to have an identical USB setup (including it's location on the PCI bus).

This was done by (see the F-series page)

    /sbin/setpci -d "8086:7112" command = 0
    # this command should say "disabled" now:
    /sbin/lspci -v | grep fce0

Disabling USB support did not fix the problem.

Guided here by wild guesses, I thought about some interaction between the disk and power management, and noticed that "ACPI" (the new standard that subsumes APM power management) is in the same pci "area"(?) as IDE and USB:

IDE	7.1
USB	7.2	now disabled
ACPI	7.3
so I tried disabling ACPI the same way to see what happened. Nothing visible happened- /sbin/lspci -v did not report this device as being disabled, suspend/hibernate still worked but still caused crashes.

Finally, I searched the web and found a post that talked about incompatibilities between ACPI and Soundblaster cards. This was a stretch - the post was talking about a windows desktop. But I tried it, and it seems to have fixed the problem! Here are the commands:


echo turning off usb
/sbin/setpci -d "8086:7112" command=0

echo turning off audio
/sbin/setpci -d "125d:1998" command=0

/sbin/lspci -v | grep disabled
I put this in a script and modified one of the startup files to call it (put it in /etc/init.d/apmd in the 'start' section since it's possibly related to apm. Is there a better place to put this?).

Note that I'm still turning off USB as well - I do not know if both USB and audio both need to be off.

Red Hat install bugs

Despite asking for KDE in the install process, RedHat gave me a Gnome desktop! I was able to figure out what to do (edit the file /etc/sysconfig/desktop), but the ex-Windows user that distributions like RH are trying to target would have been stuck at several places.