Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

Hi, here's the TL;DR:

I need to reduce the power limit of my crusty old AMD Radeon R9 280 to prevent overheating just like I could do in Windows OSes using the AMD Radeon Software. The picture below shows exactly what I mean:
Image

I just need to know how to change the setting labeled "Power Tuning" in that GUI. (Edit.: I DON'T NEED OR CARE FOR THE GUI. Just changing the power consumption limit will do.)

Context:
I am completely new to Linux Mint and it's been a lot of trouble to do (and fix) anything hardware related (except sound now that I think of it). It's now the second week-end I spend fully trying to make things work using a live USB because I am still evaluating if I can do everything important I can already do in Windows 10. Trying to find any software that can do sometimes basic functions - and actually work - has been a challenge on its own.
So I was very happy to discover that I don't need any extra piece of software to change the fan speed of my GPU: I just need to edit the files pwm1 and pwm1_enable both in directory /sys/class/drm/card0/device/hwmon/hwmon0/.
But with respect to the power consumption, I have no clue where that would be. Engine searches are all unhelpful, the ArchLinux wiki doesn't seem to know either and the search for the keyword "power" in the directory "card0" returns hundreds of results without particularly distinctive names ! With the fan control, it's very obvious I am doing it right since I can hear it ! I can't do that with power and I presume it's extremely dangerous to mess with any of the files with the word "power" in the name anyway.

I'm starting to really like where Linux is going and I hope my performance benchmarks with the default radeon driver under Linux will be at least on par with those of Windows with the proprietary drivers. The more I did searches, the more I dread having to uninstall included drivers and install proprietary ones instead all under Linux so I hope that won't be necessary.

P.S. The Software Manager also only returned trash or the driver already installed.
Last edited by MLG-443 on Mon Mar 25, 2024 6:05 am, edited 2 times in total.
seasons
Level 4
Level 4
Posts: 373
Joined: Fri Nov 17, 2023 5:00 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by seasons »

Look in /sys/class/drm/card0/device/hwmon/ (might be another hwmon subdirectory) for a file(s) called:
power1_cap
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by Hoser Rob »

I'd be looking for kernel parameters rather than files to be modified but there's not much here: https://wiki.archlinux.org/title/ATI

You definitely are not going to get anything like that screenshot from Windows in Linux.

Paste the text output of

Code: Select all

inxi -G
from the terminal to confirm you're really using the radeon driver, which after a little searching I think is right. There aren't going to be any proprietary drivers for a card running the radeon driver, that's all that's available.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

Here's the inxi -Gxxx instead :)

Code: Select all

root@mint:~/Unigine_Heaven-4.0# inxi -Gxxx
Graphics:
  Device-1: AMD Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
    vendor: Micro-Star MSI driver: radeon v: kernel pcie: speed: 5 GT/s
    lanes: 16 ports: active: HDMI-A-1 empty: DP-1,DP-2,DVI-I-1
    bus-ID: 01:00.0 chip-ID: 1002:679a class-ID: 0300
  Display: server: X.Org v: 1.21.1.4 driver: X: loaded: ati,radeon
    unloaded: fbdev,modesetting,vesa gpu: radeon display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x572mm (40.0x22.5")
    s-diag: 1166mm (45.9")
  Monitor-1: HDMI-0 mapped: HDMI-A-1 model: Asus PB287Q serial: 110111
    res: 3840x2160 hz: 30 dpi: 157 size: 621x341mm (24.4x13.4")
    diag: 708mm (27.9") modes: max: 3840x2160 min: 720x400
  OpenGL: renderer: TAHITI ( LLVM 15.0.7 DRM 2.50 5.15.0-91-generic)
    v: 4.5 Mesa 23.0.4-0ubuntu1~22.04.1 direct render: Yes
Don't mind the odd resolution/refresh rate. It's because the display port is used by another (more important) computer.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

seasons wrote: Sun Mar 24, 2024 1:21 pm Look in /sys/class/drm/card0/device/hwmon/ (might be another hwmon subdirectory) for a file(s) called:
power1_cap
I just did a GUI search for the expression "power*" in that exact directory and got a shitload of "power" folders, "power" files, "power_caps" files and "power state" files but interestingly enough, I also got these results:

power1_crit
power1_input
power_dpm_force_performance_level
power_dpm_state
power_method
power_off_acct x2
power_on_acct x2
power_profile
power_save
power_save_controller

I have the impression that it might be the first one that I am looking for but it's probably very dangerous to mess with it without knowing. Can I have confirmation ?

Edit: Only ONE result returned by google search for "power1_crit" and it's not particularly relevant... :/
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by SMG »

MLG-443 wrote: Sun Mar 24, 2024 12:49 amI need to reduce the power limit of my crusty old AMD Radeon R9 280 to prevent overheating just like I could do in Windows OSes using the AMD Radeon Software.
I'm not sure why you think you need to exactly duplicate what you were doing in Windows, but Tahiti is GCN1.0+ which has experimental support for amdgpu through the use of kernel parameters. You do not need to be using the radeon driver and you do not need to be installing proprietary drivers.

Linux Mint is not a free version of Windows. It is a different operating system. That means you should expect you will need to learn something new. Instead of trying to duplicate Windows on Linux Mint, you might want to just consider optimizing Linux Mint.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

SMG wrote: Sun Mar 24, 2024 5:57 pm
MLG-443 wrote: Sun Mar 24, 2024 12:49 amI need to reduce the power limit of my crusty old AMD Radeon R9 280 to prevent overheating just like I could do in Windows OSes using the AMD Radeon Software.
I'm not sure why you think you need to exactly duplicate what you were doing in Windows, but Tahiti is GCN1.0+ which has experimental support for amdgpu through the use of kernel parameters. You do not need to be using the radeon driver and you do not need to be installing proprietary drivers.

Linux Mint is not a free version of Windows. It is a different operating system. That means you should expect you will need to learn something new. Instead of trying to duplicate Windows on Linux Mint, you might want to just consider optimizing Linux Mint.
I'm not aiming to replicate the whole GUI ! I just want control over the power consumption of my graphic card. The picture is there just to make sure there is not a hint of confusion as to was parameter I am trying to change.

BTW, I did more recursive directory searches and checked the content of a whole bunch of files with the word power in their names and so far, it looks like /sys/class/drm/card0/device/hwmon/hwmon0/subsystem/hwmon1/power1_crit is the one I am looking for based on the content but I am worried I might destroy something since I don't really know what it is doing or what I am messing with here.

There is one numeric value inside that "file" (94992187) and it looks like it *could* be a power figure in microwatts but I know R9 280s are much more power hungry graphic cards at stock: https://www.techpowerup.com/gpu-specs/r ... -280.c2405
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by SMG »

MLG-443 wrote: Sun Mar 24, 2024 6:11 pmI'm not aiming to replicate the whole GUI ! I just want control over the power consumption of my graphic card.
You just assume you can control things better than the Linux kernel and AMD engineers can. Maybe you can. However, I don't see where you posted any data to 1) indicate there is a problem and 2) know if there is a difference when using the radeon driver versus the amdgpu driver.

Please open the System Reports app and click the System Information tab on the left. Your computer's information should come up in the right pane. Then click the Copy button in the lower right and paste the results into a reply window here so we can see how Linux Mint views your hardware.

I personally don't mess with trying to overrule what the engineers have designed to be done so I cannot help you with your request.

Here is the ArchLinux wiki for amdgpu. Tahiti is "Southern Islands" generation.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

SMG wrote: Sun Mar 24, 2024 6:21 pm You just assume you can control things better than the Linux kernel and AMD engineers can.
First of all, I don't ASSUME shit ! I've been living with this video card for a full decade now and I know it's overheating horribly if left to its default settings while playing 3D (exceeding 100 Celsius in a matter of minutes). Second, I'm not acting or pretending or thinking I am better than AMD engineers just because I need to tweak something THAT IS TWEAKABLE WITH A WINDOWS SOFTWARE. It could just be that my unit is just bad and more leaky than the average R9 280, that doesn't make the default settings of R9 280s in general wrong and neither does it mean I shouldn't adjust it down for my unit specifically.
SMG wrote: Sun Mar 24, 2024 6:21 pm However, I don't see where you posted any data to 1) indicate there is a problem and 2) know if there is a difference when using the radeon driver versus the amdgpu driver.
What ? You want proof it's overheating now ? What is this ? Last time I checked, this is a forum thread and we are not here to publish scientific papers. I'm not going to go through the hassle of figuring out what video capture software to use and how to install it under Linux Mint just to show it to you. Why can't you just take my word for it ? Isn't that a common problem to have video cards overheat for time to time ? Especially if they are 10 years old ?

Additionally, the overheating problem has nothing to do with the OS used. The problem is exactly the same under windows and proprietary drivers.
SMG wrote: Sun Mar 24, 2024 6:21 pm I personally don't mess with trying to overrule what the engineers have designed to be done...
Then that's the end of the line... and a VERY strange thing to post for a Linux user. Isn't it what ALL Linux Nerds and their whole culture is about ? Tinkering and improving stuff ? I'm seriously disappointed.
SMG wrote: Sun Mar 24, 2024 6:21 pm Here is the ArchLinux wiki for amdgpu. Tahiti is "Southern Islands" generation.
I already have this exact page opened for two days... I don't have the same settings anyway on my GPU.
seasons
Level 4
Level 4
Posts: 373
Joined: Fri Nov 17, 2023 5:00 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by seasons »

The answer is in the link SMG gave you. (Oh, and please don't abuse SMG.)
Make sure you have the right card and hwmon number. The Wattage is in microWatts (so add 6 zeroes). For example, for 50W:

Code: Select all

echo "50000000" | sudo tee /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap
power1_cap_min: minimum cap supported in microWatts
power1_cap_max: maximum cap supported in microWatts
power1_cap: selected power cap in microWatts
-- https://www.kernel.org/doc/html/latest/ ... ermal.html

AMD itself does not have a central GUI utility for the opensource Linux drivers like they do on Windows. If you want a power GUI somewhat like Windows, there are 3rd party utilities, like CoreCtrl: https://gitlab.com/corectrl/corectrl/-/ ... type=heads
IIRC, CoreCtrl 1.3.9 is the last version that works with Mint 21.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

It started as just an impression so I kept it to myself but now I am really starting to think a lot of you don't even read half of what I said.

A. Idgaf about the GUI itself. I just need control over the power consumption
and B. I already searched for "power1_cap*" a long time ago and said so in this very thread ! It seems to not exist for this graphics card. Maybe it's too old and thus have different register field names ?

P.S. I have a few leads to investigate further this issue but I will tell all about it later because it's Monday and I have to get to work....
seasons
Level 4
Level 4
Posts: 373
Joined: Fri Nov 17, 2023 5:00 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by seasons »

MLG-443 wrote: Mon Mar 25, 2024 5:59 am I am really starting to think a lot of you don't even read half of what I said. ... I already searched for "power1_cap*" a long time ago and said so in this very thread !
You also "got a shitload of ... "power_caps" files in your search. Maybe it's not power1_cap because you are using older radeon module.
It seems to not exist for this graphics card. Maybe it's too old and thus have different register field names ?
Then maybe you should you try Corectrl. Or maybe you should switch to newer amdgpu module like SMG said. I am really starting to think you don't even read half of what we tell you.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

I am really starting to think you don't even read half of what we tell you.
Feel free to snarkily challenge me on any of that all you want. I did read everything. In fact, the reason why power_caps just aren't it is because as I specified earlier, only the "file" power1_crit appears to contain a value resembling the microwatts figure we are looking for.

To be more explicit than previously, when I said "checked the content of a whole bunch of files with the word power in their names", that included "power_caps" files which contain a DWORD written in hexadecimal if you are interested. Additionally, I kept the built-in radeon driver over the proprietary AMD GPU driver because the latter is nearly ten years old (https://www2.ati.com/drivers/linux/rade ... 97685e.zip) for linux platforms. I am being told everywhere that AMD cards have really good support for Linux and that the built-in driver is especially recommended for radeon cards so I steered clear so far from this proprietary driver. Furthermore, given how much it seems to be a nightmare to replace graphic card drivers under linux I would put that as a last resort. I'd like to try any other of my leads before that one. Right now it's lunch break and I have to go back to work so we'll see maybe tonight.

Moreover, when you say amdgpu "module", did you mean "driver" ?

So in the meanwhile, I'd like to leave it up to you and SMG to actually read what I typed in full if you are now more inclined to before making disparaging assumptions about my character.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by SMG »

MLG-443 wrote: Sun Mar 24, 2024 7:06 pmAdditionally, I kept the built-in radeon driver over the proprietary AMD GPU driver because the latter is nearly ten years old (https://www2.ati.com/drivers/linux/rade ... 97685e.zip) for linux platforms.
Amdgpu is the current AMD driver and it is not proprietary. Radeon is the driver which is many years old.

I have helped plenty of people with GCN1.0+ and GCN2.x architectures and all who game are delighted at the significant performance difference they get when using kernel parameters to enable the amdgpu driver to load at boot time. I personally do not recommend anyone who games to use the radeon driver if they have GCN1.0+ and GCN2.x.

This is not an issue of default versus proprietary drivers. These are two different drivers because AMD decided to go the route of no longer supporting radeon with their GPUs and moved to amdgpu.

Both the radeon and amdgpu drivers are in the kernel (ie. not proprietary) and the default is to load the radeon for GCN1.0+ and GCN2.x unless the

Code: Select all

radeon.si_support=0 amdgpu.si_support=1 radeon.cik_support=0 amdgpu.cik_support=1
kernel parameters are used to tell the system to load the amdgpu drivers. In fact, if you check the Xorg log, you will see even if radeon has loaded that the GCN1.0+ and GCN2.x GPUs are capable of using amdgpu.

There are quite a few GPUs which fall into the GCN1.0+ and GCN2.x and I am not going to spend the time to check those to get data for you considering your extreme rudeness in this topic.

Good luck with your quest.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
seasons
Level 4
Level 4
Posts: 373
Joined: Fri Nov 17, 2023 5:00 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by seasons »

EDIT: While I was typing this, SMG gave you an altenative way to do what I did in this post.

If the radeon kernel module does not give you the proper knobs to play with, then you may have to switch over to the amdgpu kernel module, just like I said. You may call it a "driver", but I don't care for that term, because people don't understand the difference between the different types of drivers in Linux (kernel module, X driver, 3D/mesa driver, etc.). So I'm going to use the term module when I'm talking about the kernel module and don't try to snarkily correct me.
I'll make it easy for you since you don't want to read the link you were given.:

Code: Select all

echo "options amdgpu si_support=1" | sudo tee /etc/modprobe.d/amdgpu.conf
echo "options radeon si_support=0" | sudo tee -a /etc/modprobe.d/amdgpu.conf
Reboot. Now you should be using the amdgpu kernel module. If you have problems and want to switch back to radeon, just delete the file you created.

Code: Select all

sudo rm /etc/modprobe.d/amdgpu.conf
DO NOT try to install any proprietary AMD "driver". It will not work on modern versions of Linux/Mint.

And stop sniping at the people trying to help you. I shouldn't have even given you the info in this thread after the way you've acted, but I'm in a good mood, so consider yourself lucky.
MLG-443
Level 1
Level 1
Posts: 8
Joined: Sat Mar 23, 2024 11:56 pm

Re: Where in the file system is the setting to tune the power limit of my old AMD GPU ?

Post by MLG-443 »

seasons wrote: Mon Mar 25, 2024 2:52 pm So I'm going to use the term module when I'm talking about the kernel module and don't try to snarkily correct me.
Sorry for not making it clearer. I wasn't attempting to correct you. I just noticed that you used the word "module" while SMG used the word "driver" for what appeared to be possibly the same thing. I have little experience with anything Linux and I neither knew nor was willing to assume outright these two words could be used interchangeably so I wanted to be sure you two were speaking of the same thing.

Meanwhile, thanks for the confirmation regardless. I do intend to try the amdgpu driver when I'll have more time and once I make a proper install of the linux mint version I have still running on live USB now. I initially thought of evaluating this frankly magnificent OS entirely on live USB before committing to it but it's becoming apparent now that it's rather futile (since reboot is needed) and thus I will have to postpone implementing this solution for another day. It's too late and tomorrow is also going to be a long work day for me. I will provide an update on this issue later.
Post Reply

Return to “Graphics Cards & Monitors”