You connect your monitors to a USB-C/Thunderbolt dock, all to then have the screens turn off erratically, or devices connected over USB acting up by turning off at random times? Sounds familiar? You are not alone!
What if I told that this is because you have not told the kernel that you need IOMMU enabled on your machine? This is particularly true if your monitors also have docks themselves, and the sheer IO overhead is overwhelming your system. How to solve it?
First, check your device BIOS and see if there is an option to enable IOMMU. Then proceed to enable IOMMU on the kernel:
For AMD: "amd_iommu=on iommu=pt"
For Intel: "intel_iommu=on iommu=pt"
On Fedora, we use grubby to update our kernel arguments:
sudo grubby --args="amd_iommu=on iommu=pt" --update-kernel=ALL
Reboot and enjoy a much stabler USB, multi-monitor peripherals handling! The reason it's not ON by default is that there is a tiny overhead in memory usage. Read more about IOMMU: https://en.wikipedia.org/wiki/Input%E2%80%93output_memory_management_unit