Hacker News new | past | comments | ask | show | jobs | submit login

VGA/DB15 is not a hot-plug connection by default.

That part started with DVI.




For what it's worth, the second letter of the d-sub naming convention indicates the width of the shell. A DB15 would be excessively wide for the number of pins. The correct name for the classic three row VGA port is DE-15 and it uses the same width shell as the DE-9 often used for serial ports.

Note, old Mac's used a wider, two row DA-15 at one point.

The DE-15 is occasionally called an HD-15 and the correctness of that is widely debated on internet forums.


Interesting, thanks!


No, it started with DDC and was used since Win95, the first PnP OS.

https://en.wikipedia.org/wiki/Display_Data_Channel


Being PnP doesn't imply any hot-plugging capability.

DDC allows digital means of changing data and letting the OS know what the monitor can do. It doesn't allow/enable hot-plugging.

Since the interface doesn't support hot plugging by design, there's no standard way to detect a new VGA peripheral. However, manufacturers flexed the standard to try to enable hot-plug, but it doesn't work reliably, as we seen for years.

Similarly, PS2, SATA, PCI are not hot-plug by default, even if they're PnP. PS2 required standards bending, SATA had to wait AHCI, and PCI had to wait PCIe to gain hot-plugging support. To add to the list, IDE drives required special hardware, and RAM requires chipset and board support to be hot-pluggable. RAM has myriad of ways of identifying itself, making it truly PnP out of the box.

So, being PnP doesn't mean anything, from a hot-plug perspective. They're very different things.


You have it all wrong.

VGA D-SUB actually is hot-plug. You can connect or disconnect a monitor or projector at any time with no risk of damage. SATA is also hot-plug for connect, but it requires firmware support for disconnect (safe eject, more precisely, because it will detect a forced disconnect). It won't support hot-plug if used in IDE compatibility mode, because IDE was not hot-plug.

PCI is also hot-plug, but not the desktop connector.

PS/2 never was hot-plug. It's a serial port with interrupt assigned at boot if there's a device connected there. It's not possible to assign the the resources after the system is booted.

I can't remeber what Win95 could do, but I'm sure that Win98 had support for dual monitor - I used that a lot. I could turn on my second monitor at any time. That's because of PnP. Win311 was not PnP and required a restart to make changes to display configuration.

I'm not sure what you belive "hot-plug" means. Possibly you wanted it to auto-change the default output configuration when something was connected/disconnected? I was very happy it didn't do that! But it was short-lived. The auto-bullshit stuff was introduced by Radeon and Nvidia drivers, independent of OS, and I absolutely hated it when the driver auto-reverted to 60Hz on my 120Hz Trinitron! Many 3rd party tools were written to fix that. I remember using RefreshLock.


You're mixing up two related concepts.

Software support for hotplug can be added or removed as desired. That's an OS feature. You could absolutely reconfigure the interrupts without rebooting, if you felt like it. But hot-plug support starts in hardware, as an attribute of the connector. Being able to safely make and break connections while the circuits are electrically "hot", without damaging the circuitry on either side.

Generally, this can be done two ways:

The first is by having circuitry that moves so little power, or moves it in such a way, that it can't be damaged by the connections being made or broken in random order. For example, plugging a light into an outlet. It doesn't matter if the line or neutral conductor makes contact first, since the light either receives power or it doesn't, and neither state is unsafe. (Don't touch the blades of the connector. That's another matter entirely.)

The second is by having a connector design where some circuits are guaranteed to be connected before others. This is typically called a "make first / break last" scheme. At its simplest, the metal shell of a D-sub connector is really really likely to make contact before any of the pins, and in practice is effectively a make-first. But all the other pins make contact in random order. Compare to something like the SATA power connector, where the grounds are longest, power pre-charge after that, and main power at the very end. This is unconditionally safe to plug and unplug while hot.

VGA is hotplug-safe in practice because while the connector isn't really designed for it, as long as ground makes first, the analog video signals aren't picky at all (they're capacitively coupled and have no DC component), and the DDC data lines have enough short-circuit protection to tolerate whatever. (Because the D-sub connector also isn't "scoop-proof" -- it's possible to touch the male pins with the shell of another connector during clumsy mating, all circuits have to tolerate shorts to ground.)

RS-232 by the way, which was designed for D-sub connectors, contains language in the spec requiring that all circuits be tolerant of indefinite shorts to any other pin or to ground. It doesn't have to function in that state, but it's not allowed to sustain damage.

PS/2 isn't hot-plug safe even if you preassigned the interrupt (or booted the machine with the keyboard connected and then unplugged and replugged it later), because the pins aren't sequenced, and the circuits aren't designed to tolerate random mating order. If the power and data lines connect before the ground, you can get a CMOS latchup situation in the controller silicon that can only be cleared by total power removal. In practice this was fairly rare because the ground usually made first, and before I understood about this, I only smoked 2 motherboards' PS/2 ports despite hundreds of hot-plugs of keyboards and mice.

The canonical example of a terrifyingly-hotplug-unsafe connector is the TRS phone plug and jack. They change order during the mating process. Some old guitar effects pedals used this connector for power, and you were virtually guaranteed to smoke a transistor if you hotplugged it. These connectors were meant for telephone signals (which can tolerate polarity reversal and indefinite shorts to ground, by design), and some idiot decided to put power over them.

Note that there are no drivers or interrupts being assigned to a guitar pedal. Software support is entirely unrelated to the electromechanical phenomenon of hot plugging.


Hotplug needs support at all levels to work. The connector is just one of them.

In case of PS/2, it needs IRQ12 specifically and it doesn't support shared IRQs like PCI does. If PS/2 is not plugged in at startup, IRQ12 is reassigned by BIOS to PCI or ISA PnP cards, so no matter what OS does, it PS/2 can't work without a reboot.

> PS/2 isn't hot-plug safe even if you preassigned the interrupt (or booted the machine with the keyboard connected and then unplugged and replugged it later), because the pins aren't sequenced, and the circuits aren't designed to tolerate random mating order. If the power and data lines connect before the ground, you can get a CMOS latchup situation in the controller silicon that can only be cleared by total power removal.

It can also be a firmware bug or a momentary brown-out during the connector insertion that glitched the controller, which could happen even if the pins were properly sequenced.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: