I recently decided to dual boot Ubuntu to give it a try as my main platform, as I like the look and feel of it and I'd really like to get away from Windows. But for whatever reason, whatever game I'm playing will freeze/drop fps for a bit before going back to normal. I know it isn't a hardware issue, as on the same exact games run perfecy fine on Windows. I've tested it with Tomb Raider (on proton, not the terrible linux port), Final Fantasy XIV, Rise of the Tomb Raider, and Slime Rancher. Looking at mangohud it seems my gpu usage is all over the place. Specifically in the Rise of the Tomb Raider benchmark sometimes my GPU usage is at 100% and is producing the expected amount of FPS, but then in another area it drops to about 59%, which in turn causes my FPS to drop from ~144 to 50-70FPS. And while running it my fps occasionally drops as low as in the 30's before going back up to 70, as the benchmark tells me the minimum. I've tried setting my CPU to performance, ondemand, schedutil, none of them seem to make much of a difference. And while using mangohud my CPU goes up to 64% at absolute most, and as I said I have no issue on Windows so it isn't a CPU bottleneck. I'm at a loss as to what the issue is, and if I could get it fixed I could see myself using the platform as my main since all of my games seem to work well enough with proton(minus the stuttering).
My specs are: ASRock AB350M 16GB ram ZOTAC Gaming RTX2060 Super (driver 460.91.03, also tried 470.57.02, didn't work) AMD Ryzen 5 1600x One Asus monitor(60hz), one Dell with GSync(144hz) And here's a pastebin of lshw in case I forgot anything: https://pastebin.com/7qdVFE72
What I've tried:
Changing CPU governor to performance Disabling Wayland Installing Pop!_OS, reinstalling Ubuntu(multiple times) Downgrading drivers Changed GPU to performance in nvidia x server settings Disabling quiet n' cool in BIOS Forcing full composition pipeline Installed onto a different SSD (I have 3) Saving to X configuration file Disabling/Enabling Sync to VBlank
Again, everything works completely fine on Windows, so I don't believe this is a hardware issue at all. Even looking at temperatures on mangohud, everything checks out. At this point I've been researching for what feels like eternity and nothing has helped, so any help would be appreciated. Edit: Pastebin with the results of free -h, sysctl vm.swappiness, and swapon -s https://pastebin.com/JfBa1pAh