Why will a USB flash drive get so hot when plugged into a Windows computer?
Solution 1:
On my laptop, the USB 3.0 port is physically very close (~ 2 in) to the fan assembly:
As a result, any USB device plugged in on that side feels approximately the same temperature as the outside of the fan (!).
My laptop is also a little bit slow. Consequently, Windows 10 runs considerably hotter at idle than Ubuntu, and I have noticed that flash drives seem to get hot on Windows as well.
You can test if this is the case for you as well by running a very CPU-intensive program in Ubuntu (say, a 4-core build) and observing whether a plugged-in flash drive gets hot during that time.
Edit: I just now saw Justin's comment. I hope this provides enough information to stand on its own.
Solution 2:
Windows does have this thing where you "can use USB sticks to speed up your computer". It does this by using otherwise-unused-stick-memory as a cache, reducing disk I/O. It's possible this extra activity is generating the excess heat.
It's possible to test this by turning off this option, and see if the stick still gets hot
Solution 3:
There are a few possibilities here.
- Windows does indeed have more software that automatically scans, integrity checks, power manages, and generally uses USB memory sticks. This can cause the drive to get more activity in Windows than Linux, assuming default installations of each.
- The Linux drivers may be using the drive as a USB 2.x connected disk, whereas Windows may have a 3.x driver and it may be a 3.x port. This would increase usage speed and heat.
- Windows is assuming power is required over the USB port for a larger disk and is supplying more, even if unnecessary, through the port. More precisely, the device requests more power from the port than is required. This is unlikely, but can occur if the firmware for the motherboard is permissive and the driver software for the motherboard and/or the devices involved is bugged/not functioning properly. I've seen this happen with older motherboards and some off-brand USB devices. It can also happen if there is a USB extension or dongle involved and the cable is damaged internally, or on a direct connection, the interface board itself is having problems. In theory, Windows 10 will catch this and notify of a power surge on the port, particularly if the cable is damaged, but it does not always successfully deactivate the port when it occurs.
- Windows Antivirus software may be doing scans of the drive when it isn't in use.
Solution 4:
According to OP, the difference in temperature happens on the same laptop, same hardware, so any proximity to heat exhaust is inconsequential.
The difference is likely due to different handling of LPM - link power management. LPM is a more sophisticated version of USB SUSPEND function. USB 3.0 mass storage devices got hot when USB host controller disables LPM (or LPM is not enabled in USB device, this is a mutual thing). Apparently the Windows OS somehow has difficulty in configuring the xHCI controller to run LPM (or has it disabled), while Linux has no problem with that.
To check Windows configuration for LPM, this link might be of some help.
Solution 5:
Another possibility is a difference in how Linux and Windows handle writing to a removable drive. Windows by default will force all writes to happen as soon as possible, in case you remove the drive. Linux, on the other hand, expects you unmount the drive before you remove it, and thus keeps a write cache in memory.
Hence it is possible that your drive is actually getting less use at a given time under Linux, as the writes would be more spread out, and even less writes may be required (if you modify a file that had not been written to the drive yet.)