MASSIVE UPGRADE VERSION 2.0 - Links in top post
Major feature upgrade - GPU monitoring, (over)clocking and fan control for ATI
GPUs.
Executive summary:
You have to make sure the display for all devices is exported on linux for all cards to be seen with "export DISPLAY=:0". NFI what you need to do on windows.
Add overclocking settings, GPU and fan control for all cards:
cgminer -o
http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 950 --gpu-memclock 300
Add overclocking settings, GPU and fan control with different engine settings for 4 cards:
cgminer -o
http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 950,945,930,960 --gpu-memclock 300
---
New command line switches:
--auto-fan Automatically adjust all GPU fan speeds to maintain a target
temperature
--auto-gpu Automatically adjust all GPU engine clock speeds to maintain
a target temperature
--gpu-engine <arg> Set the GPU engine (over)clock in Mhz - one value for all or
separate by commas for per card.
--gpu-fan <arg> Set the GPU fan percentage - one value for all or separate
by commas for per card.
--gpu-memclock <arg> Set the GPU memory (over)clock in Mhz - one value for all
or separate by commas for per card.
--gpu-powertune <arg> Set the GPU powertune percentage - one value for all or
separate by commas for per card.
--gpu-vddc <arg> Set the GPU voltage in Volts - one value for all or separate
by commas for per card.
--temp-hysteresis <arg> Set how much the temperature can fluctuate outside
limits when automanaging speeds (default: 3)
--temp-overheat <arg> Set the overheat temperature when automatically managing
fan and GPU speeds (default: 85)
--temp-target <arg> Set the target temperature when automatically managing fan
and GPU speeds (default: 75)
---
OVERCLOCKING WARNING AND INFORMATION
AS WITH ALL OVERCLOCKING TOOLS YOU ARE ENTIRELY RESPONSIBLE FOR ANY HARM YOU
MAY CAUSE TO YOUR HARDWARE. OVERCLOCKING CAN INVALIDATE WARRANTIES, DAMAGE
HARDWARE AND EVEN CAUSE FIRES. THE AUTHOR ASSUMES NO RESPONSIBILITY FOR ANY
DAMAGE YOU MAY CAUSE OR UNPLANNED CHILDREN THAT MAY OCCUR AS A RESULT.
The GPU monitoring, clocking and fanspeed control incorporated into cgminer
comes through use of the ATI Display Library. As such, it only supports ATI
GPUs. Even if ADL support is successfully built into cgminer, unless the card
and driver supports it, no GPU monitoring/settings will be available.
Cgminer supports initial setting of GPU engine clock speed, memory clock
speed, voltage, fanspeed, and the undocumented powertune feature of 69x0+ GPUs.
The setting passed to cgminer is used by all GPUs unless separate values are
specified. All settings can all be changed within the menu on the fly on a
per-GPU basis.
For example:
--gpu-engine 950 --gpu-memclock 825
will try to set all GPU engine clocks to 950 and all memory clocks to 825,
while:
--gpu-engine 950,945,930,960 --gpu-memclock 300
will try to set the engine clock of card 0 to 950, 1 to 945, 2 to 930, 3 to
960 and all memory clocks to 825.
AUTO MODES:
There are two "auto" modes in cgminer, --auto-fan and --auto-gpu. These can
be used independently of each other and are complementary. Both auto modes
are designed to safely change settings while trying to maintain a target
temperature. By default this is set to 75 degrees C but can be changed with:
--temp-target
AUTO FAN:
Fan control in auto fan works off the theory that the minimum possible fan
required to maintain an optimal temperature will use less power, make less
noise, and prolong the life of the fan. In auto-fan mode, the fan speed is
limited to 85% if the temperature is below "overheat" intentionally, as
higher fanspeeds on GPUs do not produce signficantly more cooling, yet
significanly shorten the lifespan of the fans. If temperature reaches the
overheat value, fanspeed will still be increased to 100%. The overheat value
is set to 85 degrees by default and can be changed with:
--temp-overheat
AUTO GPU:
GPU control in auto gpu tries to maintain as high a clock speed as possible
while not reaching overheat temperatures. As a lower clock speed limit,
the auto-gpu mode checks the GPU card's "normal" clock speed and will not go
below this unless you have manually set a lower speed at some time. Also,
unless a higher clock speed was specified at startup, it will not raise the
clockspeed. If the temperature climbs, fanspeed is adjusted and optimised
before GPU engine clockspeed is adjusted. If fan speed control is not available
or already optimal, then GPU clock speed is only decreased if it goes over
the target temperature by the hysteresis amount, which is set to 3 by default
and can be changed with:
--temp-hysteresis
If the temperature drops below the target temperature, and engine clock speed
is not at the highest level set at startup, cgminer will raise the clock speed.
If at any time you manually set an even higher clock speed successfully in
cgminer, it will record this value and use it as its new upper limit (and the
same for low clock speeds and lower limits).
CHANGING SETTINGS:
When setting values, it is important to realise that even though the driver
may report the value was changed successfully, and the new card power profile
information contains the values you set it to, that the card itself may
refuse to use those settings. As the performance profile changes dynamically,
querying the "current" value on the card can be wrong as well. So when changing
values in cgminer, after a pause of 1 second, it will report to you the current
values where you should check that your change has taken. An example is that
6970 reference cards will accept low memory values but refuse to actually run
those lower memory values unless they're within 125 of the engine clock speed.
In that scenario, they usually set their real speed back to their default.
STARTUP / SHUTDOWN:
When cgminer starts up, it tries to read off the current profile information
for clock and fan speeds and stores these values. When quitting cgminer, it
will then try to restore the original values. Changing settings outside of
cgminer while it's running may be reset to the startup cgminer values when
cgminer shuts down because of this.
---
Full changelog:
- Implement ATI ADL support for GPU parameter monitoring now and setting later
(temp, fan, clocks etc.).
- Check for the presence of the ADL header files in ADL_SDK.
- Import adl_functions.h from amd overdrive ctrl.
- Implement a setup function that tries to detect GPUs that support the ADL and
link in the parameters into the gpus struct.
- Put a summary of monitoring information from the GPU menu.
- Implement changing memory speed and voltage on the fly.
- Implement fan speed setting.
- Minor corrections to set fan speed by percentage.
- Make sure to read off the value in RPM only.
- Implement auto fanspeed adjustment to maintain a target temperature and
fanspeed below 85%, with an overheat check that will speed the fan up to 100%.
- Add an --auto-fan command line option to allow all GPUs to have autofan
enabled from startup.
- Add a gpu autotune option which adjusts GPU speed to maintain a target
temperature within the bounds of the default GPU speed and any overclocking set.
- Avoid a dereference if the longpoll thread doesn't exist.
- Clean up by setting performance profiles and fan settings to startup levels on
exit.
- Add a small amount of hysteresis before lowering clock speed.
- Allow target, overheat and hysteresis temperatures to be set from command
line.
- Combine all stats collating into one function to avoid repeating function
calls on each variable.
- Add gpu statistics to debugging output via the watchdog thread.
- Implement menus to change temperature limits.
- Implement setting the GPU engine clock speed of all devices or each device as
a comma separated value.
- Implement setting the GPU memory clock speed of all devices or each device as
a comma separated value.
- Implement setting the GPU voltage of all devices or each device as a comma
separated value.
- Implement setting the GPU fan speed of all devices or each device as a comma
separated value.
- Add support for monitoring powertune setting.
- Implement changing of powertune value from the GPU change settings menu.
- Get the value of powertune in get_stats.
- Implement setting the GPU powertune value of all devices or each device as a
comma separated value.
- Remove the safety checks in speed setting since confirmation is done first in
the menu, then show the new current values after a short pause.
- Force the speed to high on startup and restore it to whatever the setting was
on exit.
- Add temperature to standard output where possible and use more compact output.
- Move and print at the same time in curses to avoid random trampling display
errors.
- Update the status window only from the watchdog thread, do not rewrite the top
status messages and only refresh once all the status window is complete,
clearing the window each time to avoid corruption.
- Set a safe starting fan speed if we're automanaging the speeds.
- Provide locking around all adl calls to prevent races.
- Lower profile settings cannot be higher than higher profile ones so link any
drops in settings.
- Add new needed text files to distribution.
- Queue requests ignoring the number of staged clones since they get discarded
very easily leading to false positives for pool not providing work fast enough.
- Include libgen.h in opt.c to fix win32 compilation warnings.
- Fix compilation warning on win32.
- Add the directory name from the arguments cgminer was called from as well to
allow it running from a relative pathname.
- Add a --disable-adl option to configure and only enable it if opencl support
exists.
- Retry before returning a failure to get upstream work as a failure to avoid
false positives for pool dead.
- Retry also if the decoding of work fails.
- Use the presence of X-Roll-Ntime in the header as a bool for exists unless N
is found in the response.