A few weeks ago I build my first pc. So there were a few problems in the beggining (I scratched the mobo very lightly when installing the gpu, i didn't place the cpu heatsink the right way so I removed it and installed it again, e.t.c) but In the end it worked. It booted normaly, I installed windows and all the drivers from the manufacturer (AMD, gigabyte) but since the day I've built I've had problems with my usb ports - all of them (USB 2.0 , 3.0, 3.1) on the mobo and the case itself. It's a bit complicated but I'll try to explain the best I can.
When I connect a usb storage device, It starts reading It but then immediately disconnects, then It reconnects and does the same thing but this time there is a 30-45 sec period where It stays disconnected and the It connects normally and the pc recognises It normally. Note: this only happends with storage devices not with mouses or keyboards.
Rarely, when I disconnect a usb device (anything) all the usb ports freeze and everything connected to the usb ports disconnects and does that thing I mentioned In (1.) but this rarely happens.
One time, while I was transfering a very large file over usb 3.0 to my external HDD It disconneted very frequently but without cutting power to the HDD (the Led stayed on) and I would need to resume the transfer or repeat It. After a few retries the issue seemed to go away but I might still be happening.
During the bootup process of windows my USB peripherals disconnect and reconnect several times and sometimes (after a restart usually) everything Usb connected doesn't work and I have to wait 10s (sometimes 30s) for the usb ports to start working again, again this doesn't happen often.
HDD: WD BLUE 2TB
SSD: Samsung 970 Evo 250GB
GPU: Sapphire Radeon RX 580 8GB Nitro+
CPU: AMD Ryzen 5 2600
RAM: Corsair Vengeance RGB 16GB DDR4-3200MHz
MOBO: Gigabyte B450 Aorus M (rev. 1.0)
PSU: Corsair CX Series CX650M
USB DEVICES (constantly connected): tp-link usb wifi adapter, toshiba 32gb usb 3.0 drive, usb headset, usb keyboard, usb mouse, usb camera
software: Windows 10 Pro 1807
latest drivers from Gigabyte and GPU driver ver. 188.8.131.52