Kivy on Raspberry Pi

189 views
Skip to first unread message

Petr Marek

unread,
Apr 22, 2020, 4:44:35 PM4/22/20
to Kivy users support
Hello,
I want to write GUI app for Raspberry Pi 3. Problem is, that RPi is very slow when I run kivy program on it. I have noticed, that it is slow only, when I have there Widgets over entire screen (For example one big Button or few buttons on GridLayout). How can I fix that? Is that possible? When I have there for example only few small buttons, everything works correctly. But when I make app with only one big Button, mouse is very slow/laggy...
For example in code below:

import kivy 
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.app import App 

class MyGrid(GridLayout):
        pass

class A(App): 

        def build(self):
            g=GridLayout(cols=4)
            g.add_widget(Button(size_hint=(0.4,0.1)))
            g.add_widget(Button(size_hint=(0.4,0.1)))
            g.add_widget(Button(size_hint=(0.4,0.1)))
            g.add_widget(Button(size_hint=(0.4,0.1)))

            return g
a = A() 
a.run() 

Please help, I need fluent app, not laggy...

Elliot Garbus

unread,
Apr 22, 2020, 5:31:39 PM4/22/20
to kivy-...@googlegroups.com
Very odd that a simple app like that would be slow.  Is there a GPU? Have you checked the graphics driver?

Sent from my iPhone

On Apr 22, 2020, at 1:45 PM, Petr Marek <petr.m...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c3a4c172-37e1-46d0-90ed-6df29d2e0fdf%40googlegroups.com.

Petr Marek

unread,
Apr 22, 2020, 5:40:35 PM4/22/20
to Kivy users support
Yes Raspberry Pi has GPU (256 MB). But strange is, that other applications works correctly on RPi, but this simple python app doesn't.
Please help!

Elliot Garbus

unread,
Apr 22, 2020, 6:00:22 PM4/22/20
to kivy-...@googlegroups.com

Look at the kivy log, or the code that runs displays when the program starts up.  What does it say about the OpenGL driver?

You may want to see if there is an update of the OpenGL driver for your platform.

--

You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

Petr Marek

unread,
Apr 22, 2020, 6:08:31 PM4/22/20
to Kivy users support
It says:

[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'3.0 Mesa 13.0.6'>
[INFO   ] [GL          ] OpenGL vendor <b'VMware, Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)'>
[INFO   ] [GL          ] OpenGL parsed version: 3, 0
[INFO   ] [GL          ] Shading version <b'1.30'>
[INFO   ] [GL          ] Texture max size <8192>
[INFO   ] [GL          ] Texture max units <32>

Elliot Garbus

unread,
Apr 22, 2020, 6:38:40 PM4/22/20
to kivy-...@googlegroups.com

I don’t know it this helps –  https://www.raspberrypi.org/forums/viewtopic.php?t=223592#p1377088

Make sure you have the latest driver, and HW acceleration is turned on.

 

It looks like Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits) is not the HW accelerated graphics driver.

 

 

From: Petr Marek
Sent: Wednesday, April 22, 2020 3:08 PM
To: Kivy users support
Subject: Re: [kivy-users] Kivy on Raspberry Pi

 

It says:

--

You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

Petr Marek

unread,
Apr 22, 2020, 7:03:44 PM4/22/20
to Kivy users support
Finally, I have found solution. I probably havent got enabled openGL driver or something like that...Sorry I don't understand technically to openGL...
Solution is:
in console: "sudo raspi-config"->advanced options->GL driver->GL (FULL KMS)->back->finish->reboot

Thanks for help! :) 
Reply all
Reply to author
Forward
0 new messages