What polyfuses protect USB ports in a typical modern PC?
Sorry, but all answers are incorrect. Vast majority of PC mainboards do use polyfuses (aka resettable fuses) to protect USB ports from overcurrent and prevent damage from melting wires and connector's pins. Below are two examples, for ASUS Z170-A mainboard And for ASUS P9X79LE
USB specifications define that "high-powered hosts" must supply AT LEAST 500 mA for USB2, and 900 mA for USB3 ports (and more for Type-C). At least. General rule of design is consumer safety and to reduce OEM liability for setting fires, so the designers tend to limit the available current. High-side switches are expensive, and require even more expensive wire and extra pin on CPU or EC (or whatever). So simple polyfuses do their job quite economically.
Also, 95% (or (99?) of all usb hubs do use polyfuses as well.
As you rightfully found, maindoard use polyfuses at about double the minimum, some can supply up to the level of entire +5VSTBy limit (2.5 A and above).
If someone still has a concern about newer mainboards, here is a snippet of Gigabyte X570 AORUS MASTER (released sometime in 2019), with polyfuses circled:
Not all computers necessarily use a polyfuse to provide overcurrent protection for USB. They may be using a dedicated IC known generally as a USB power switch.
If you know the specific USB power switch used, you can look up the datasheet and find the typical trip current. Finding this is tricky, as you'll need the schematic which is typically proprietary and unpublished. Otherwise, you can look at the PCB and figure out what power switch is used.
To give a specific example, I searched for a ThinkPad X220 schematic and found an alleged copy on a forum. From there, I found that the power switch used is the TI TPS2069. If you take a look at the electrical characteristics in the linked datasheet, you will find that the typical overcurrent trip threshold is 2.85A, with a minimum of 2.3A and a maximum of 3.4A.
There are no fuses in the general USB 3.0 controller (unless you count an electronic fuse circuit as a fuse). The fusing is provided by a mosfet that is built into an IC (host controller or external mosfet) with a current level detection circuit. If the current goes beyond the spec, then the circuit is shut down. With USB 2.0 and earlier the current limit is provided by the host controller and that limit is 500mA.
Source: https://www.usb.org/sites/default/files/usb_20_20190524.zip (USB 2.0 ECN VBUS Max Limit.pdf)
A device cannot sink more current than is sourced, and it is my understanding (based on observation of shorted USB ports that I have shorted) that all ports have some kind of over current detection (and will flag the port in the OS when the current is overdrawn and shut down power to the port) .
Here is a good question on the current outputs of each spec: https://superuser.com/questions/1131515/usb-c-to-usb-a-cable-usb-3-0-with-high-current-at-2m-length If the manufacturer does not report which port belongs to each spec, then there isn't a good way to find out unless the circuit is reverse engineered. Many manufacturers produce USB ports that are out of spec.