New laptop

A few weeks ago, my laptop started spontaneously shutting down. It did this a few months ago, and I sent it in for repair. All was well for a while. The day after I got it back this time, it shut itself down again. Sometimes it does this from a cold boot and sometimes after the system’s been up for a while. Best Buy sent it off for nearly three weeks, and they replaced the fan, cleaned things up, etc. Since it does it from a cold boot, we figured that it’s probably a motherboard issue rather than a cooling issue, and so I made them swap the laptop out for a new one. The one I really wanted, which looked and felt very much like my old one, wasn’t in stock. So I got the HP Pavilion (zv5320us) with widescreen display, on-board wireless, CD/RW, etc. It’s just a slight step up in some regards from my old system, though it’s a lot bigger. It also turns out that it’s a much bigger pain to put Linux on it than it was on my last system. So I’m briefly documenting the process for future reference.

I put Fedora Core 3 on this thing, figuring it’d be as easy an install as Fedora Core 2 was on my other system. The problem lies not in the transition between Fedora Core 2 and 3 but in the hardware on the new system. First off, the touchpad didn’t work, so I had to negotiate my screen using keys. Which is fine, but which isn’t good in the long term. So I spent a half a day trying to figure out how to get the mouse to work. Eventually, I downloaded the Synaptics driver rpm and installed that. I also downloaded the source, which has a patch for the ALPS driver that apparently powers my touchpad (as using just the synaptics driver didn’t do the trick). I wound up having to download a new kernel, patch in the ALPs driver, and proceed from there. I had never done a kernel update before, so it was intimidating but turned out to be pretty easy. I started the kernel build as follows:

rpm -ivh kernel-2.6.9-1.678_FC3.src.rpm
cd /usr/src/redhat
rpmbuild -bp --target=i686 SPECS/kernel-2.6.spec

Then, I copied the alps.patch file from the synaptics package into /usr/src/linux/drivers/input/mouse and applied it by executing “patch < alps.patch." I'm not sure whether or not I needed to do this (probably not), but I added "modprobe psmouse" to /etc/rc.local to make sure the mouse would load. Once I got all this done, I went into the kernel source directory and did "make && make modules_install && make install" to actually update the kernel. That took an hour or two. When I rebooted afterward, I had a working mouse. The motion was very slow, however. I'd be zipping my finger all over the touchpad, but the mouse would just creep along. So I tweaked /etc/X11/xorg.conf. My config is as follows:


Section "ServerLayout"
...
InputDevice "Synaptics Mouse" "AlwaysCore"
EndSection

Section "Module"
...
Load "synaptics"
EndSection

Section "InputDevice"
Identifier "Synaptics Mouse"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "14"
Option "FingerHigh" "15"
Option "MaxTapTime" "180"
Option "MaxTapMove" "110"
Option "EmulateMidButtonTime" "75"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.32"
Option "MaxSpeed" "0.52"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
Option "Repeater" "/dev/ps2mouse"
EndSection

Next came fixing the monitor up. The laptop has a widescreen monitor, and so the default aspect ratio caused a vertical scroll and obscured the toolbars. I spent hours on this issue and finally did just the right Google queries to produce several sites whose tips I glommed together to find the right solution. I learned about a command line utility called "gtf" that generates a modeline for the monitor. The modeline is defined in xorg.conf and tells your monitor when and where to fire pixels; if you have the wrong modeline, you can screw your monitor royally. To find the specs for your monitor, just type "gtf screen_width screen_height refresh_rate" (so "gtf 1280 800 75" for example) and paste the resulting line into the appropriate spot in xorg.conf. I was unable to get the nv driver to work properly, so I downloaded and installed the nvidia driver and added "modprobe nvidia" to /etc/rc.local and changed the appropriate line in my conf. This got rid of the vertical scroll, but it also caused the screen image to shrink, leaving a black margin at the right of the display. So I kept googling and found a reference to the option "IgnoreEdid," which I added to my conf. This caused the display to stretch to its correct width but to be doubled vertically and to be grainy and weird looking. To remedy this, you just make sure both the Vsync and Hsync in your modeline are negative (one of them was positive in my original modeline). This made the display fit the screen, but it was still grainy and oddly colored and had some pixels blinking. So I googled some more and found an xorg.conf whose monitor section made my monitor work like a charm. Here's hoping it doesn't get fried later. Here's the relevant portion of my xorg.conf in its currently operational state:

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "HP D2806 Ergo Ultra VGA 15-inch Display"
        HorizSync    31.0 - 100.0
        VertRefresh  59.0 - 76.0
        #Modeline "1280x800_75.00"  107.21  1280 1360 1496 1712  800 801 804 835  -HSync -Vsync
        #Modeline "1280x800"  107.21  1280 1360 1496 1712  800 801 804 835  -HSync -Vsync
        Modeline "1280x800" 83.91 1280 1312 1624 1656 800 816 824 841 -HSync -Vsync
        #ModeLine     "1280x800" 85.7 1280 1360 1496 1712 800 801 804 835
        Option      "dpms"
        Option "IgnoreEdid" "1"
        #UseModes "16:10"
EndSection

Section "Device"

        #Driver      "nv"
        Identifier  "Videocard0"
        Driver      "nvidia"
        VendorName  "Videocard vendor"
        BoardName   "NVIDIA GeForce 4 (generic)"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     16

        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "1280x800" "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Next, I move on to wireless. The system has a Broadcom chip, so I've installed ndiswrapper, but I think I've got the wrong Windows driver installed, as I get an error unsetting an encryption key when I try to start the wireless network. Finding the right driver for this should be a cinch, though, and I hope to have wireless up and running soon.

Some links that proved most helpful in setting all of this up include the following:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s