Bitcoin Forum
April 27, 2024, 08:43:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
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 ... 66 »
  Print  
Author Topic: Hacking The KNC Firmware: Overclocking  (Read 144308 times)
Dave5
Member
**
Offline Offline

Activity: 109
Merit: 10


View Profile
December 18, 2013, 11:21:13 PM
 #101

What do you mean restart the miner?

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

Does it rewrites the zzz.sh file?  or its only in memory and resets when miner is rebooted?

Thanks!

❒ SWISS ALPS ❒        ▬ MINING & ENERGY ▬      ❒ SWISS ALPS ❒
█████          The Smart Mining Company           █████
Telegram █  Get a piece of COLD 6 220 238 SAM █     Twitter
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714207430
Hero Member
*
Offline Offline

Posts: 1714207430

View Profile Personal Message (Offline)

Ignore
1714207430
Reply with quote  #2

1714207430
Report to moderator
1714207430
Hero Member
*
Offline Offline

Posts: 1714207430

View Profile Personal Message (Offline)

Ignore
1714207430
Reply with quote  #2

1714207430
Report to moderator
1714207430
Hero Member
*
Offline Offline

Posts: 1714207430

View Profile Personal Message (Offline)

Ignore
1714207430
Reply with quote  #2

1714207430
Report to moderator
chrono030
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
December 19, 2013, 12:03:30 AM
 #102

What do you mean restart the miner?

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

Does it rewrites the zzz.sh file?  or its only in memory and resets when miner is rebooted?

Thanks!

You probably shouldnt be monkeying around with your miner if you don't understand the SED command... You've been warned.

The substitute command changes all occurrences of the regular expression into a new value.  In the case above, it is substituting BD1BF1B in the cgminer.sh file and creating a new zzz.sh file.  The command then runs the zzz.sh script
Dave5
Member
**
Offline Offline

Activity: 109
Merit: 10


View Profile
December 19, 2013, 12:29:32 AM
 #103

Thank you for the clear explanation.

Now when I reboot/restart the miner, which .sh will be run?

The old (cgminer.sh) or the new zzz.sh?

Thanks!

❒ SWISS ALPS ❒        ▬ MINING & ENERGY ▬      ❒ SWISS ALPS ❒
█████          The Smart Mining Company           █████
Telegram █  Get a piece of COLD 6 220 238 SAM █     Twitter
arousedrhino
Sr. Member
****
Offline Offline

Activity: 347
Merit: 250


View Profile
December 19, 2013, 02:05:12 AM
 #104

How do you do this with bfgminer? When you launch bfgminer with the command "./bfgminer -S knc:auto -c /config/cgminer.conf" will that then use the modified cgminer.sh file or do I need to follow the instructions at https://bitcointalk.org/index.php?topic=170332.msg3714194#msg3714194 to copy the cgminer.sh and make my own bfgminer.sh file?

Thanks for the help

You have to modify the COPY of the cgminer.sh to start bfgminer instead.
details at link below
https://bitcointalk.org/index.php?topic=170332.msg3714194#msg3714194

You might could start a modified cgminer.sh, stop it and use
"./bfgminer -S knc:auto -c /config/cgminer.conf"

EDIT and I'm ignorant for pointing you to a link included in your post, lol

Haha, no worries I went through that modification process but for some reason it did not work. I think I'll have to try it again. Just to be clear the bfgminer.sh is based on a copy of the cgminer.sh with mentioned modifications?

Thanks for the assistance.
joeventura
Hero Member
*****
Offline Offline

Activity: 854
Merit: 500



View Profile
December 19, 2013, 03:02:08 AM
 #105

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.


My problem is I cant find that exact code in my file

Quote
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 PLL
                        i2cset -y 2 0x71 1 $((p+1))
                        for c in 0 1 2 3 ; do
                                cmd=$(printf "0x84,0x%02X,0,0" $c)
                                spi-test -s 50000 -OHC -D /dev/spidev1.0 $cmd >/dev/null
                                cmd=$(printf "0x86,0x%02X,0x01,0xD1" $c) 
                                spi-test -s 50000 -OHC -D /dev/spidev1.0 $cmd >/dev/null
                                cmd=$(printf "0x85,0x%02X,0,0" $c)
                                spi-test -s 50000 -OHC -D /dev/spidev1.0 $cmd >/dev/null
                        done

                        # 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 PLL
                        i2cset -y 2 0x71 1 $((p+1))
                        for c in 0 1 2 3 ; do
                                cmd=$(printf "0x84,0x%02X,0,0" $c)
                                spi-test -s 50000 -OHC -D /dev/spidev1.0 $cmd >/dev/null
                        done

                        # disable all cores
                        i=0
                        while [[ $i -lt 192 ]] ; do
                                i2cset -y 2 0x2$p $i 0


Thats what miine looks like (4 VRM)

What should I change? The bolded line?
ceyre
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 19, 2013, 03:02:34 AM
 #106

Those of you with watercooled systems, care to show some pictures of how you set it up?
I am considering water cooling, not because I have heat problems, just because I am preventative by nature... Smiley
tolip_wen
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


View Profile
December 19, 2013, 04:13:58 AM
 #107

What do you mean restart the miner?

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

Does it rewrites the zzz.sh file?  or its only in memory and resets when miner is rebooted?

Thanks!

The sed thingie keeps the original and makes a copy that survives reboot.

Reboot to run original
or
'/etc/init.d/cgminer.sh restart'


to run modified
'/config/zzz.sh restart'
(make changes only to the copy for fast recovery to stock system)

to swith back to normal
'/etc/init.d/cgminer.sh restart'

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

Activity: 386
Merit: 250


View Profile
December 19, 2013, 04:24:59 AM
 #108


What should I change? The bolded line?

modify the line you bolded to change whole miner speed

to change single die speed add a section like this for each module
https://bitcointalk.org/index.php?topic=313978.msg4010530#msg4010530

Add it right below the bolded line

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

Activity: 226
Merit: 100



View Profile
December 19, 2013, 04:28:06 AM
 #109

Woohoo! I'm running at ~910GH/s with less than 1% HW errors on my 6-module October Jupiter. Before overclocking, I could barely get 840GH/s and had ~3% HW errors.


1N3o5Kyvb4iECiJ3WKScKY8xTVXxf1hMvA
mwarrior
Member
**
Offline Offline

Activity: 329
Merit: 10


https://eloncity.io/


View Profile
December 19, 2013, 05:07:58 AM
Last edit: December 19, 2013, 05:40:41 AM by mwarrior
 #110

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.


Wow.  I must say hieroglyphics / Greek / anything I can't understand fits this fits just perfect.  After about 5 hours I figured it out.  I think a lot of people are looking for an exact match to the (p) values in the code etc. Thanks for this info.  I was able to bump my 8 VRM jupiter up to a 15% increase as well and it is running great.  Temps are fine as it's running in the garage and cold as balls down there.  I have 1 chip running at 55° and the other 3 are between 35° and 38°.  What is the max temp you want to get these  while overclocking?  The whole vi editor seems very antiquated to me but I most certainly see where it is useful (and I'm sure all the old school mainframe guys at work know it well).  With what you did above,  does it adjust all chips or just one?  I'm pretty sure I saw that you should have a section for each ASIC, but it also looks like the code might perform a wham bam thank you man and do all at once.  Still trying to figure that part out.   Thanks!

ElGabo
Hero Member
*****
Offline Offline

Activity: 635
Merit: 500


View Profile
December 19, 2013, 07:48:35 AM
 #111

tolip_wen

Could give some help for the clock values (in the command line)?

Or just a tip how to figre it out?



" 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"
tolip_wen
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


View Profile
December 19, 2013, 01:34:47 PM
 #112

tolip_wen

Could give some help for the clock values (in the command line)?

Or just a tip how to figre it out?


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


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

Activity: 635
Merit: 500


View Profile
December 19, 2013, 01:46:44 PM
 #113

Yep I've played with this.

But it's confirmed till 850. You didn't wrote the mhz to the other combos.

I saw in your list 950Mhz. Could you help what is the number for that?

" 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"
chrono030
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
December 19, 2013, 02:39:32 PM
Last edit: December 19, 2013, 02:53:35 PM by chrono030
 #114

This is a bit odd, i tried running the SED command and when it rebooted CGminer it prompted me to enter the pool credentials etc... I rebooted the miner and now cgminer and now i am getting some CGminer errors related to pool credentials etc?  Any ideas?

Edit: Very odd, eligius works with this mod, but bitminter does not.  Perhaps it has something to do with the pool credentials?  Anyone have any insight?

Edit2: Bitminter pool seems to be back up using original unmodified file.
r1senfa17h
Full Member
***
Offline Offline

Activity: 226
Merit: 100



View Profile
December 19, 2013, 02:54:30 PM
 #115

This is a bit odd, i tried running the SED command and when it rebooted CGminer it prompted me to enter the pool credentials etc... I rebooted the miner and now cgminer and now i am getting some CGminer errors related to pool credentials etc?  Any ideas?

Edit: Very odd, eligius works with this mod, but bitminter does not.  Perhaps it has something to do with the pool credentials?  Anyone have any insight?

Edit2: Bitminter pool seems to be back up using original unmodified file.

There's absolutely no possible way that the sed command (if run on cgminer.sh) would have altered your pool credentials in any way. Is it possible that you ran sed against cgminer.conf instead?

1N3o5Kyvb4iECiJ3WKScKY8xTVXxf1hMvA
the-skeptic
Member
**
Offline Offline

Activity: 91
Merit: 10


View Profile
December 19, 2013, 03:05:11 PM
 #116

Wow, just wow. I love you people. In a purely platonic way, that is.

Thanks to this thread, I have worked my october jupiter  (4-VRMs) up through different speeds using different codes in cgminer.sh. Currently "231" really kicks this sucker in the pants.

My sad story involves KNC refusing to advance RMA bad components, so my Jupiter was gimping along at 495Ghs with two die-0 boards and two good boards. Instead of trying to stay sane during a week or two of downtime (valium, xanax anyone?), I decided that I would just run the two die-0 boards at 75%, because it would take months to break even from the RMA downtime.

I am happy to announce that changing the cgminer.sh x086 register to 231 I am seeing 598Ghs locally and 595-605 at the pool!

VRMs are a little toasty, pushing 43-45W each, but I am confident that they have built some tolerances into the components and they would withstand a sustained 55W if asked. I have also added two extra 120mm fans inside the case to push more air past the rear ASIC boards to keep temps down in the 50s.

Many thanks to Tolip_wen and all the others who have helped bring my Jupiter up to factory specs, plus a bonus 50Ghs on top. On a machine with only 14 of 16 good dies!

Don't they usually refer to hidden tricks in software as easter eggs? Sounds like Santa brought me 100Ghs for Christmas instead!
chrono030
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
December 19, 2013, 03:44:46 PM
Last edit: December 19, 2013, 04:09:08 PM by chrono030
 #117

This is a bit odd, i tried running the SED command and when it rebooted CGminer it prompted me to enter the pool credentials etc... I rebooted the miner and now cgminer and now i am getting some CGminer errors related to pool credentials etc?  Any ideas?

Edit: Very odd, eligius works with this mod, but bitminter does not.  Perhaps it has something to do with the pool credentials?  Anyone have any insight?

Edit2: Bitminter pool seems to be back up using original unmodified file.

There's absolutely no possible way that the sed command (if run on cgminer.sh) would have altered your pool credentials in any way. Is it possible that you ran sed against cgminer.conf instead?

Nope - no possible way.  For some reason, it takes 5 minutes or so for CGminer to figure out that the bitminter pool is alive.  Eliguis works perfectly well right at bootup.  After about 10 minutes of mining, CGminer will revert back to the bitminter pool once it verifies that it is alive.

In summary - For those of you running on bitminter, please configure a backup pool in the KNCminer web interface ( i had only configured mine in the cgminer.conf file) BEFORE running this command.
Biffa
Legendary
*
Offline Offline

Activity: 3220
Merit: 1220



View Profile
December 20, 2013, 02:49:46 AM
Last edit: December 20, 2013, 03:05:52 AM by Biffa
 #118

My sad story involves KNC refusing to advance RMA bad components, so my Jupiter was gimping along at 495Ghs with two die-0 boards and two good boards. Instead of trying to stay sane during a week or two of downtime (valium, xanax anyone?), I decided that I would just run the two die-0 boards at 75%, because it would take months to break even from the RMA downtime.

Where do you live? On the moon? Smiley Huh Most people get RMA turn around in a matter of days.

Oh but congrats on overclocking your miner, thats pretty cool.  Grin

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


Mine @ pools that pay Tx fees & don't mine empty blocks :: kanopool :: ckpool ::
Should bitmain create LPM for all models?
:: Dalcore's Crypto Mining H/W Hosting Directory & Reputation ::
palmface
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
December 20, 2013, 03:59:59 AM
 #119



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
palmface
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
December 20, 2013, 04:03:37 AM
 #120

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!
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 ... 66 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!