How can I tell if my GPU is being utilized properly?
I purchased a system76 Thelio Mira Elite With a AMD Radeon RX 7900 XT. I kinda regret not going with Nvidia at this point but it is what it is. I primarily use it as a developer workstation, but want to play games on it as well so I can be rid of my windows box.
I didn't expect it to be able to play the latest and greatest games but I did expect it to be able to play older titles reasonably well. Games launch from steam and seem to work, but I'm getting between 0 and 10 fps on the title screen of Kerbal Space Program. Other games are similarly functional but poorly performing.
Where do I start? How can I ensure my GPU is being leveraged? Is this as good as it gets?
I see the system you got came with a 4070 if was the elite or was custom?, Not sure if you try to reinstall pop is? Unless someone said it all ready. Its very weird that your video card giving you problem should just work.
NVTOP - terminal top-like app, works well for AMD GPU stats.
Mission Control - flatpak, windows task manager style process monitoring, shows GPU stats, much like windows.
MangoHUD, in game overlay, showing live fps, CPU and GPU usage
This are the 3 I tend to use to monitor my system performance
(If you running a Wayland powered desktop, that may be a source of issues. I've had issues that I dont experience in good old X. But that was some time ago. My 6800XT performs as well as I expect it to under windows. Running NVIDIA on Linux is generally a real chore, AMD has been plug and play for me)
When I select proton-experimental as the version under force proton runtime, I actually see usage in rocm-smi, however I get a black screen or that weird "see behind my window effect I screenshotted" in another comment. When I let it choose, I can see the game but sit at 0% utilization.
Kerbal Space Program has a Linux native client and a windows client. By default, Steam will try to install the Linux native client, which is using OpenGL and, apparently, doing software rendering.
You could try to troubleshoot why OpenGL is broken, you probably are missing an environmental variable or something to tell it to use a specific device and so it defaults to software. However, this is kind of a moot point. Development stopped on OpenGL in 2017 and so bugs and weirdness will continue to crop up and fixing it won't resolve your core issue (Which may be that you're just not using Proton).
If you're going to game on this system then you should do what most people do and enable Steam Play and let Steam download the Windows version of KSP and run it through Proton (aka Steam's version of WINE). Often the Windows versions of games are more supported than the Linux native versions and WINE/Proton do an excellent job of translating the underlying windows system calls into Linux-ese. Proton is the primary reason why gaming on Linux works, because it lets you just play the Windows version of games.
Your logs indicate that your graphics card is the default device for Vulkan and so it should just work as soon as you enable Steam Play. If you have any problems with other games (once you verify that you're using your graphics card) you can look them up on Protondb (https://www.protondb.com/) and see if you need to make any setting changes. KSP looks to have a Gold rating and appears to work with Proton without any changes.
So steam play was already enabled, it looks like it defaults to "steam Linux runtime 1.0 (scout). When I select different versions of proton runtime I get different behavior dependig on which one I select.
Proton 9 says that it cannot switch to my monitors resolution,
Proton experimental and hot fix launch the game (I can hear it!), but things are ... Weird. It only renders the windows behind it and the custom game cursor. When I alt enter to bring it into Windows mode, it's still just the windows/desktop that would be behind the game but now it's scaled differently.
EDIT:
It's hard to tell but the above screenshot is the game window
Do other games show a similar behavior or is it limited to KSP?
BG3 should work fine (was just playing it on Linux about 30m ago, but Arch, btw, etc).
You can get some extra logging from steam, if you exit completely and the, in a terminal, run:
steam -d
It'll start Steam but output a lot of info to the terminal. The bit we're interested in isn't the stuff that it generates while Steam is starting. We want the bit that happens when you press play on a game. It'll output the information about the important bits (like the Vulkan device, driver versions, monitors, etc )
Make sure there's no obvious account info in the logs (there shouldn't be, but always check) and post that.
I'm off to bed but I'll check in with you tomorrow
There's a program called amdgou_top you can use to see the breakdown of components on the GPU(s) and their utilization, as well as what apps are running on the GPU
AMD GPUs are usually the best pick for Linux, and the RX 7900 XT is capable of a lot better performance than 0-10 FPS. (It will vary by game, settings, and resolution, of course. You didn't mention the latter two.)
It's possible your games are using the CPU's integrated GPU instead of your graphics card. (Your iGPU is made for desktop use; it's not suitable for most gaming.) Do any of your underperforming games have a screen that shows which GPU they are using? Is your monitor plugged into the motherboard's video port, or one of the graphics card's ports? Does an overlay appear in the top left of the screen if you put DXVK_HUD=1 %command% in an underperforming game's Steam Launch Options?
It could also be that you don't have a recent enough kernel, firmware, or mesa/vulkan drivers installed for that fairly new GPU model.
Since you bought from System76, I would guess that they have support staff who can help make sure these things are set up properly. They even have their own Linux distro, which I think is pretty well regarded. Have you called them?
Is this as good as it gets?
No. Not even close.
EDIT: Added note about DXVK_HUD in Steam Launch Options
Do any of your underperforming games have a screen that shows which GPU they are using?
I haven't found any that do but I can try launching a few and searching.
Is your monitor plugged into the motherboard’s video port, or one of the graphics card’s ports?
GPU port, 100%
Since you bought from System76, I would guess that they have support staff who can help make sure these things are set up properly. Have you called them?
I had not thought of doing that for whatever reason, but I will in the daytime tomorrow.
Does an overlay appear in the top left of the screen if you put DXVK_HUD=devinfo %command% in an underperforming game’s Steam Launch Options?
For the 3 I've checked so far no, I don't see that.
Do any of your underperforming games have a screen that shows which GPU they are using?
I haven't found any that do but I can try launching a few and searching.
Take a look in each game's graphics settings. Not all of them show it, but some do. In Baldur's Gate 3, it's shown in Options: Video: General: Display Adapter. In Elite Dangerous, it's in Options: Graphics: Display: Adapter. There are other ways of trying to determine which GPU is likely to be used by default, but seeing it directly in-game is the best way to be sure.
Does an overlay appear in the top left of the screen if you put DXVK_HUD=devinfo %command% in an underperforming game’s Steam Launch Options?
For the 3 I've checked so far no, I don't see that.
The fact that you see no DXVK overlay when using that launch option suggests that either none of the games you tried use DirectX 9/10/11, or there's something missing/misconfigured/old in your Vulkan driver stack. I would expect System76 to be able to help with this more efficiently than we can, since they sold you the system for use with Linux and are known for being competent.
EDIT: I just noticed your other comment that shows Pop!_OS 22.04 LTS as your Linux distro. That release predates your GPU model by about a year, I think. It seems likely that you just need to get a newer kernel, firmware, and graphics drivers installed. This stuff is available upstream of your distro, so it shouldn't be too hard for someone who knows Pop!_OS well, like System76. :)
Yup really does sound like that. I had a friend make this mistake when we upgraded some components in his computer last summer I asked him to plug everything back in...
In his case there wasn't a GPU on the CPU so the computer wasn't booting to any image.
We spent way too much time in the case second guessing my work only for me to go around to the back of the computer and facepalm.
Now i'm starting to doubt since this these responses have been so ubiquitous, but it's definitely not plugged into the motherboard's gpu slot. The motherboard has a single hdmi and displayport port. It, like all the other motherboard ports have a matte-black finish that matches the case. The displays are plugged into the glossy silver PCIE aligned hdmi and display ports, which doesn't match the rest of the case. The card is doublewide, occupying 2 pcie slots and is labeled "ASROCK".
A 7900xt is like top 5 consumer graphics cards ever made at the moment, so 10 fps on a 15 year old game is not normal. I have the same card and just beat Control and Space Marines 2 with max settings with ray tracing and it constantly stayed above 100fps, with a vast majority of its time maxed at 144.
The first thing to do is to download CS2 and see where you're at with max graphics, you should get steady 144fps. If CS2 works, it's your games you're playing, check proton db and see if there is some common advice on settings/boot configs. Proton GE and Feral gamemode are two common tricks. There's also an option to trick games into thinking you're on a steamdeck that's becoming more common. If you see something unexpected with those configs, you may need to dig into your bios and make sure your card is behaving there, and there are some profiling tools for GPUs. You may have to update your drivers depending on your distro. Not all 7900 cards are the same, depending on the company designing the card's case, you may get different behavior on things like fans.
Their are some GUI tools that profile AMD GPUs, but I've found they don't show must more than sensors and lsusb show.
Yeah it appears my card isn't being used at all, which explains the poor performance. Honestly the fact the system runs as well as it does without it is impressive. I'm reaching out to system76 for their diagnostics on why this might be
Games launch from steam and seem to work, but I’m getting between 0 and 10 fps on the title screen of Kerbal Space Program.
Something is definitely off on your system. I've a 7900 XTX (the slightly-higher-end version of that card), and while I don't have the box in front of me, it definitely runs at at least reasonable (60fps+) rates at 2560x1440 on KSP. Might do well above that, dunno. It's definitely not herky-jerky to the level you're seeing, though.
Are you using Wayland or Xorg?
If you run radeontop (in Debian trixie, package radeontop) it should tell you various load characteristics. There isn't a GPU-agnostic utility to do this, unless things have changed since last I've looked -- Nvidia and AMD both have their own utilities.
I kinda regret not going with Nvidia at this point
Unless you're aiming for AI stuff, where there are some significant benefits, like a large userbase and support for transformers, I'd probably recommend AMD for Linux use.
EDIT:
If you run glxinfo on either Xorg (or Wayland, since the emulation layer will handle it), package mesa-utils on Debian trixie, it'll tell you what OpenGL is trying to use. If you're using hardware-accelerated stuff, you'll get something like this:
That's been the quick-thumb-in-the-wind test to know whether hardware 3d acceleration is running since just about forever. KSP probably doesn't actually use OpenGL -- I'd guess that it's probably using DirectX going through some emulation layer in Proton to Vulkan -- but if you've got something wonky like no usable 3D driver support for your GPU, that'll show it up.
EDIT2: There's also vulkaninfo in (package vulkan-tools in Debian trixie). It'll give you something like:
GPU id : 0 (AMD Radeon Graphics (RADV GFX1103_R1)):
EDIT3: If you're using Xorg and that doesn't show hardware acceleration in use, then the next thing that I'd probably look at is /var/log/Xorg.0.log to see what Xorg is saying regarding your GPU. I don't know much about diagnosing Wayland issues, as I've not been using it for all that long. The kernel log may also have interesting messages information (as root, journalctl -kb or dmesg) if the problem is at the kernel level.
Yeah, so it's not using hardware acceleration then -- your (poor) CPU has been trying to do all this in software emulation. I updated my comment above -- take a look in Xorg.0.log if you're on Xorg. My first guess is that you most-likely need newer drivers.
I know that these are new enough for the 7900 XTX; that's current for Debian trixie, just to provide a known-good point in terms of driver version.
$ dpkg -l|grep radeon
ii libdrm-radeon1:amd64 2.4.123-1 amd64 Userspace interface to radeon-specific kernel DRM services -- runtime
ii libdrm-radeon1:i386 2.4.123-1 i386 Userspace interface to radeon-specific kernel DRM services -- runtime
ii radeontop 1.4-2 amd64 Utility to show Radeon GPU utilization
ii xserver-xorg-video-radeon 1:22.0.0-1 amd64 X.Org X server -- AMD/ATI Radeon display driver
EDIT: You don't say what distro you're using. If you're using Debian stable -- I think I was when I first got my 7900 XTX, and IIRC they didn't have driver support in at that point, though that was a while back now -- you might check whether you have the backports repository present.
EDIT2: The first results for my search as to minimum supported version, though I wouldn't take this as authoritative:
Yep, you're using software rendering and your extremely fast GPU is sitting there idle. Talk to System76 about enabling the correct driver.
(That was obvious from the initial "0-10 FPS in KSP" symptom, of course -- even my 7-year-old AMD GPU, a Vega 56, can run that game just fine, and I'm pretty sure the AMD GPU I had before that could too.)
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id = 0 (Radeon RX 7900 GRE (RADV NAVI31))
GPU id = 1 (Intel(R) Graphics (RPL-S))
GPU id = 2 (llvmpipe (LLVM 15.0.7, 256 bits))
GPU id : 0 (Radeon RX 7900 GRE (RADV NAVI31)):
GPU id : 1 (Intel(R) Graphics (RPL-S)):
GPU id : 2 (llvmpipe (LLVM 15.0.7, 256 bits)):
cat /var/log/Xorg.*.log | grep amd
[ 5067.696] (II) LoadModule: "amdgpu"
[ 5067.696] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[ 5067.696] (II) Module amdgpu: vendor="X.Org Foundation"
All GPUs supported by the amdgpu kernel driver
cat /var/log/Xorg.*.log | grep gpu
[ 5067.696] (II) Applying OutputClass "AMDgpu" to /dev/dri/card1
[ 5067.696] loading driver: amdgpu
[ 5067.696] (==) Matched amdgpu as autoconfigured driver 0
[ 5067.696] (II) LoadModule: "amdgpu"
[ 5067.696] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[ 5067.696] (II) Module amdgpu: vendor="X.Org Foundation"
All GPUs supported by the amdgpu kernel driver
This is Pop_Os, which is System76's 'ubuntu like' distro that comes shipped with vendor maintained drivers. It comes preinstalled with steam and is intended to be able to use it right out of the box. I've opened a ticket with them to discuss it further
don't use it. It is totally left without support nowadays. They are developing COSMIC, a new Wayland desktop enviroment and Pop OS is abandoned. System 76 pcs support other distros too. You need something based on Fedora Atomic or Arch