I got a new computer a couple weeks ago, with a 5070, and installed ubuntu on it and it was incredibly slow. I looked online and found some claim that 24.04 has some incompatability with nvidia, tried installing a bunch of different driver versions and nothing helped, tried turning everything off in gnome tweaks and still slow, tried installing 26.04 and 22.04 but the installer hangs forever in both, tried linux mint 24.04 still slow, gave up and installed windows with WSL :/
I run a computer with a 5070 and Nobara. Nvidia and Linux always seem to be at odds but that has gotten a lot better with some distros.
If you wanted to run Ubuntu from the beginning, it would be better to search for a computer designed for it, not for Windows.
Try CachyOS instead. Ubuntu is not great.
What was slow?
I'm running Ubuntu on a 9950x3d and 5090 and it is not slow. Games in Steam with Proton are buttery smooth.
One hiccup was I had to disable variable refresh rate because moving the cursor didn't "count" as a reason to update the screen, so moving the cursor on its own (rather than e.g. moving a window) looked choppy.
But a choppy mouse cursor isn't "slow".
Tip: if you have a performance problem, run Claude Code (or an AI agent of your choice) and ask it to investigate.