hannesschulze / optimizer

Find out what's eating up your system resources and delete unnecessary files from your disk.
GNU General Public License v3.0
50 stars 11 forks source link

Nvidia support #76

Closed msmaldi closed 4 years ago

msmaldi commented 4 years ago

NVidia support.

Still running without nvidia cards without the functionality.

hannesschulze commented 4 years ago

Alright, thank you! Sorry for not being available last week. I'm going to merge this PR for now. There are a few problems I personally have. I think after these are fixed, this can also be merged into master:

If you have any hints or suggestions, feel free to leave them here – I am not really experienced with this kind of hardware interaction.

msmaldi commented 4 years ago

I'm sorry for my english, I'm brazilian.

Can you run radeontop without root?

I think we need try a pseudo code...

include int main () { init_pci(params....);

collect(ticks, dumpinterval);

// result is declared in radeontop.h,
// This does not need to be atomic. A delay here is acceptable.

while(!results) usleep(16000);

// https://github.com/clbr/radeontop/blob/master/ui.c
float k = 1.0f / ticks / dumpinterval;

float gui = 100 results->gui k;

printright(2, hw, _("Graphics pipe %6.2f%%"), gui);

...

}