clbr / radeontop

GNU General Public License v3.0
789 stars 69 forks source link

Navi Support? #88

Closed wherron01 closed 4 years ago

wherron01 commented 4 years ago

Everything but VRAM, GTT, and Shader Clock on my RX5700XT reports a constant 100% load, even when my GPU is doing no work. My gpu performs fine on benchmarks and in the game tests I've run it through, and radeontop reports it as "UNKNOWN_CARD" so this leads me to suspect it is unsupported. When is this support coming, or should it already be here?

clbr commented 4 years ago

This is not an official AMD project, nor affiliated in any way. I don't even have any cards from the amdgpu generations. So support for $newcard comes when someone contributes such, or sends me such a card.

wherron01 commented 4 years ago

Yeah, for sure. I was aware of that. I’d be totally willing to provide whatever is necessary to implement support for the 5700XT, if I can. Are there any tests I can run or any info I can provide to give you what’s necessary to do that? I am experienced in C, but have very little experience with lower-level linux development especially on the graphics side, so I doubt my ability to contribute the support on my own.

clbr commented 4 years ago

You could look into the kernel code for your card, find if the register location changed. The amdgpu libdrm parts should show the magic strings to look for. Also, did you try latest git? There were some navi pci ids at least.

wherron01 commented 4 years ago

Welp, that would do it. Update before you complain about missing features, @wherron01. Thanks for the help!

clbr commented 4 years ago

If the mem path still fails on Navi in current git, that would be good to fix.

wherron01 commented 4 years ago

everything looks like it works

clbr commented 4 years ago

Great, thanks for testing. Then the pci ids were enough.

samrocketman commented 3 years ago

Solution isn't clear to me. I have a newer card and facing the same issue. Read the comments and still don't understand. Can you provide an example of what you looked at and the radeontop options you passed?

samrocketman commented 3 years ago

Apologies for raising this from the dead.

Well, for completeness I built from source with make amdgpu=1 xcb=1 from the README and it works. I'm on Ubuntu 18.04 and the vanilla package from repositories does not work without recompiling radeontop.

Here's my development Dockerfile based on my OS... if a user is using another OS then they should use a different docker image tailored for them.

git clone git@github.com:clbr/radeontop.git
cp Dockerfile radeontop/
cd radeontop/
docker build -t rad .
docker run -it --rm -v "$PWD":/home/sam/radeontop rad

Which compiles it in the container for my OS (Ubuntu 18.04). Then, sudo ./radeontop works for my AMD Radeon 5700 XT. Worth noting that I already installed radeontop from the package manager so the runtime prerequisites were already satisfied. I used Docker to provide a quick compiling environment so that I could easily clean up my system by just deleting the dev container.

Source code of my Dockerfile (Click to expand) --- ```dockerfile FROM ubuntu:18.04 RUN set -ex; \ DEBIAN_FRONTEND=noninteractive adduser --quiet sam RUN set -ex; \ apt-get update RUN set -ex; \ apt-get install -y sudo; \ echo 'sam ALL=NOPASSWD: ALL' > /etc/sudoers.d/sam RUN set -ex; \ apt-get install -y git vim RUN set -ex; \ apt-get install -y make gcc pkgconf libdrm-dev libncurses-dev libpciaccess-dev libxcb1-dev libxcb-dri2-0-dev USER sam VOLUME /home/sam/radeontop WORKDIR /home/sam/radeontop CMD make amdgpu=1 xcb=1 ```

Cleaning up and deleting my dev environment I ran the following commands...

docker rmi rad
docker image prune
clbr commented 3 years ago

Ubuntu generally does not update apps in older repos, so 18.04 packages are going to be from 2018. Then -backports is usually for security fixes only.

samrocketman commented 3 years ago

Makes sense; if anybody is on an older distro like mine there’s compile instructions for them.