Bitcoin Forum
June 22, 2024, 11:06:31 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: AMDOverdriveCtrl in Linuxcoin startup script doesn't have any effect  (Read 2265 times)
runeks (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1008



View Profile WWW
January 16, 2012, 07:04:08 PM
 #1

Hey all

I would like to use AMDOverdriveCtrl to set the core clock and voltage of the two GPUs in my my mining rig - a 5870 and a 5770.
I have successfully made a script that sets these properties, and added it to be run in /etc/rc.local. The script looks like this:

Code:
#!/bin/bash
sleep 30
cd /home/user/
AMDOverdriveCtrl -b -i 3 .AMDOverdriveCtrl/5770.ovdr >> logs/overdrive.log 2>&1
AMDOverdriveCtrl -b -i 0 .AMDOverdriveCtrl/5870.ovdr >> logs/overdrive.log 2>&1

The problem is that when I start up my mining rig, and run "aticonfig --odgc" to see the clocks of my cards, they're at their default clocks (and voltages). So the script hasn't had any effect. This is printed to the log file:

Code:
Error: Unable to initialize gtk, is DISPLAY set properly?
Error: Unable to initialize gtk, is DISPLAY set properly?

The script works fine if I log in via SSH and execute it manually. But when run from /etc/rc.local, it prints the error message above.
Dutch Merganser
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
January 16, 2012, 07:10:08 PM
Last edit: January 16, 2012, 07:23:50 PM by Dutch Merganser
 #2

Hey all

I would like to use AMDOverdriveCtrl to set the core clock and voltage of the two GPUs in my my mining rig - a 5870 and a 5770.
I have successfully made a script that sets these properties, and added it to be run in /etc/rc.local. The script looks like this:

Code:
#!/bin/bash
sleep 30
cd /home/user/
AMDOverdriveCtrl -b -i 3 .AMDOverdriveCtrl/5770.ovdr >> logs/overdrive.log 2>&1
AMDOverdriveCtrl -b -i 0 .AMDOverdriveCtrl/5870.ovdr >> logs/overdrive.log 2>&1

The problem is that when I start up my mining rig, and run "aticonfig --odgc" to see the clocks of my cards, they're at their default clocks (and voltages). So the script hasn't had any effect. This is printed to the log file:

Code:
Error: Unable to initialize gtk, is DISPLAY set properly?
Error: Unable to initialize gtk, is DISPLAY set properly?

The script works fine if I log in via SSH and execute it manually. But when run from /etc/rc.local, it prints the error message above.


You probgably need to export the DISPLAY variable: the following works for me from cron and such:

export DISPLAY=':0'
/opt/bin/aticonfig --od-enable
/opt/bin/aticonfig --odgc
/opt/bin/aticonfig --odsc=900,1150

It just occurred to me that that can be more than one DISPLAY address, e.g. ':1' with a multi-card setup, I don't have a way to test this. Perhaps someone else can help here, as nor do I use the AMDOverdriveCtrl.

"Science flies you to the Moon, religion flies you into buildings."
 - Victor Stenger

"Religion is regarded by the common people as true, by the wise as false, and the rulers as useful."
 - Seneca the Elder (ca. 54 BCE - ca. 39 CE) Roman rhetorician
runeks (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1008



View Profile WWW
January 16, 2012, 10:31:58 PM
 #3

Yippee! Thank you! That did the trick. I had tried adding a line that said "DISPLAY=:0" before, but it didn't work properly. It seems it was the "export" keyword that was missing.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!