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

Unable to get a Windows #5360

Closed
fui86 opened this Issue Aug 31, 2017 · 19 comments

Comments

Projects
None yet
8 participants
@fui86

fui86 commented Aug 31, 2017

Hi, i've installed Kivy on the new relase of Jessie (Stretch).
Now, when i lounch videoplayer.py i see this error:

[WARNING] [Config ] Older configuration version detected (0 instead of 20)
[WARNING] [Config ] Upgrading configuration in progress.
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_17-08-31_0.txt
[INFO ] [Kivy ] v1.10.1.dev0, git-500de18, 20170831
[INFO ] [Python ] v2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170124]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [VideoGstplayer] Using Gstreamer 1.10.4.0
[INFO ] [Video ] Provider: gstplayer
[INFO ] [Window ] Provider: egl_rpi
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
[INFO ] [OSC ] using for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
error: XDG_RUNTIME_DIR not set in the environment.
[CRITICAL] [Window ] Unable to find any valuable Window provider.
egl_rpi - EGLError: EGL_NOT_INITIALIZED (code x3001)
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 67, in core_select_lib
cls = cls()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py", li ne 949, in init
self.create_window()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.p y", line 38, in create_window
self._create_egl_context(self.win, 0)
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.p y", line 68, in _create_egl_context
egl.Initialise(display)
File "kivy/lib/vidcore_lite/egl.pyx", line 352, in kivy.lib.vidcore_lite.egl.I nitialise (/tmp/pip-6kvoQv-build/kivy/lib/vidcore_lite/egl.c:2591)
File "kivy/lib/vidcore_lite/egl.pyx", line 322, in kivy.lib.vidcore_lite.egl.r aise_egl_error (/tmp/pip-6kvoQv-build/kivy/lib/vidcore_lite/egl.c:2168)

sdl2 - RuntimeError: No available video device
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 67, in core_select_lib
cls = cls()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 140, in init
super(WindowSDL, self).init()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py", li ne 949, in init
self.create_window()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 269, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 84, in kivy.core.window._window _sdl2._WindowSDL2Storage.setup_window (/tmp/pip-6kvoQv-build/kivy/core/window/_w indow_sdl2.c:2390)
File "kivy/core/window/_window_sdl2.pyx", line 57, in kivy.core.window._window _sdl2._WindowSDL2Storage.die (/tmp/pip-6kvoQv-build/kivy/core/window/_window_sdl 2.c:1967)

x11 - ImportError: No module named window_x11
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 59, in core_select_lib
fromlist=[modulename], level=0)

[CRITICAL] [App ] Unable to get a Window, abort.

Can you help me?

@KeyWeeUsr

This comment has been minimized.

Member

KeyWeeUsr commented Sep 15, 2017

error: XDG_RUNTIME_DIR not set in the environment.
sdl2 - RuntimeError: No available video device

I'm not sure, but it seems to me like you're running just the console and not the window manager. I got a similar error long ago in Travis when I didn't run the window manager / display.

@submax82

This comment has been minimized.

submax82 commented Oct 27, 2017

I have the same problem on raspbian Stretch lite version (without GUI).
I want run kivy without Xorg... is possible? what is missing for work?

[INFO ] Logger: Record log in /root/.kivy/logs/kivy_17-10-27_4.txt
[INFO ] Kivy: v1.10.0
[INFO ] Python: v2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170124]
[INFO ] Factory: 194 symbols loaded
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] Text: Provider: sdl2
[INFO ] Window: Provider: egl_rpi
[INFO ] OSC: using for socket
[INFO ] Window: Provider: sdl2(['window_egl_rpi'] ignored)
[CRITICAL] Window: Unable to find any valuable Window provider.
egl_rpi - EGLError: EGL_NOT_INITIALIZED (code x3001)
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 67, in core_select_lib
cls = cls()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py", line 899, in init
self.create_window()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py", line 37, in create_window
self._create_egl_context(self.win, 0)
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py", line 66, in _create_egl_context
egl.Initialise(display)
File "kivy/lib/vidcore_lite/egl.pyx", line 351, in kivy.lib.vidcore_lite.egl.Initialise (/tmp/pip-build-JK3ofh/kivy/kivy/lib/vidcore_lite/egl.c:2586)
File "kivy/lib/vidcore_lite/egl.pyx", line 321, in kivy.lib.vidcore_lite.egl.raise_egl_error (/tmp/pip-build-JK3ofh/kivy/kivy/lib/vidcore_lite/egl.c:2163)
sdl2 - RuntimeError: No available video device
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 67, in core_select_lib
cls = cls()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 140, in init
super(WindowSDL, self).init()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/init.py", line 899, in init
self.create_window()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 269, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 84, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (/tmp/pip-build-JK3ofh/kivy/kivy/core/window/_window_sdl2.c:2286)
File "kivy/core/window/_window_sdl2.pyx", line 57, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (/tmp/pip-build-JK3ofh/kivy/kivy/core/window/_window_sdl2.c:1868)
x11 - ImportError: No module named window_x11
File "/usr/local/lib/python2.7/dist-packages/kivy/core/init.py", line 59, in core_select_lib
fromlist=[modulename], level=0)

@submax82

This comment has been minimized.

submax82 commented Oct 28, 2017

#5362

The foundation renamed some libraries in August 2017 to clear up some confusion.

libGLESv2.so became libbrcmGLESv2.so
libEGL.so became libbrcmEGL.so

and so on. Why ? It turns out Mesa ships libraries with exactly the same name and people were gettting confused which libraries were from Mesa and which from Broadcom. This is especially fatal since the libraries Mesa provides are better integrated with X , but less stable and a bit slower (speed has increased dramatically since hardware rendering was added).

reference: https://jp.raspberrypi.org/forums/viewtopic.php?f=68&t=192869

On kivy >= 1.10.1 is already fixed, therefore on raspbian Stretch must be used:
pip install --upgrade --force-reinstall git+https://github.com/kivy/kivy.git@master

@KeyWeeUsr

This comment has been minimized.

Member

KeyWeeUsr commented Oct 28, 2017

Nice findings, especially the date. Perhaps you could include it to the RPi installation docs as a .. note::? I bet it will help someone using stable versions instead of digging through the github issues.

@submax82

This comment has been minimized.

submax82 commented Oct 28, 2017

if you want i can, but how?
permissions for commit on docs? Or i can send to you a patch's rst?

@KeyWeeUsr

This comment has been minimized.

Member

KeyWeeUsr commented Oct 28, 2017

@submax82 you can edit this file, check the RST syntax on this page and submit a pull request :)

@Zen-CODE Zen-CODE closed this in 7f5ade7 Feb 7, 2018

@ivopashov

This comment has been minimized.

ivopashov commented Apr 23, 2018

I see this is closed but still experience the error.
I am running:

sysop@pipaos:~$ cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"

also have the latest kivy installed (pip installed from master)

sysop@pipaos:~$ cat /usr/local/lib/python2.7/dist-packages/kivy/version.py
# THIS FILE IS GENERATED FROM KIVY SETUP.PY
__version__ = '1.10.1.dev0'
__hash__ = 'ae3665c32e1fdb9b7564aa6bbceeb58b5cd09ec5'
__date__ = '20180423'

and when i run a basic examples as python /usr/local/share/kivy-examples/demo/camera/main.py i get

[CRITICAL] [Window      ] Unable to find any valuable Window provider.
egl_rpi - ImportError: cannot import name bcm
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
    from kivy.lib.vidcore_lite import bcm, egl

sdl2 - RuntimeError: No available video device
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 67, in core_select_lib
    cls = cls()
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 140, in __init__
    super(WindowSDL, self).__init__()
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 960, in __init__
    self.create_window()
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py", line 272, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 93, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
  File "kivy/core/window/_window_sdl2.pyx", line 66, in kivy.core.window._window_sdl2._WindowSDL2Storage.die

x11 - ImportError: No module named window_x11
  File "/usr/local/lib/python2.7/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)

[CRITICAL] [App         ] Unable to get a Window, abort.
@joeseegmiller

This comment has been minimized.

joeseegmiller commented Jun 4, 2018

I am seeing the exact same error as @ivopashov on kivy 1.10.1.dev0 using a Raspberry Pi 3B+ and Raspbian Stretch

The fix presented above does not fix it.

@kuzeyron

This comment has been minimized.

Contributor

kuzeyron commented Jun 4, 2018

Hello! As a start. I have never got the Kivy Camera to run on my Desktop PC.
So you would probably need to check the source code for it.
Using PiCamera python-bindings you might find more success with.

If you set the OpenGL driver to Full KMS. You do that by running sudo raspi-config.
And add this to /home/pi/.bashrc: export DISPLAY=:0.0
sudo reboot or just run in Terminal: source ~/.bashrc
It should do the trick and even hide FBO errors.
I'm doing research regarding these issues. Hopefully tomorrow is the day for me to know the real answer for everything!

@Graveen

This comment has been minimized.

Graveen commented Jul 1, 2018

Hi, i'm more or less in this case, except i'd like to downgrade from 1.11dev0.
I'm assuming to run with python3 i must use pip3 instead of pip
-> am i right ?
and for downgrading a kivy installed i should use
-> pip install --upgrade --force-reinstall git+https://github.com/kivy/kivy.git@stable-1.10

Does it sound correct ? TY

The bug i suspect is with my touchpanel. It works under Pixel, it is detected by Kivy correctly in the log, but nothing happens when i try touchtracer or my own app.

@Neex101

This comment has been minimized.

Neex101 commented Sep 15, 2018

I am seeing the exact same error as @ivopashov on kivy 1.10.1 using a Raspberry Pi 3B+ and Raspbian Stretch.

I am using the official RasPi 7" touchscreen, and python2. Is there any testing I can do to help? Thnx

@kuzeyron

This comment has been minimized.

Contributor

kuzeyron commented Sep 16, 2018

I hope you guys have tried this Guide.
Otherwise Ubuntu Mate is using different drivers for the Graphics. So If Raspbian fails on you that much that you get FBO errors and such. Then I advice you to try out Ubuntu Mate.

@Neex101

This comment has been minimized.

Neex101 commented Sep 18, 2018

@kuzeyron thanks, yes was building from the Kivy.org guide. Can't use Ubuntu Mate, want to use PipaOS for lightweight boot.

@Neex101

This comment has been minimized.

Neex101 commented Sep 18, 2018

OK, it's working for me today:

Hardware: Raspberry Pi 3B+, official 7" touchscreen
OS: Rasbian Stretch Lite, latest release (June 2018) from here
Following build steps from Kivy.org here to install latest Kivy globally.
Kivy: 1.11.0.dev0 (@master) git-ce8017c, 20180918
Python: 2.7.13

python /usr/local/share//kivy-examples/demo/showcase/main.py

... runs fine

@kuzeyron

This comment has been minimized.

Contributor

kuzeyron commented Sep 18, 2018

@Neex101 It will work unless you try running ScreenManager. I hit easily the memory leak.
But on the other hand, Kivy runs smoothly for me as well on ArchLinux which is on my Pi3B+.
But I'm only using Carousel so that's fine.

@Neex101

This comment has been minimized.

Neex101 commented Sep 25, 2018

@kuzeyron hi! So Kivy won't work on 3B+ with ScreenManager?? Is it a memory leak or just not enough memory? (maybe I can adjust the memory allocated to the GPU?). Is ArchLinux better than Rasbian Stretch Lite for this application, if so why? Many thanks,

@kuzeyron

This comment has been minimized.

Contributor

kuzeyron commented Sep 25, 2018

@Neex101 Ubuntu Mate is known to have working drivers. Raspbian and Arch is using the same drivers.
I haven't looked on Ubuntu Mates drivers on how they compiled it and which syntaxes.
If I or someone else would manage to get the same drivers. Then the drivers could be placed on its own place and Kivy would simply just link it so other users know where to grab it from.

Yes, it's a memory leak. Not sure of the cause. But the Raspberry Pi foundation should be looking at the issue AFAIK. This is what I know: raspberrypi.org/forums

@Neex101

This comment has been minimized.

Neex101 commented Sep 26, 2018

Wow! I'm shocked... thank you for your very helpful direction. I will try Mate immediately. Do you have any particular version to recommend? If I can make a working build I'll try to make a post to help newbies (like me) build a workaround.

@kuzeyron

This comment has been minimized.

Contributor

kuzeyron commented Sep 26, 2018

No I don't have any particular version. But as long as the drivers are using "llvmpipe" it should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment