When you reinstall the AMD Drivers do this:
Try this basic method of uninstalling and reinstalling AMD Drivers.
First download the correct Full AMD driver set from AMD Support for your Desktop for the RX580 here: Desktop
Make sure your Windows 10 is fully updated via Windows Update (including Optionals).
Disconnect the Internet from your computer to prevent it from installing a different GPU Driver than the one you are installing.
Use Windows 10 Uninstall to uninstall all AMD Drivers and software. Then use DDU in safe mode to completely eliminate all traces of the old AMD drivers and software related to the GPU.
Delete C:\AMD Folder. This prevents New and Old AMD driver files from installing and corrupting the installation process.
After rebooting from DDU, Reinstall the new AMD Full set of drivers. If it installed correctly, again delete C:\AMD folder to save Hard Disk space and reconnect to the Internet.
I'm having this problem as well with my Rx 480. So here's a super weird bit. If I have a D drive plugged in, it installs fine but I receive the mouse lag/stutter. But when I only have my C drive in, the lag/stutter is gone but I can't install the package. When I open the log only the video driver, and hdmi driver were able to install. But my D drive is dying and causing a lot of problems on my computer so I can't just plug it in every time I want to install a driver.