Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As far as I know, PS/2 keyboards are interrupt driven, while USB are polled. Typically a PS/2 keyboard was assigned IRQ_1 on Windows.

I'm no hardware expert, but at a first glance seems like the PS/2 keyboards are more efficient. So here are my questions:

  1. On modern day computers, are PS/2 keyboard better (or faster), and if so, would it be noticeable at all? (e.g.: in gaming)
  2. Since they don't need polling, do PS/2 keyboards save energy compared to USB? (notice I'm not talking only about the peripheral here, but about the overall computer energy consumption).
  3. In case PS/2 had any advantage over USB, would adding a PS/2 adapter to my USB keyboard make the device as good as an actual PS/2 keyboard? Conversely, would adding a USB adapter to a PS/2 make it as bad as a USB KB?

Thanks in advance.


Edit: I'll explain #2:

USB needs active polling. So the CPU must dedicate some of its cycles to scan for keypresses, meaning that the number of cycles available for other tasks is lower. This can cause the CPU frequency to rise, hence the power consumption would be higher. An interesting case: Let's say we put two identical computers side to side, one using a PS/2 keyboard and the other using a USB keyboard of the same model, and we keep them switched on for a whole day. If we only press a single key during the day, the amount of CPU time the PS/2 keyboard has required is much lower that the USB counterpart. So in a CPU with an extreme dynamic frequency scaling, the USB KB would have required more power overall. Also, USB protocol needs to manage several devices, I guess this management makes processing a USB keypress computationally more expensive that the dedicated IRQ in case of PS/2 keyboards. These are the kind of considerations I was asking in #2, taking into account the PC as a whole, and not only how much does the KB suck from the 5V input.


Edit
Seems that the polling thing is only up to USB 2.0, and according to Wikipedia, USB 3.0 gets rid of polling:

improved bus utilization – a new feature is added (using packets NRDY and ERDY) to let a device asynchronously notify the host of its readiness (no need of polling)

(USB 3.0 keyboards are rare as of today. I only know about a Gigabyte KB showcased this year at Computex, and I doubt it uses USB 3.0 to get rid of polling, but instead to provide a USB 3.0 hub right on the keyboard).

I'm also trying to find hard data on what is the polling rate for a USB KB. Some people says 125 Hz, and there are some tweaks up to 1kHz. By comparison, consoles like PS3 poll at 100 Hz, and XBox at 125 Hz. Even if 1KHz were the case, it seems negligible on a GHz CPU (0,000001 % of CPU cycles/second). These numbers lead to another question: for gaming purposes, how better (if any) would be for a PS/2 KB to generate 1k interrupts per second?

share|improve this question
1  
I'd note tho, many modern systems don't have PS/2. –  Journeyman Geek Sep 10 '12 at 11:15
    
True, but some desktop motherboards still come with it. –  Mister Smith Sep 10 '12 at 11:45

2 Answers 2

Response Times PS/2 vs. USB Keyboards:
There are a number of interesting results, but the point relevant to this question is that there was a fairly significant variance between keyboards, and all the USB keyboards tested had a longer effective scan interval (18.77 ms - 32.75 ms) than the PS/2 keyboards (2.83 ms - 10.88 ms).

More information from this Superuser thread itself: Do USB or PS/2 Keyboards Respond Faster


Power Consumption between the two devices and overall Power Consumption: (Referencing HP Doc)

  • USB
    Operating voltage : + 5VDC ± 5%
    Power consumption : 50-mA maximum (with three LEDs ON)

  • PS/2
    Operating voltage : + 5VDC ± 5%
    Power consumption : 50-mA maximum (with three LEDs ON)


My take on it:
So the maximum possible power consumption will be +5V and the motherboard must have accounted for this power for the PS/2 port irrespective of its actual consumption. And we know the USB does give us +5V of power output on it. The actual power consumption varies a little from brand to brand. Some say it consumes 50-mA, some say it's 70-mA, with a roof of 100-mA. Nothing I have read so far says or show more than 100-mA of actual consumption. In fact, windows also reports 70-mA of actual power required. But my Macbook shows a requirement of 100-mA on the USB. So the USB keyboard actual power consumption could be a little higher that the PS/2 keyboard. Attaching a couple of images below.

On Windows
Win USB

On MacBook
Mac USB


Explaining the Updated Question in #2:

  • Well, there is only 1 USB controller, but every USB port is interfaced individually. So the protocol makes the device exclusive for every port.

  • So, every USB device connected to a port is interfaced individually. So when a device is connected to the port, the port tells us which device is connected. So this is like having a dedicated port per device, and the controller has the bus capabilities of sending multiple requests simultaneously to the processor.

  • So in my reckoning the amount of power / CPU time taken by the PS/2 or USB keyboard would be same. And if the USB keyboard was heavy on processing and power, people would have not used them inter-changeably. And we would have also read a lot more tech articles on them!

  • My personal argument on this would be, Apple just gives you USB ports on the Mac Minis and iMacs, so would Apple do it if it was so power and process intensive? Even most of the new Dell machines don't have PS/2 ports on them. (Leave all the assembled and custom hardware aside)

share|improve this answer
    
Thanks for your time. I've edited the question to better explain #2. –  Mister Smith Sep 10 '12 at 11:41
    
@MisterSmith : have written my explanation for your #2 to explain it better. And I guess that's just my take on things! –  aliasgar Sep 10 '12 at 12:29
  1. This is personal opinion, but I wouldn't expect any noticeable difference. It would be a lot more dependant on the keyboard's hardware construction/quality (e.g. how quick it processes keypresses, how fast it reacts to you pushing a key, etc.). The interrupt would halt other things being processed, but programs or games would still have to react to it first. It's not like the whole game logic sits in the interrupt handler.
  2. I don't have the PS/2 spec in mind, but considering USB is usually something like 5 V 500 mA, which would result in 2.5 W. Now look at CPUs and GPUs that might (esp. on a gaming PC) take more than 250 W alone, this feels VERY neglectable.
  3. Definitely not! Even if there's an advantage, you're adding another step/stage, which would kill the whole advantage by linking both technologies one after the other. Let's assume USB's reaction time would be 0.1 seconds and PS/2's reaction time would be 0.05 seconds. With an adapter you'd be most likely somewhere around 0.15 seconds or maybe even higher.

Edit after your edit:

I'm assuming you'd like to improve your reaction times or whatever. If your question is really just theoretically, ignore this. If you'd like to "optimize" your gaming experience, just grab a USB keyboard made for gaming. These usually offer a more consistent key press behaviour and might have other features (e.g. detecting how deep or long you press rather than just pressed/not pressed). I wouldn't even try to worry about PS/2 at all, especially due to the fact how limited PS/2 ports are on today's hardware. You probably don't want to win a few milliseconds in input handling while losing more time due to lower memory bandwidth or other things.

Also something completely different to consider for gaming: Typical refresh rate on today's desktop PCs is 60 Hz. That means 60 frames per second or approx. 16.67 ms per frame. This leads to the fact that, even if you're polling 1000 times per second, you won't notice any reaction faster (compared to let's say 100 times per second). Sure, calculations might be faster (e.g. simulating the game world at 100, 500 or even 1000 frames per second), but I'd still say you won't notice any real difference at all.

share|improve this answer
    
I'm not so sure about #3. USB to PS/2 is a simple wiring adapter, and many gaming KBs include it. So the KB would thus be able to detect the protocol used at power-on. And about #2, I was thinking mostly on the CPU cycles that would be needed for USB polling, not on the keyboard itself. –  Mister Smith Sep 10 '12 at 9:43
1  
@MisterSmith - USB to PS/2 is NOT a simple wiring adapter in the general case. There are some devices (including a lot of gaming keyboards) that support both interfaces on the same connector (via simple wiring adapter), but in the general case this is NOT true. As to #2, the amount of power/cycles used to poll the USB keyboard vs respond to PS/2 interrupts is so small as to be irrelevant. –  Michael Kohne Sep 10 '12 at 11:59
    
@Michael Kohne Yup, you are right. I was just reading about users whose KB only supported USB and the adapter didn't work. So that seems to be the answer for #3. –  Mister Smith Sep 10 '12 at 12:08
    
Yeah, forgot about that point. It really depends on the implementation, but if you're having a simple wire adapter, then you're not really using any adapter at all (you're just using another connector). Also reminds me of Microsoft controllers being released during the early years of USB having those short adapter cables that unfortunately didn't work with older hardware. –  Mario Sep 10 '12 at 23:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.