Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So when I log on, I go to a terminal and type

echo "mid" | sudo tee /sys/class/drm/card0/device/power_profile 

which means my laptop works without the fan being constantly ON.

It would be great it I didn't have to do this; I would like this to be done for me, and without me having to enter the password for sudo.

share|improve this question

4 Answers 4

up vote 2 down vote accepted

Stick it in /etc/rc.local, before the exit statement.

share|improve this answer
    
excellent! Thank you. –  artfulrobot Mar 22 '12 at 17:16

I tried the rc.local solution and found it not working for some reason (like other common solutions as described here). So I'm posting an alternative solution using pm-utils. I'm not sure if it is the best way to do it (I'm new to Linux) but it does what is necessary: Set the radeon power_profile to low on boot and retain that setting after suspend-resume.

Step 1: Create hook

gksu gedit /usr/lib/pm-utils/power.d/radeon-power_profile

Step 2: Fill in the desired setting

#!/bin/sh

echo profile > /sys/class/drm/card0/device/power_method
echo low > /sys/class/drm/card0/device/power_profile

exit 0

Step 3: Make it executable

sudo chmod +x /usr/lib/pm-utils/power.d/radeon-power_profile

That's it :)

share|improve this answer

I had try it but doesn't work for me echo "low" | sudo password /sys/class/drm/card0/device/power_profile or echo "low" > /sys/class/drm/card0/device/power_profile when I log in and enter cat /sys/class/drm/card0/device/power_profile still gives me "high"

running - 12.04 x64 , 3.2.0-25-generic

share|improve this answer
    
This is not an answer - use comments for things like this, not answers. First check your card allows that setting. Log in, start terminal, use the command in my question. Then use your cat command to see whether your setting is set. Then put the line in /etc/rc.local before the exit 0. Here you want echo "low" > /sys/class/drm/card0/device/power_profile as this script is run by root, so you don't want/need sudo (and anyway this won't work). Then reboot, login and test. –  artfulrobot Jun 22 '12 at 10:13
    
sorry for my post. But this stil Doesn't Work! as I say it before. My GPU is goint really hot after I hit Enter in the boot menu. is there a solution to add this command from start not after login ? –  Tosho Jun 22 '12 at 12:25
    
Do you mean rc.local is not being executed before you log in? Or not being executed at all? Or that the echo "low"... thing isn't working from the command line? rc.local: Check execution bits (ls -l /etc/rc.local are set). Check it is being executed - e.g. put in a line like logger -t rc.local boo, then reboot, wait 5 mins, login and less /var/log/syslog and search for "rc.local" - the timestamp will show you when it was run. The comments say it runs at end of multiuser boot levels, which means that it should be running by the time you see your login screen. –  artfulrobot Jun 22 '12 at 14:41
    
Jun 22 21:15:51 Zion AptDaemon.PackageKit: INFO: Get updates() Jun 22 21:15:53 Zion AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/4baf315f513b4dd39a6b39226808e8a7 Jun 22 21:17:01 Zion CRON[2988]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Jun 22 21:19:54 Zion rc.local: boo Jun 22 21:20:39 Zion kernel: Kernel logging (proc) stopped. Jun 22 21:20:39 Zion rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="970" x-info="rsyslog.com"] exiting on signal 15 –  Tosho Jun 22 '12 at 18:37
    
I also create a dir with rc.local - mkdir /home/tosho/alabala echo "low" > /sys/class/drm/card0/device/power_profile exit 0 the directory is created after I login but still when I write cat /sys/class/drm/card0/device/power_profile it shows high instead of low which for me means that the command is not executed. I did another tutorial link where I made a script that runs on startup but still my power_profile remains in "high" –  Tosho Jun 22 '12 at 18:46

alt-f2:

gksudo gedit /etc/init.d/ati-power-save

write this in ati-power-save file:

#!/bin/sh

# ATI power save
echo profile > /sys/class/drm/card0/device/power_method
echo low > /sys/class/drm/card0/device/power_profile

save and run these commands:

sudo chmod +x /etc/init.d/ati-power-save 
sudo update-rc.d ati-power-save defaults 99

as described in here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.