Author

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

member
Activity: 86
Merit: 10
Thank you for the quick answer Grin
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
New version 3.2.0 - 31st May 2013

Major upgrades to virtually all FPGA and ASIC drivers. Nothing much here for GPU miners.This version changes all the drivers to the direct USB mode so linux users will not need any drivers and all devices should now hotplug,that includes Avalon. Windows users will need to remove the ftdi driver for the ancient serial USB mode and use a tool like Zadig to associate their USB devices with the WinUSB driver (which is an official Microsoft driver). The code for all devices is built into the binaries I have uploaded except for Avalon on windows (but why on earth would anyone want to do that?).

Huge props and thanks to Sitarow for virtually unrestricted remote access to his avalon and Xiangfu to sponsor the Avalon development.
While the code is now heavily tested, being such a massive update, there may be new bugs.


Human readable changelog.

- Clamp initial GPU fanspeed to range provided by user.
- Update screen completely when going into a menu entry.
- Shut down/restart more reliably.
- Shows pool difficulty change in logs if it changes via stratum.
- Less locking around some of the stratum code may prevent some rare hangs or delays in processing stratum data.
- Decrease the amount of ram and threads used by stratum share submission to minimise the risk of running out of resources to submit shares.
- Fixed small memory leaks.
- New option: --lowmem            Minimise caching of shares for low memory applications
- Increase timeouts for windows comms.
- New windows DLLs for updated libcurl
- Major rewrite of icarus driver to move to direct USB.
- Rename of all devices to tell them apart.
- Massive changes under the hood supporting all the changes, along with bugfixes and improvements.
- Major rewrite of all the Avalon driver:
. Uses direct USB to the chip removing need for ftdi driver and its heavy polling which decreases overhead.
. Uses separate work submission and result parsing threads from the main hashing thread, to guarantee adequate work is submitted to keep the device busy, and ensure no results are lost due to receive delays or buffer overflows.
. Parses results using a buffered + scanned mechanism to avoid getting out of sync and needing to reset the device to recover. It can also discard garbage results without them affecting further results.
. More reliably detects hardware errors: The count will now appear higher due to "NMW - no matching work" being counted as a hardware error which it truly is.
. Idles the device if there is no work due to pool or network outage to avoid wasting unnecessary power.
. Disables the device gracefully and can hotplug it again if it is pulled out/plugged in via USB.
. Monitors temperature more reliably to adjust fanspeed by checking values returned more rigorously.
. Decreases the amount of memory in use by the device.
. Avoids run-over to start repeating results through much better timing of submitting new work.
. More reliably detect conditions that require an FPGA reset thus decreasing the number of resets but is more likely to recover when a reset occurs.
. Now displays ambient/operating temperature and fan %/RPM in the text user interface when run on a PC/console.
. Can start an avalon mining without any options being passed to it.
. Documentation of avalon options in ASIC-README.
. Numerous other low level bugfixes and improvements.


Full changelog

- Add FAQ about windows USB keyboards and hotplug interactions.
- Fix mingw build warnings in icarus driver.
- Make usb_ftdi_cts use the _usb_transfer_read function.
- Update ASIC-README with avalon info regarding default behaviour.
- Break out of idling loop in avalon_idle if the buffer is full.
- Provide some defaults for avalon if none are specified and do not try to claim
the device if it fails to reset with them and no options are specified.
- usbutils automatically track IO errors
- usbutils allow a short wait for resources to be released
- correct semaphore timeout comment
- Set the fanspeed to the nominal chosen for GPUs.
- Inverted sem_init logic.
- Document avalon options in ASIC-README
- Do avalon driver detection last as it will try to claim any similar device and
they are not reliably detected.
- Clamp initial GPU fanspeed to within user specified range.
- Use a counting semaphore to signal the usb resource thread that it has work to
do.
- Avalon fan factor is already multiplied into the info values.
- Get rid of zeros which corrupt display.
- Logic fail on minimum fanspeed reporting.
- Provide a workaround for fan0 sensor not being used on avalon and pad fan RPM
with zeros.
- Add ambient temp and lowest fan RPM information to avalon statline.
- Display max temperature and fanspeed data for avalon.
- Set devices to disabled after they exit the hashing loops to prevent the
watchdog thread from trying to act on them.
- Add avalon driver to hotplug.
- Shut down the avalon mining thread if the device disappears.
- Check for no usb device in usb_ftdi_cts
- Check for valid usbdev in _usb_read in case the device has been unplugged.
- Scanhash functions perform driver shutdown so don't repeat it.
- Change the opencl shutdown sequence.
- Send the shutdown message to threads and do the thread shutdown functions
before more forcefully sending pthread_cancel to threads.
- Use the cgpu_info shutdown to determine when to stop the avalon read and write
threads.
- Use semaphores to signal a reset to pause the read thread while the write
thread does the actual reset, making all writes come from the same place.
- Remove now unneeded fgpautils.h include from avalon.
- usb_transfer_read should also not play with the endianness.
- Use the USB wrappers for avalon, telling usbutils that we want the raw data.
- Use separate ep for avalon tasks vs avalon reset and do not loop in write
indefinitely.
- Remove unneeded function and checks in avalon write code.
- CMR handle baud options
- work_restart is reset within the queued hash work loop.
- Fix avalon shutdown sequence.
- Execute driver shutdown sequence during kill_work.
- Use nusleep in avalon_get_results in place of nmsleep.
- Provide an nusleep equivalent function to nmsleep.
- usb/ica add more (incomplete) CMR settings
- Give a buffer of perceived results in avalon during idle periods to allow for
results once it becomes active again.
- libusb_control_transfer are meant to be endian specific, but host endianness
so no conversion is needed.
- Reuse old MTX Handle
- usbutils check all memory allocation
- usb separate thread for resource locking and modified windows locking code
- Icarus report data direction with comms errors
- Set the read and write threads for avalon to not cancel within libusb
functions and wait for the threads to pthread_join on shutdown.
- Offset needs to be incremented after avalon reads.
- Make the avalon_read function parse the ftdi responses appopriately.
- Use the avalon read timeout to completion if no data has been read.
- wait_avalon_ready should only be used before writes.
- Ask for the correct amount to read in avalon get results.
- Spawn the avalon read thread first with info->reset set to discard any data
till work is adequately queued.
- Use direct usb read commands to avoid ftdi data being automatically cut off in
avalon reads.
- Do a simple usb_read_once for the avalon result from a reset command.
- Make sure avalon is ready to receive more usb commands before sending them.
- Implement avalon_ready and avalon_wait_ready functions for when usb is ready
to receive commands.
- avalon_read should not loop but just return whatever it has succeeded in
reading.
- Set avalon_info to device data void struct.
- Specify avalon in avalon_reset.
- First pass rewriting serialdev into direct usb dev for avalon driver.
- Define a cts equivalent for direct usb and use it for avalon driver full.
- Compile usbutils into avalon driver.
- Check results come in at least at 2/3 the rate they should be on avalon and if
not, reset it.
- Give a warning but don't reset if the avalon buffer is full early.
- Discard any reads obtained from the avalon get results thread during a reset.
- Differentiate initial reset in avalon from subsequent ones.
- Perform a mandatory reset if the avalon buffer signals it's full before it has
queued its normal quota of work.
- Wait till buffer is cleared after sending idle tasks to avalon before
returning from avalon_idle.
- Lock qlock mutex during reset from read thread in avalon to prevent more work
being sent till the reset is over.
- Reset avalon if we continue to be unable to send all the work items.
- Add avalon reset response to debugging output.
- Do a wait_avalon_ready before sending a reset code.
- Iterate over spare bytes in the avalon result returned from a reset request
trying to find the beginning of the reset.
- Idle avalon after reset.
- Check for nothing but consecutive bad results on avalon and reset the FPGA if
it happens.
- Make submit_nonce return a bool for whether it's a valid share or not.
- Unset the work restart flag sooner in avalon_flush_work to avoid re-entering
the flush work function and just reset the queued counter instead of rotating
the array to avoid runs of no valid work.
- Implement an avalon_flush_work function for work restarts.
- Shut down avalon read and write threads and idle the miners on closing it.
- Tighter control over work submissions in avalon allows us to use a smaller
array.
- Rotate avalon array to reset the queued count before releasing the lock so
work will always be available on next pass.
- Move avalon read thread start till after conditional wait, store idle status
in avalon_info and use it to determine whether an error is appropriate or not.
- Wait till the avalon_send_tasks thread has filled the avalon with idle work
before starting the avalon_get_results thread.
- Use AVA_GETS_OK macro in avalon_read.
- Do all writes on avalon with a select() timeout to prevent indefinite blocking
and loop if less than desired is written.
- Check explicitly that ava_buffer_full equals the macro.
- Send initial reset as an avalon task to remove avalon_write function.
- avalon_clear_readbuf is no longer required.
- Check for 2 stray bytes on avalon reset.
- Create a separate thread for handling all work and idle submission to the
avalon which messages the scanhash function it has completed to update
statistics.
- usbutils ensure it compiles without stats
- usbutils include transfer mode in usbstats
- Give the avalon get results thread name the device number as well.
- Make sure we're not adjusting temps on every successful work retrieval on
avalon.
- Count missing work items from behind a successful work read in avalon as well.
- Change message for work not found in avalon parser.
- usbutils handle bulk_transfer partial writes
- Simplify debugging and only discard from avalon read buffer if at least one
full result has been discarded.
- Only display discarded bytes in avalon if they're not used as nonces.
- Only loop once through avalon_parse_results, but do so after timeouts as well.
- Only debug and move ram if spare bytes exist in avalon buffer.
- Remove off by one error.
- Inverted logic.
- Add more debugging to avalon reads.
- Convert unsigned size_ts to ints for parsing avalon messages.
- Cope with not finding nonces in avalon parsing gracefully by not overflowing
buffers.
- Adjust avalon temp values on one lot of valid nonces from the parser.
- Created a threaded message parser for avalon reads.
- Avalon_wait_write is not effective during resets so do it after going idle.
- Send only a single byte reset.
- Repeat going idle after avalon reset, and wait for write ready before sending
each reset request instead of some arbitrary sleep time.
- Timeouts on avalon_read and avalon_write should be 100ms.
- Don't close avalon after detecting it until we're cleaning up, instead using
reset for comms failures.
- Check for avalon_wait_write before sending reset command.
- Sleep in avalon_write_ready.
- Make avalon_wait_write a bool function and check its return value.
- Show how many idle tasks are sent to avalon if it aborts on buffer full.
- Reset avalon->device_fd after it is closed.
- Create an avalon_wait_write function that is used before sending avalon idle
command.
- Avoid repeating avalon_idle in do_avalon_close and extra sleep.
- Pass fd to avalon_idle.
- Do avalon_reset after info structure is set up.
- Rework avalon reset sequence to include idling of chips and waiting for them
to go idle followed by 2nd reset and then checking result.
- Do a non-blocking read of anything in the avalon buffer after opening the
device.
- Assign the avalon info data to the device_data in cgpu_info.
- thread shutdown is different on windows
- usbutils make all windows timeouts 999ms
- usb add another Cairnsmore1 USB chip
- icarus do the full detect test twice if required
- CMR usb config guess
- usb add transfer_read and commented out in icarus
- usbutils allow unrounded control transfers
- icarus ICA initialisation
- icarus report err on read failure
- icarus correct device_id and use device_data for icarus_info
- miner.h remove unused device_file and add device_data
- miner.h icarus no long uses fd
- icarus AMU config transfers
- Create a logwin_update function which mandatorily updates the logwin and use
it when input is expected to prevent display refresh delays.
- usbutils force an unknown IDENT for zero
- icarus set default options/timing based on device
- Must unlock curses as well in logwin_update.
- Create a logwin_update function which mandatorily updates the logwin and use
it when input is expected to prevent display refresh delays.
- icarus report usb write error information
- Add name to icarus copyright notice.
- Check for *pth dereference on pthread_join
- usbutils name latency correctly
- Check for restart before buffering more reads in Icarus.
- Icarus should timeout if it's greater than the timeout duration even if it's
receiving data.
- We should check for amount buffered in icarus get_nonce against amount already
received.
- Make mining threads report out during work submission.
- submit_work_async is no longer used directly by driver code.
- Fix first read timeout on icarus get nonce.
- Retry icarus_initialise if the first read attempt fails.
- Properly pthread_join miner threads on shutdown.
- Properly pthread_join miner threads on shutdown.
- Use a persistent single separate thread for stratum share submission that uses
workqueues since all stratum sends are serialised.
- All stratum calls to recv_line are serialised from the one place so there is
no need to use locking around recv().
- Only allow the mining thread to be cancelled when it is not within driver
code, making for cleaner shutdown and allowing us to pthread_join the miner
threads on kill_work().
- Only allow the mining thread to be cancelled when it is not within driver
code, making for cleaner shutdown and allowing us to pthread_join the miner
threads on kill_work().
- Set pool->probed to true after an attempt to resolve the url via stratum code.
- icarus test nodev everywhere
- usbutils/icarus separate FTDI transfer values and more debug
- add icarus to hotplug
- usbutils add rest of icarus
- simple serial-USB python test script
- icarus->USB v0.1 incomplete - missing initialise()
- README spelling
- Update documentation for icarus switch to USB
- Add USB rules for supported USB devices
- switch icarus configuration to usb
- usbutils new command for icarus
- usb add a numeric sub-indentity for each name
- usbutils - make FTDI handling automatic
- fix duplicate name
- usbutils set Black Arrow Lancelot's as BAL and match the lot->llt name
- usbutils identify Icarus devices
- libusb_control_transfer 16 bit words are endian specific.
- usb_applog separate amt display
- Show pool difficulty more verbosely if it changes via stratum.
- Attribute whatever stats we can get on untracked stratum shares based on
current pool diff.
- Provide a --lowmem option which does not cache shares on failed submission to
prevent low memory hardware (eg Avalon) from crashing.
- Update util.c
member
Activity: 86
Merit: 10
when the new version of cgminer will come out?
newbie
Activity: 50
Merit: 0
Thanks. That gets us part of the way there. At least I know what it is likely trying to do when you have the problem. Do you know what happened at that particular time  [2013-05-31 14:04:07] on your machine? Did your IP address change, did you have network outage, did your ISP go down, did the pool go down? Did you delete windows in disgust and install linux to fix this?

I checked the router, and it didn't hang up or change IPs. The windows box has a static IP.

One other thing that might help - All machines mining on this particular internet connection would fail, not just this one. (They are all windows boxes)

That's the best I can tell you for now.

I haven't gone into the Linux world yet to mine because its been years, and I think I have been demoted to noob status again.

I probably should switch to linux though.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
ckolivas, I finally got my rig to error out again with verbose mode turned on.

Here are the errors:
...snip
I hope this helps you. Thanks!
Thanks. That gets us part of the way there. At least I know what it is likely trying to do when you have the problem. Do you know what happened at that particular time  [2013-05-31 14:04:07] on your machine? Did your IP address change, did you have network outage, did your ISP go down, did the pool go down? Did you delete windows in disgust and install linux to fix this?
newbie
Activity: 50
Merit: 0
ckolivas, I finally got my rig to error out again with verbose mode turned on.

Here are the errors:

http://users.on.net/pacey/bit/errorcaught.jpg

And here is the log file:

http://users.on.net/pacey/bit/logfile02.txt

I hope this helps you. Thanks!
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
oh right, my fault.
in the meantime i decided to build from source.

Used this :

Code:
CFLAGS="-g -W -Wall" ./autogen.sh --disable-opencl --disable-adl --enable-icarus
Is that optimal ?

I think i made it fine. Haven't tested in mining but at least it is executable.  Smiley

Yeah when I saw 12.04 in your post I assumed you were using ckolivas binary.
Sorry got that mixed up.

But since you are using 12.04, you will need to use the ckoivas binary anyway.

cgminer-3.1.1-x86_64-built/cgminer-nogpu
full member
Activity: 188
Merit: 100
oh right, my fault.
in the meantime i decided to build from source.

Used this :

Code:
CFLAGS="-g -W -Wall" ./autogen.sh --disable-opencl --disable-adl --enable-icarus
Is that optimal ?

I think i made it fine. Haven't tested in mining but at least it is executable.  Smiley
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
i downloaded the https://github.com/kanoi/cgminer-binaries/raw/master/Ubuntu_11.04_x86_64/cgminer-3.1.1a and i'm using xubuntu 12.10. I'll only need cgminer for ASICMINER usbs.

i'm getting this error :

Code:
./cgminer-3.1.1a: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

if i got it right opencl is for GPU mining, that i will not need. So how may i use cgminer or bypass the error? Thanks.
look at what you downloaded ...

cgminer-3.1.1-x86_64-built/cgminer-nogpu

Edit: oops sorry you downloaded my 11.04
OK - that's compiled specifically for GPUs
No reason to be mining on 11.04 unless you have GPUs

Get the master ckolivas version (you'll need it on 12.04 anyway)
full member
Activity: 188
Merit: 100
i downloaded the https://github.com/kanoi/cgminer-binaries/raw/master/Ubuntu_11.04_x86_64/cgminer-3.1.1a and i'm using xubuntu 12.10. I'll only need cgminer for ASICMINER usbs.

i'm getting this error :

Code:
./cgminer-3.1.1a: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

if i got it right opencl is for GPU mining, that i will not need. So how may i use cgminer or bypass the error? Thanks.
legendary
Activity: 1792
Merit: 1008
/dev/null
Seriously, the support asking for here is: "How do I access a file on windows"
Can we avoid "how do I use a computer" posts for page after page thanks?
Waste of damn space.
seems we need a "how to commit suicide to increase the overall inteligence of humanity" Tongue
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Seriously, the support asking for here is: "How do I access a file on windows"
Can we avoid "how do I use a computer" posts for page after page thanks?
Waste of damn space.
legendary
Activity: 952
Merit: 1000
Catalyst 13.6 beta
Did you try downgrading to 13.1? Beta drivers are not recommended for mining.  Roll Eyes
sr. member
Activity: 378
Merit: 250
FYI, just so you know... on the recent Windows OSes, you have to become "Owner" of a directory to access it by rightclicking to properties and then security tab and go in about two layers deep to change the owner to yourself before you can change permissions.
legendary
Activity: 2912
Merit: 1060
I wasn't being mean, I'm just happy we found a work around. Works prefect on my 2012 which is 8 but even more strict.
full member
Activity: 236
Merit: 109
I said who cares like forget about it. Something is wrong with your windows but it doesn't matter, you still got it to work.

My windows is W8x64. It is a month old, not tweaked or smth likr that.
Just launched cgminer with .exe than put in url, name and pass it launched but could not create .bin files and crashed. I repeated the procedure with my old .bin files from 2.11.4. It works. Hashrate is bad but it works.

Also tried to launch BFGminer with .exe than put in url, name and pass. It launched but gives me: ocl 0: invalid nonce - HW error.

Catalyst 13.6 beta
legendary
Activity: 2912
Merit: 1060
I said who cares like forget about it. Something is wrong with your windows but it doesn't matter, you still got it to work.
full member
Activity: 236
Merit: 109
Yes, it opens with notepad!
Contents of config file:
cgminer -o http://pool.itzod.ru:3333 -u *** -p *** -I d --gpu-engine 900,850 --gpu-memclock 300,300 --temp-target 85 -k diablo
full member
Activity: 236
Merit: 109
Your permissions are screwed, try a check disk.
If not who cares, you have a good work around. Next.

Check disk reports that no mistakes found! The 2nd part of your message is not clear to me. Please explain.
How do I fix those permissions?
Jump to: