Bitcoin Forum
December 18, 2017, 12:53:28 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ... 66 »
  Print  
Author Topic: Hacking The KNC Firmware: Overclocking  (Read 143276 times)
Biffa
Legendary
*
Offline Offline

Activity: 1372



View Profile
December 20, 2013, 04:10:40 AM
 #121



Anyone else have a cgminer.sh that doesn't look anything like the one the-skeptic posted?

I'm running 0.99-tune but mine doesn't have anything that even vaguely looks like:  cmd=$(printf "0x86,0x%02X,0x01,0xF1" $c)

This is what mine looks like (vanilla without touching anything)

Code:
#!/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/cgminer
NAME=cgminer
DESC="Cgminer daemon"

set -e

test -x "$DAEMON" || exit 0

do_start() {
# Stop SPI poller
spi_ena=0
i2cset -y 2 0x71 2 $spi_ena

good_ports=""
bad_ports=""

# CLear faults in megadlynx's
for b in 3 4 5 6 7 8 ; do
for d in 0 1 2 3 4 5 6 7 ; do
i2cset -y $b 0x1$d 3 >/dev/null 2>&1 || true
done
done

for p in 0 1 2 3 4 5 ; do
i2cset -y 2 0x71 1 $((p+1))
good_flag=0
ar="$(spi-test -s 50000 -OHC -D /dev/spidev1.0 0x80,3,0,0,0,0,0,0 | tail -c 13)"
                if [ "x$ar" = "x00 30 A0 01" ] ; then
good_flag=1
fi
ar="$(spi-test -s 50000 -OHC -D /dev/spidev1.0 0x80,2,0,0,0,0,0,0 | tail -c 13)"
                if [ "x$ar" = "x00 30 A0 01" ] ; then
good_flag=1
fi
ar="$(spi-test -s 50000 -OHC -D /dev/spidev1.0 0x80,1,0,0,0,0,0,0 | tail -c 13)"
                if [ "x$ar" = "x00 30 A0 01" ] ; then
good_flag=1
fi
ar="$(spi-test -s 50000 -OHC -D /dev/spidev1.0 0x80,0,0,0,0,0,0,0 | tail -c 13)"
                if [ "x$ar" = "x00 30 A0 01" ] ; then
good_flag=1
fi

if [ "$good_flag" = "1" ] ; then
good_ports=$good_ports" $p"
else
bad_ports=$bad_ports" $p"
fi
done

if [ -n "$good_ports" ] ; then
for p in $good_ports ; do
# re-enable all cores
i=0
while [[ $i -lt 192 ]] ; do
i2cset -y 2 0x2$p $i 1
i=$((i+1))
done
spi_ena=$(( spi_ena | (1 << $p) ))
done
fi
if [ -n "$bad_ports" ] ; then
for p in $bad_ports ; do
# disable all cores
i=0
while [[ $i -lt 192 ]] ; do
i2cset -y 2 0x2$p $i 0
i=$((i+1))
done
spi_ena=$(( spi_ena & ~(1 << $p) ))
done
fi

# Disable direct SPI
i2cset -y 2 0x71 1 0

# Enable SPI poller
i2cset -y 2 0x71 2 $spi_ena

MINING_SW=`ls -l /usr/bin/cgminer`
if [ "`echo $MINING_SW | grep bfgminer`" != "" ] ; then
export LD_LIBRARY_PATH=/usr/bfgminer/
start-stop-daemon -b -S -x screen -- -S cgminer -t cgminer -m -d "$DAEMON" --api-listen -c /config/cgminer.conf -S knc:auto
else
start-stop-daemon -b -S -x screen -- -S cgminer -t cgminer -m -d "$DAEMON" --api-listen --default-config /config/cgminer.conf
fi
}

do_stop() {
        killall -9 cgminer || true
}
case "$1" in
  start)
        echo -n "Starting $DESC: "
do_start
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
do_stop
        echo "$NAME."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: "
        do_stop
        do_start
        echo "$NAME."
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0


I had the same thing, it was caused by Bertmod. Shut your miner down and restart it, don't load Bertmod. Then run the sed cmd and you should be good to go.
Hope this helps

OK thanks, so do you load it after to check temps, cores etc?

1513601608
Hero Member
*
Offline Offline

Posts: 1513601608

View Profile Personal Message (Offline)

Ignore
1513601608
Reply with quote  #2

1513601608
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513601608
Hero Member
*
Offline Offline

Posts: 1513601608

View Profile Personal Message (Offline)

Ignore
1513601608
Reply with quote  #2

1513601608
Report to moderator
palmface
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 20, 2013, 04:28:11 AM
 #122

I haven't reloaded bertmod yet, but so long as you have the zzz.sh file already you should be ok. Having said that, I do not know if zzz.sh survives a machine restart. I am monitoring temps on the Advanced page in the web ui at the moment.
dwdoc
Legendary
*
Offline Offline

Activity: 966


- - -Caveat Aleo- - -


View Profile
December 20, 2013, 04:57:49 AM
 #123

I second that.  I'm getting between 575 and 625 on my day 1 shipment miner (which arrived on day 5) .  The Beaglebone board went south on mine the second week I had it and I lost 2 weeks due to incompetence by KNC.  This is truly amazing and I thank you so very much for sharing the info.  Still wish I had my 2 weeks back when the difficulty was still 86,933,018, but this takes a little pain away from the wound and I salute you for it.  Curious if any of you guys bit on the new miner?  If so I look forward to seeing what you can accomplish.  I didn't bite on that one myself after getting burned the first time... but will be watching.  Many thanks!


- .m.w. -


and all you did was issue this:

sed sBD1BF1B </etc/init.d/cgminer.sh >/config/zzz.sh ; /config/zzz.sh restart

??

The sed command changes one register and gives you a mild 7% boost in speed. In order to see the fastest speeds you need to read though the hieroglyphics on this thread and figure out what they are saying. when I figured it out, I am getting almost 15% over factory speeds.

The main thing you need to do is ssh into your miner and use a text editor to edit /etc/init.d/cgminer.sh

try:
vi /etc/init.d/cgminer.sh


Use the cursor keys on your keyboard to scroll down till you see this code, the important parts you will change are in bold:

Quote
                                                           
                                if [ $p -eq 2 ]                                            
                                then                                                      
                                        cmd=$(printf "0x86,0x%02X,0x01,0xF1" $c)          
                                        if [ $c -eq 1 ]                                    
                                        then                                              
                                                cmd=$(printf "0x86,0x%02X,0x03,0xE2" $c)  
                                        fi                                                

When you see someone say "Try 201" (which gives about 12% speed increase) you would edit the code to look like:

Quote
                                                           
                                if [ $p -eq 2 ]                                            
                                then                                                      
                                        cmd=$(printf "0x86,0x%02X,0x02,0x01" $c)          
                                        if [ $c -eq 1 ]                                    
                                        then                                              
                                                cmd=$(printf "0x86,0x%02X,0x03,0xE2" $c)  
                                        fi                                                

Hit escape when finished. Then hit the : key, then x to save.

relaunch cgminer with the command line:
/etc/init.d/cgminer.sh restart

Don't blame me if shit blows up. I'm just one newbie helping another.


I personally use 211, but have extra fans inside the case for extra cooling, just to be safe. A list of codes and corresponding speeds are listed several times in this thread, I suggest trying several until you find one that gives you a good boost in speed without going over 40-42watts per die, since they are rated at 40W per VRM.

Good luck.

1+
DPoS
Sr. Member
****
Offline Offline

Activity: 462



View Profile
December 20, 2013, 05:16:36 AM
 #124

I haven't reloaded bertmod yet, but so long as you have the zzz.sh file already you should be ok. Having said that, I do not know if zzz.sh survives a machine restart. I am monitoring temps on the Advanced page in the web ui at the moment.

anything in /config survives.. some things can get rewritten by factory files on a hard reset there too

~~BTC~~GAMBIT~~BTC~~Play Boardgames for Bitcoins!!~~BTC~~GAMBIT~~BTC~~ Something I say help? Donate BTC! 1KN1K1xStzsgfYxdArSX4PEjFfcLEuYhid
palmface
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 20, 2013, 06:09:37 AM
 #125

I haven't reloaded bertmod yet, but so long as you have the zzz.sh file already you should be ok. Having said that, I do not know if zzz.sh survives a machine restart. I am monitoring temps on the Advanced page in the web ui at the moment.

anything in /config survives.. some things can get rewritten by factory files on a hard reset there too


Thanks for this. Good to know!
tolip_wen
Sr. Member
****
Offline Offline

Activity: 387


View Profile
December 20, 2013, 12:22:04 PM
 #126

Just wanted to drop a big Thank You to tolip-wen and everyone who helped get this going. Please tolip, drop an address here so I can send you a little appreciation!

since you asked

13362fxFAdrhagmCvSmFy4WoHrNRPG2V57

Or (from an earlier post in this thread)

Quote
I spent a lot to find and document the details and pass them on, downtime is money.
You can help fund this research if interested.
Just point your miner to one of my workers for a few minutes.

For BTCGuild worker = tolip_ZsearchFund (PPS, best for short donations)
For GHash.io  worker = tolip.anything (replace anything with your name if you like)

You can also use my reseller ID if you purchase a Neptune.

https://www.kncminer.com/?resellerid=206

I don't expect anything, I do this for fun, I share to educate.

 Smiley

'twisted research and opinion' donations happily accepted @
13362fxFAdrhagmCvSmFy4WoHrNRPG2V57
My sub 1337 vanity address Wink
joeventura
Hero Member
*****
Offline Offline

Activity: 714



View Profile
December 20, 2013, 12:22:48 PM
 #127

Thanks everyone for the help, got about a 14% increase sustained. using 211

What is the furthest someone has pushed these? I have the 4VRM units

BitCoinRateWatcher.com One stop for latest rates from MtGox, Bitstamp, CampBx, Coinbase and Bitpay all on one mobile friendly screen.
the-skeptic
Member
**
Offline Offline

Activity: 91


View Profile
December 20, 2013, 02:20:35 PM
 #128

JoeVentura,

I live on the edge. I use 231. It's about 20% faster than stock but some of my VRMs are in the 45W range!

Edit: 221 works also, about 17% increase in speed but about the same power usage as 231. I would recommend some extra cooling since I saw the rear ASICs climbing into the mid-high 70s before I added a couple of 120mm helper fans between the four asic boards. Three boards are in the mid 50s and one is on the low 60s, so I feel more confident. the VRMs are getting some extra cooling too.
joeventura
Hero Member
*****
Offline Offline

Activity: 714



View Profile
December 20, 2013, 02:26:54 PM
 #129

JoeVentura,

I live on the edge. I use 231. It's about 20% faster than stock but some of my VRMs are in the 45W range!

I am in the 39-41W range with 211

BitCoinRateWatcher.com One stop for latest rates from MtGox, Bitstamp, CampBx, Coinbase and Bitpay all on one mobile friendly screen.
the-skeptic
Member
**
Offline Offline

Activity: 91


View Profile
December 20, 2013, 02:36:08 PM
 #130

JoeVentura,

I live on the edge. I use 231. It's about 20% faster than stock but some of my VRMs are in the 45W range!

I am in the 39-41W range with 211

Ok, my "perfect" boards consume 41-43W, but the boards with bad die-0 problems run 0W on die-0,  about 45-46W on the second die and 43-44 on the remaining two. This is all with 231.

tolip_wen
Sr. Member
****
Offline Offline

Activity: 387


View Profile
December 20, 2013, 03:24:34 PM
 #131

Ok, my "perfect" boards consume 41-43W, but the boards with bad die-0 problems run 0W on die-0,  about 45-46W on the second die and 43-44 on the remaining two. This is all with 231.

Did you try running die 0 slower?

'twisted research and opinion' donations happily accepted @
13362fxFAdrhagmCvSmFy4WoHrNRPG2V57
My sub 1337 vanity address Wink
r1senfa17h
Full Member
***
Offline Offline

Activity: 226



View Profile
December 20, 2013, 08:20:20 PM
 #132

Getting closer to that 1TH mark on my Oct 6-module Jupiter! It's pulling about 1250 watts at the wall on my 1250w PSU though Shocked
Who wants to bet how long it will make it before blowing up? It's running ~47 watts per DC/DC at the moment with modules ranging from 55c to 79.5c. I'm stress testing this sucker so others don't have to  Grin



Edit: I should mention that this screenshot was taken after about 5 minutes of running. It has settled to ~980GH/s with 1.6% HW errors (WU: 13362 = ~956GH/s at the pool).

1N3o5Kyvb4iECiJ3WKScKY8xTVXxf1hMvA
ElGabo
Hero Member
*****
Offline Offline

Activity: 636


View Profile
December 20, 2013, 08:27:16 PM
 #133

Don't worry bro! You'll get it!  Wink



Big thanks who helped!

" I'm waiting for my punishment, I know it's on my way
  So cut, cut, cut me up and fuck, fuck, fuck me up"
CYPER
Hero Member
*****
Offline Offline

Activity: 714



View Profile
December 20, 2013, 09:00:29 PM
 #134

So guys, is it riskier to try it on a 8VRM October Jupiter, or shall I try it first on a 4VRM October one?

If this post helped you and you feel generous you know what to do: 1P9tXFy9bVgzrfPGeV7F8np26ZtFdCCWvz
ElGabo
Hero Member
*****
Offline Offline

Activity: 636


View Profile
December 20, 2013, 09:11:17 PM
 #135

So guys, is it riskier to try it on a 8VRM October Jupiter, or shall I try it first on a 4VRM October one?

I doesn't have any 8 vrm boards but it works fine with 4 vrm-s. Smiley Just watch your temps. Smiley

" I'm waiting for my punishment, I know it's on my way
  So cut, cut, cut me up and fuck, fuck, fuck me up"
DPoS
Sr. Member
****
Offline Offline

Activity: 462



View Profile
December 20, 2013, 10:42:52 PM
 #136

Getting closer to that 1TH mark on my Oct 6-module Jupiter! It's pulling about 1250 watts at the wall on my 1250w PSU though Shocked
Who wants to bet how long it will make it before blowing up? It's running ~47 watts per DC/DC at the moment with modules ranging from 55c to 79.5c. I'm stress testing this sucker so others don't have to  Grin

Best to never change anything now..  you will be tempted to upgrade the PSU, or perhaps some new firmware or whatever, but until the system shutsdown on its own (or power outage) just keep it and the PSU cooled as best you can

Many people had issues with dies/cores after they made changes thinking it would be better and found out how flaky these things really are

congratz!   I think I will wait til after the holidays to ramp up my jupiters

~~BTC~~GAMBIT~~BTC~~Play Boardgames for Bitcoins!!~~BTC~~GAMBIT~~BTC~~ Something I say help? Donate BTC! 1KN1K1xStzsgfYxdArSX4PEjFfcLEuYhid
jermwerty
Sr. Member
****
Offline Offline

Activity: 477


View Profile
December 20, 2013, 10:52:23 PM
 #137

So guys, is it riskier to try it on a 8VRM October Jupiter, or shall I try it first on a 4VRM October one?

From reading this thread no one has been able to get 8VRM boards to work?Huh?   Sad

I have an early 8VRM Saturn and I couldn't get it to work with an upgrade module either.  I also only get 264GH on it as each chip has some individual cores that are constantly flipping between enable/disable, but at least no DIE 0 issues...
CYPER
Hero Member
*****
Offline Offline

Activity: 714



View Profile
December 20, 2013, 11:54:47 PM
 #138

ElGabo was kind enough to help me with the OC  Grin

Btw on one of the miners I am testing the OC I have a board with 2 dead dies, which I usually revive by increasing the voltage of all dies to the max and then immediately lowering them back to normal.
So is there a way to increase the voltage for these 2 dies to revive them while zzz.sh is running.
I get it if I change anything in the Advanced tab then the miner switches back to the original file.
Why is that?

If this post helped you and you feel generous you know what to do: 1P9tXFy9bVgzrfPGeV7F8np26ZtFdCCWvz
the-skeptic
Member
**
Offline Offline

Activity: 91


View Profile
December 21, 2013, 12:19:35 AM
 #139

OK, I get what each variable means and how to manipulate it, I'm just not sure the proper way to insert the code into cgminer.sh in order to implement it. Could you give us a sample of working code with a little more reference code on each end to help us newbs through this? I guess the correct term is syntax. I understand the code (kinda) I just need to know the proper syntax so that I can insert my own version into cgminer.sh.

Thanks!

While I was asleep bfgminer quit and cgminer took over at default speed.

Below is how I do different clock on different die and module.

ASIC plugs on mainboard are numbered 0,1,2,3,4,5
$p =2 stands for my first ASIC plugged into the third plug and counting up from zero it is 2.
$c = 1 is second die, program counts them from zero (ex 0,1,2,3)

$p =5 is my second ASIC plugged into 6th plug on mainboard.
Adjust according to your miner setup.
It is admittedly sloppy coding but it works, just a test.

I have Saturn, for a Jupiter you need 4 $p sections _IF_ you want different clocks per ASIC.

Code:
#                                                                                          
                                if [ $p -eq 2 ]                                            
                                then                                                      
                                        cmd=$(printf "0x86,0x%02X,0x01,0xF1" $c)          
                                        if [ $c -eq 1 ]                                    
                                        then                                              
                                                cmd=$(printf "0x86,0x%02X,0x03,0xE2" $c)  
                                        fi                                                
                                fi                                                        
                                if [ $p -eq 5 ]                                            
                                then                                                      
                                        cmd=$(printf "0x86,0x%02X,0x01,0xF1" $c)            
                                fi                                                          
#                                                                                          
                                spi-test -s 50000 -OHC -D /dev/spidev1.0 $cmd >/dev/null    

My next focus will be running only 1/2 the cores on one die and trying higher clocks.
I hope to determine if the limit is power or noise related on 4 VRM modules.

tolip_wen
Sr. Member
****
Offline Offline

Activity: 387


View Profile
December 21, 2013, 09:21:55 AM
 #140

OK, I get what each variable means and how to manipulate it, I'm just not sure the proper way to insert the code into cgminer.sh in order to implement it. Could you give us a sample of working code with a little more reference code on each end to help us newbs through this? I guess the correct term is syntax. I understand the code (kinda) I just need to know the proper syntax so that I can insert my own version into cgminer.sh.

Thanks!


A newer better code example is here

https://bitcointalk.org/index.php?topic=313978.msg4010530#msg4010530


What you quoted was from earlier in the process and only addresses one die.

'twisted research and opinion' donations happily accepted @
13362fxFAdrhagmCvSmFy4WoHrNRPG2V57
My sub 1337 vanity address Wink
Pages: « 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ... 66 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!