EE on a Raspberry Pi 2

2»

Comments

  • edited November 2017
    I've just tested in on the latest rasbian + experimental OpenGL drivers on a Pi2 (enabled in raspi-config). No longer crashed within minutes with EE and another project of mine. The other project was my focus, EE was just an extra test. So not a whole lot of time spend there.

    Depending on the resolution and the station it runs EE somewhere between 10 and 25FPS, which isn't great but acceptable. Science had the lowest performance of the stations, and the GM screen was actually the worst.
    The 10FPS was on 1920×1080, as I was using my HD TV as screen.
    Not running the server could also help, as I noticed with F11 that the server update was taking quite some time on the pi.

    I tried the main screen view (as my other project is using shaders and that worked now on the Pi2) this crashed with out-of-video memory. Most likely adjusting the memory split in rasbi-config could fix this. But I didn't try.

    I could compile is straight forwards as on any other linux system, SFML has been updated in the rasbian repo, so you no longer need to compile that yourself as well. You can just "apt-get install sfml-dev"
  • Thank for the review. Do you know if is it the same for debian 8 now ? The SFML can just be updated by apt-install ?
  • On stretch, looks like it.
  • Optimizer! Noticed that the optimizer wasn't enabled when compiling. Also figured I would double check if the hardware floating point is used. And because of that, I found that I can set a whole bunch of compiler options to improve runtime speed.

    Currently I have, Raspberry pi specific:
    "-mcpu=native -mfpu=neon-vfpv4 -O3 -mfloat-abi=hard -funsafe-math-optimizations"

    Now compiling is taking a whole lot longer. But this might bring it to an acceptable 30FPS. I'll report back when compiling is done.
  • With the new compile options, the performance comes within the range of acceptable. Especially at lower resolutions. The GM screen for example, jumped to 17FPS from the previous 10FPS.
  • edited November 2017
    @el.tito when in doubt, just do an
    apt-get update && apt-cache policy libsfml-dev
    It should show at least Version 2.3. But as you are talking about Debian 8, you still have to install sfml manually. Stretch is Version 9. However that is not much of a problem. I made deb-packages with checkinstall for that case, so it is easy to distribute on distros like MX Linux, that are still on jessie.


    @daid: your experiences are similar to those that I made some month ago. I used that opportunity to test it again, and interestingly I have some different experiences.
    - On an old jessie-based install, the game crashes on main-screen, however I don't see an out of video memory error, but just a segfault.
    - I then made a new stretch-based install and compiled EE. interestingly the game did not crash here, but freezes.
    So it is strange that there are different experiences, even on the same software (in the second case), and I also have the Pi2
    BTW upping video Ram split did not have an effect on that issue.

    Those compile options are very interesting, I will try that too. Do they have to be added in CMakeLists.txt? And is there a chance to optimize in similar ways for old x86-Laptops?

    Sidenote: Checkinstall seems to have a bug in stretch for ARM. So I had to use this fix to make a deb-package on the raspi: https://github.com/opencv/opencv/issues/8897#issuecomment-336597703
  • Yes, I added the options to the CMakeList.

    To the lines:
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")

    I will make a proper solution soon. So it adds default optimization flags always, and detects the Pi to optimize even more for that. Should help on all platforms, including older laptops. But only if the problems are CPU related, not GPU related.
  • edited December 2017
    @daid : could you explain me where to put theses options :

    "-mcpu=native -mfpu=neon-vfpv4 -O3 -mfloat-abi=hard -funsafe-math-optimizations"

    currently, i compile EE according to the wiki instructions :

    cmake .. -DSERIOUS_PROTON_DIR=$PWD/../../SeriousProton/
    make
    sudo make install

    I have already activate the GLoption.

    Thanks in advance.
  • edited December 2017
    open the CMakeLists.txt, go to the lines daid has posted:
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
    in these lines, there is only the option -Wall, so you add the additional options to them

    So after the edit it should look like
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -mcpu=native -mfpu=neon-vfpv4 -O3 -mfloat-abi=hard -funsafe-math-optimizations")

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -mcpu=native -mfpu=neon-vfpv4 -O3 -mfloat-abi=hard -funsafe-math-optimizations")
  • Ok, i didn't understand the last message of Daid. Thanks @BlueShadow, I hope this will help to my older desktops (I collected 20 old desktops last month :) ).
  • For desktops, leave out the "-mfpu=neon-vfpv4" and "-mfloat-abi=hard", as those are raspberry pi specific.
  • I cannot exceed 20 FPS with my Pi 2. How can you reach 30 fps ?

    I use the GL option and I add the line code but nothing. Is it because i use a high resolution (1080) ? I dont know why but I cannot decrease the resolution of my Pi.
  • Yes, the resolution is key. Full screen also helps.
    "xrandr" is the linux tool to change resolutions, which I used to lower the resolution of my HD TV to test this.
Sign In or Register to comment.