Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPi: Autodetect when we are on a Raspberry Pi 4 #6562

Merged
merged 2 commits into from
Dec 16, 2019

Conversation

Lauszus
Copy link
Contributor

@Lauszus Lauszus commented Oct 20, 2019

Do NOT use the proprietary Broadcom video core drivers, as they are not available on the Raspberry Pi 4.

I'll also like to update the documentation with my instructions here: #6474 (comment), so new users should be able to get it up and running on a Pi 4 easily :)

For anyone that wants to try this, you can install it like so:

export VIDEOCOREMESA=1; pip3 install --verbose git+https://github.com/Lauszus/kivy.git@rpi4_auto#egg=kivy

@Lauszus
Copy link
Contributor Author

Lauszus commented Oct 20, 2019

I'll like to test this with VIDEOCOREMESA=0 and VIDEOCOREMESA=1 and see if there is any performance difference.

In case VIDEOCOREMESA=1 works better I'll enable it by default for the Raspberry Pi 4.

…tary Broadcom video core drivers, as they are not available on the Raspberry Pi 4
@Lauszus
Copy link
Contributor Author

Lauszus commented Oct 21, 2019

@matham I found another issue, as VIDEOCOREMESA=0 does actually select the mesa drivers:

>>> print(True if '0' else False)
True

Instead one should use:

unset VIDEOCOREMESA; pip3 install --verbose git+https://github.com/Lauszus/kivy.git@rpi4_auto#egg=kivy

I've pushed another commit, so it checks if VIDEOCOREMESA is equal to 1: cef99e4.

…ly select the mesa drivers:

>>> print(True if '0' else False)
True
@Lauszus
Copy link
Contributor Author

Lauszus commented Oct 22, 2019

I have now compared VIDEOCOREMESA=0 and VIDEOCOREMESA=1 and I can't really tell any difference in performance.

FYI here's the Kivy log for VIDEOCOREMESA=0:

[INFO   ] Window: Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] GL: Using the "OpenGL" graphics system
[INFO   ] GL: Backend used <sdl2>
[INFO   ] GL: OpenGL version <b'2.1 Mesa 19.2.0-rc1'>
[INFO   ] GL: OpenGL vendor <b'Broadcom'>
[INFO   ] GL: OpenGL renderer <b'V3D 4.2'>
[INFO   ] GL: OpenGL parsed version: 2, 1
[INFO   ] GL: Shading version <b'1.20'>
[INFO   ] GL: Texture max size <4096>
[INFO   ] GL: Texture max units <16>

and VIDEOCOREMESA=1:

[INFO   ] Window: Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] GL: Using the "OpenGL ES 2" graphics system
[INFO   ] GL: Backend used <sdl2>
[INFO   ] GL: OpenGL version <b'2.1 Mesa 19.2.0-rc1'>
[INFO   ] GL: OpenGL vendor <b'Broadcom'>
[INFO   ] GL: OpenGL renderer <b'V3D 4.2'>
[INFO   ] GL: OpenGL parsed version: 2, 1
[INFO   ] GL: Shading version <b'1.20'>
[INFO   ] GL: Texture max size <4096>
[INFO   ] GL: Texture max units <16>

From what I can tell from the output it seems like it is always using Mesa, so the VIDEOCOREMESA flag does not make any difference.

@Lauszus Lauszus changed the title WIP Autodetect when we are on a Raspberry Pi 4 Autodetect when we are on a Raspberry Pi 4 Oct 23, 2019
Copy link
Member

@tshirtman tshirtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Didn't test, but LGTM, if it's enough to be able to use kivy on the pi4, then i'm all for it, do we need some documentation update btw ? doc/sources/installation/installation-rpi.rst (can be done in a different PR).

@Lauszus
Copy link
Contributor Author

Lauszus commented Dec 16, 2019

@tshirtman yes that is all that is needed. Please see my comment here: #6474 (comment) on how to get it up and running on a Raspberry Pi 4 when using Raspbian Lite, as it needs X.

@tshirtman tshirtman merged commit 19e139f into kivy:master Dec 16, 2019
@tshirtman
Copy link
Member

Great, merging then, thanks a lot!

@Lauszus
Copy link
Contributor Author

Lauszus commented Dec 18, 2019

@tshirtman installtion instructions are added in #6568

@matham matham added this to the 2.0.0 milestone Oct 28, 2020
@matham matham changed the title Autodetect when we are on a Raspberry Pi 4 RPi: Autodetect when we are on a Raspberry Pi 4 Dec 8, 2020
@matham matham added the Component: distribution Wheels, apt PPA, conda, end user install issues label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: distribution Wheels, apt PPA, conda, end user install issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants