cosmic-applets icon indicating copy to clipboard operation
cosmic-applets copied to clipboard

cosmic-applet-battery: Discrete GPU info doesn't show which apps are using the dGPU (AMD + AMD)

Open ryanabx opened this issue 10 months ago • 1 comments

On my AMD + AMD system, I don't get a list of apps that are using the dGPU. This could possibly be an upstream issue for whatever library is being used to get the info in the first place

screenshot-2024-04-17-01-27-44

ryanabx avatar Apr 17 '24 01:04 ryanabx

We don't use a library, the code we use to get this information is here: https://github.com/pop-os/cosmic-applets/blob/master/cosmic-applet-battery/src/dgpu.rs#L182-L295

The issue most likely comes down to permissions. You can't list root processes using the gpu easily for non-nvidia gpus, without some root-daemon running in the background. (There are plans to move this into system76-power to provide the necessary access, but nothing has been done on that front.)

Additionally depending on your system, it might be, that your GPU simply never goes into D3 sleep mode, even if nothing is actively using that. (The code to check this is here: https://github.com/pop-os/cosmic-applets/blob/master/cosmic-applet-battery/src/dgpu.rs#L67-L93)

(Those might also be firmware bugs, I have a laptop with an nvidia gpu, that refuses to go to sleep once an external display was connected to it until I reboot the whole machine..)

Drakulix avatar Apr 17 '24 09:04 Drakulix