My Compaq R3000 page

My Linux kernel patch for the clock being too fast (x86_64 and i386)

The patch fixes the timer by adjusting the PIT/TSC rate based on the PM timer rate which I found to be the only reliable timer source on the laptop.

The PM timer is compared to the TSC/PIT rate at boot and a ratio is computed. On a "normal" system, the ratio is 1. On my broken laptop, the ratio is about 3.

The patch applies on a Linux kernel source tree and is available for both the i386 and x86_64 architectures. It might apply on other kernel versions, but I've not tested.

This patch has no known side or ill effect on a sane system.

Update 03-Oct-2006: The patch is now available for kernel 2.6.18, but for x86_64 only.

  1. Grab the patch that applies to the corresponding Linux kernel version:
  2. linux-2.6.12-pmtimer-v3.patch for Linux 2.6.12
    linux-2.6.13-pmtimer-v3.patch for Linux 2.6.13
    linux-2.6.14-pmtimer-v4.patch for Linux 2.6.14
    linux-2.6.15-pmtimer-v4.patch for Linux 2.6.15
    linux-2.6.16-pmtimer-v4.patch for Linux 2.6.16
    linux-2.6.17-pmtimer-v4.patch for Linux 2.6.17
    linux-2.6.18-pmtimer-v4.patch for Linux 2.6.18 (x86_64 arch only)
  3. Configure and build the kernel as usual. Make sure the PM timer is enabled in the kernel (should be the default on any recent Linux distribution)
  4. Build and install the kernel
  5. Once you have built and installed the patched kernel, add the boot parameter to instruct the kernel to "trust" the ACPI PM timer :
On i386, add :
clock=pmtmr
On x86_64, add :
pmtmr

Note: If someone ever includes this patch in a Linux distribution, please drop me a note, I'll gladly switch to that distribution!

Ressources

  1. The F35 BIOS fixed DSDT table (and the corresponding compiled AML file) - If you wonder what this is all about, check this how-to)
  2. My xorg.conf for Fedora Core 3.
  3. My xorg.conf for Ubuntu 5.04
  4. My xorg.conf for Ubuntu 6.06 with NVIDIA proprietary driver version 8756
  5. "nvidia" proprietary driver options to use for the R3000 screen :
  6. options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=4 NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1
    alias char-major-195* nvidia
    alias /dev/nvidiactl
    char-major-195


Olivier, <fourdan at xfce dot org>