You are not logged in.

#1 2017-02-24 23:42:31

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

[SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Hello,

I'm trying to get my gpu load and frequencies to display on Conky. I already found one command that gives me this info but it depends on the usage of sudo, which stops it from working on conky, at least I can't do it. This is the command

sudo cat /sys/kernel/debug/dri/64/amdgpu_pm_info

I do know how to combine it with grep and cut to get the info I need the problem being the usage of sudo. Is there any other command or a way to use sudo with conky?

Thanks in advance.

Last edited by marcelo1401 (2017-03-01 13:09:48)

Offline

#2 2017-02-25 11:40:55

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Either change the permissions on the file so that it can be read by a non-root user, or add an entry to sudoers so you can run the command without a password.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-02-25 13:37:31

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

I might do that but is there any other way of doing this? Is there a program/command that can give this info without having to be root?

Offline

#4 2017-02-25 17:00:26

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

If you are using open source drivers there may be.

mesa can provide a HUD for gallium drivers and also supply the data to lm-sensors .
currently only mesa-git from LordHeavy's mesa-git repo is build with those options.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2017-02-26 16:20:25

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Lone_Wolf wrote:

mesa can provide a HUD for gallium drivers and also supply the data to lm-sensors .
currently only mesa-git from LordHeavy's mesa-git repo is build with those options.

Do you know when this will enter mesa stable version? I might end up using slithery's solution and waiting for this to be merged to mesa stable.

Offline

#6 2017-02-27 00:46:41

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

These are the permissions on the file that has the info I want:

-r--r--r-- 1 root root 0 Feb 26 15:59 amdgpu_pm_info

Considering that all users have read permissions, shouldn't I be able to read it without having to be root? What permissions would I need to set to be able to do what I need? Do I need to change the owner/group?

Last edited by marcelo1401 (2017-02-27 00:54:53)

Offline

#7 2017-02-27 01:21:04

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Tried changing the owner to myself without any luck, still need to be root. Also tried looking at /sys/class/hwmon/hwmon3 (which I found out refers to my gpu) but didn't find a file that gives the load. My question is: isn't this the directory lm_sensors uses to get the info it displays? If so, considering that lm_sensors doens't show gpu load, I shouldn't find the info I want here, right?

Offline

#8 2017-02-27 11:38:15

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

/sys/kernel/debug/ is a pseudo-filesystem that is only accessible by root afaik.


I have not seen any posts from people using those new mesa options, i suggest you try them to see if they can provide what you need.
If they do, there's a clear use case for them and you could create a feature request to get them in arch stable mesa.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2017-02-27 13:49:59

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Lone_Wolf do you know how to enable the HUD? I think I installed the right package. Followed this link mesa-git - latest videodrivers & issues. Can't find info on how to enable the HUD.

Last edited by marcelo1401 (2017-02-27 13:51:07)

Offline

#10 2017-02-27 14:13:49

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Looks like you configure/enable the gallium-hud through environment variables ( 5 of them) ,

check https://www.mesa3d.org/envvars.html , search for GALLIUM_HUD


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#11 2017-02-27 14:24:14

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Yup, thanks. Found out allready how to enable it already. Now just have to find how to integrate it with conky smile

Offline

#12 2017-02-27 21:47:03

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

As I said, I already found out how to have it display what I want over a game. The only thing I need now is how to supply this info to lm_sensors. Any idea? Been searching for a solution with no success. Btw, thanks for your help so far.

Offline

#13 2017-02-27 23:07:06

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

have you run the sensors-detect part of lm_sensors?

Offline

#14 2017-02-28 00:09:44

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Yes. Still no luck

Offline

#15 2017-02-28 12:00:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

I've looked into mesa sourcecode and it seems --enable-lmsensors allows the gallium HUD to use stuff already exposed by libsensors library instead of the other way around.

Sorry, no idea how to continue.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#16 2017-02-28 14:22:27

marcelo1401
Member
Registered: 2016-11-06
Posts: 22

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

Couldn't find an answer either. But the HUD serves my purpose even better so I'll mark this as solved (kind of) and if I happen to find an answer I'll post it somewhere in the forums. I'd still like to have at least frequencies show up on Conky. Btw, the HUD actually works on regular mesa from extra/multilib.

[marcelo@archlinux ~]$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD POLARIS10 (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.0
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

As you can see I'm running a stable version of mesa and I tried setting the environment variable to show gpu load graph and it actually worked. It may be because of residual bits from LH's mesa-git but I dont think so. There's no need to ask for it to be merged to mesa stable then. You can see here that there's no git packages relating to mesa on my system (at least I think this lists them all)

[marcelo@archlinux ~]$ pacman -Q | grep mesa
lib32-mesa 17.0.0-2
lib32-mesa-libgl 17.0.0-2
mesa 17.0.0-2
mesa-demos 8.3.0-2
mesa-libgl 17.0.0-2

Thanks for all you guys' help

NOTE: If you think I should mark this as anything else than solved please let me know.

Last edited by marcelo1401 (2017-02-28 14:27:41)

Offline

#17 2017-03-01 11:52:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]AMDGPU + Conky: Getting gpu load and frequencies

I checked and it does seem like gallium_hud functionality is enabled by default in mesa.

Those 2 configure options just add extra features.

Edit :
you found a way to get what you want, even if it isn't through conky.
Solved does seem appropriate.

Last edited by Lone_Wolf (2017-03-01 11:54:51)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB