I suddenly started getting lag spikes on Terraria and they were starting to really piss me off so I checked the system monitor and noticed that my IGPU was getting used almost every time the game gets a lag spike. Which.. it shouldn’t be used at all I’m thinking.
So, I used winetricks to install dxvk and put “DXVK_FILTER_DEVICE_NAME=“AMD Radeon RX 9060 XT” %command%” into my Terraria launch options on Steam.
Now whenever I play the game, I still get lag spikes. I’ve turned off frame skip, turned it to subtle, turned it on, changed every setting to minimum, changed lighting to every setting, and still the same lag spikes lasting for up to 3 seconds each. On the F7 menu the green “draw” line spikes up whenever I get a lag spike, along with it saying the CPU usage spikes from on average 20% up to 95% or higher.
System monitor shows that it’s using more of my GPU, I believe. But it is still at some points using the IGPU. My friend suggested that it may be offloading some tasks to it, but I don’t think it’s supposed to be offloading so much of it that the the igpu spikes up to 70% + usage and lags the entire game.
I’m at a loss here : /
Really doesn’t help that I’m a newbie.. using Windows since I was 4 hadn’t prepared me for this ;-;
Oh, yes, while I’m idling, system monitor shows absolutely 0 usage of the igpu and only goes up to about 11% of the normal gpu relative to the on average ~17% usage when playing the game. I’m fairly certain it’s the game actually using the correct gpu.. sometimes.
The game has a native Linux port that it uses by default. What you did there with DXVK and Winetricks amounted to basically nothing, as far as I could tell.
You could try to install switcheroo-control and see if it can let you launch Steam exclusively using the dGPU? You could disable the iGPU if you don’t need it in the BIOS too, maybe?
Building on this, provided you’re happy you’ve got your saves backed up and/or are using steam cloud saves, one thing you could try is uninstalling the Linux native version and installing the windows version with proton (go to preferences for the game through right click menu → compatibility → force use of specific proton version before you reinstall).
I don’t know for this game specifically, but some “linux native” ports are just the developer bundling their own version of wine, which depending on when they did it, might not be as good as current mainline proton/proton ge or whatever. I’ve definitely had games where the Linux native build is less well behaved than just using proton, weird as that sounds!
Just a note, depending on what system monitor you use, you might treat the reporting with a grain of salt. I have a ryzen 7000 CPU with igpu and a radeon 9000 gpu, and in my case mangohud gets muddled and reports some CPU properties as if they were exclusive to the igpu. The KDE system monitor does not seem to have that confusion. I flag that just in case the igpu use is some weird red herring and it’s just a regular CPU bound frame drop. On the off chance this is right, have you tried using feral gamemode to run it? By bumping up process priority, it can reduce stutters under some conditions. A more extreme way to achieve a similar but potentially greater result would be to use the cachy os kernel, which in theory contains a scheduler better suited to game responsiveness under certain scenarios.
Final thing from me; you can use mangohud to set a frame cap, I often do that just for thermals and noise in hot weather. That can also reduce dips and drops in some scenarios.
Welcome to Linux and happy gaming adventures! In addition to protondb, the “what game are you playing” thread here can be a nice place to be.