What to do when you run out of IRQs

IRQs are your system's natural resources, and there are only so many to go around. What do you do when you've used them all up? In this Daily Drill Down, Ken Dwight tells you how to conserve your IRQs.

The biggest problem with IRQs is the fact that they are a finite resource. There are only 16 of them, and over half of those are used for basic system functions. That leaves only a limited number of these precious hardware resources for the various input/output devices we may need to install in a given system. In this Daily Drill Down, I’ll explain how you can find space for all the IRQs needed for today’s systems.

BIOS limitations
One possible solution to the problem of limited IRQs would be to increase the number of IRQs supported by these systems. Unfortunately, that’s not practical because four bits are used to represent the IRQ to the system BIOS. Four bits can represent a decimal number from 0 to 15, or 16 possible values. Adding a fifth bit, which would allow 32 possible values, would be incompatible with all PCs that have been manufactured over the last 20 years or so!

The general purpose served by an IRQ is to let the system know that a device needs attention. When an input device has data that needs to be handled by the CPU, the device raises an interrupt. For a more detailed explanation of IRQs, read the TechProGuild Daily Drill Down, ”Understanding interrupts and memory addresses in Windows 98.”

Probably the easiest solution to avoid IRQ conflicts is to use USB devices wherever possible instead of the older devices that use serial (COM) and parallel (LPT) ports. If you can follow this approach, you probably still have more work to do than just changing devices. The balance of this Daily Drill Down will show you the other aspects of your system that may require changes.

By now, most IT workers are familiar with USB. This external device interface, which was first introduced on the Wintel platform in 1996, allows you to connect multiple devices, either through hubs or daisy-chained from one device to another. The USB specification allows for up to 127 devices to be controlled by a single set of hardware resources on that port.

Most external devices you would buy today are available in a USB version, including printers, monitors, keyboards, mice, scanners, and external removable media devices such as Zip drives. When you have a choice, USB offers a much faster connection than serial or parallel ports, in addition to reducing the likelihood of IRQ conflicts, so it’s usually an easy decision. The only significant limitation of USB devices is the aggregate bandwidth of the USB port, at 12 Mbps.

The second-generation USB 2.0 is scheduled to start appearing on new PCs soon. That specification raises the speed to 480 Mbps, so any type of peripheral can be reliably attached to a USB 2.0 port. These ports will be backward compatible, so any USB devices you buy today will continue to function on the new ports as well.

If you want to learn more about USB specifications and devices, the USB Implementers’ Forum provides excellent, detailed information. That site also provides a software compatibility test that will help you ensure that your system is ready to properly support your new USB devices.

Whether or not you switch to USB devices, there are still some IRQs you can free up for additional devices. Here are specific recommendations.

IRQ3 and IRQ4
By default, IRQ3 and IRQ4 are used for your serial ports; they are also the IRQs most likely to present you with a conflict. PC architecture allows for up to four serial ports (COM1 through COM4) but provides only two IRQs to handle them all. By default, IRQ3 is used for COM2 and COM4, and IRQ4 is used for COM1 and COM3.

An IRQ conflict occurs when you attach a third serial device to COM3 or COM4. You’ll have to resolve it manually unless you have a Plug and Play OS that successfully assigns a different IRQ to one of the devices.

On the other hand, if you’re not using any serial devices, you can probably free up IRQ3 and IRQ4 for other uses. Most modern motherboards include onboard serial ports that by default are usually designated COM1 and COM2. IRQ3 and IRQ4 are tied to those ports. To make them available, you’ll need to go into your BIOS and disable those ports. You can probably find those settings in the Integrated Peripherals section of your BIOS Setup routine.

The default assignment for IRQ5 is LPT2, the second parallel port. Most systems don’t have an LPT2 installed, so IRQ5 can be freely used for some other device. You’ll commonly find that Plug and Play has assigned IRQ5 to your sound card or possibly to USB devices.

By default, IRQ6 is used for the Floppy Disk Controller, which is a standard function integrated onto most modern motherboards. If you’re still using a standard floppy disk drive on this machine, you’ll need to leave IRQ6 alone, but there’s an important fringe benefit if you decide to upgrade this device.

You can replace a standard floppy disk drive with an LS-120 drive, which is also known as a Super Disk, from Imation. This floppy replacement has 120-MB capacity, with the additional capability of reading and writing standard 3.5-inch floppy disks. Most important for this discussion, the LS-120 does not use the Floppy Disk Controller.

LS-120 drives are IDE devices, similar to your hard drives and CD-ROM drives. If you install an internal LS-120 drive, you can then go into your BIOS’s Integrated Peripherals section and disable the Onboard Floppy Disk Controller. That will free up IRQ6 for use by another device.

By default, IRQ7 is used for LPT1, the standard parallel port. If you have a locally attached printer and can’t convert it to a USB connection, you’ll probably need to leave this one alone. But there are several ways you may be able to safely recover IRQ7 for some other device.

Most new printers today allow you to connect them to your computer either through a parallel printer cable or a USB connection. If you have the latter option, go ahead and buy a USB cable, and you’ve eliminated the need for IRQ7. You’ll need to reinstall the printer as a USB device, but it’s well worth that minimal effort.

If this computer is on a network and has a networked printer available and you don’t have or need a local printer, you can disable the Onboard Parallel Port in the BIOS. That will make IRQ7 available for another device.

Finally, remember that IRQs are needed by input devices to tell the BIOS the device needs attention. Since a printer is an output device, it usually doesn’t need an IRQ anyway. The only time a printer needs an IRQ is to let the system know of an exceptional condition, such as being out of paper. If you’re willing to take a chance on not knowing about these error conditions, you may disable IRQ7 in your BIOS.

By default, IRQ12 is used for the PS/2 Mouse Port. If you’re using a USB mouse, or even a serial mouse, you don’t need to tie up IRQ12. If you want to disable the Onboard PS/2 Mouse Port in your BIOS, though, you may not find that setting in the same area as the other onboard devices.

On some Award/Phoenix BIOS Setup screens, the PS/2 Mouse selection is found on the BIOS Features screen instead of Integrated Peripherals. If you see a setting on that screen that says PS/2 mouse function control, set that to Disable to free up IRQ12.

Other IRQs you may not need
Your BIOS probably gives you the ability to reclaim two more IRQs that you may not actually be using. These settings typically are found on the PNP/PCI Configuration screen. These settings let you enable or disable IRQs for VGA and USB.

Remember, IRQs are used by input devices. Like a printer, a VGA adapter is primarily an output device. Unless your VGA adapter is used for 3D applications or other high-end applications, such as a TV tuner or DVD-ROM playback, it probably doesn’t require an IRQ.

An additional configuration issue that would require an IRQ for the VGA adapter would be a system with two video adapters and multiple monitors. If you have that type of installation, you’ll need to leave the VGA IRQ enabled. Otherwise, try disabling this setting in the BIOS and see if the system still performs normally. You’ll usually find it does just fine without an IRQ.

If your motherboard has an onboard USB controller, as most modern motherboards do, then by default it will be assigned an IRQ. Although my enthusiasm for USB devices should be fairly obvious by now, you don’t need an IRQ for USB if you don’t have any USB devices installed! Disable this setting and reclaim another precious IRQ.

Using more than two serial devices
In some cases, you can successfully use more than two serial devices, in spite of the limitations of IRQ3 and IRQ4. The key is to configure the devices so that no more than two are in use at the same time. Let’s say you have installed a serial mouse and a modem, and you want to add a serial scanner. At one time, a fairly common scanner was incorporated into a keyboard, and that scanner attached to a serial port. If you can live with a simple procedural limitation, you can make this configuration work without causing an IRQ conflict.

First, decide which COM port to use for each device. Second, choose which devices will be used simultaneously. If you agree not to use the scanner while the modem is in use, those two devices can use the same IRQ but at different times.

This setup will work if you attach your serial mouse to COM1, which will use IRQ4. COM3 uses IRQ4 by default, so don’t attach any device to COM3. The modem can go on COM2 and use IRQ3, and the scanner can be connected to COM4 and also use IRQ3. Even though COM2 and COM4 use the same IRQ, they use different I/O addresses, so the system can keep the devices straight. But don’t try to use the scanner and modem at the same time.

Using a PCI adapter
If, no matter what you do, all your system’s IRQs are assigned to devices, there is one more way to add another device without causing an IRQ conflict: Install a PCI adapter for the function you need. With the proper motherboard and operating system, PCI devices can share IRQs.

Any modern (Pentium-class) motherboard will provide this capability, in conjunction with a Plug and Play OS such as Windows 95/98/Millennium or Windows 2000. You may need to verify several BIOS settings to make it work. Most important, the setting PNP OS Installed must be set to Yes. In addition, some BIOSs require you to specify which IRQs can be shared by PCI devices. Check your motherboard documentation for all the details that could be involved with this approach. Having said that, I am pleased to report that I’ve seen PCs sharing as many as four devices.

Resolving ISA conflicts
The steps listed in this Daily Drill Down should resolve most of your IRQ problems. However, if you’re still supporting 16-bit ISA cards, you may need more work to get all your devices configured. If you find yourself in this position, make a list of all the devices that require IRQs. Then, list the range of IRQs each ISA card can support and rank them in inverse order of flexibility. Don’t worry about PCI cards—they will be at the bottom of your list.

Some of the oldest ISA expansion cards, with no plug and play capability, may require specific IRQs in order to function properly. Some old sound cards fall into this category, and some network interface cards of this generation have jumpers that allow you to choose between IRQ3 and IRQ10—there are no other options. These cards will be at the top of your list.

Once you have your list prioritized, install your devices in that order—least flexible legacy ISA cards first, then PnP ISA cards with the fewest IRQ options, PnP ISA cards with the most IRQ choices, and finally, PCI cards. By definition, PCI devices are fully plug and play compliant, although they may still have a limited range of IRQs from which to choose.

By following the suggestions in this Daily Drill Down, you should be able to set up even the most difficult device configuration. In a few more years, with new specifications and interfaces, we won’t have to worry about running out of IRQs or causing IRQ conflicts. In the meantime, these tips should keep you going.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.

Editor's Picks

Free Newsletters, In your Inbox