[SOLVED] Editing my GPU's power profile (AMD 5870)

[SOLVED] Editing my GPU's power profile (AMD 5870)

Postby VoodooDali » Apr 17th, '13, 20:48

Hello:

My GPU (AMD Radeon Mobility HD 5870) runs very hot (about 187 degrees F) while using the open-source "radeon" driver. I could switch to the AMD Catalyst Driver but that no longer works in Netflix, YouTube, ESPN3 and a bunch of other video applications.

I can cool down my GPU by running the following command as root:

Code: Select all
echo low > /sys/class/drm/card0/device/power_profile


However, this is a temporary fix. Exiting su/root mode causes my sound to cut out. :shock: And, next time I reboot, my power profile will be set back to "auto" which runs very hot.

Anyone know how I can *permanently* alter my power profile? (There really needs to be a GUI-based tool for this tweak :lol: ) Thanks!
Last edited by VoodooDali on Apr 23rd, '13, 13:55, edited 1 time in total.
Image
Voo #557749
running "Celene"
ASUS G73Jh
Intel Core i7 720QM
AMD (ATi) Mobility Radeon HD 5870
Mageia 4
User avatar
VoodooDali
 
Posts: 114
Joined: Mar 24th, '13, 18:11
Location: Chicago, IL, US

Re: Editing my GPU's power profile (AMD 5870)

Postby oj » Apr 18th, '13, 04:49

Sounds like a job for /etc/rc.d/rc.local. You have to enable rc.local compatibility if your OS uses systemd.
oj
 
Posts: 232
Joined: Aug 23rd, '12, 00:22

Re: Editing my GPU's power profile (AMD 5870)

Postby VoodooDali » Apr 23rd, '13, 00:08

oj wrote:Sounds like a job for /etc/rc.d/rc.local. You have to enable rc.local compatibility if your OS uses systemd.


Is there a command to enable rc.local compatibility? I tried using systemctl to enable the rc-local.service, and got a rather lengthy error message. :/
Image
Voo #557749
running "Celene"
ASUS G73Jh
Intel Core i7 720QM
AMD (ATi) Mobility Radeon HD 5870
Mageia 4
User avatar
VoodooDali
 
Posts: 114
Joined: Mar 24th, '13, 18:11
Location: Chicago, IL, US

Re: Editing my GPU's power profile (AMD 5870)

Postby sander85 » Apr 23rd, '13, 10:35

VoodooDali wrote:
oj wrote:Sounds like a job for /etc/rc.d/rc.local. You have to enable rc.local compatibility if your OS uses systemd.


Is there a command to enable rc.local compatibility? I tried using systemctl to enable the rc-local.service, and got a rather lengthy error message. :/


It's actually quite easy:

From the systemd unit (/lib/systemd/system/rc-local.service):
# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.

So all you have to do is create /etc/rc.d/rc.local and make it executable.
Stand for something, or you will fall for nothing.
-- Richard Stallman
User avatar
sander85
 
Posts: 88
Joined: Jan 28th, '12, 20:41
Location: Estonia

Re: Editing my GPU's power profile (AMD 5870)

Postby VoodooDali » Apr 23rd, '13, 13:53

For the benefit of anyone else trying to do this, here's what worked, step by step.

I had to create a file called rc-local.service with the following contents:

Code: Select all
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/bin/sh /etc/rc.local
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
Alias=rc-local.service


Then I created an rc.local file with the following:

Code: Select all
echo mid > /sys/class/drm/card0/device/power_profile


I set these files to executable in Dolphin, then moved the files to where they belonged by running the following as root:

Code: Select all
mv rc.local /etc
mv rc-local.service /etc/systemd/system


I changed ownership of the files to root:

Code: Select all
chown root /etc/rc.local
chown root /etc/systemd/system/rc-local.service


I enabled rc.local compatibility in systemd and started the service:

Code: Select all
systemctl enable rc-local.service
systemctl start rc-local.service


I received errors for both the systemctl commands, but when I rebooted, my GPU was running at the cooler temperature, and a check of

Code: Select all
 cat /sys/class/drm/card0/device/power_profile


reported the value "mid". Success. :D
Image
Voo #557749
running "Celene"
ASUS G73Jh
Intel Core i7 720QM
AMD (ATi) Mobility Radeon HD 5870
Mageia 4
User avatar
VoodooDali
 
Posts: 114
Joined: Mar 24th, '13, 18:11
Location: Chicago, IL, US

Re: [SOLVED] Editing my GPU's power profile (AMD 5870)

Postby VoodooDali » Apr 23rd, '13, 13:59

Special thanks to:

-defektz at fedoraforums.org
-TobiSGD at linuxquestions.org
-oj and sander85, right here :D
Image
Voo #557749
running "Celene"
ASUS G73Jh
Intel Core i7 720QM
AMD (ATi) Mobility Radeon HD 5870
Mageia 4
User avatar
VoodooDali
 
Posts: 114
Joined: Mar 24th, '13, 18:11
Location: Chicago, IL, US


Return to Video

Who is online

Users browsing this forum: No registered users and 1 guest