Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Intel GPUs? #644

Closed
dm17 opened this issue Oct 14, 2023 · 25 comments
Closed

Add Intel GPUs? #644

dm17 opened this issue Oct 14, 2023 · 25 comments
Assignees
Labels
enhancement New feature or request

Comments

@dm17
Copy link

dm17 commented Oct 14, 2023

Is there a way to display the output from intel_gpu_top in btop already? If not, that is kind of what I'm looking for... And perhaps other users can use the same method to poll radeontop and similar.
Thanks; btop is great!

@dm17 dm17 added the enhancement New feature or request label Oct 14, 2023
@42willow
Copy link

42willow commented Jan 24, 2024

#529 (comment)

Support for intel GPU's was added mentioned in this PR, but unfortunately for now there isn't any intel GPU support

edit: oops wrong wording sorry, it was mentioned but not added

@notorand-it
Copy link

As of 1.3.2, no Intel GPU (mine is Iris Xe Graphics) usage is shown.

@Sarajevo1914
Copy link

thinkpad T14 Gen 2 i5 1135g7 is not shown (btop 1.3.2)

@dontknowhy
Copy link

Good news:There is some other way to show Team Blue's GPU usage:
Screenshot_20240524_184554

Bad news:I think it uses DRM to get the GPU's usage.
Mission Center

As this pull message said,it's hard to use the same way as igt-gpu-tools.

@Antiarchitect
Copy link

btop 1.3.2 IrisXe HP Pro Book - not shown

@dm17
Copy link
Author

dm17 commented Sep 7, 2024

In terms of AMD and Intel GPUs, I've found nvtop to be significantly nicer than radeontop and intel_gpu_top. Would be cool to have them all working in btop though!

@notorand-it
Copy link

The point here, IMHO, is not to the the best ever GPU usage tracking, but rather to add (for now) an idea on how much the GPU(s) are loaded. Nicer, fancier, more accurate can come later.

@dm17
Copy link
Author

dm17 commented Sep 20, 2024

Right and the only thing I care about typically is one of the GPUs memclock and temp. There's an amdgpu bug where it gets suck at full clock for no reason and can overheat. I suppose it is best to write a script that monitors that... I wanted to mention nvtop because it is the only GPU monitor I've used in Linux that detects all GPUs correctly so far, including multiple (and all brands so far). And so if there's a way to not double its efforts in BTOP and use its libs somehow, then great...

@aristocratos
Copy link
Owner

Added in commit 24fc97c

@dontknowhy
Copy link

Added in commit 24fc97c

@aristocratos
It works for me.
But why I need to give it my root permission to see my GPU usage?
Is there any way to use it without root?

@aristocratos
Copy link
Owner

@dontknowhy
Because the user you are launching btop with doesn't have permission to read SYSFS.

You can either check documentation for your distribution how to fix that.
Or try with sudo setcap cap_perfmon=+ep /usr/local/bin/btop (replace the path with your path to btop).

This will be explained in the documentation when I create a new release, and will add a option to the Makefile make setcap that will do that for you.

@dontknowhy
Copy link

@dontknowhy
Because the user you are launching btop with doesn't have permission to read SYSFS.

You can either check documentation for your distribution how to fix that.
Or try with sudo setcap cap_perfmon=+ep /usr/local/bin/btop (replace the path with your path to btop).

This will be explained in the documentation when I create a new release, and will add a option to the Makefile make setcap that will do that for you.

Now it works.
:)

@FranMUex
Copy link

Mine only shows gpu usage, but not it's frequency or power usage, even when running as root
dom 22 sep 2024 12:14:20 CEST

@dontknowhy
Copy link

Mine only shows gpu usage, but not it's frequency or power usage, even when running as root
dom 22 sep 2024 12:14:20 CEST

Try to restart it.
Because mine didn't show up in her first time.

@aristocratos
Copy link
Owner

Only utilization, watt and clockspeed is supported for Intel, same as intel_gpu_top.

Open up the GPU box to see clocks, '5' key if you only got 1 gpu.

@FranMUex
Copy link

Oh, thanks, I thought it was supposed to show in the CPU box.

@aristocratos
Copy link
Owner

Added in release v1.4.0

@notorand-it
Copy link

notorand-it commented Sep 22, 2024

Super! It works on ArchLinux!

Maybe the Watt reading need some polishing as it shows 0... But this is not the final goal, it's a start line!
Kudos!

SHOT-20240922-224127+0200

[UPDATE]
I could see something larger than 0W at some point.

@matthenning
Copy link

Can confirm. GPU usage including power draw works on Arch. Thank you!

@notorand-it
Copy link

SHOT-20240923-183201+0200

Also GPU "ad hoc" panel works nice!

@7system7
Copy link

I upgraded, but sadly it does not work here. 😢

Pasted image (2)

@notorand-it
Copy link

Have you "fixed"other permissions with sudo?

(Read above)

@7system7
Copy link

Nope. But after the permissions added, it just works. Thank you and sorry to not read the thread completely. 🥳

@dontknowhy
Copy link

dontknowhy commented Sep 30, 2024

btop version: 1.4.0+2e7208d
Compiled with: c++ (14.2.0)
Configured with: cmake -DBTOP_STATIC=OFF -DBTOP_USE_MOLD=OFF -DBTOP_FORTIFY=ON -DBTOP_GPU=ON
 ❯ sudo getcap btop                
btop cap_perfmon=eip

Screenshot_20240930_213930
I'm sorry. But it looks like somebody did some nasty things...
Edit: That Kylin 9000s is a custom CPU name, not a bug.

@1nv3n7or
Copy link

1nv3n7or commented Jan 4, 2025

Gonna save some time for future generations

As it seams, apt has old version of btop 1.2

You need to install it from sourse or use homebrew

In mine case brew has same 1.4 version as in repo at the time

Using homebrew

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install btop

brew install btop

Find path to btop

which btop

# /home/linuxbrew/.linuxbrew/bin/btop

Find actual path

readlink -f /home/linuxbrew/.linuxbrew/bin/btop
# /home/linuxbrew/.linuxbrew/Cellar/btop/1.4.0/bin/btop

Use actual path to fix permissions

sudo setcap cap_perfmon=+ep /home/linuxbrew/.linuxbrew/Cellar/btop/1.4.0/bin/btop

Now should be fine:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests