+ Reply to Thread
Results 1 to 2 of 2

Thread: Lag when typing? Choppy sound? Hardware interrupts eating a lot of CPU?

  1. #1
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,410
    Activity Longevity
    7/20 19/20
    Today Posts
    0/5 ssss39410

    Thumbs up Lag when typing? Choppy sound? Hardware interrupts eating a lot of CPU?

    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  2. #2
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,410
    Activity Longevity
    7/20 19/20
    Today Posts
    0/5 ssss39410
    I found this going through old threads.

    It turns out that my hard disks switching into PIO mode was not the cause. That should only cause lag when transferring from or to those disks, since PIO uses the CPU to send read/write commands for data and the data itself.

    Anyway, using latencymon, I traced these DPC latency spikes to i8042prt.sys, which is Microsoft's driver for controlling the PS/2 ports (and since I use a PS/2 keyboard, that made sense).

    This was good to know, but didn't get me too close to fixing the problem. For some time, my only solutions were 1. ignoring it or 2. reboot and hope it doesn't happen this time. Then I thought I could swap the offending driver with its XP SP1 version1. Tried that, but the problem was still there. I did the same with kbdclass.sys, which is the keyboard class driver, to no avail.

    I then remembered about the ReactOS project, which seeks to create an operating system that's binary and driver-compatible with Windows, using clean room reverse engineering. Grabbed the latest ISO and snatched both files from a clean install, but the results were disappointing:

    • swapping i8042prt with its ROS version fixed the problem, but made Windows ignore the key repetition settings and always use the slowest speed.
    • swapping i8042prt and kbdclass caused a BSOD upon pressing just one key.


    Almost gave up at this point, but had one last idea.

    Inside a virtual machine, I installed Windows 2000 SP4 and hotfixes for both drivers (to ensure having the latest version), then copied them over to my desktop computer2. And that fixed the problem...



    I had stolen a USB keyboard (with permission ) from my work, but I never even got to open its box, as I tried all of this before thinking of switching - would rather keep the one I'm used to typing on for years, and PS/2 keyboards are better than USB ones for a variety of reasons[1].

    Anyway, I'm attaching the drivers that solved my problem. They come from freely-available hotfixes, so there should be no copyright problems, but I can remove them if Microsoft desires. The registry files are there only for reference and should not be merged with your system directly.

    1 = there were major code changes between XP SP1 and SP2 for many system components. Replacing a troublesome file with its SP1 version can often solve problems like this.
    2 = on which I'm running Windows Server 2003, by the way
    Attached Files Attached Files
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •