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

[REQUEST] Avoid waking up Nvidia discrete GPUs #738

Open
UltimateBoomer opened this issue Jan 27, 2024 · 3 comments
Open

[REQUEST] Avoid waking up Nvidia discrete GPUs #738

UltimateBoomer opened this issue Jan 27, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@UltimateBoomer
Copy link

Is your feature request related to a problem? Please describe.
On laptops with Nvidia discrete GPUs that has been set up to enter d3cold power state when idle, running btop will cause the discrete GPU to wake up, and also make btop show a blank screen a few seconds.

Describe the solution you'd like
Btop should check if the GPU is in an idle power state before polling its stats. I think this should be possible by reading /sys/class/drm/card*/device/power_state, which will provide the power state of the GPU without waking it up. If the GPU is not in d0, then the GPU monitoring bar should show that the GPU is sleeping.

Describe alternatives you've considered
Btop has the functionality to hide GPU stats with the "show GPU info" option, but this doesn't actually disable GPU monitoring and thus leads to the same issue. The only way to work around this issue I found is to compile btop without GPU monitoring.

Additional context
I tested this on a laptop with Intel i7-11800H and Nvidia RTX 3060.

@UltimateBoomer UltimateBoomer added the enhancement New feature or request label Jan 27, 2024
@LnLcFlx
Copy link

LnLcFlx commented Feb 3, 2024

I'd like this feature very much!

Also, if "show gpu info" is off, the gpu goes back to sleep after btop is startet.
So apparently it only accesses the gpu once at the beginning.
And after the gpu is back to sleep, closing btop has a similar delay to starting btop starts when it wakes up the gpu.

@rigel314
Copy link

rigel314 commented Jul 6, 2024

I have the same problem with the AMD discrete GPU on my laptop. My current workaround is to have a custom wrapper around the (amd gpu specific) librocm_smi64.so library which lies to btop and tells it there's only one GPU. This wakes up the dGPU briefly, but then it goes back to sleep shortly, while btop continues to run.

@cugola
Copy link

cugola commented Nov 21, 2024

Same issue and same request here. This missing "feature" made me going back to bpytop (sigh).

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

5 participants