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

Issue with GPU load #7

Closed
Ahmed-E-86 opened this issue Feb 4, 2020 · 16 comments
Closed

Issue with GPU load #7

Ahmed-E-86 opened this issue Feb 4, 2020 · 16 comments
Labels

Comments

@Ahmed-E-86
Copy link

Ahmed-E-86 commented Feb 4, 2020

GPU load = 0% all the time, and it doesn't change at all.

Darksiders_Genesis

System information:
OS: Kubuntu 19.10 - kernel: 5.3.0-29
GPU: AMD Radeon HD 8750M
CPU: Intel core I5 4200M
Driver: Mesa 20-dev (obiaf ppa)

@flightlessmango
Copy link
Owner

The problem seems to be that /sys/class/drm/card1/device/gpu_busy_percent can't be read.
cat /sys/class/drm/card1/device/gpu_busy_percent
cat: /sys/class/drm/card1/device/gpu_busy_percent: Invalid argument

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

In my case, it doesn't even exist.

cat: /sys/class/drm/card1/device/gpu_busy_percent: No such file or directory

I think it's a tool for AMD GPUs.

I have a Nvidia GPU + Optimus.

edit: tested with the commands from here and I can have the gpu load. Maybe it can help.

Screenshot_20200205_135438

@jackun
Copy link
Collaborator

jackun commented Feb 5, 2020

@NerosTie where did you get MangoHud? It shouldn't go so deep that it complains about gpu_busy_percent, hopefully, and there is no cat .../gpu_busy_percent anymore

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

From AUR on Arch.

@jackun
Copy link
Collaborator

jackun commented Feb 5, 2020

Strange, did you install it just today?

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

Yes, like 1 hour ago.

@jackun
Copy link
Collaborator

jackun commented Feb 5, 2020

Oof, which one? This https://aur.archlinux.org/packages/mangohud ?

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

This one and lib32-mangohud.

@jackun
Copy link
Collaborator

jackun commented Feb 5, 2020

Bizarre. Only cat usage is

src/overlay.cpp:831:      ram =  exec("cat /proc/meminfo...
src/overlay.cpp:833:      cpu =  exec("cat /proc/cpuinfo...
src/overlay.cpp:837:      os = exec("cat /etc/*-release...

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

Because it's a fopen command in a cpp code:
amdGpuFile = fopen((path + "/device/gpu_busy_percent").c_str(), "r");

But it's the case you have an AMD GPU.

For Nvidia:

            if (device_data->gpu_stats) {
              // get gpu usage
              if (device_data->properties.vendorID == 0x10de)
                 pthread_create(&nvidiaSmiThread, NULL, &getNvidiaGpuInfo, NULL);

But I don't know how it works.

edit:

I think it's that thing in cpu_gpu.h that doesn't work:

void *getNvidiaGpuInfo(void *){
    if (!nvmlSuccess)
        checkNvidia();

    if (nvmlSuccess){
        getNvidiaInfo();
        gpuLoad = nvidiaUtilization.gpu;
        gpuTemp = nvidiaTemp;
        gpuMemUsed = nvidiaMemory.used / (1024 * 1024);
    }

    pthread_detach(nvidiaSmiThread);
    return NULL;
}

@jackun
Copy link
Collaborator

jackun commented Feb 5, 2020

Check if libnvidia-ml.so.1 exists. It should be somewhere in /usr/lib/x86_64-linux-gnu/. Could be installed by libnvidia-compute-[some version] package.

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

whereis libnvidia-ml.so.1                                                
libnvidia-ml.so: /usr/lib/libnvidia-ml.so.1 /usr/lib/libnvidia-ml.so

@flightlessmango
Copy link
Owner

@NerosTie what nvidia GPU is it?

@NerosTie
Copy link

NerosTie commented Feb 5, 2020

GeForce GT 730M

@flightlessmango
Copy link
Owner

@NerosTie I think your problem is actually related to #3. The gpu is too old and does not play well with NVML, the solution is probably to implement a separate branch that uses nvctrl instead of NVML

@flightlessmango
Copy link
Owner

I think this issue is more or less 'resolved' as the GPU is not supported. Feel free to open up the issue again if that's not correct

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

No branches or pull requests

4 participants