Has anyone got Pico-8 working on Raspberry Pi 4? Specifically under Raspbian Buster, console/terminal mode?
I've got it running in the Desktop, but there are graphics issues (tearing, non-smooth scrolling) so want to run it from the console. I have done this in the past on Pi 1/3, but am having trouble with the Pi 4...
Launching Pico-8 give me the following error:
SDL Error: Could not create EGL window surface ** FATAL ERROR: Unable to create window (SDL restoring keyboard) Segmentation fault
(pico8_dyn gives the same error)
Anyone know what I need to do?
I think it has to do with Raspbian Buster rather than the Raspberry 4. Same issue if you try to use Kodi.
Basically it has to do with the video drivers not being ready yet. You should be able to use the previous version of Raspbian. There are also ways to make it work on Buster, but I haven't tried. Some people suggest installing xorg.
So then, tried the oldest version of Buster (2019-06-20) - same problem.
Also tried the latest version of Stretch (2019-04-08) and it won't boot...I think that is probably normal as the OS is older than the Pi 4 hardware.
What I'm confused about is that I found the following thread where mdgunn is using Pi 4, Buster and Pico8. Perhaps this is running from the desktop?:
I'm looking to make a RasPi purchase here with the prime goal of running PICO8 games on it. (I plan on keeping it behind my TV so I can play in the lounge at home.)
I think PICO runs fine on the RasPi 3, but reading this thread maybe not so well on the 4? Would it be wiser to just purchase a 3b+ do you think?
A little while ago I made sure I had all the recent updates on my Pi 4 and it didn't make much / any difference.
However I made note of some settings to try changing but have not yet had chance to try it. I will do so soon and report back.
Aside from all that...if you only want to run Pico 8 from a console then a Pi 2 or 3 would do the job perfectly. I have used both in that scenario.
If you want to run from a console without any desktop environment, then you have to do a custom build of libsdl to enable framebuffer display!
This has instructions: https://choccyhobnob.com/sdl2-2-0-8-on-raspberry-pi/
Now a problem is that the built-in framebuffer driver was fbcon with libsdl 1.2, but it is removed in version 2: https://wiki.libsdl.org/FAQUsingSDL
According to https://bbs.archlinux.org/viewtopic.php?id=243100 the option for the configure script is '--enable-video-directfb'
I haven’t tried these yet, but I will at some point and report in this thread (and the couple others with the same problem). Please tell us if you try it first!
Hi! Just got a Pi 4, and having the same issue: really slow in full-screen mode, but runs fine in windowed. I tried pico8_dyn and still had the same problem.
@merwok - did you ever try those solutions? I'm a total beginner so this is all rather over my head, but I'd really appreciate some help. The Pi was part of a present with a build-your-own-handheld, and I'll be really disappointed if it can't run smoothly in full-screen...
Right! I commented on other raspberry pi threads but forgot this one.
I found a random 7 inch HDMI screen and tried pico8 on a raspi zero using raspbian without X (no graphical environment at all). I ran 'pico8' from the console, the version that links libsdl statically and wiringpi dynamically and it started! I didn’t have to compile custom libraries. I had sound from the screen speakers and the keyboard worked, but not the mouse, so I have to go back to it.
I don’t know about your raspi 4 performance problem though. But you could try booting to a console rather than a graphical desktop and run pico8 from there! If you have issues, you may get help on the hardware-dev channel of the pico8 discord.
Re: performance on Raspberry Pi 4, for me it runs a lot better with the old GL driver.
To change, run
$ sudo raspi-config
select Advanced Options, GL Driver, and choose Legacy. After saving, reboot and try again. With this setting, I get over 60 fps full screen at 1080p, where previously it seemed to never be more than 20 fps even without a game running.
So I just ran into this same issue of having extremely slow performance when running either as a maximized desktop window or in fullscreen on a Raspberry Pi 400 (the keyboard one).
By slow performance, I mean it was literally running slowly. Not where the framerate is lagging, where it shows 15fps, but is still running at normal speed. I mean if the only code I had was...
function _draw() cls() print(t()) end
...then the time displayed would actually run about 1/2 to 2/3 the speed of a stopwatch held up next to it, even though it's reporting (using Ctrl-P) that it's running at 30fps.
However, I'm happy to report that the solution @septomin posted above does work. Now it's getting the right framerate and running at the correct speed, both as a maximized desktop window and in fullscreen. Thanks, @septomin!
I use Pico-8 on a raspberry pi 4 with the latest Raspbian Buster, no issues so far. I use the latest version of SDL2 (built from source).
Other people have had the same experience using other products with the same issue (SDL Error: Could not create EGL window surface). I'm not doing anything special to get it working.
sudo apt-get update
sudo apt-get full-upgrade
- Build SDL2 from source
- installed SDL2, SDL2_ttf
that's all I did before installing pico-8
maybe look into a *mesa-dev driver that needs installing? I'm not sure.
[Please log in to post a comment]