Author

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

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: 1057
Merit: 1021
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: 1057
Merit: 1021
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...
legendary
Activity: 952
Merit: 1000
I have run my CGminer about 7 days, and i have about 11 Rigs with 5x 5850 and until today morning i found that some of my CGminer Freeze and stop sending share and i found some funny figure when i freeze something like "LW:50" and high figure around beside "LW"

where some of my CGminer still running fine thich is "LW:0"

you can see that on top of the cgminer !

anyone pls help

i cannot provide screen shot because it is not convenient and it is far from my house to warehouse

so anyone pls help if it happen again i will get the screen shot

sry for my English !
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 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!
hero member
Activity: 658
Merit: 500
He's saying it's a bug in ati's drivers ( no stretch there ) not in cgminer. ATI would have to fix it.

However, if ATI could make a decent driver it would be a miracle. That's their Achilles heel. Their hardware is amazing, their drivers are piss poor.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
...
If it keeps hashing after losing its ADL information, I won't even worry about it. I manually set the fan to 85% anyway regardless of how low temps are, so I'm not too concerned with the fan control. I can manually restart it whenever I notice.

Still, if there's a thread on the issue I'd love to read it. A quick search on the forums either turned up not much or way too much.
It's been discussed a few times in this thread.
legendary
Activity: 1274
Merit: 1004
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.
Solution Smiley

As you said, use --no-restart (so cgminer doesn't crash when ATI screws up - yes it is the ATI librarys fault on windows)

Also with a separate (simple) program using the API, check when any of the GPU's become sick or lose their ADL info then use an API 'restart'

Edit: I'll also add that anyone expecting there to be a cgminer code fix for this is misunderstanding the problem.
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.

If it keeps hashing after losing its ADL information, I won't even worry about it. I manually set the fan to 85% anyway regardless of how low temps are, so I'm not too concerned with the fan control. I can manually restart it whenever I notice.

Still, if there's a thread on the issue I'd love to read it. A quick search on the forums either turned up not much or way too much.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
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.
Solution Smiley

As you said, use --no-restart (so cgminer doesn't crash when ATI screws up - yes it is the ATI librarys fault on windows)

Also with a separate (simple) program using the API, check when any of the GPU's become sick or lose their ADL info then use an API 'restart'

Edit: I'll also add that anyone expecting there to be a cgminer code fix for this is misunderstanding the problem.
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.
legendary
Activity: 1274
Merit: 1004
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.
Jump to: