Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 567. (Read 5806088 times)

hero member
Activity: 518
Merit: 500
They will only clock back up if the temperature drops enough again.

How long will this take ? I left them about 15 minutes after the heat stopped and the cold begun and they did not clock back automatically ( I had to do it manually ).

Thanks !
legendary
Activity: 952
Merit: 1000
Question: If I upgrade one of my 58XX cards to a 79XX card, and consequently upgrade my SDK from 2.5 to 2.6, I can still use the phatk .bin from 2.5 on the 5870, correct?

2.6 will be installed, but I'd be using a phatk.bin from 2.5 on my 5870, and a diakgcn.bin from 2.6 on the 79XX for the best speed, correct?

Now how do I keep those .bins in use in future versions of CGMiner? (I do keep backups of my known good working bins in a separate folder)
legendary
Activity: 1795
Merit: 1208
This is not OK.
legendary
Activity: 2702
Merit: 1468
It doesn't happen on linux like this - only windows.
If it happened the same way on both linux and windows then it could be a possible cgminer code fix, but since it is windows specific (and not reproducible on linux) it is extremely likely to be in the ATI windows library
Also the fact that the GPU doesn't stop working (if you use --no-restart) but simply loses it's ADL information, again means it is in the ATI library that is the problem.

Why do you expect AMD code to work the same way on Linux and Windows?
If you unloaded the ADL dll before re-initializing opencl, and then reloaded it, you would not have "this ADL library bug".

Just because it happens to work on Linux does not mean it must work on Windows.
It is like saying: my cgminer works in my environment so it is not a bug.
donator
Activity: 448
Merit: 250

Does anybody have an idea what the issue might be?


to get it working in openwrt, i had to manually specify the location of the lib.

LIBCURL_CFLAGS=-L/path/to/lib LIBCURL_LIBS=-lcurl


Good catch, but after defining these variables myself ./configure works
Code:
LIBCURL_CFLAGS='-I/usr/include/curl'
LIBCURL_LIBS='-L/usr/lib -lcurl'
and having a closer look at the error, it appears to me that it doesn't like the syntax of PKG_CHECK_MODULES.
Commenting out these two lines unfortunately leads to an undefined variable ACEOF which causes more issues.
Did you have these issues too?


Scratch that, I had to run aclocal before ./autogen.sh


legendary
Activity: 1795
Merit: 1208
This is not OK.

Does anybody have an idea what the issue might be?


to get it working in openwrt, i had to manually specify the location of the lib.

LIBCURL_CFLAGS=-L/path/to/lib LIBCURL_LIBS=-lcurl
legendary
Activity: 1260
Merit: 1000
donator
Activity: 448
Merit: 250
I'm reposting this from this newbie thread (since I think here's a better place for it:
Re: Running an FPGA on Raspberry Pi, possible?

OK, here's how far I got installing cgminer on my Raspberry Pi:
Code:
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install libncurses-dev
sudo apt-get install yasm
sudo apt-get install curl
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install pkg-config
Download zip archive from https://github.com/ckolivas/cgminer
Code:
unzip ckolivas-cgminer-v2.4.1-9-gb69d735.zip 
cd ckolivas-cgminer-b69d735/
./autogen.sh
./configure --enable-bitforce
configure then quits after a while with the following errors:
Code:
./configure: line 9269: syntax error near unexpected token `PKG_CHECK_MODULES'
./configure: line 9269: `PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.15.6, AC_DEFINE([CURL_HAS_SOCKOPT], [1], [Defined if version of curl supports sockopts.]),'

Doing a
Code:
curl-config --version
results in
Code:
libcurl 7.21.0
so the libcurl version should work.

Does anybody have an idea what the issue might be?


legendary
Activity: 2702
Merit: 1468
The LW value is almost certainly completely unrelated. If it crashes at approximately 7 days, then you are being hit by the ATI Display Library crashing after a week bug that happens only on windows. Try starting cgminer with --no-restart . You will lose temperature and/or fanspeed monitoring after a week but it at least wont crash.
I searched this thread but didn't really find any mention of this bug. I have a 5970 that crashes somewhere in the vicinity of once a week, without fully crashing the display driver. Clocks and voltages that often change when a card crashes aren't affected in this case. When it does this cgminer declares it sick and attempts to restart it, at which point cgminer crashes. A quick restart of cgminer fixes the issue, and the system goes about mining again without issue. I recently restarted it with --no-restart and I haven't had an issue yet (7 days will be 12 hours from now). Does anyone have any links to information or a possible solution to this if it is an ATI driver bug? I assumed I had a bad core on my GPU, but it would be great if that's not the issue.

7 days that is pretty good.  My setup crashes after 4-5 days, even when running at stock clock speeds.  Any overclocking or underclocking/undervolting causes cgminer to crash sooner rather than later. 

Just restart it and forget it.

I don't think Con has any interest in debugging this on Windows.
legendary
Activity: 1795
Merit: 1208
This is not OK.
I don't know, I think success should return success, and failure should return failure.
In this case, it terminates a successful conversion with failure.

Also, I changed it in my code to || last night... still working fine for me Smiley
legendary
Activity: 1795
Merit: 1208
This is not OK.

Not sure which version of driver-bitforce.c you are looking at but 2.4.1 does not check return code from hex2bin().  Sure, terminating after first 4 hex numbers would be better for BFL and Icarus, but jobj_binary()/work_decode() also uses this and checks the return code. 


I'm bug chasing, so I edited the code to use the return value.
legendary
Activity: 1795
Merit: 1208
This is not OK.
Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
...
return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?

I think the code is correct.  It also checks input parameters.

If size of buffer (p) is too small for a given hex str,the caller would know that something is wrong.
If the hexStr is truncated to size less than buffer (p) length, the caller would know.

For example: if hexStr points to 32 hex numbers, but the size of buffer pointed by p is 64, the function would return false.
If you had || instead of &&, the function would return true and the caller would assume that there are 64 valid (0-255) bytes.

If you had a prototype:

bool hex2bin(unsigned char *buf, int bufSize, const char *hexstr, int * outlen)

it would allow callers to check the size of the converted binary buffer.



Thing is, the BFL uses hex2bin the other way round: the string is longer than p. The BFL returns a string of nonces, hex2bin is used to extract these nonces. There's no null terminator on each nonce, so hex2bin is returning an error, even though everything is fine.
legendary
Activity: 952
Merit: 1000
...
I did the sudo aticonfig -f --adapter=all --initial and rebooted, I also deleted the .bin file in cgminer's directory.

CGminer gave an error about the number of devices not matching. It saw three devices, but OpenCL was only seeing one?
...
opencl has nothing to do with xorg I'm afraid, but what you need before starting cgminer is:
Code:
export DISPLAY=:0


I'm not running as root. DISPLAY is already set. And I'm not using SSH, I'm on the local console.

I just suffered from the same problem. If your DISPLAY is set to ":0.0", clinfo only finds one card!!! This is dumb.

You can correct it by setting it to ":0" as suggested above.

I found the solution haphazardly from here: http://devgurus.amd.com/thread/140667

It's not dumb - it's the way Xorg works. Before I was using CGMiner, I had 3 instances of phoenix on :0.0 :0.1 and :0.2 . That's how you specify cards.
member
Activity: 64
Merit: 10
...
I did the sudo aticonfig -f --adapter=all --initial and rebooted, I also deleted the .bin file in cgminer's directory.

CGminer gave an error about the number of devices not matching. It saw three devices, but OpenCL was only seeing one?
...
opencl has nothing to do with xorg I'm afraid, but what you need before starting cgminer is:
Code:
export DISPLAY=:0


I'm not running as root. DISPLAY is already set. And I'm not using SSH, I'm on the local console.

I just suffered from the same problem. If your DISPLAY is set to ":0.0", clinfo only finds one card!!! This is dumb.

You can correct it by setting it to ":0" as suggested above.

I found the solution haphazardly from here: http://devgurus.amd.com/thread/140667
legendary
Activity: 1795
Merit: 1208
This is not OK.
Code:
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
{
while (*hexstr && len) {
char hex_byte[3];
unsigned int v;

if (!hexstr[1]) {
applog(LOG_ERR, "hex2bin str truncated");
return false;
}

hex_byte[0] = hexstr[0];
hex_byte[1] = hexstr[1];
hex_byte[2] = 0;

if (sscanf(hex_byte, "%x", &v) != 1) {
applog(LOG_ERR, "hex2bin sscanf '%s' failed", hex_byte);
return false;
}

*p = (unsigned char) v;

p++;
hexstr += 2;
len--;
}

return (len == 0 && *hexstr == 0) ? true : false;
}

Should the return value not be || rather than &&?
donator
Activity: 1059
Merit: 1038
ty so much.

configure: WARNING: Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
I just setup another copy of Ubuntu running on another thin client.

On all my other thin clients I can see all the temps, speed etc on one screen.

On this new one they are just flying by in one line and it is very hard to see what is going on.  I am guessing I changed the view somehow maybe in the conf file?

How can I get back to the regular cgminer screen?

2.4.1

Thanks
'Thin client'? NFI what you mean by that.

Not sure what you did wrong, but it could be one of the following:
1) You (or someone else you got it from) compiled cgminer without curses
 Solution - tell the person who compiled it to check the output of ./configure when they run it

2) You used -T and somehow got that into the ~/.cgminer/cgminer.conf file
 (look for "text-only" : true and remove it)
You might also find "debug" : true and "verbose" : true that you want to also remove

3) Maybe curses failed to load and it went into text mode coz you are using 11.04 and forgot to:
 cd /lib64/
 sudo ln -s libncurses.so.5 libtinfo.so.5

Not sure what else at the moment.
donator
Activity: 1059
Merit: 1038
I just setup another copy of Ubuntu running on another thin client.

On all my other thin clients I can see all the temps, speed etc on one screen.

On this new one they are just flying by in one line and it is very hard to see what is going on.  I am guessing I changed the view somehow maybe in the conf file?

How can I get back to the regular cgminer screen?

2.4.1

Thanks
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
It doesn't happen on linux like this - only windows.
If it happened the same way on both linux and windows then it could be a possible cgminer code fix, but since it is windows specific (and not reproducible on linux) it is extremely likely to be in the ATI windows library
Also the fact that the GPU doesn't stop working (if you use --no-restart) but simply loses it's ADL information, again means it is in the ATI library that is the problem.

Why do you expect AMD code to work the same way on Linux and Windows?
If you unloaded the ADL dll before re-initializing opencl, and then reloaded it, you would not have "this ADL library bug".

Just because it happens to work on Linux does not mean it must work on Windows.
It is like saying: my cgminer works in my environment so it is not a bug.
The point is this particular problem doesn't happen on linux in the first place - it only happens on windows.
The problem is that the miner keeps hashing but the ADL stops working ... after a long period of time (something like 6 or 7 days)
If you have a workaround to fix this ATI bug (yes it is a bug) then feel free to discuss this with ckolivas (if he is interested)
There is also the issue of testing a workaround ...
legendary
Activity: 952
Merit: 1000
I have my computer set to restart every day at a certain time, and CGMiner starts when windows starts. Ya lose 3 minutes of hashing a day, but no 7 day bug you're talking about. The temp/fanspeed/dynamic OC is what makes CGMiner great!

Wrong!  If cgminer crashes right after your reboot, you can lose a bit more than 3 minutes.


I have a .bat that pings 127.0.0.1 a couple dozen times and then starts CGMiner. This makes sure the User is fully logged on, connected to the wifi, and the HD has stopped before I start mining. It's never crashed on me yet...
Jump to: