Bitcoin Forum
December 08, 2016, 02:22:52 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: AMDOverdriveCtrl in Linuxcoin startup script doesn't have any effect  (Read 2005 times)
runeks
Legendary
*
Offline Offline

Activity: 924



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.
1481163772
Hero Member
*
Offline Offline

Posts: 1481163772

View Profile Personal Message (Offline)

Ignore
1481163772
Reply with quote  #2

1481163772
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481163772
Hero Member
*
Offline Offline

Posts: 1481163772

View Profile Personal Message (Offline)

Ignore
1481163772
Reply with quote  #2

1481163772
Report to moderator
Dutch Merganser
Member
**
Offline Offline

Activity: 84


View Profile
January 16, 2012, 07:10:08 PM
 #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
Legendary
*
Offline Offline

Activity: 924



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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!