Issue: This machine is sometimes able to run at the advertised speed (~1100 gh/s). Other times when cgminer starts, it runs at either 200 gh/s or 0 gh/s. But this appears to be setup and/or pool dependent.
Setup: Running via a raspberry pi with openwrt. No AUC. Instead, connected directly to the pi headers with command line option --avalon4-iic-detect.
Works: Previously, when using an AUC connection and connected to a Linux machine running cgminer built with --enable-avalon4. The machine worked at full speed. But in order to get this, it's necessary to restart cgminer about 10 times. With 9/10 tries, the machine runs at 200 gh/s, or worse, at 0 gh/s. Another variation is that during this setup, the machine would only be able to mine at full speed when connected to eligius pool (and that is after restarting cgminer about 10 times). F2pool or slushpool would not ever go above 200 gh/s.
Here is the log (https://pastebin.com/embed_js/MiVCQDSj) from running the command:
cgminer --lowmem --avalon4-fan 20 -o stratum+tcp://stratum.mining.eligius.st:3334 -O
Any help is greatly appreciated!
Start of the log. More at pastebin link:
[2017-12-13 06:24:23.801] Started cgminer 4.9.2
[2017-12-13 06:24:23.803] USB scan devices: checking for AV4 devices
[2017-12-13 06:24:23.804] RES: thread starting
[2017-12-13 06:24:23.970] AV4 looking for AV4 29f1:33f2 but found 0424:ec00 instead
[2017-12-13 06:24:23.972] AV4 looking for AV4 29f1:33f2 but found 0424:9514 instead
[2017-12-13 06:24:23.973] AV4 looking for AV4 29f1:33f2 but found 1d6b:0002 instead
[2017-12-13 06:24:23.974] AV4-0: Found at /dev/i2c-1
[2017-12-13 06:24:23.976] Pushing sem post to thread 0
[2017-12-13 06:24:23.977] Probing for an alive pool
[2017-12-13 06:24:23.979] Waiting on sem in miner thread
[2017-12-13 06:24:23.980] Testing pool stratum+tcp://stratum.mining.eligius.st:3334
[2017-12-13 06:24:24.224] Succeeded delayed connect
[2017-12-13 06:24:24.399] Pool 0 stratum session id: 200100001
[2017-12-13 06:24:24.401] Pool 0 difficulty changed to 4095.9
[2017-12-13 06:24:24.571] Pool 0 coinbase 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d03f2a3070d00456c6967697573005a3ea20afabe6d6d297308432d48f5f7ae7d21ba9164df4bef061c4726f45d716143d2104f2c32e70100000000000000002f6875322f002001000000000000f
[2017-12-13 06:24:24.582] AV4-0: AVA4_P_DETECT ID[1]
[2017-12-13 06:24:24.587] I2C-W-RAW(0x00)
[2017-12-13 06:24:24.597] I2C-R-RAW(0x00)
[2017-12-13 06:24:24.598] AV4-0-0: AVA4_P_ACKDETECT
[2017-12-13 06:24:24.600] AV4-0: Module detect ID[1]: 64
[2017-12-13 06:24:24.601] AV4-0: New module detect! ID[1]
[2017-12-13 06:24:24.602] AV4-0: AVA4_P_DETECT ID[2]
[2017-12-13 06:24:24.608] I2C-W-RAW(0x00)
[2017-12-13 06:24:24.614] i2c 0x00: failed to read raw from fdesc 9: I/O error
[2017-12-13 06:24:24.615] AV4-0: IIC xfer read raw failed!
[2017-12-13 06:24:24.615] 00000000 43 4e 40 00 01 01 01 32 53 67 cb 60 83 ab 34 31 |[email protected].`..41|
[2017-12-13 06:24:24.616] 00000010 31 35 30 33 2d 39 32 38 31 63 64 31 30 00 00 00 |1503-9281cd10...|
[2017-12-13 06:24:24.618] 00000020 00 00 00 00 00 00 d5 ea |........ |
[2017-12-13 06:24:24.618] AV4-0: AVA4_P_DETECT: Failed AUC xfer data with err -1
[2017-12-13 06:24:24.620] [thread 0: 0 hashes, 0.0 mhash/sec]
[2017-12-13 06:24:24.645] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.655] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.656] AV4-0-1: AVA4_P_STATUS
[2017-12-13 06:24:24.656] 00000000 00 00 00 1a 00 00 03 a2 00 00 01 90 00 00 ff 00 |................|
[2017-12-13 06:24:24.658] 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
[2017-12-13 06:24:24.683] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.693] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.694] AV4-0-1: AVA4_P_STATUS_LW
[2017-12-13 06:24:24.720] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.730] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.731] AV4-0-1: AVA4_P_STATUS_HW
[2017-12-13 06:24:24.756] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.766] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.768] AV4-0-1: AVA4_P_STATUS
[2017-12-13 06:24:24.768] 00000000 00 00 00 1a 00 00 03 a2 00 00 01 90 00 00 ff 00 |................|
[2017-12-13 06:24:24.769] 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
[2017-12-13 06:24:24.777] Stratum authorisation success for pool 0
[2017-12-13 06:24:24.778] Pool 0 stratum+tcp://stratum.mining.eligius.st:3334 alive
[2017-12-13 06:24:24.795] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.804] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.805] AV4-0-1: AVA4_P_STATUS_LW
[2017-12-13 06:24:24.830] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.840] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.841] AV4-0-1: AVA4_P_STATUS_HW
[2017-12-13 06:24:24.867] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.876] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.876] AV4-0-1: AVA4_P_STATUS
[2017-12-13 06:24:24.878] 00000000 00 00 00 1a 00 00 03 a2 00 00 01 90 00 00 ff 00 |................|
[2017-12-13 06:24:24.879] 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
[2017-12-13 06:24:24.904] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.915] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.916] AV4-0-1: AVA4_P_STATUS_LW
[2017-12-13 06:24:24.941] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.951] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.951] AV4-0-1: AVA4_P_STATUS_HW
[2017-12-13 06:24:24.976] I2C-W-RAW(0x01)
[2017-12-13 06:24:24.979] Unable to set thread to high priority
[2017-12-13 06:24:24.980] Work update message received
[2017-12-13 06:24:24.980] Selecting pool 0 for work
[2017-12-13 06:24:24.981] Generated stratum merkle d52d07efbf7f58ce5deb36730d5204d1edd8bd814db3b4bca360d67878d6062a
[2017-12-13 06:24:24.981] Generated stratum header 2000000049775607a9f1c3f8b8a3b874ee2a861b345b0236006fc5c70000000000000000d52d07efbf7f58ce5deb36730d5204d1edd8bd814db3b4bca360d67878d6062a5a3ea20a18009645000000000000008000000000000000000000000000000000000000000000000000000000
[2017-12-13 06:24:24.982] Work job_id 1514054154 757832 nonce2 0 ntime 5a3ea20a
[2017-12-13 06:24:24.982] Generated target 0000000000000000000000000000000000000000000000000000100000000000
[2017-12-13 06:24:24.983] Generated stratum work
[2017-12-13 06:24:24.983] Pushing work from pool 0 to hash queue
[2017-12-13 06:24:24.984] Network diff set to 1.87T
[2017-12-13 06:24:24.984] New block: 0000000000000000006fc5c7345b0236ee2a861bb8a3b874a9f1c3f849775607... diff 1.87T
[2017-12-13 06:24:24.985] Selecting pool 0 for work
[2017-12-13 06:24:24.986] Generated stratum merkle 5279b8d607ef9a6203b81fc80853c16e077eb3e3149f57f05690fb8c6ed8f166
[2017-12-13 06:24:24.986] Generated stratum header 2000000049775607a9f1c3f8b8a3b874ee2a861b345b0236006fc5c700000000000000005279b8d607ef9a6203b81fc80853c16e077eb3e3149f57f05690fb8c6ed8f1665a3ea20a18009645000000000000008000000000000000000000000000000000000000000000000000000000
[2017-12-13 06:24:24.986] Work job_id 1514054154 757832 nonce2 1 ntime 5a3ea20a
[2017-12-13 06:24:24.987] Generated target 0000000000000000000000000000000000000000000000000000100000000000
[2017-12-13 06:24:24.987] Generated stratum work
[2017-12-13 06:24:24.988] Pushing work from pool 0 to hash queue
[2017-12-13 06:24:24.990] Unable to set thread to low priority
[2017-12-13 06:24:24.990] Unable to set thread to low priority
[2017-12-13 06:24:24.991] Unable to set thread to low priority
[2017-12-13 06:24:24.992] I2C-R-RAW(0x01)
[2017-12-13 06:24:24.994] AV4-0-1: AVA4_P_STATUS
[2017-12-13 06:24:24.996] 00000000 00 00 00 1a 00 00 03 a2 00 00 01 90 00 00 ff 00 |................|
[2017-12-13 06:24:24.997] 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
[2017-12-13 06:24:24.999] AV4-0: New stratum: restart: 0, update: 1
[2017-12-13 06:24:25.000] API not running - API will not be available
[2017-12-13 06:24:25.001] Popping work from get queue to get work
[2017-12-13 06:24:25.002] Selecting pool 0 for work
[2017-12-13 06:24:25.003] Generated stratum merkle 00374fd68e5b9c314645456f8e3c438b8bf1824e4bb4b6d164a08fbe0af8b81a
[2017-12-13 06:24:25.003] Generated stratum header 2000000049775607a9f1c3f8b8a3b874ee2a861b345b0236006fc5c7000000000000000000374fd68e5b9c314645456f8e3c438b8bf1824e4bb4b6d164a08fbe0af8b81a5a3ea20a18009645000000000000008000000000000000000000000000000000000000000000000000000000
[2017-12-13 06:24:25.004] Work job_id 1514054154 757832 nonce2 2 ntime 5a3ea20a
[2017-12-13 06:24:25.004] Generated target 0000000000000000000000000000000000000000000000000000100000000000
[2017-12-13 06:24:25.005] Generated stratum work
[2017-12-13 06:24:25.005] Pushing work from pool 0 to hash queue
[2017-12-13 06:24:25.007] Testing pool stratum+tcp://stratum.mining.eligius.st:3334
[2017-12-13 06:24:25.007] Got work from get queue to get work for thread 0
[2017-12-13 06:24:25.009] Discarded cloned or rolled work
[2017-12-13 06:24:25.011] AV4-0: AVA4_P_DETECT ID[2]
[2017-12-13 06:24:25.016] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.022] i2c 0x00: failed to read raw from fdesc 9: I/O error
[2017-12-13 06:24:25.024] AV4-0: IIC xfer read raw failed!
[2017-12-13 06:24:25.025] 00000000 80 e7 05 00 ea 02 00 00 c8 42 f5 b6 28 10 db b6 |.........B..(...|
[2017-12-13 06:24:25.026] 00000010 00 00 00 00 a4 1b 08 00 60 bd 06 00 bd 07 00 00 |........`.......|
[2017-12-13 06:24:25.028] 00000020 40 92 04 00 17 bf 06 00 |@....... |
[2017-12-13 06:24:25.028] AV4-0: AVA4_P_DETECT: Failed AUC xfer data with err -1
[2017-12-13 06:24:25.030] AV4-0: Pool stratum message STATIC: 162, 115, 4, 36, 12
[2017-12-13 06:24:25.035] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.042] Generated target 000000000000000000000000000000000000000000000000c0ff3f0000000000
[2017-12-13 06:24:25.043] AV4-0: Pool stratum target: 000000000000000000000000000000000000000000000000c0ff3f0000000000
[2017-12-13 06:24:25.048] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.054] AV4-0: Pool stratum message JOBS_ID[9f4f]: 1514054154 757832
[2017-12-13 06:24:25.058] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.068] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.073] AV4-0: Pool stratum message modified COINBASE: 4 2
[2017-12-13 06:24:25.078] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.087] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.097] I2C-W-RAW(0x00)
[2017-12-13 06:24:25.106] I2C-W-RAW(0x00)
(Moderator note: This post was edited by frodocooper to replace the OP's quote tags with code tags for the log output.)