Bitcoin Forum

Bitcoin => Hardware => Topic started by: GenTarkin on November 02, 2014, 08:45:24 AM



Title: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: GenTarkin on November 02, 2014, 08:45:24 AM
So, most of the miners Ive ever tried on the PI absolutely hate its USB ports.. Ive had stability issues, CRC packet tossing problems, LIBUSB timeout errors ... enough to drive anyone insane w/ a PI....

A year or go w/ some miners back then I remedied the issue by adding:

dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3

to my /boot/cmdline.txt file ... it fixed the issues at the time...

>> to today, Ive had issues w/ newer 'faster' miners. Like the ones mentioned above, on various different hardware.

Well, after wanting to throw all my pi's out or just putting 1 per miner just so they 'might stay stable' ... I just knew there had to be / hopefully was a magic setting that would fix it all....
The rest of that puzzle was solved today (hopefully, so far it is)...

add this to the /boot/cmdline.txt as well:
dwc_otg.speed=1

This setting forces the USB ports on the pi into USB 1.1 mode and I believe disables some other highspeed 2.0 features as well.

As it turns out, the PI hates having a USB 2.0 or higher port plugged into it, it causes enormous latency issues w/ devices(in the form of packet loss, the exact thing CGMINER complains about). Maybe it just hates USB 2.0 devices period, I dont know, but it really hates hubs.

After running my miners for an hour or so, ALL of those CGMINER complaints, USB timeouts, CRC packet tossing is now COMPLETELY GONE!!!!!!
This would normally happen once or twice every 10 mins, or 10 times every 10mins...was completely random. Now ALL GONE.

I would go so far to even say you could probably get away w/ a shitload of miners now on the pi w/ this setting. Enough till the CPU of pi starts getting maxed anyways =P

Im truely amazed by this... =)

I hope this helps some of you guys out.


NOTE: I hope the story is the same in the morning, of course, many hours later and they are just as stable =) ... will follow up on this. But for right now, Im extremely excited!


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: dogie on November 02, 2014, 10:01:08 AM
I notice you've not mentioned this, but were you using a powered USB hub?


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: Newar on November 02, 2014, 10:34:40 AM

I had good success with the Y-cable mod [1] where the RPi only gets data and is disconnected from the USB power emtirely. Solved my USB issues (that I had with or without powered hubs).

[1] https://bitcointalk.org/index.php?topic=765365.msg8730781#msg8730781



Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: GenTarkin on November 02, 2014, 11:13:40 AM
I notice you've not mentioned this, but were you using a powered USB hub?

Yes, I use powered hubs, yes Ive ensured that the pi is not being backfed power through the uplink port on the hub ( so yes Ive done the mod to the hubs ).

Ive tried almost everything one could think of in regards to the hardware side. Diff cables, modded hubs, .. etc..
The USB 1.1 forcing is the one change that made everything 100x better for all my miners.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: Newar on November 02, 2014, 11:38:45 AM

Which miners are you using?


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: warrensgun on November 02, 2014, 03:23:46 PM
Sweet I'll have to give this a try.  I got so frustrated with the pi and usb miners - i just setup a computer to leave on to run them.  Talk about the opposite of what we should be doing.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: GenTarkin on November 02, 2014, 06:42:12 PM

Which miners are you using?

Primarily HF boards =O ... those most recently gave me the most issues.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: Zich on November 03, 2014, 01:09:00 AM
Sorry, maybe this is new for you. But some one already point out this long time ago in nanofury thread.
Still this is only work if only one type miner connected to Rpi. If there is multiple different brand miner, another problem arise.
Basicly Rpi is a crap.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: GenTarkin on November 03, 2014, 01:35:23 AM
Sorry, maybe this is new for you. But some one already point out this long time ago in nanofury thread.
Still this is only work if only one type miner connected to Rpi. If there is multiple different brand miner, another problem arise.
Basicly Rpi is a crap.

While thats a possibility, I can say that I have 3x HF boards & 2 GSblades running on a SINGLE pi without issue.
Also, I have 3x HF boards & 1 avy3 module on a SINGLE pi without issue.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: volosator on November 03, 2014, 05:42:26 PM
Not a solution for me: I use wifi connection to my Pi. It gives me more headache when I drop USB to 1.1 vs 2.0 for wifi dongle.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: richardamullens on November 03, 2014, 07:46:17 PM
I think that you will find that the Raspberry Pi B+ is much improved.  It can supply more power to the USB ports, it is more efficient (it uses switched mode rather than linear regulation to make 3.3V) and the USB software has improved with later versions of Raspbian.

I am using the B+ and the second generation B with CGminer with Antminer U1 and U2 devices.  The only problems I've had have been due to my powered USB hub dropping too much voltage when powering these devices.  My systems are now rock steady.


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: Photon939 on November 03, 2014, 09:44:42 PM
IDK I had pretty good luck with hooking up stupid amounts of junk to my raspi a few months ago when block erupters still managed to mine a couple bitcents

https://dl.dropboxusercontent.com/u/1181169/cap15.png


Title: Re: Do you hate the PI's USB ports like I do? here is a fix for us miners!!!!!!!!!
Post by: GenTarkin on November 03, 2014, 09:58:28 PM
Not a solution for me: I use wifi connection to my Pi. It gives me more headache when I drop USB to 1.1 vs 2.0 for wifi dongle.

I have a wifi dongle on 2 pi's, forcing 1.1 has not affected them at all =)