Change of a single value via command line

Help
thermoman
2011-06-17
2012-12-07
  • thermoman

    thermoman - 2011-06-17

    Hi Thorsten,

    first of i have to say that your program works really really well - good job!

    I'm able to underclock my ATI card to e.g. 150 MHz which is not possible with the aticonfig tool.

    One thing that could be improved in my opinion is the way to set values via batch command:

    Lets say i have a regular ATI HD 5970 card with these settings:

    INF: Perf Level 0: GPU 157MHz Memory 1000MHz Voltage 0.95V
    INF: Perf Level 1: GPU 550MHz Memory 1000MHz Voltage 1.038V
    INF: Perf Level 2: GPU 725MHz Memory 1000MHz Voltage 1.05V

    and a PC with an HD 5970 Black Edition with higher speeds:

    INF: Perf Level 0: GPU 157MHz Memory 1200MHz Voltage 0.95V
    INF: Perf Level 1: GPU 550MHz Memory 1200MHz Voltage 1.05V
    INF: Perf Level 2: GPU 850MHz Memory 1200MHz Voltage 1.175V

    My linux install gets bootet off the net via PXE so the same OS could run
    on the PC with the first card or on the PC with the second card.

    Now i would like to reduce GPU memory clock speed to 150 MHz regardless of core speed or voltages, e.g. i'm looking for:

    % AMDOverdriveCtrl -i 0 --set-memory=150 --level 0
    % AMDOverdriveCtrl -i 0 --set-memory=150 --level 1
    % AMDOverdriveCtrl -i 0 --set-memory=150 --level 2
    

    which should then read the current values of card 0, change the memory clock speed to 150 MHz for the specified performance levels and commit these changes.

    With the current implementation i have to start AMDOverdriveCtrl, save a profile to XML file for each card i have and then make 100% sure i don't use the wrong XML file with my ATI cards or i would fry them (e.g. by mistake use the profile of the Black Edition with 850 MHz core speed on the normal HD 5970 with 725 MHz core speed).

    Would it be possible to add such functionality?

    Another angle to this solution would be the approach to allow partial XML files to be used for batch processing, e.g.

    <?xml version="1.0" encoding="utf-8"?>
    <OVERDRIVE_PROFILE>
      <PERFORMANCE_LEVEL level="2" mem="15000"/>
      <PERFORMANCE_LEVEL level="1" mem="15000"/>
      <PERFORMANCE_LEVEL level="0" mem="15000"/>
    </OVERDRIVE_PROFILE>
    

    with such an (incomplete) XML file it could be possible to just change the mentioned values and leave all the other ones as they are.

    Thanks for reading!

    Greetings from germany

    Marcel.

     
  • Thorsten Gilling

    Hi Marcel,

    your second suggestion (partial xml files) was easy to implement and is already available in the git repository. It will be part of the next release.

    regards,
    Thorsten

     
  • thermoman

    thermoman - 2011-06-19

    Hi Thorsten,

    wow, that was fast!

    Will try the git version on monday at work and then i can give you feedback.

    Thanks again!

    Regards,
    Marcel.

     
  • thermoman

    thermoman - 2011-06-20

    % cat underclock.cfg
    <?xml version="1.0" encoding="utf-8"?>
    <OVERDRIVE_PROFILE>
      <PERFORMANCE_LEVEL level="2" mem="15000"/>
      <PERFORMANCE_LEVEL level="1" mem="15000"/>
      <PERFORMANCE_LEVEL level="0" mem="15000"/>
    </OVERDRIVE_PROFILE>

    % AMDOverdriveCtrl -i 0 -b underclock.cfg
    INF: Nr. of Adapters: 4
    INF: Adapter index: 0, active, ID:16077312, ATI Radeon HD 5900 Series
    INF: Adapter index: 1, inact., ID:16077312, ATI Radeon HD 5900 Series
    INF: Adapter index: 2, inact., ID:16077312, ATI Radeon HD 5900 Series
    INF: Adapter index: 3, active, ID:16695088, ATI Radeon HD 5900 Series
    INF: Adapter index 0 choosen.
    INF: Nr. of Performance Levels: 3
    INF: Card's default Perf Level 0: GPU 157MHz Memory 300MHz Voltage 0.95V
    INF: Card's default Perf Level 1: GPU 550MHz Memory 1000MHz Voltage 1.038V
    INF: Card's default Perf Level 2: GPU 725MHz Memory 1000MHz Voltage 1.05V
    ACT: Set fan speed to default
    INF: Nr. of Displays to check 5
    INF: Color temp disp(3) :
    INF: current 6500K default 6500K
    INF: min 4000K max 10000K step 100K
    ACT: SetOverdriveValues: Level 0: 15700MHz, 15000MHz, MHz, 0.95V
    ACT: SetOverdriveValues: Level 1: 55000MHz, 15000MHz, MHz, 1.038V
    ACT: SetOverdriveValues: Level 2: 72500MHz, 15000MHz, MHz, 1.05V
    ACT: Profile 'underclock.cfg' applied successfully
    

    Works perfectly.

    One minor issue: The "ACT: SetOverdriveValues:" lines have the MHz values times 100 displayed.

    I'm using the following script to set memory clock of all ATI cards found in the system:

    1
    2
    3
    4
    5
    6
    7
    8
    #!/bin/sh
    export DISPLAY=:0
    ACTIVE_ADAPTER="$(AMDOverdriveCtrl --help 2>&1 | grep -E '^INF.* active' | perl -pi -e 's#^.*Adapter index: (\d).*$#$1#')"
    cd "$(dirname "$0")"
    for i in $ACTIVE_ADAPTER
    do
      AMDOverdriveCtrl -i $i -b underclock.cfg
    done
    

    Is there any other way to get the adapter indices to be used for -i other than grepping the INF output like i do?

    Regards,
    Marcel.

     
  • Thorsten Gilling

    Corrected the MHz values.

    Your script looks fine to me, but I'm not a bash script wizard…

     
  • thermoman

    thermoman - 2011-06-20

    Looks good. There is still one

    << "MHz, "
    

    to much.

     
  • Thorsten Gilling

    not any more ;-)

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks