prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
7.4k stars 863 forks source link

gpuinfo not working #225

Closed b3m17 closed 1 year ago

b3m17 commented 1 year ago

230917_09h49m46s_screenshot

230917_09h57m52s_screenshot

Is there supposed to be a package I have to install first in order for this to work?

prasanthrangan commented 1 year ago

hmm no, as you have amd gpu, the nvidia packages are not expected to be installed, so the script should be detecting it... This is a bug...

SketchyStunts commented 1 year ago

I'm getting this. 230917_06h10m39s_screenshot Do I need the AMD-Pro drivers? Not showing in Waybar just CPU & Memory

katsuja commented 1 year ago

AMD-Pro drivers

It doesn't work for me either. I also tried with AMD-Pro drivers with the same result. I then returned to the open amd drivers. 230917_15h18m36s_screenshot

230917_15h20m47s_screenshot

T-Crypt commented 1 year ago

I can fix this tomorrow morning. — looks like the AMD gpu_info is probably grabbing from the wrong location.

I don’t have a AMD GPU to verify but I can do a script refresh tomorrow.

T-Crypt commented 1 year ago

Sorry -- Family emergency yesterday.. Working on this now

b3m17 commented 1 year ago

Sorry -- Family emergency yesterday.. Working on this now

Hey it's okay, man. Take your time. I hope everything turns out alright for you and your family.

prasanthrangan commented 1 year ago

Sorry -- Family emergency yesterday.. Working on this now

Relax brother, take care of yourself and family...

T-Crypt commented 1 year ago

I'm almost done! This was more work than I thought lol -- but im about to submit my PR

**DONE

katsuja commented 1 year ago

I'm almost done! This was more work than I thought lol -- but im about to submit my PR

**DONE

I just updated to your commit and get this result: 230919_21h58m21s_screenshot

T-Crypt commented 1 year ago

Do you have an AMD integrated?

Running into a lot of road blocks on the ability to get a grepable output for the AMD integrated -- may be the same for the intel gpu -- haven't tested yet

katsuja commented 1 year ago

Do you have an AMD integrated?

Running into a lot of road blocks on the ability to get a grepable output for the AMD integrated -- may be the same for the intel gpu -- haven't tested yet

Yes I have an integrated AMD on an laptop serface 4 AMD

❯ lspci -v | grep -A 12 "VGA controller" 03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev e3) (prog-if 00 [VGA controller]) Subsystem: Microsoft Corporation Renoir Flags: bus master, fast devsel, latency 0, IRQ 47 Memory at 2b0000000 (64-bit, prefetchable) [size=256M] Memory at 2c0000000 (64-bit, prefetchable) [size=2M] I/O ports at 1000 [size=256] Memory at f1300000 (32-bit, non-prefetchable) [size=512K] Capabilities: Kernel driver in use: amdgpu Kernel modules: amdgpu

03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller

T-Crypt commented 1 year ago

https://github.com/Umio-Yasuno/amdgpu_top

im working on integrating this package into the script as its the only greppable format cli tool for amd gpu's that i've found

amdgpu_top -J and -d >>> puts in json format or dumps. Need a little time to dial it in!!

b3m17 commented 1 year ago

Here's the result on my end

230920_09h54m28s_screenshot

katsuja commented 1 year ago

Do you have an AMD integrated?

Running into a lot of road blocks on the ability to get a grepable output for the AMD integrated -- may be the same for the intel gpu -- haven't tested yet

I also get the same result on the desktop with discrete AMD GPU: 230920_13h54m09s_screenshot If you want I can act as a guinea pig with the desktop. Maybe I'll sell the laptop today :)

T-Crypt commented 1 year ago

Can you go to my repo and clone and run the install script so I don't have to open a PR until it is ready?

I have updated the script to use amdgpu_top and formatted the output similar to the nvidia-smi output.

REPO: https://github.com/T-Crypt/hyprdots

Note: as I test you will see commits so you may need to do a git pull after verifying you have the most recent commits i have made.

T-Crypt commented 1 year ago

for first use make sure to run ./gpuinfo.sh and it will install the needed packages.

katsuja commented 1 year ago

for first use make sure to run ./gpuinfo.sh and it will install the needed packages.

I get this: 230920_18h53m14s_screenshot

230920_18h56m34s_screenshot

T-Crypt commented 1 year ago

Do you get an ouput with running amdgpu_top -d

That doesn't look like the updated script, output should be: 230920_11h28m42s_screenshot

T-Crypt commented 1 year ago

These commands should net these results:

230920_11h35m51s_screenshot

katsuja commented 1 year ago

230920_19h46m45s_screenshot 230920_19h46m55s_screenshot

T-Crypt commented 1 year ago

Okay working on adding debugging statements to see where this is getting caught up.

T-Crypt commented 1 year ago

Okay try now from my commit - 9 minutes ago.

** Now im getting some odd error where the gpu status isn't even showing.

katsuja commented 1 year ago

230920_23h02m03s_screenshot

SketchyStunts commented 1 year ago

@T-Crypt tried your gpuinfo.sh with 6800XT & it now show in waybar but no temp or power 230921_05h59m34s_screenshot But running amdgpu_top -d it shows it? 230921_06h04m06s_screenshot I'll also check on my laptop when I get to work with integrated AMD

T-Crypt commented 1 year ago

Yeah I need to refine the script today / tomorrow to get this working. I've got mostly there -- When I actually echo the $gpu_info_amd -- it seems to produce the output for the script but for some reason messes up the whole waybar gpu module as I believe the output is not formatted correctly in "json" like the gpuinfo.jsonc has it formatted.

I apologize for the issues guys, working hard on getting this to work for AMD gpu's and integrated as well -- seems nvidia was straight forward were as AMD wants me to jump through hoops for the needed stats.

prasanthrangan commented 1 year ago

Thank you bro, I think amd should be straight forward without the amd_top, you could try these files. Please lemme know if you need anything from me

T-Crypt commented 1 year ago

Thank you bro, I think amd should be straight forward without the amd_top, you could try these files. Please lemme know if you need anything from me

I looked into this yesterday and thats what I was going to try this morning -- It just has to have a lot of conversion to the right metrics and converting the output to the same format as the nvidia -- the only one that gives a straight result no conversion needed is the

cat /sys/class/drm/card0/device/gpu_busy_percent

prasanthrangan commented 1 year ago

cool, there is also this nvtop... I've not tried this, but you can check it out if you find it useful... it shows gpu info for all nvidia/intel/amd cards.

There is also python libraries available from gpu vendors that can be used in a python script to fetch the gpu info.. i might mess around with it later when i get some time!

T-Crypt commented 1 year ago

I updated the script

https://github.com/T-Crypt/hyprdots/blob/main/Configs/.config/hypr/scripts/gpuinfo.sh

my next option is like you said python libraries:

  1. https://pypi.org/project/amdgpu-stats/
  2. https://pypi.org/project/pyamdgpuinfo/
T-Crypt commented 1 year ago

I've got it working with Python!!

Now I just need to modify the original script to call for this in:

amd_info=$(python3 ~/.config/hypr/scripts/amdgpu.py)

230921_11h44m06s_screenshot

**UPDATE: can one of you try with your AMD gpu to the updated commits?

katsuja commented 1 year ago

No icon in waybar after reboot. What you see is the CPU temperature (screenshot). Now the shell shows signs of life :) When I launch the script from the terminal it always reinstalls python-pyamdgpuinfo then prints the output (screenshot)

230921_22h46m31s_screenshot 230921_22h46m52s_screenshot

T-Crypt commented 1 year ago

Okay I removed the install function and placed python-pyamdgpuinfo in custom_hypr.lst so it doesn't try to reinstall over and over.

Should be installed when you run ./install.sh and then that way the package is already installed on first boot and not when the script is triggered.

katsuja commented 1 year ago

Works! Thank you :) 230922_14h00m17s_screenshot

T-Crypt commented 1 year ago

Ill fix the MHz / GHz format today so that is resolved!!

Finally got this working -- Makes me happy!

katsuja commented 1 year ago

Ill fix the MHz / GHz format today so that is resolved!!

Finally got this working -- Makes me happy!

good job !!!

katsuja commented 1 year ago

If it's not a problem, I would like to point out that there are problems with Intel GPUs too: 230922_16h28m54s_screenshot 230922_16h29m26s_screenshot

T-Crypt commented 1 year ago

Yeah -- that's the next hurdle for today's resolve!!

Ill work on this now, it may require python as well to integrate the results.

katsuja commented 1 year ago

I noticed it now that there are both Mhz and Ghz units :)

katsuja commented 1 year ago

ok! I am available in case of testing.

T-Crypt commented 1 year ago

I noticed it now that there are both Mhz and Ghz units :)

I updated this in the pull request -- just need to update to the latest commit :)

T-Crypt commented 1 year ago

Can you do me a favor and use this command and paste your output? I dont have an intel device to test on with arch or linux --- Just WSL :( my main is a nvidia and AMD apu

only on your intel igpu device!

run this in terminal

sensors

katsuja commented 1 year ago

I noticed that it doesn't reveal the intel gpu temp. I did not notice that. I installed arch linux on this laptop yesterday To you. Anyway, here's the output: 230922_16h51m28s_screenshot

katsuja commented 1 year ago

Now I have to go out. Later :)

T-Crypt commented 1 year ago

I need someone to run this with a intel integrated GPU

yes | sudo sensors-detect

and then paste the output of the command below in here:

sensors

katsuja commented 1 year ago

I ran "yes | sudo sensors-detect" but it doesn't reveal the igpu temp. I'll look around to see if I can find a solution for this damn sensor. :) 230922_17h57m58s_screenshot

T-Crypt commented 1 year ago

I think its because its handled with a ACPI sensor..

this one is a little more complicated -- may just need to use the coretemp

refernce: https://www.linuxquestions.org/questions/linux-software-2/lm-sensors-does-not-detect-intel-gpu-4175585339/

katsuja commented 1 year ago

CPU and GPU temperatures are the same thing, they both live on the same piece of silicon. (quote https://bbs.archlinux.org/viewtopic.php?id=223852) Is flawless

T-Crypt commented 1 year ago

CPU and GPU temperatures are the same thing, they both live on the same piece of silicon. (quote https://bbs.archlinux.org/viewtopic.php?id=223852) Is flawless

I think it is fair to say that for Intel igpu's the coretemp of the CPU package ID 0: will most likely be 5°C higher or lower than the igpu sensor temp. Of course, only to a degree as the proximity would necessarily even things out, but still they can heat up differently.

For now you can at least monitor the whole package temp with this updated script in my test branch! You want to download this script and run this on your intel machine to see what result you get?

https://github.com/T-Crypt/hyprdots/blob/test/Configs/.config/hypr/scripts/gpuinfo.sh

katsuja commented 1 year ago

ok I'll try now

katsuja commented 1 year ago

230922_18h59m57s_screenshot