• subscribe
May 14, 2009 12:00 AM

Use DevCon to Manage Finicky Hardware

One IT pro is using DevCon to break a sound barrier
Windows IT Pro
InstantDoc ID #101652

Being an audio enthusiast, I'm an avid user of sound cards. For the past couple of years, I've had an ongoing battle in getting a sound card to work with Windows XP SP2. Although I haven't been able to determine the root cause of the problem, I recently came up with an effective workaround that uses DevCon, a utility that lets you manage devices from the command line. Although I'm using DevCon to manage sound card hardware, you can use it to manage other types of finicky hardware as well.

The problem began after I applied SP2 to my XP workstation two years ago. The PC locked up immediately after I typed in my credentials and pressed Enter during the XP logon. With the assistance of a Microsoft support technician, I discovered that the Windows Driver Model (WDM) driver (i.e., the Windows sound driver) for my Creative Labs' Sound Blaster Live! card was the culprit.

The debugging effort turned out to be one of those ordeals in which Microsoft said it was a hardware problem, and the hardware vendor said it was a Microsoft problem. As a workaround, the Microsoft support technician found that if I disabled the Creative SB Live! (WDM) driver in XP's Device Manager (devmgmt.msc), I could at least boot to the Windows desktop so that I could work (without sound, though).

I later found that I could enable the card's WDM driver once the desktop was fully loaded. I then had a fully functional sound card and a stable PC. The downside was that if I forgot to disable the card's WDM driver before I shut down the PC, it would lock up the next time I logged on. I then had to use the PC's reset button, get into Windows via Safe Mode, disable the driver, and reboot.

Over the course of the next two years, I occasionally experimented with various ways to try to fix the problem. I tried the usual procedures, such as:

  • Moving the Sound Blaster Live! card to different PCI slots in an attempt to change the IRQ that the card was using.
  • Using the card's old DOS setup utility to manually set a specific IRQ, then setting the PC's BIOS to use only that IRQ on a specific PCI slot and forcing Windows to use that IRQ as well.
  • Attempting to delay the startup of the sound service by implementing the solution presented in the Microsoft article "How to delay loading of specific services".

None of these solutions worked, so I replaced the Sound Blaster Live! card with a new Plug and Play (PnP) sound card. The new card had a different chipset (i.e., C-Media Electronics' C-Media) and different WDM driver. Surprisingly, I experienced the same problem with the new card. Since I preferred the Sound Blaster Live! card's MIDI wavetable samples and What U Hear feature, I reinstalled it and donated the new sound card to a relative.

At this point, I decided to automate the tasks of enabling the Creative SB Live! (WDM) driver after the desktop loaded and disabling it before shutdown. I decided to use DevCon because it lets you enable and disable devices from the command line. To use DevCon, though, I had to get the WDM driver's hardware ID.

To determine the hardware ID for the WDM driver, I opened up Device Manager, double-clicked Sound, video and game controllers, right-clicked the Creative SB Live! (WDM) entry, and selected Properties.

In the WDM driver's properties page, I clicked the Details tab. The first item in the Property drop-down list was Device Instance ID. The box directly underneath the drop-down list showed that ID, which was PCI\VEN_1102&DEV_0002\SUBSYS_00211102&REV_03…. (I truncated it to save space.) The first part of the device instance ID provided the hardware ID. It specified that the driver had a physical PCI bus interface, the vendor was 1102 (i.e., Creative Labs), and the vendor's ID for the device was 0002. The balance of the device instance ID (anything to the right of 0002) wasn't needed to use DevCon to enable and disable the driver. If you're unfamiliar with hardware IDs and device instance IDs, check out Table 1. More detailed information can also be found in the Microsoft articles "Device Identification Strings" and "Device Management and Installation Step-by-Step Guide: Controlling Device Driver Installation and Usage with Group Policy".

Table 1: Common Types of Identifiers for Devices
Identifier Description Example
Device ID Vendor-defined identifier that is the most specific, identifying a device's make, model, and revision. A device has only one device ID. The first ID in a list of hardware IDs is referred to as the device ID. PCI\VEN_1102&DEV_0002&SUBSYS_00211102&REV_03
Hardware ID Vendor-defined identifier that is less specific than the device ID. For example, it might identify a device's make and model but not its revision. PCI\VEN_1102&DEV_0002
Instance ID System-assigned identifier that distinguishes a device from other devices of the same type on a machine. \3&61AAA01&0&50
Device Instance ID System-assigned unique identifier for a device. It consists of a device ID followed by an instance ID. PCI\VEN_1102&DEV_0002&SUBSYS_00211102&REV_03\3&61AAA01&0&50


ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here