Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-06 Thread Terry Coles
On Friday, 6 January 2017 11:54:20 GMT Ralph Corderoy wrote:
> > > The Pi Zero could replace the former and should be up to flinging
> > > SPI data to more than one of them.
> > 
> > The problem is that we want the UI to be simple toggle switches on the
> > front of the ammo-box case for the system and the two players need to
> > be interactive, so that they don't try to fight each other
> 
> > Doing it in a single device makes that much easier.
> 
> The single device would be the Pi, as now, and the UI unchanged.  The
> MP3-decoding ICs would replace the USB audio adapters.

Yes.  I'm sure that could be done, but I suspect it would need a fair amount 
of hardware/software development, plus an additional PSU Brick, as with the 
two Pi solution.

> Does the Pi 3 mean no external hub is required?  And you've never had
> crashes in that configuration?  If so, throwing money at the problem
> sounds easiest, though your `heir and a spare' approach doubles the
> difference.

We would still use the external hub, but only because that is also our power 
source for the Pi.  I have never seen any crashes with that setup yet.

In reality, with a Pi 3, we would need no external hub if we were prepared to 
spend money on a Pi PSU brick or use the spare brick from the Lighting Project 
last year.

As I see it, we can currently implement this from the spares pool with no 
additional cost but we'd have no spare Pi 3 for either this project or the 
Webserver and we'd have an additional two spare Pi Zeros for the Lighting 
system.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-06 Thread Terry Coles
On Friday, 6 January 2017 11:17:48 GMT Stephen Wolff wrote:
> It might be a silly suggestion - but could you use multiple Pi Zeros,
> given that their cost is much less than the Pi 3?

That has been discussed and could be done using GPIO pins to achieve the 
interactive requirements (see my other post).

The main reason I've avoided it to date is that we would need another PSU 
brick as well as another Pi.  The equipment and case for the mains supplies 
has already been procured and only has room for two bricks, so the knock on 
effect is fairly expensive.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-06 Thread Terry Coles
On Thursday, 5 January 2017 15:12:10 GMT Ralph Corderoy wrote:
> One last idea.  It used to be you'd build an MP3 player from an MCU and
> a $7 MP3-decoder chip.  The Pi Zero could replace the former and should
> be up to flinging SPI data to more than one of them.
> 
> http://www.vlsi.fi/en/products/:-).html
> http://fun4diy.com/CCS_MP3.htm
> https://www.sparkfun.com/products/8126

That would be a good way of doing it if we just wanted a standalone MP3 Player 
with a simpler UI.  RS Components even do an evaluation board which implements 
an MP3 Player, with LCD display and UI based on a menu and a toggle switch.  
The cost is £11 plus VAT, plus the cost of the VS1011 chip; probably about £20 
all told.

The problem is that we want the UI to be simple toggle switches on the front 
of the ammo-box case for the system and the two players need to be 
interactive, so that they don't try to fight each other and so that we can play 
a wedding sequence which consists of bells chiming in the Tower, a Wedding 
March and Widor's Toccata in the Chancel and then more bells in the Tower.  
Doing it in a single device makes that much easier.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-06 Thread Stephen Wolff


It turns out that the Pi Hut device is not multi-TT, in fact they 
specifically
warn about this in the User Manual and describe the penalty of using 
USB V1.1

devices with it, so that's no go.

Having done an extensive search, it seems that the cheapest Multi-TT 
Hub on
the market at the moment is the Pi 3!  It just happens to have a 
pretty

capable micro-controller attached :-)


It might be a silly suggestion - but could you use multiple Pi Zeros, 
given that their cost is much less than the Pi 3?


--
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-06 Thread Terry Coles
On Thursday, 5 January 2017 14:10:38 GMT Terry Coles wrote:
> It looks as though I could fix this with a multi-TT hub, as suggested by
> William, but the cost may be prohibitive.  There is a hub that is specific
> to the Zero that is sold by the Pi Hut for £10.  I would need to ask them
> these questions to find out if they support at least one multi-TT channel.

It turns out that the Pi Hut device is not multi-TT, in fact they specifically 
warn about this in the User Manual and describe the penalty of using USB V1.1 
devices with it, so that's no go.

Having done an extensive search, it seems that the cheapest Multi-TT Hub on 
the market at the moment is the Pi 3!  It just happens to have a pretty 
capable micro-controller attached :-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-05 Thread Ralph Corderoy
Hi Terry,

One last idea.  It used to be you'd build an MP3 player from an MCU and
a $7 MP3-decoder chip.  The Pi Zero could replace the former and should
be up to flinging SPI data to more than one of them.

http://www.vlsi.fi/en/products/vs1011.html
http://fun4diy.com/CCS_MP3.htm
https://www.sparkfun.com/products/8126

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-05 Thread Terry Coles
On Thursday, 5 January 2017 12:17:05 GMT Ralph Corderoy wrote:
> > I ran lsusb on the hub Terry tried and it does show up as single-TT,
> > although it does show up as 4 hubs.
> 
> I filtered out some of its more interesting lines to try and lessen the
> noise, giving http://pastebin.com/GSu1Cb8A
> That says "bDeviceProtocol 2 TT per port" a couple of times so I think
> it may be multi-TT?

Here are the outputs of lsusb -v on the Pi Zero and the Pi 3:

http://hadrian-way.co.uk/Misc/Pi0_lsusb-v.txt[1] 

_http://hadrian-way.co.uk/Misc/Pi3_lsusb-v.txt_ 

If you look, you will see that the Pi 0 only has single-TT while the Pi 3 has 
one Multi-TT.

It looks as though I could fix this with a multi-TT hub, as suggested by 
William, but the cost 
may be prohibitive.  There is a hub that is specific to the Zero that is sold 
by the Pi Hut for 
£10.  I would need to ask them these questions to find out if they support at 
least one 
multi-TT channel.

-- 



Terry Coles


[1] http://hadrian-way.co.uk/Misc/Pi3_lsusb-v.txt
-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-05 Thread Ralph Corderoy
Hi Terry,

> I'm leaning towards the multi-core effect as being the reason that the
> bigger Pis work.

Quite possibly.  Andrew's good idea of two Pis with their UARTs
connected so you've a serial console might actually give useful
information when it freezes rather than all this guesswork.

> Your suggestion to use a HDMI adaptor has merit and in fact was one
> solution that I looked at very early on in the design.  I will still
> need a hub though, because we said that we would put the MP3 files
> onto a USB stick, so that the WMT staff can change them without having
> to speak linux.

You don't make it easy, do you.  :-)  The Zero can have its audio out
jack restored if that would give a separate playback to HDMI.
https://learn.adafruit.com/introducing-the-raspberry-pi-zero/audio-outputs
Or there's investigating playing one MP3 on HDMI's left channel and
another on its right.  Staff would just dish up two MP3s without caring.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-05 Thread Terry Coles
On Thursday, 5 January 2017 12:17:05 GMT Ralph Corderoy wrote:
> > I ran lsusb on the hub Terry tried and it does show up as single-TT,
> > although it does show up as 4 hubs.
> 
> I filtered out some of its more interesting lines to try and lessen the
> noise, giving http://pastebin.com/GSu1Cb8A
> That says "bDeviceProtocol 2 TT per port" a couple of times so I think
> it may be multi-TT?
> 
> Terry, how about using the Pi Zero's GPU to do audio on HDMI for one
> output, and putting a single USB audio adapter directly into its OTG
> port for the other?  No hub.  You've GPIO for the RTC IIRC.  And if you
> need networking then there's the UART and PPP?

I've been shopping; so haven't tried any of the suggestions made to date.  
However, I did post an update to my query on the Raspberry Pi Forums before I 
went out:

https://www.raspberrypi.org/forums/viewtopic.php?p=1092584#p1092584

This outlines a couple of theories that I have after reading your link to the 
Pi documentation.  I rather suspect that the RPi 2 and 3 hubs are not multi-
TT, so I'm leaning towards the multi-core effect as being the reason that the 
bigger Pis work.

Your suggestion to use a HDMI adaptor has merit and in fact was one solution 
that I looked at very early on in the design.  I will still need a hub though, 
because we said that we would put the MP3 files onto a USB stick, so that the 
WMT staff can change them without having to speak linux.  That would put the 
Audio Adaptor back in the hub (only one though) and I've definitely seen lock-
ups with only one Adaptor plugged in.

Also.  The HDMI Adaptor would increase the number of different devices which 
might need sparing, whereas we already have a Pi 3 + one spare for the 
webserver part of the development.  We would either live without the spare or 
bite the bullet and buy one more.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-05 Thread Ralph Corderoy
Hi David,

> I ran lsusb on the hub Terry tried and it does show up as single-TT,
> although it does show up as 4 hubs.

I filtered out some of its more interesting lines to try and lessen the
noise, giving http://pastebin.com/GSu1Cb8A
That says "bDeviceProtocol 2 TT per port" a couple of times so I think
it may be multi-TT?

Terry, how about using the Pi Zero's GPU to do audio on HDMI for one
output, and putting a single USB audio adapter directly into its OTG
port for the other?  No hub.  You've GPIO for the RTC IIRC.  And if you
need networking then there's the UART and PPP?

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread David Wilkinson

On 04/01/17 17:30, Terry Coles wrote:

The hub that I borrowed from David Wilkinson was USB 2.0 and so is the Naked 
one that
we are using for the project, so they should have had at least one built-in 
transaction
translator


I ran lsusb on the hub Terry tried and it does show up as single-TT, 
although it does show up as 4 hubs.


Looks like there 3 hubs attached to USB ports.
1 for ports 1-5 and 1 for each high powered "phone charge" ports.

I assume if you used the 2 high power ports and a normal port that would 
get around the single-TT issue?


lsusb output - http://pastebin.com/JVfiaQXT


--
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Ralph Corderoy
Hi Terry,

Will wrote:
> > You might try using a multi transaction translator ("Multi-TT") hub
> > instead.
>
> The hub that I borrowed from David Wilkinson was USB 2.0 and so is the
> Naked one that we are using for the project, so they should have had
> at least one built-in transaction translator according to Toms
> hardware.

Do try and find out if you've a Multi-TT hub being used.  It's worth
reading all of
https://www.raspberrypi.org/forums/viewtopic.php?f=28=53832?ref=driverlayer.com/web

tl;dr is the Pi's SoC's single USB port, through which all other USB
travels, isn't much cop?

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Ralph Corderoy
Hi Terry,

> Well OK.  I am surmising that there are conflicts when the three
> devices are all shouting.

OK, but they're not playing audio at this point, just there for bus
enumeration, current negotiation, etc.

> The problem only occurs (and it occurs every time) if I try to connect
> the hub through one USB port.

Have you seen the list of issues on
https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md
It's out of date, I think, but then so much of the Pi documentation is
frankly shoddy and incomplete.

Because of the OTG hardware limitations, if too many Full- or
Low-speed devices are plugged into a single-TT hub, unreliable
operation of the devices may occur.

> > Try and create a CPU load some other way
>
> Wouldn't that also be a problem when the Adaptors are plugged directly
> into the Pi?

No, because they'd be powered differently then so could have different
behaviour?

> > gzip -9 /dev/null
> >
> > Check `dmesg' output.  `dmesg -w' will wait for new output, similar
> > to journalctl above.
>
> Will need the £11 cable to do those things.

Don't think so because the USB keyboard will continue to work unless CPU
load causes a crash, and if it does then that's good.

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Andrew

On 04/01/17 16:26, Terry Coles wrote:

Also, I think `journalctl -f' might be interesting to watch as you do
things.  You can tap Enter to give you a bit of blank space now and
again so you can see what's new.  You can try doing this over an SSH
connection to the Pi for when you run `startx', but given networking is
also over the Pi's USB port I'd really recommend you use the Pi's serial
port and set the Linux console to use that.  Cables are available.

 http://elinux.org/RPi_Serial_Connection
 http://amzn.to/2iAd006

I tried SSH.  As predicted the Pi is inaccessible.  I could pay for a third of
a Pi 3 for the cost of one of those leads:-)



If you have more than one Raspberry Pi then you can connect their serial 
UARTs together with three wires. Gnd to Gnd, RX to TX, TX to RX.


--

Andrew.


--
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Terry Coles
On Wednesday, 4 January 2017 16:36:54 GMT William R Sowerbutts wrote:
> >Well OK.  I am surmising that there are conflicts when the three devices
> >are all shouting.
> 
> It may be that there isn't enough USB bandwidth to serve multiple low-speed
> isochronous devices concurrently.

That is what I think too.  If the V1.1 devices throttle the hub to 12 Mps (see 
below), then 
there could well be an issue.

> You might try using a multi transaction translator ("Multi-TT") hub instead.
> 
>   https://en.wikipedia.org/wiki/USB_hub#Transaction_translator
>   http://www.tomshardware.com/reviews/usb-technology,677-3.html
> 
> "lsusb -v" will tell you if your hardware supports multi-TT
> (bInterfaceProtocol, 1 = single-TT, 2 = multi-TT) and if it is enabled
> (bDeviceProtocol, again 2 = multi-TT).
> 
> Although even if multi-TT works, maintenance could be a problem; the risk
> would be that one day the hub breaks, someone replaces it with a Single-TT
> hub assuming it is equivalent to the failed hub, and the thing mysteriously
> breaks.

It's probably cheaper to buy a Pi 3 :-)

The hub that I borrowed from David Wilkinson was USB 2.0 and so is the Naked 
one that 
we are using for the project, so they should have had at least one built-in 
transaction 
translator according to Toms hardware.

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread William R Sowerbutts
>Well OK.  I am surmising that there are conflicts when the three devices are 
>all shouting.

It may be that there isn't enough USB bandwidth to serve multiple low-speed 
isochronous devices concurrently. 

You might try using a multi transaction translator ("Multi-TT") hub instead.

  https://en.wikipedia.org/wiki/USB_hub#Transaction_translator
  http://www.tomshardware.com/reviews/usb-technology,677-3.html

"lsusb -v" will tell you if your hardware supports multi-TT 
(bInterfaceProtocol, 1 = single-TT, 2 = multi-TT) and if it is enabled 
(bDeviceProtocol, again 2 = multi-TT).

Although even if multi-TT works, maintenance could be a problem; the risk 
would be that one day the hub breaks, someone replaces it with a Single-TT 
hub assuming it is equivalent to the failed hub, and the thing mysteriously 
breaks.

Will

_
William R Sowerbutts  w...@sowerbutts.com
"Carpe post meridiem"   http://sowerbutts.com
 main(){char*s=">#=0> ^#X@#@^7=",c=0,m;for(;c<15;c++)for
 (m=-1;m<7;putchar(m++/6%3/2?10:s[c]-31&1<

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Terry Coles
On Wednesday, 4 January 2017 15:50:00 GMT Ralph Corderoy wrote:
> > It turns out that the problem seems to be that the Hub is connected
> > via a USB port on the Pi (the only one in the case of the Zero).  It
> > looks like that port cannot handle the conflicts when all the Audio
> > Adaptors shout at once.
> 
> I don't see a strong indication that's the cause?  What conflicts?

Well OK.  I am surmising that there are conflicts when the three devices are 
all shouting.

> The different Pis have different USB hardware, and different Linux
> drivers to talk to them IIRC.  And those drivers change over time.  Try
> a distro with a dramatically different kernel version, like an old one.
> It will be another data point.

This problem occurs with a Zero, a Pi 2 and a Pi 3, so I'm discounting the 
hardware at the moment.  I am using the same SD card running Raspbian Jessie 
on all three.  The problem only occurs (and it occurs every time) if I try to 
connect the hub through one USB port.

I will have a look at using an old distro, but the fact that the Adaptors work 
OK when they are accessed through separate USB ports seems to preclude driver 
issues to me.  Maybe I'm wrong.

> Also, I think `journalctl -f' might be interesting to watch as you do
> things.  You can tap Enter to give you a bit of blank space now and
> again so you can see what's new.  You can try doing this over an SSH
> connection to the Pi for when you run `startx', but given networking is
> also over the Pi's USB port I'd really recommend you use the Pi's serial
> port and set the Linux console to use that.  Cables are available.
> 
> http://elinux.org/RPi_Serial_Connection
> http://amzn.to/2iAd006

I tried SSH.  As predicted the Pi is inaccessible.  I could pay for a third of 
a Pi 3 for the cost of one of those leads :-)

> Other thoughts: startx(1) will prod USB as well as creating CPU load
> causing the ARM to draw more power as its frequency increases.  Try and
> create a CPU load some other way;  this should make one core busy and
> you can run it in the background so you can kick off one per core if
> need be.

Wouldn't that also be a problem when the Adaptors are plugged directly into 
the Pi?

> gzip -9 /dev/null
> 
> Check `dmesg' output.  `dmesg -w' will wait for new output, similar to
> journalctl above.

Will need the £11 cable to do those things.

> Replace the audio USB adapters with other devices that will want
> significant current to see if it helps spot when it's the £3 Chinese
> audio USBs or a power issue.

Yes.  Paul says that he has some USB speaker-phone adaptors that I can borrow.  
Otherwise, I suppose I could scrape together some USB hard disks, but they 
tend to be self-powered, so not necessarily conclusive if they work.

I've now raised this on the Raspberry Pi Forum, so my next move is to see what 
they say.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Ralph Corderoy
Hi Terry,

> Not in fact the problem, see :
> 
> http://forum.modmypi.com/technical-support/usb-audio-adaptors-pi-locking-up-when-booting-t1041.html#p4482
> 
> It turns out that the problem seems to be that the Hub is connected
> via a USB port on the Pi (the only one in the case of the Zero).  It
> looks like that port cannot handle the conflicts when all the Audio
> Adaptors shout at once.

I don't see a strong indication that's the cause?  What conflicts?

> If I plug all the Adaptors directly into a Pi 2 or Pi 3 (even when I
> am using a hub for the other devices (mouse, keyboard, WiFI)),
> everything works.

The different Pis have different USB hardware, and different Linux
drivers to talk to them IIRC.  And those drivers change over time.  Try
a distro with a dramatically different kernel version, like an old one.
It will be another data point.

Also, I think `journalctl -f' might be interesting to watch as you do
things.  You can tap Enter to give you a bit of blank space now and
again so you can see what's new.  You can try doing this over an SSH
connection to the Pi for when you run `startx', but given networking is
also over the Pi's USB port I'd really recommend you use the Pi's serial
port and set the Linux console to use that.  Cables are available.

http://elinux.org/RPi_Serial_Connection
http://amzn.to/2iAd006

Other thoughts: startx(1) will prod USB as well as creating CPU load
causing the ARM to draw more power as its frequency increases.  Try and
create a CPU load some other way;  this should make one core busy and
you can run it in the background so you can kick off one per core if
need be.

gzip -9 /dev/null

Check `dmesg' output.  `dmesg -w' will wait for new output, similar to
journalctl above.

Replace the audio USB adapters with other devices that will want
significant current to see if it helps spot when it's the £3 Chinese
audio USBs or a power issue.

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Terry Coles
On Wednesday, 4 January 2017 15:30:01 GMT Ralph Corderoy wrote:
> > > Have you this page, and in particular the anchored section?
> > > http://elinux.org/RPi_Powered_USB_Hubs#USB_Hub_Power_Hookup
> > 
> > The answer is yes; that's exactly what I am doing.
> 
> So you saw "This section describes two tests that will verify that a USB
> hub has the correct power circuitry"?

Yes.  Although I didn't run them because the problem occurs with more than one 
hub type, including David's with 3 A shared by all ports, and because I have 
now discovered that the problem is the single port that carries all of the USB 
traffic; see my other post.
  
> As mentioned last night, a USB device requests a current allowance.
> `sudo lsusb -v' will show lots of interesting information that's really
> worth reading through;  ignore what doesn't make any sense.  The sudo is
> required.

I added a line to config.txt; 'max_usb_current=1, which doubles the current 
available to each device (in this case the whole hub) to 1.2 A.  This was 
advised by Jake on the ModMyPi forum, but it didn't help.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Ralph Corderoy
Hi Terry,

> > Have you this page, and in particular the anchored section?
> > http://elinux.org/RPi_Powered_USB_Hubs#USB_Hub_Power_Hookup
>
> The answer is yes; that's exactly what I am doing.

So you saw "This section describes two tests that will verify that a USB
hub has the correct power circuitry"?

As mentioned last night, a USB device requests a current allowance.
`sudo lsusb -v' will show lots of interesting information that's really
worth reading through;  ignore what doesn't make any sense.  The sudo is
required.

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-04 Thread Terry Coles
On Tuesday, 3 January 2017 14:23:45 GMT Terry Coles wrote:
> My previous request for a loan of a powered Hub took me a step closer to
> resolving my problem (thanks David).  The problem is that although I think
> I know now what is causing the problem, I don't know what it is doing to
> the machine.
> 
> So when I plugged David's Hub in, instead of the 'Naked' Hub, I got exactly
> the same symptoms as I got with my own Hub.  So, the 'Naked' Hub isn't the
> cause and neither is the supplied PSU Brick.
> 
> After lots of testing, using different combinations of devices plugged into
> the Hub, I have arrived at the conclusion that the Audio Adaptors are the
> problem:

Not in fact the problem, see :

http://forum.modmypi.com/technical-support/usb-audio-adaptors-pi-locking-up-when-booting-t1041.html#p4482

It turns out that the problem seems to be that the Hub is connected via a USB 
port on the Pi (the only one in the case of the Zero).  It looks like that 
port cannot handle the conflicts when all the Audio Adaptors shout at once.

If I plug all the Adaptors directly into a Pi 2 or Pi 3 (even when I am using 
a hub for the other devices (mouse, keyboard, WiFI)), everything works.

That means that I cannot use a £4 Pi Zero and must use a £30 Pi 3 (the Pi 2 is 
now £32).

Unless   Someone knows how to resolve the issue.  (These devices are USB 
V1.1 and that means that the whole hub runs at V 1.1 speed).

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-02-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-03 Thread Terry Coles
On Tuesday, 3 January 2017 16:56:50 GMT Ralph Corderoy wrote:
> I'm just passing by so haven't read back over the thread, but it sounds
> like a power issue to me.  Have you this page, and in particular the
> anchored section?
> http://elinux.org/RPi_Powered_USB_Hubs#USB_Hub_Power_Hookup

:-)  I just answered this off-list (I didn't notice that steampunkprofessor 
sent to me direct).

The answer is yes; that's exactly what I am doing.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-01-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-03 Thread Ralph Corderoy
Hi Terry,

I'm just passing by so haven't read back over the thread, but it sounds
like a power issue to me.  Have you this page, and in particular the
anchored section?
http://elinux.org/RPi_Powered_USB_Hubs#USB_Hub_Power_Hookup

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-01-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-03 Thread Terry Coles
On Tuesday, 3 January 2017 16:39:02 GMT steampunkprofessor wrote:
> Looks like you got the power supply covered then. Beyond checking dmesg and
> going on forums I'm afraid I have little else to offer, I assume it's not
> overclocked. The flash symbol appears top right on my desktop. Had it when
> running my Pi off a battery bar, not that I had any operating issues. 

No it's not overclocked.

Also, I forgot to mention; I get the same behaviour with my Pi 2.

I'm waiting for responses on various forums.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-01-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] How can I discover why my RPi freezes after it has frozen?

2017-01-03 Thread Terry Coles
Hi,

My previous request for a loan of a powered Hub took me a step closer to 
resolving my 
problem (thanks David).  The problem is that although I think I know now what 
is causing 
the problem, I don't know what it is doing to the machine.  

So when I plugged David's Hub in, instead of the 'Naked' Hub, I got exactly the 
same 
symptoms as I got with my own Hub.  So, the 'Naked' Hub isn't the cause and 
neither is 
the supplied PSU Brick.

After lots of testing, using different combinations of devices plugged into the 
Hub, I have 
arrived at the conclusion that the Audio Adaptors are the problem:

1. I have got an Edimax WiFi dongle, a mouse, a keyboard and three Audio 
Adaptor 
dongles plugged into a hub. Nine times out of 10, if I boot into a shell in 
Raspbian Pixel, 
the system is OK and I can see all three Audio Adaptors using lsusb or aplay -l.

2. On the tenth occasion, I get no response from the keyboard.

3. If I successfully boot into the shell and then type startx, the mouse 
invariably freezes.

4. If I only plug one adaptor into the hub, I can usually get into Pixel, but 
it occasionally 
freezes. 

I've looked in /var/log, but I'm uncertain what I'm looking for.  The file 
'messages' seems 
to contain a conglomeration of messages from the kernel and elsewhere, but I 
can't see 
anything that leaps out of the screen at me.

Does anyone know where I should be looking?

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2017-01-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR