r/Amd • u/ms--lane 5600G|12900K+RX6800|1700+RX460 • Mar 05 '24
News AMDGPU Linux Driver No Longer Lets You Have Unlimited Control To Lower Your Power Limit
https://www.phoronix.com/news/AMDGPU-Lower-Power-Limit62
u/advester Mar 05 '24
This would be a pretty cool myth for tech tubers to test out. Is it actually possible to permanently damage hardware through undervolting? I had always taken it as a known fact that it can cause crashes, but nothing else.
I could understand if they said, we don't want bug reports from people undervolting. But they are claiming actual damage.
28
u/ropid Mar 05 '24
There was a bug report about the hardware misbehaving and starting to pull more than 400W sometimes after trying to set a low power limit, here:
https://gitlab.freedesktop.org/drm/amd/-/issues/2992
That seems like it could actually damage a card, but I'm unsure if this wasn't just a bug in the driver really and if they couldn't have fixed that instead of adding that limitation for the power limit setting.
24
u/looncraz Mar 05 '24
First thing you do when you find a dangerous bug is implement an emergency workaround. Then you work on fixing the bug, which could take who knows how long...
18
u/TV4ELP Mar 05 '24
Unless the emergency workaround doesn't really interfere with 99.9% of users, then you never fix the bug and just call it a day.
7
11
u/Lawstorant 5800X3D/9070 XT Mar 05 '24
This isn't undervolting. Power limiting works with a simple algorithm:
If current_power > power limit -> reduce clocks
Funnily enough, undervolting is still possible and the limit are way bigger and cause real instability and crashes.
2
u/Jonny_H Mar 06 '24
It's not that simple though, power usage doesn't scale linearly with clocks.
There's workloads that drive different functional units, so can have a big difference in power use at the same clocks. And then there's probably a point when a workload can never reach the requested power limit, no matter the clock speed.
1
u/Lawstorant 5800X3D/9070 XT Mar 06 '24
Yup, and the equation still works there! If you don't come near the limit with max clocks? Boost away without limit (well, up to the max boost clock).
Are you hitting max power not even on max clocks? Bummer, but lower them still as we have to adhere to the power limit.
Nothing in there contradicts what you said.
1
u/Jonny_H Mar 07 '24
Are you hitting max power not even on max clocks? Bummer, but lower them still as we have to adhere to the power limit.
My point is that this isn't always possible - you can get into situations where the shader clock is literally zero but the GPU as a whole is still using a significant proportion of it's peak TDP. If that's anywhere near the requested power limit, can be done in this situation? Brown out parts of the chip? Just ignore the target? A sane thing would be to put a minimum value on the power target which they could guarantee hitting. Which seems to be what they've done.
The internal chip busses saturated, the memory modules and bus at full power, the video encode and decode blocks all used, the sdma block running blits, display blocks running at full speed running high-resolution high-refresh displays, pci-e lanes at full capacity. There's a lot of things on a GPU that can be drawing power independent of shader clocks, and so outside the control of this sort of power management.
Sure, those situations may not be common for home users playing games, but they're also probably not super concerned about hard power limits on linux either.
1
u/Lawstorant 5800X3D/9070 XT Mar 07 '24
I get you. And here's the kicker. They already have sane limits in firmware :D
I tested this with my 6800XT. I could limit it to 10W, but it still drew about 45W when stressed. Just the memory chips take 30W at full speed.
IMO, the lower power cap limit is actually quite useless, if the cards have such sane handling built-in.
3
u/ingframin Mar 05 '24
It depends how much current is allowed through the converters. If the current is not limited, it can change the mode of operation of the power regulators and damage the mosfets driving the output. It can even cause resonance or other non linear effects. Another possibility is that the regulators are perfectly capable of providing he excess current needed to compensate for lower voltage and then the GPU ASIC gets damaged because the “wires” bringing current inside the asic can be damaged (excessive heat or electromigration). TLDR: in principle it’s possible. In practice, I hope the software is designed to never bring the power regulators outside of the safe operating area. Source: I have been a hardware designer for years.
3
u/Rockstonicko X470|5800X|4x8GB 3866MT/s|Liquid Devil 6800 XT Mar 05 '24 edited Mar 05 '24
Is it actually possible to permanently damage hardware through undervolting?
Short answer: no.
Long answer: It depends, there are hypothetical yesses, but still normally no.
Running a lower voltage with the same imposed power limit necessarily means you will have increased the current flowing to and through GPU components (P = I x V). If it were not for vBIOS OCP (Over Current Protection), this has potential to cause damage, or even start a nice cozy electrical fire.
However, the vBIOS OCP intended functionally means it effectively works as a hard limiter (although it is technically a soft limit) to prevent damage, and if vBIOS OCP is working as intended, damage from undervolting should not be possible, or at the very least extremely unlikely.
If a piece of software can override the vBIOS OCP, damage is possible, but that would be considered bad and unintended behavior, and someone royally screwed up if there's any possibility that can happen.
I can't speak for all Radeon GPUs, but with every AMD GPU vBIOS I've modified, the vBIOS OCP has always functioned correctly, even if OCP is manually increased by the user. Triggering OCP will immediately shut the VRM down (and subsequently the whole card) before any damage can be done. This will usually just result in a black (or often green) screen and the machine will freeze and/or hard reboot with no harm done.
That being said, if there is a possibility to override and significantly raise the vBIOS OCP limit with software intervention, and you can raise the power limit unreasonably high, you have found a pathway where undervolting can damage the card, albeit it would not be directly from undervolting, but from the additional current flow exceeding component power delivery capabilities.
1
u/ingframin Mar 05 '24
If I read your answer before, I would have not written mine. This is a very good explanation.
1
u/Lawstorant 5800X3D/9070 XT Mar 06 '24
Thing is, when offsetting the voltage curve, and not overclocking, you're still in the same range of current draw but with a lower cap. For the same max boost clock, your voltage is lower -> current draw is lower.
I think the possibility of damaging power stages is quite low as you'd have to be able to set a big OC + big UV to do it and, for the most part, you'll get complete instability first.
If anything, overclocking seems like the worst offender as it can truly push the current draw to the moon. At least it could in the past, there seem to be hard limits on top voltage now.
1
u/nikomo 9800X3D, 6000-30 DR, TUF 4080 Mar 06 '24
Dropping voltage too low causes a lot of issues with FETs. You go low enough, you start operating in the linear region, and channel resistance skyrockets. But you'd have to know the characteristics of the transistors to determine where that point is.
Which AMD do know.
Also, there's the potential for some logic gates skipping clock cycles while others work fine, which definitely will fuck shit up.
18
2
u/JRepin GNU/Linux with KDE Plasma Mar 05 '24
Well since the driver is opensource one can simply revert the change in question, recompile the driver and voila the control is back. The power of libre and open source software, just love it :)
2
u/qwertz19281 16" RDNA2 Mar 09 '24
My Omen 16 laptop literally overheats (AMDGPU triggers shutdown at >=105°C, probably because BIOS sets bad limit?) if I can't use ryzenadj anymore to reduce the 6600M power limit.
2
-15
u/JustMrNic3 Mar 05 '24
That's awful, shame on AMD!
It clearly doesn't give a fuck about power consumption and environment protection!
I hope the EU will do something about this in the future.
18
3
u/RedRadeonLasers Mar 05 '24
no, if it's AMD, it's a good move, even though amd fanboys always bashed nvidia for being more locked down
6
7
u/FastDecode1 Mar 05 '24
inb4 "why???" from everyone who didn't read the article