User avatar
Gavinmc42
Posts: 4659
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Oct 19, 2018 12:48 am

It worked pretty much first time and I am really impressed how good it runs! Congrats and thanks to the dev team for making is so portable!
Cool, nice to know it ports without major trouble now
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

itsmedoofer
Posts: 429
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK
Contact: AOL

Re: Supertuxkart on Raspberry Pi

Mon Oct 22, 2018 8:48 pm

Hi,

I've been looking at compiling this, the first thing I found was that with make -j4 I ran out of memory, even with -j3 it would start to swap, -j2 worked OK.

Having compiled and installed, when I run the game I get a notification that my OpenGL is too old, it needs ES 3.0 or better.. Have I done something wrong? The game runs but is a bit choppy..

I used

Code: Select all

cmake .. -DUSE_GLES2=1


and and put <card os="linux" disable="ForceLegacyDevice"/> in /usr/local/share/supertuxkart/datagraphical_restrictions.xml

Any ideas ?

Ta :)

User avatar
rpiMike
Posts: 1464
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 6:26 am

Have you enabled the GL Driver in raspi-config ?

itsmedoofer
Posts: 429
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK
Contact: AOL

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:05 pm

Hi,

Thanks for the quick reply, its appreciated.

The driver is enabled and appears to be working OK, glxgears runs at 60fps, and oolite plays fine..

From my config.txt

Code: Select all

dtoverlay=vc4-kms-v3d
gpu_mem=256
Should datagraphical_restrictions.xml have been edited before I compiled the game ?

EDIT:-

I think I have found the answer, I found this when hitting google, glxinfo in the Pi shows version 1.4
Since STK 0.9 we use new rendering engine that requires OpenGL 3.1 or higher
Maybe I should try and compile and older version....
Last edited by itsmedoofer on Tue Oct 23, 2018 5:17 pm, edited 1 time in total.

User avatar
rpiMike
Posts: 1464
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:16 pm

Edit: Don't think datagraphical_restrictions.xml needed editing
Last edited by rpiMike on Tue Oct 23, 2018 5:39 pm, edited 1 time in total.

itsmedoofer
Posts: 429
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK
Contact: AOL

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:31 pm

Is that you dont think the newer code is a fault ?

Edit:- Ah :)

EliCash
Posts: 2
Joined: Thu Jul 11, 2019 11:34 pm

Re: Supertuxkart on Raspberry Pi

Thu Jul 11, 2019 11:52 pm

Hi, first-timer here with not much technical knowledge going in. After doing the "light an LED" tutorial I wanted to install SuperTuxKart.

My first attempt was to just use:

Code: Select all

sudo apt-get install supertuxkart
Which KINDA worked, except that it gets hung on the loading screen until it quits the program. From this thread, I assumed I therefore needed to make tweaks to the code yet couldn't find it. That made me think I needed to "build from source" from github. So I cloned it. Eventually I figured out how to do install subversion and then grab the STK assets.

I got errors from the "dependencies" section of the documentation no matter which option I chose (do I need to install "Ubantu" or "Fedora"? I don't know what these things are...), so I moved ahead to compiling. However, when I ran "sudo cmake .." or "cmake .." I got a similar error message:

Code: Select all

-- No build type selected, default to STKRelease
-- Checking for module 'libenet>=1.3.4'
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.7/Modules/FindJPEG.cmake:32 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:193 (find_package)
(With no "sudo" there I got )

I thought maybe it had to do with the dependencies so I tried individually installing them but couldn't figure out how to do that, either. I did sudo apt install libgles2-mesa-dev libegl1-mesa-dev after seeing it on this thread, too. Thoughts?

User avatar
Gavinmc42
Posts: 4659
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 1:08 am

SuperTuxKart is OpenGL based.
It installs fine on a Pi4, it does pop up a warning but it still runs fine.
Not sure which version it is and more fine tuning would probably make it work better.

The Pi4 Buster is OpenGL all the way down.
More games now just install and work, some don't quite yet like 0AD and Warzone2100 is weird on big maps.

Trigger Rally works too.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

EliCash
Posts: 2
Joined: Thu Jul 11, 2019 11:34 pm

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 2:58 am

I've got a Raspberry Pi 3 B+. So is that why it won't run and quits on startup? Folks earlier in this thread got it going...

And my project is to create some external controllers for the game, rather than mouse/keyboard. To do that I think I'm going to need to access code for "fine tuning." If I'm not downloading it from GitHub and editing it, and just running it from what comes loaded, how do I access the code? Not asking to walk me through it but if there's a direction you can point of where to read more it'd be super helpful. Thanks

User avatar
Gavinmc42
Posts: 4659
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 5:02 am

The 3B+ uses the VC4 and does not default to OpenGL
The 4B uses the VC6 and does default to OpenGL.

The 4 is so much faster/better and more stuff like OpenGL games just install/work.
Not perfect but I noticed after one update/upgrade SuperTuxKart was even better.

I tried compiling it in Gentoo64 on a 3B+ as that OS is OpenGL too.
Nope, too hard for me.

I will be getting a 4B4 so I can then mess about with skinning karts, making maps etc.
The Tux Kart engine is used in other things, like AR/VR.

I have used Microbits via BT talking to Pi's.
Adafruit library for Arduino IDE.
Have not tried with the new BT5.0 on the Pi4 yet.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jdonald
Posts: 444
Joined: Fri Nov 03, 2017 4:36 pm

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 11:25 am

EliCash what’s the version that comes from the Apt repository? If that’s still 0.8.2 then it won’t work and yes you’ll have to build from source.

The working 30 FPS Pi 3/3B+ config discussed here must be built with -DUSE_GLES2=1, but note this is Mesa GLES so it requires the open-source driver. That’s the same driver as “full OpenGL” so make sure to run:

Code: Select all

    sudo raspi-config
And select that driver as mentioned above.

As for your cmake error, that last line says it couldn’t find libjpeg, so try:

Code: Select all

    sudo apt install -y libjpeg-dev
There are a few other dependencies so you’ll probably have to continually troubleshoot in the same way.

User avatar
Gavinmc42
Posts: 4659
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 11:43 am

You should try it on a Pi4 :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

QwertyChouskie
Posts: 9
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Tue Jul 16, 2019 9:23 pm

Here's the low down on SuperTuxKart support on the Raspberry Pi:

On any hardware, make sure you have the full GL driver (known as the VC4 or V3D Mesa driver) selected in raspi-config. It is NECESSARY to do this step, STK will not work using the legacy drivers, instead defaulting to software rendering (<1FPS). Note that the RPI4 should have the full GL driver selected by default.

V3D supports GL 2.1 and GLES 2.0 on the Pi 3B+ and below; and supports GL 2.1 and GLES 3.0 on the PI 4. Eventually the V3D driver should support GL 3.x on the Pi 4, but it doesn't yet.

SuperTuxKart uses the legacy renderer when GL 2.1/GLES 2.0 is available, and the modern renderer when GL 3.3/GLES 3.0 is available. Whether STK uses GL or GLES is selected at compile-time.

If you are on Raspbian Buster, it includes STK version 0.9.3 in the repos, presumably built to use the GL renderer. It should work out of the box with "sudo apt install supertuxkart", as the V3D provides desktop GL 2.1, and 0.9.3 includes the necessary graphical restriction (https://github.com/supertuxkart/stk-cod ... 9b4ec953bd). You will get an old driver warning on startup, but it should otherwise work fine.

If you manually compile version 1.0 or newer, or install it from a PPA (https://launchpad.net/~stk/+archive/ubuntu/dev), it should detect it is being compiled on an ARM device and default to the GLES renderer. *There is no need to use the -DUSE_GLES=1 option when compiling STK on the Pi anymore, it is now automatic.* (This auto-detection at compile-time was added in this commit: https://github.com/supertuxkart/stk-cod ... fc945731dd) This means that when using it on the Pi 4, it *should* use the modern renderer, and support goodies like dynamic lighting (known in-settings as the Advanced Pipeline, option is selectable even when using the legacy renderer, but will only actually do anything with the modern renderer).

How well STK performs on the Pi 4 when enabling dynamic lighting and such is the big question, as this definitely takes more processing power, but makes STK look significantly nicer. I'd love to hear some test results if someone is willing to test.

Installing version 1.0 from the PPA should be as simple as adding "deb http://ppa.launchpad.net/stk/dev/ubuntu disco main" "deb http://ppa.launchpad.net/stk/dev/ubuntu cosmic main" (updated as previous was wrong) to your sources.list and running "sudo apt update && sudo apt install supertuxkart" so long as you are on Raspbian Buster. If you are on an earlier version of Raspbian, I recommend upgrading for simplicity's sake.

EDIT 2020: The PPA no longer supports the Ubuntu release that maps to Raspbian Buster, but you can use the Snap build on any recent Raspbian version:

Code: Select all

sudo apt update
sudo apt install snapd
sudo snap install supertuxkart
Last edited by QwertyChouskie on Fri Feb 14, 2020 9:38 pm, edited 2 times in total.

User avatar
Gavinmc42
Posts: 4659
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 1:46 am

If you are on Raspbian Buster, it includes STK version 0.9.3 in the repos, presumably built to use the GL renderer. It should work out of the box with "sudo apt install supertuxkart", as the V3D provides desktop GL 2.1, and 0.9.3 includes the necessary graphical restriction (https://github.com/supertuxkart/stk-cod ... 9b4ec953bd). You will get an old driver warning on startup, but it should otherwise work fine.
I can confirm it works after the install on a Pi4 with Buster and there is that warning.
Gave it to the kid are try, he had no complaints about response speed.

The new 1.0 will be interesting, how hard will it will push the Pi4?
STK has been a stress test benchmark for Pi's for me for years.
Now it works, well the version in the repo anyway :D

Will be interesting when netbooting is working on the Pi4.
Network gaming ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

itsmedoofer
Posts: 429
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK
Contact: AOL

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 2:26 pm

QwertyChouskie wrote:
Tue Jul 16, 2019 9:23 pm

Installing version 1.0 from the PPA should be as simple as adding "deb http://ppa.launchpad.net/stk/dev/ubuntu disco main" to your sources.list and running "sudo apt update && sudo apt install supertuxkart" so long as you are on Raspbian Buster. If you are on an earlier version of Raspbian, I recommend upgrading for simplicity's sake.
Not quite as easy as that, having added the repository, trying to install gives me:-

Code: Select all

The following packages have unmet dependencies:
 supertuxkart : Depends: libc6 (>= 2.29) but 2.28-10+rpi1 is to be installed
E: Unable to correct problems, you have held broken packages.
Nothing appears broken though.

Code: Select all

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Not going to try too hard as the version in the Rasbian Repo works great ..

QwertyChouskie
Posts: 9
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 11:05 pm

Maybe instead try "deb http://ppa.launchpad.net/stk/dev/ubuntu cosmic main" instead in sources.list (making sure to remove the old line and run "sudo apt update" before trying re-installation). I was guessing at the Ubuntu version -> Debian/Raspbian version mapping, guess I got it wrong. :)

Zenitur
Posts: 9
Joined: Fri Mar 16, 2018 7:27 pm

Re: Supertuxkart on Raspberry Pi

Mon Jan 06, 2020 5:57 pm

Is there any build for RPi 3? I have Raspbian 10 with Legacy non-GL driver (libbrcmGLESv2.so). It's fine to use builds for Mesa OpenGL ES and Bradcom OpenGL ES to compare them

jdonald
Posts: 444
Joined: Fri Nov 03, 2017 4:36 pm

Re: Supertuxkart on Raspberry Pi

Mon Jan 06, 2020 8:00 pm

The build for the Pi 3 is the Mesa GLES one because you can enable FKMS on a Pi 3B/3B+ :)

But I can tell you're asking for a legacy GLES driver build. I mentioned looking into that a few posts back, but ran into difficulty setting it up because STK packages its own version of libirrlicht.

It's probably less interesting to do the comparison now anyhow, because the Mesa driver keeps getting better.

QwertyChouskie
Posts: 9
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Fri Feb 14, 2020 9:49 pm

The installation instructions in my previous post won't work anymore, but I updated the post with the new commands. I'll also post them here for reference:

Code: Select all

sudo apt update
sudo apt install snapd
sudo snap install supertuxkart
Just make sure you remove any old versions of STK first or it will probably try to launch the wrong version. :)

russlb
Posts: 8
Joined: Sun Jul 19, 2020 12:26 am

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 12:29 am

Has anyone tried to compile on an RPi4 w/ Buster? The compile succeeds but when it runs the players and the cars are not visible.

Giga_Pi
Posts: 170
Joined: Mon May 20, 2019 9:48 am

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 7:58 am

russlb wrote:
Sun Jul 19, 2020 12:29 am
Has anyone tried to compile on an RPi4 w/ Buster? The compile succeeds but when it runs the players and the cars are not visible.
Yeah, that's something to do with the graphics.

There is a way to fix that. I can't remember what though.
GNOME for Pi

A project to get the popular GNOME desktop to run on Raspberry Pi OS.

Guide here: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=276512

Pi4 4GB @2GHz GPU@750MHz with ubuntu 20.04

russlb
Posts: 8
Joined: Sun Jul 19, 2020 12:26 am

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 1:20 pm

I have 0.9.3 from the snapd install and it works, except for that warning message that I really want to get rid of.

After using The Google I found this: https://github.com/supertuxkart/stk-code/issues/3058. I'll give that a try.

EDIT: The only thing that works is changing "force_legacy_device" to true, but then the error message comes up at startup.

EDIT: I was able to compile 1.1 and it works great, except for the no textures on the kart as 3058. force_legacy_device to true makes them return.

Here is the log I captured:

..:: Antarctica Rendering Engine 2.0 ::..
Linux 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l
[info ] IrrDriver: OpenGL version: 3.1
[info ] IrrDriver: OpenGL vendor: Broadcom
[info ] IrrDriver: OpenGL renderer: V3D 4.2
[info ] IrrDriver: OpenGL version string: OpenGL ES 3.1 Mesa 19.3.2
[info ] GLDriver: EXT texture format BGRA8888 Present
[info ] GLDriver: EXT Color Buffer Float Present
[warn ] irr_driver: Using the fixed pipeline (old GPU, or shaders disabled in options)
[info ] HTTPRequest: Downloading https://online.supertuxkart.net/dl/xml/online_news.xml

QwertyChouskie
Posts: 9
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 8:53 pm

Is the kart invisible or does it just not have textures? If you're able, a screenshot of 1.1 showing the issue (with force_legacy_device disabled) would help.

Also, is snap really giving you 0.9.3? Seems weird, I'll have to check up on that (it should give 1.1). Are you sure you removed any versions installed from the repos via APT before installing the snap? (The version on the Buster repos is 0.9.3, it's possible you were accidentally running the repo version.)

russlb
Posts: 8
Joined: Sun Jul 19, 2020 12:26 am

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 10:04 pm

This is the image from issue 3058 and it's exactly what I'm seeing.

Image

Here's the link to issue 3058: https://github.com/supertuxkart/stk-code/issues/3058.

Snap was acting wonky with me. I tried sudo snap remove supertuxkart and it looked like nothing got removed. I ended up compiling 1.1 myself and compiling without the recorder capability, but it showed the same behavior.

I'm on a 4GB RaspberryPi 4 with Buster as the base build.

I originally used the install script written for RetroPie and I checked it and it pulls from the repo.

I'm going to wipe it out and reinstall.

russlb
Posts: 8
Joined: Sun Jul 19, 2020 12:26 am

Re: Supertuxkart on Raspberry Pi

Sun Jul 19, 2020 10:18 pm

Ok, yikes...

The version that was downloaded to /snap/bin now does this when I execute to get the version number:

./supertuxkart --version
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.soERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/snap/supertuxkart/408/usr/bin/supertuxkart: error while loading shared libraries: libopenh264.so.4: cannot open shared object file: No such file or directory

Missing libopenh264.so.4 and then it stops there. the 1.1 I compiled still works fine, with the issue I outlined.

Return to “Gaming”