mancity
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm

Rainbow Square

Thu Jan 01, 2015 8:31 pm

Hi all just a quick question...

The Rainbow square, is EVERY time you see this, an indication that your power supply isn't providing enough power?

I have a 5.1v, 2.1a iPhone charger and a 1m USB cable and I see the rainbow square very briefly at boot up, but just then.

If I change the OC settings to turbo, I see it when running MAME too.

So yeah, is that rainbow square an indication of under power every time you see it?

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Rainbow Square

Thu Jan 01, 2015 8:40 pm

Yes. It is meant to be triggered when the voltage drops beneath 4.65.

http://www.raspberrypi.org/forums/viewt ... 29&t=82373

User avatar
PeterO
Posts: 4294
Joined: Sun Jul 22, 2012 4:14 pm

Re: Rainbow Square

Thu Jan 01, 2015 8:52 pm

mancity wrote:Hi all just a quick question...

The Rainbow square, is EVERY time you see this, an indication that your power supply isn't providing enough power?

I have a 5.1v, 2.1a iPhone charger and a 1m USB cable and I see the rainbow square very briefly at boot up, but just then.

If I change the OC settings to turbo, I see it when running MAME too.

So yeah, is that rainbow square an indication of under power every time you see it?
If you are talking about the BIG (nearly full screen) one, then that is always displayed at power up so it is nothing to worry about.

TBH I don't think I've ever seen the low-voltage-warning one. I ought to set up a pi on a bench PSU and slowly decrease the voltage to find out what it looks like !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

mancity
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm

Re: Rainbow Square

Thu Jan 01, 2015 9:46 pm

I mean the small square at the top right.

I don't understand how the voltage can drop though? The plug is 5.1v...

DirkS
Posts: 9501
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Rainbow Square

Thu Jan 01, 2015 9:49 pm

mancity wrote:I mean the small square at the top right.

I don't understand how the voltage can drop though? The plug is 5.1v...
With a dodgy microUSB cable that can easily drop below the limit.
It also depends on what's plugged into the USB connectors.

Gr.
Dirk.

User avatar
PeterO
Posts: 4294
Joined: Sun Jul 22, 2012 4:14 pm

Re: Rainbow Square

Thu Jan 01, 2015 9:50 pm

mancity wrote:I mean the small square at the top right.

I don't understand how the voltage can drop though? The plug is 5.1v...
The plug may be maintaining 5.1V at its output, but if the 1m USB cable is low quality the voltage will be lower at the other end.
Can you try with a shorter USB cable between the plug and the PI ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Rainbow Square

Thu Jan 01, 2015 9:52 pm

mancity wrote:I mean the small square at the top right.

I don't understand how the voltage can drop though? The plug is 5.1v...
Some power supplies are better than others. A good one will maintain the correct voltage no matter how much current is drawn within its rated limits.

klricks
Posts: 5913
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Rainbow Square

Thu Jan 01, 2015 11:46 pm

mancity wrote:Hi all just a quick question...

The Rainbow square, is EVERY time you see this, an indication that your power supply isn't providing enough power?

I have a 5.1v, 2.1a iPhone charger and a 1m USB cable and I see the rainbow square very briefly at boot up, but just then.

If I change the OC settings to turbo, I see it when running MAME too.

So yeah, is that rainbow square an indication of under power every time you see it?
On my NOOBs install I see the large and small rainbow block on every boot which fades away as at the same time the recovery screen goes away.
On my 'raw' image Raspbian install I don't see either the large or small rainbow block at boot.

I am using an industrial 5V 10A supply. So I would say the rainbow block at boot has no meaning.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

User avatar
DougieLawson
Posts: 34166
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Rainbow Square

Thu Jan 01, 2015 11:51 pm

On my A+ I see the brownout small rainbow while the system is booting and the USB WiFi adapter is associating with the access point.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

DirkS
Posts: 9501
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Rainbow Square

Fri Jan 02, 2015 12:14 am

klricks wrote:On my 'raw' image Raspbian install I don't see either the large or small rainbow block at boot.
According to the docs disable_splash=1 in config.txt disables the rainbow splash screen.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11088
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Rainbow Square

Fri Jan 02, 2015 1:18 am

the rainbow screen during boot is a GPU test (not a "splash screen" in any way), and has NOTHING to do with the brownout detector (in fact the ARM CPU that reacts to the GPIO input to which the brownout detector is connected isn't even running at that moment, it hasn't been started yet!

The Small rainbow square in the GUI screen means that the Linux kernel has detected that the GPIO to which the brownout detector is connected has triggered, and that definitively means that somehow VCC (the 5V microUSB input voltage) has dropped below 4.65 V (give or take a few dozen millivolts). and that is well below the 4.75V that most USB devices require!

Reasons for the drop can be:
  • A power supply that doesn't regulate its output voltage well enough
  • A power cable with too much resistance
  • An unrecovered, previously overloaded polyfuse

Oolong
Posts: 11
Joined: Fri Sep 12, 2014 3:25 pm

Re: Rainbow Square

Thu Mar 17, 2016 2:01 pm

So... the brownout detector is a *small* rainbow square? There's always (?) a big rainbow square while it's starting? But a big, persistent rainbow square means... that the boot file is incompatible? Is that right?

Is there any special reason not to explain these things with text, rather than beautiful yet impenetrably cryptic squares of varying sizes and durations?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20929
Joined: Sat Jul 30, 2011 7:41 pm

Re: Rainbow Square

Thu Mar 17, 2016 2:14 pm

Oolong wrote:So... the brownout detector is a *small* rainbow square? There's always (?) a big rainbow square while it's starting? But a big, persistent rainbow square means... that the boot file is incompatible? Is that right?

Is there any special reason not to explain these things with text, rather than beautiful yet impenetrably cryptic squares of varying sizes and durations?
Correct, something wrong with the firmware.


At the point of displaying the big coloured thingy, there are is no OS loaded, so no font support, so the easiest and least memory hungry thing to do is simply splat something recognisable on the display. It would take about 10 lines of C to do the square, and hundreds to output text (plus the font data).
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Rainbow Square

Thu Mar 17, 2016 3:08 pm

Oolong wrote:Is there any special reason not to explain these things with text, rather than beautiful yet impenetrably cryptic squares of varying sizes and durations?
The rainbow squares are just 4 pixels, even the large rainbow square is just 4 pixels scaled up to fill the screen. The rainbow effect is the result of aliasing by the scaling kernel, which turns the 4 colored pixels into a rainbow square when scaled up in size.

As @jamesh pointed out providing text would be pretty involved, but the GPU can easily overlay 4 colored pixels on the screen and scale them as necessary.

Return to “Beginners”