PDA

View Full Version : Lag when typing? Choppy sound? Hardware interrupts eating a lot of CPU?



anon
13.05.11, 22:03
Read this:
FrazzledDad: Lousy Performance, High Hardware Interrupt Usage (http://frazzleddad.blogspot.com/2006/03/lousy-performance-high-hardware.html)
And then this:
The Neodon: Little-Known Tweak to Boost Hard Drive Performance! (http://neodon.blogspot.com/2006/07/little-known-tweak-to-boost-hard-drive.html)

It may save your life.

anon
07.03.15, 19:17
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 (http://www.resplendence.com/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...

http://www.sb-innovation.de/attachment.php?attachmentid=15230

I had stolen a USB keyboard (with permission :eyebrows:) 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] (http://en.wikipedia.org/wiki/PS/2_connector#Legacy_port_status_and_USB).

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