ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

OpenGL on Raspi 3

Sat Jun 04, 2016 6:42 pm

I tried to get OpenGL working on Raspi 3.

Therefor I took the latest kernel source from Github
https://github.com/raspberrypi/linux/tree/rpi-4.7.y
compiled and installed it by this documentation:
https://www.raspberrypi.org/documentati ... uilding.md
And it works:

Code: Select all

root@raspberrypi:~# uname -a
Linux raspberrypi 4.7.0-rc1-v7+ #1 SMP Sat Jun 4 15:02:47 CEST 2016 armv7l GNU/Linux
But when I try to enable the VC4 driver in config.txt it stalls during boot:

Code: Select all

dtoverlay=vc4-kms-v3d
My question is the still the right way for kernel 4.7 od do I have to do something different? Is there any chance to get OpenGL working on Raspi 3?

fruitoftheloom
Posts: 24046
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: OpenGL on Raspi 3

Sat Jun 04, 2016 8:09 pm

ceving wrote:I tried to get OpenGL working on Raspi 3.

Therefor I took the latest kernel source from Github
https://github.com/raspberrypi/linux/tree/rpi-4.7.y
compiled and installed it by this documentation:
https://www.raspberrypi.org/documentati ... uilding.md
And it works:

Code: Select all

root@raspberrypi:~# uname -a
Linux raspberrypi 4.7.0-rc1-v7+ #1 SMP Sat Jun 4 15:02:47 CEST 2016 armv7l GNU/Linux
But when I try to enable the VC4 driver in config.txt it stalls during boot:

Code: Select all

dtoverlay=vc4-kms-v3d
My question is the still the right way for kernel 4.7 od do I have to do something different? Is there any chance to get OpenGL working on Raspi 3?
I was under the impression that in latest Raspbian Jessie OS the experimental OpenGL could be implemented via raspi-config:

https://www.raspberrypi.org/blog/anothe ... an-release
Thinking outside the box is better than burying your head in the sand...

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sat Jun 04, 2016 10:15 pm

fruitoftheloom wrote: I was under the impression that in latest Raspbian Jessie OS the experimental OpenGL could be implemented via raspi-config:
https://www.raspberrypi.org/blog/anothe ... an-release
Yes it can be enabled in config.txt but it does not work. The Jessie kernel 4.4.6 and the rpi-update kernel 4.4.12 display a colored square and my compiled 4.7 freezes.

The post you have quoted is from the beginning of February. Raspi 3 has been released at the end of February. The post mentions only Raspi 2 but not Raspi 3.

User avatar
rpiMike
Posts: 1463
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: OpenGL on Raspi 3

Sun Jun 05, 2016 12:23 pm

The coloured square means your Pi3 is not getting enough power. Are you using the recommended 2.5 Amp power supply?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5591
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: OpenGL on Raspi 3

Sun Jun 05, 2016 12:43 pm

4.7 doesn't support the experimental GL driver yet - it's only been out a few days and it at -rc1 stage (very early).
If you want a tested kernel then 4.4 is recommended.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jun 05, 2016 6:53 pm

rpiMike wrote:The coloured square means your Pi3 is not getting enough power. Are you using the recommended 2.5 Amp power supply?
I do not have the small one in the right top, but a big one filling the complete screen.

I have only a Raspi 2 PSU but I did not connect anything. I attached just mouse, keyboard, monitor and lan. This means 2 USB ports a free and this means that the setup uses 2 x 500 mA less than maximum. And so I thought the Raspi 2 PSU might be enough for the beginning.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jun 05, 2016 7:17 pm

dom wrote:4.7 doesn't support the experimental GL driver yet - it's only been out a few days and it at -rc1 stage (very early).
If you want a tested kernel then 4.4 is recommended.
What means tested. I have read on the net that many people have problems with OpenGL on Raspi 3.

Is there a reproduce able procedure which works reliably? Like

Take Jessy
run apt-get update, apt-get dist-upgrade
run rpi-update
enable OpenGL
reboot
run glxgears

What I did is not much different and I end with a black screen.

I would really like to know how the test case looks like, which gives 60 fps in glxgears on a Raspi 3.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jun 05, 2016 8:02 pm

Just another test.

I started once more from scratch now with a Raspi 2:
  • Win32 Disk Imager
    • Write 2016-05-27-raspbian-jessie.img to a 32 Gig Sandisk card.
  • raspi-config
    • Expand Filesystem
    • Change User Password
    • Internationalisation Options
      • Change Locale
      • Change Timezone
      • Change Keyboard Layout
      • Change Wi-fi Country
  • config.txt
    • disable_overscan=1
  • Apt
    • apt-get install mesa-utils
    • apt-get update
    • apt-get dist-upgrade
  • raspi-config
    • Advanced Options
      • GL Driver
After reboot Raspi 2 boots into a desktop and runs glxgears with 60 frames.

Now I took the SD card and put it in a Raspi 3 and attached everything that has been attached to the Raspi 2 (mouse, keyboard, lan, monitor). The Raspi 3 starts to boot but fails to start the desktop. The result is a black screen.

User avatar
rpiMike
Posts: 1463
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 9:53 am

Still sounds like a power issue to me, as it worked with the Pi2. The Pi3 requires more power and enabling the Open GL driver puts more strain on the power supply.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 11:39 am

rpiMike wrote:Still sounds like a power issue to me, as it worked with the Pi2. The Pi3 requires more power and enabling the Open GL driver puts more strain on the power supply.
Does this mean, that you did this already and it worked on a Raspi 3?

User avatar
rpiMike
Posts: 1463
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 11:49 am

Yes, i've been using OpenGL on the Pi3 for months. Here's Minecraft on my Pi3 using the OpenGL driver :

https://www.youtube.com/watch?v=GXFMo8psp-U

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 12:06 pm

rpiMike wrote:Yes, i've been using OpenGL on the Pi3 for months. Here's Minecraft on my Pi3 using the OpenGL driver :

https://www.youtube.com/watch?v=GXFMo8psp-U
Ok I ordered a 12,5 VA PSU.

But the power discussion sounds still quite strange to me. If a 2 Ampere PSU is not sufficient, because a 2,5 Ampere PSU is required, how should it ever be possible to plug anything else than a mouse into the remaining USB ports? If the Raspi 3 requires the 2,5 Ampere for itself, what is left for additional USB devices?

I think it gets silly, that the Raspi 3 has still a USB connector for power. The idea that a simple USB port is sufficient to power a Raspi is dead. I think it might be better, if the Raspi 3 would have a coaxial power connector like anything else, too. If it is necessary to buy a new PSU with every Raspi model, it is useless to have a USB connector.

User avatar
rpiMike
Posts: 1463
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 12:18 pm

Did you order one of these ?

http://www.modmypi.com/raspberry-pi/acc ... r%20supply

As they have a chunky 2 core cable to deliver all the power to the Pi.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 12:36 pm

rpiMike wrote:Did you order one of these ?

http://www.modmypi.com/raspberry-pi/acc ... r%20supply

As they have a chunky 2 core cable to deliver all the power to the Pi.
Hmm I get a bit scared now. Is this the only one which works with a Raspi 3? :shock:

I ordered this one: https://www.amazon.de/gp/product/B00GUSHNW4
to able to use a cable with an on/off switch: https://www.amazon.de/gp/product/B0131Q3SNK

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5591
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: OpenGL on Raspi 3

Mon Jun 06, 2016 12:40 pm

ceving wrote: to able to use a cable with an on/off switch: https://www.amazon.de/gp/product/B0131Q3SNK
I'd guess the cable with a switch is the problem. I've seen cables like that drop a lot of voltage (they don't have to, but the one I saw was made with very thin wires).
Do you have an alternative cable to test?

George10
Posts: 6
Joined: Sun Jun 05, 2016 2:38 pm

Re: OpenGL on Raspi 3

Fri Jun 10, 2016 6:36 pm

ceving wrote:
dom wrote:4.7 doesn't support the experimental GL driver yet - it's only been out a few days and it at -rc1 stage (very early).
If you want a tested kernel then 4.4 is recommended.
What means tested. I have read on the net that many people have problems with OpenGL on Raspi 3.

Is there a reproduce able procedure which works reliably? Like

Take Jessy
run apt-get update, apt-get dist-upgrade
run rpi-update
enable OpenGL
reboot
run glxgears

What I did is not much different and I end with a black screen.

I would really like to know how the test case looks like, which gives 60 fps in glxgears on a Raspi 3.
i'm running
uname -a
Linux raspberrypi 4.4.13-v7+ #893 SMP Wed Jun 8 14:39:18 BST 2016 armv7l GNU/Linux

just did
run apt-get update, apt-get dist-upgrade
run rpi-update
enable OpenGL
reboot
run glxgears

and i get 60 fps in a small window and @25 in full screen (1080x1920).

but in the browser i get less than 1 fps.

if i disable opengl is the opposite, i get under 1 fps in glxgears in 25 in the browser. Chromium and Epiphany

Are not all the pis created equal?

However. I am intrigued that omxplayer is working in full hd with no missing frame and very little CPU.

George10
Posts: 6
Joined: Sun Jun 05, 2016 2:38 pm

Re: OpenGL on Raspi 3

Sat Jun 11, 2016 2:18 am

It looks like nobody's answering to my questions. Taking the suggestions of this post i bought a 25 V 220 micro electrolitic cap with 1 dollar at Fry's and put it between pin 2 and 6 of the GPIO connector. I reinstalled the whole thing, did the updates, upgrades and everything and got the same result. Then i was curious about a thing and replaced the 2.5 amps charger with a 0.7 amps one that didn't work before (was crashing) and REINSTALLED the whole thing again with no difference and no color cube in the upper right corner of the screen. It's the ripples! The ripples get bigger when more power is drown from the charger, the lower limit of the voltage on the ripple goes beyond the limit and it stops. Truth is the phone chargers don't have any filtering in them they are design to work with batteries that are also huge caps and smooth the voltage anyways. I think the pi could use a bigger cap on power supply input.

https://drive.google.com/file/d/0B-ShIh ... sp=sharing

George10
Posts: 6
Joined: Sun Jun 05, 2016 2:38 pm

Re: OpenGL on Raspi 3

Sat Jun 11, 2016 4:02 am

Nevermind. I started it again later and it crashes when tried to open the browser. Back to the 2.5 amp power supply.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jun 12, 2016 11:20 am

I spend another 20 € for a different power supply and it does not change anything. The Raspi 3 does not start the desktop, but the Raspi 2 starts the desktop and runs glxgears in 60 frames.

But when I enable the overclocking (as it is told in the Minecraft howto) the Raspi 2 shows the same behavior like the Raspi 3. It does not start the desktop.

Maybe I will search for another cable but I am getting tired of testing. I think I will send the Raspi 3 back. It seems to be a bad buy. Maybe the whole Minecraft on Raspi idea is silly. I was a bit blinded by the Youtube video. But it seems to me that it is much easier to use a NUC.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jun 12, 2016 11:30 am

George10 wrote:It looks like nobody's answering to my questions. Taking the suggestions of this post i bought a 25 V 220 micro electrolitic cap with 1 dollar at Fry's and put it between pin 2 and 6 of the GPIO connector. I reinstalled the whole thing, did the updates, upgrades and everything and got the same result. Then i was curious about a thing and replaced the 2.5 amps charger with a 0.7 amps one that didn't work before (was crashing) and REINSTALLED the whole thing again with no difference and no color cube in the upper right corner of the screen. It's the ripples! The ripples get bigger when more power is drown from the charger, the lower limit of the voltage on the ripple goes beyond the limit and it stops. Truth is the phone chargers don't have any filtering in them they are design to work with batteries that are also huge caps and smooth the voltage anyways. I think the pi could use a bigger cap on power supply input.

https://drive.google.com/file/d/0B-ShIh ... sp=sharing
This is a helpful hint!

Considering your observation I used now a Ravpower battery being able to deliver 2.4 Ampere and the Raspi 3 WORKS: glxgears in 60 frames.

And this means that the Raspi does not need 3 Ampere.

ceving
Posts: 11
Joined: Sat Jun 04, 2016 6:26 pm

Re: OpenGL on Raspi 3

Sun Jul 03, 2016 9:27 am

ceving wrote:Considering your observation I used now a Ravpower battery being able to deliver 2.4 Ampere and the Raspi 3 WORKS: glxgears in 60 frames.
I tough it would work, but it still does not work. It works only if I boot into X11 without OpenGL support, enable OpenGL and do a soft reset. When I switch off the power and boot directly with OpenGL support, I will get a black screen.

I would say OpenGL on Raspi is not in experimental but in random state.

Return to “Raspberry Pi OS”