attract icon indicating copy to clipboard operation
attract copied to clipboard

Compiling on the Raspberry Pi 4 (Raspbian Buster)

Open ghost opened this issue 5 years ago • 126 comments

It seems to be the opportune moment to update the compilation guide of Attract-Mode in pi4 with Raspbian Buster, right?

ghost avatar Jul 13 '19 11:07 ghost

sounds good, pull requests welcomed

On Jul 13, 2019, at 4:49 AM, zlagos [email protected] wrote:

It seems to be the opportune moment to update the compilation guide of Attract-Mode in pi4 with Raspbian Buster, right?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

mickelson avatar Jul 13 '19 14:07 mickelson

I have already prepared the pull request, with the AM compilation in Buster, including Buster Lite, but I have two problems: 1 - This does not allow me to add a new pull request anywhere. 2 - After doing the whole compilation process (in my raspberry pi 4 4GB) without seeing any error message, when I'm going to start attract-mode, it doesn't start and says "* failed to add service - already in use?

ghost avatar Jul 30 '19 17:07 ghost

Hi, I have the same exact same problem. No problem compiling like @ghost, but when it's time to start it, I have the same error : "* failed to add service - already in us?"

I had the same error when compiling Retroarch on the Raspberry Pi 4. It seems to be a problem with version 1 of OpenGL (Gl1) which is not supported in the new GPU if I remember well. Just before compiling, one guy suggested to add flag(option) to disabled it from the make so the application is not trying to start it(causing the error we get).

I don't know how to interpret this Attract-Mode, but I would like to get it working on my Raspberry Pi 4. This guy @karbinunit on Github was able to get us debugged by this command before compiling : CFLAGS='-mfpu=neon -mtune=cortex-a72 -march=armv8-a' ./configure --enable-alsa --enable-udev --enable-neon --disable-videocore --enable-opengles --enable-opengles3 --disable-opengl1 --enable-x11

Source is : https://gist.github.com/AlexMax/32e5d038a66ce57253e740ea75736805

I am not too sure if you can do something with that from here. If i find something, I'll let you know.

SUPER-DAN avatar Sep 10 '19 22:09 SUPER-DAN

Just saw Attract-Mode was updated to 2.6.0 @SUPER-DAN does it fix your issue?

kwyxz avatar Oct 23 '19 01:10 kwyxz

@kwyxz This is issue still occurs with 2.6.0 when compiling with the most recent raspbian updates.

mbirnie avatar Oct 27 '19 15:10 mbirnie

This error has disappeared with the latest code from git and raspian updates :+1:

mbirnie avatar Nov 02 '19 16:11 mbirnie

@mbirnie did you do anything specific? Following the documentation here - which means building sfml-pi and ffmpeg for mmal - I am still getting the error * failed to add service - already in use? when attempting to run attract mode from the command line (without X11) on a Raspberry Pi 4 running Raspbian with the latest update.

kwyxz avatar Nov 04 '19 07:11 kwyxz

I did nothing specific. I am currently on the latest raspbian image with all the latest updates. This version of raspbian also has a libsfml-dev package that can be installed instead of building sfml locally. I cloned the attract mode git repository from Oct 29th and built with USE_GLES=1

mbirnie avatar Nov 06 '19 14:11 mbirnie

Thanks, I had not thought about building using the Raspbian package for SMFL. I'll give it a try.

kwyxz avatar Nov 06 '19 19:11 kwyxz

@mbirnie can you please confirm you're running Attract-Mode with FKMS and not X11 because building the latest git rev using libsfml-dev from Raspbian and USE_GLES=1 I end up with Failed to open X11 display; make sure the DISPLAY environment variable is set correctly when running attract-mode.

kwyxz avatar Nov 07 '19 03:11 kwyxz

I definitely don't think mbirnie got the compilation in the terms he told us. Either something is missing, or does not tell the truth.

iOtero55 avatar Nov 20 '19 19:11 iOtero55

any update on if anyone was successful?

Sinistars avatar Feb 08 '20 20:02 Sinistars

Sorry, I've been busy starting my own business and have had little time for hobbies... I am using the FKMS overlay driver with X11. With the latest git commits, I got attract-mode to work when compiled with

make USE_GLES=1 USE_VC4=1

mbirnie avatar Feb 14 '20 03:02 mbirnie

If @mbirnie is using attract-mode he will do it under x11, because compiling as he says the message still comes out: "Failed to open X11 display; make sure the DISPLAY environment variable is set correctly"

iOtero55 avatar Feb 14 '20 19:02 iOtero55

I just added a page to the wiki with the build process I followed to get a working build in Buster.

chase-cobb avatar Apr 29 '20 18:04 chase-cobb

I just added a page to the wiki with the build process I followed to get a working build in Buster.

Could you provide a link :S

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)

chase-cobb avatar Apr 29 '20 18:04 chase-cobb

I just added a page to the wiki with the build process I followed to get a working build in Buster.

Could you provide a link :S

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)

Thanks this will help users fine a direct link. Also did you get this working on a pi 4 ?

Yes, these were the steps I took to get it running on my Pi 4.

chase-cobb avatar Apr 29 '20 20:04 chase-cobb

Yes, these were the steps I took to get it running on my Pi 4.

... under X11, right?

kwyxz avatar Apr 29 '20 20:04 kwyxz

Very strange issue still shows Even on a fresh install that is already in use... mhmmm

Unless SFML is patched, there's no way to use Attract on the Raspberry Pi 4 without X11.

kwyxz avatar Apr 29 '20 21:04 kwyxz

Very strange issue still shows Even on a fresh install that is already in use... mhmmm

Unless SFML is patched, there's no way to use Attract on the Raspberry Pi 4 without X11.

What’s the best guide to follow to install it on X11 at this time for new users.

Try this -> https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)

chase-cobb avatar Apr 29 '20 22:04 chase-cobb

@chase-cobb - When I follow your steps on a clean build of Raspian Buster, I get the error "Failed to open X11 Display". Is there something I should've done before trying to run it?

MancV21 avatar May 13 '20 15:05 MancV21

@chase-cobb - When I follow your steps on a clean build of Raspian Buster, I get the error "Failed to open X11 Display". Is there something I should've done before trying to run it?

Yes : install and run X11.

kwyxz avatar May 13 '20 15:05 kwyxz

NVM. I was using a terminal from my PC (so I could easily just copy ROMs across once it was installed). I decided I'd just try it straight on the machine (run > attract) and it works fine (so far). Now to install some emulators and ROMs and try it out.

Cheers. :)

EDIT - Out of interest, is it worth trying to install it on the latest RetroPie or is that a no go? And while I've got you, does lr-mame2003 run on Buster / RP?

Thanks again.

MancV21 avatar May 13 '20 15:05 MancV21

The buster guide works great to compile but attract will run only on desktop/x11 otherwise "Failed to open X11 Display" You can edit autostart to startx and then attract. But it would be nice to run with FKMS as everything now changed for pi4 support. Probably a clean buster with desktop and and no kms enabled should work as before, right?

2play avatar May 19 '20 13:05 2play

What do you mean by saying "through RetroPie" ? AM will not magically turn complicit with KMS.

oomek avatar May 19 '20 15:05 oomek

Hi @supremeretropie Unfo Attract mode runs over x11 not with KMS at the moment. I can run attract on the desktop my self thats not the problem. AM cant run and boot directly to it from cli as in the past as a seaprate frontend. Thats the only way to run it, over x11. I think the discussion here is to make AM boot/run as was on pi3. Option to exit retropie boot direct to AM if supported.

OK from what you posted last if their devs manage to make it run oven KMS then task will be accomplished. Ive already updated my auto install scritps for pi4. Now we wait for KMS :-)

2play avatar May 19 '20 16:05 2play

The main advantage of FKMS is that we can finally have shaders working on PI. This requires a serious rewrite of the SFML linux window/glcontext management functions.

oomek avatar May 19 '20 16:05 oomek

@supremeretropie ill reply quick as its not the place. since PB v1 Nov 2008 I have created an auto installation script for ppl to install AM and all extras. Now ive updated to include the latest pi4 devs advised.

2play avatar May 19 '20 16:05 2play

@chase-cobb - When I follow your steps on a clean build of Raspian Buster, I get the error "Failed to open X11 Display". Is there something I should've done before trying to run it?

Yes : install and run X11.

how do you install and run x11

airman221 avatar May 26 '20 15:05 airman221

@chase-cobb - When I follow your steps on a clean build of Raspian Buster, I get the error "Failed to open X11 Display". Is there something I should've done before trying to run it?

Yes : install and run X11.

how do you install and run x11

Just google "install x11" but if you have already desktop on your pi4 probably you have it. If you have you can run the attract mode in there

2play avatar May 26 '20 16:05 2play