Bug 255418 - games/supertuxkart - Does not run under Wayland (sway)
Summary: games/supertuxkart - Does not run under Wayland (sway)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-26 12:58 UTC by stephan
Modified: 2021-05-12 04:53 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (amdmi3)


Attachments
fix (with commit message) (1.43 KB, patch)
2021-04-27 13:40 UTC, Jan Beich
jbeich: maintainer-approval? (amdmi3)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description stephan 2021-04-26 12:58:50 UTC
On FreeBSD 13 with i915 (KMS) and by using x11-wm/sway as Wayland compositor, supertuxkart does not start.

supertuxkart is running fine if it is started under Xorg with an Xorg WM so I assume it is related to Wayland.

$ pkg info supertuxkart
supertuxkart-1.2
Name           : supertuxkart
Version        : 1.2
Installed on   : Thu Apr 15 11:45:31 2021 CEST
Origin         : games/supertuxkart
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : games
Licenses       : GPLv3+
Maintainer     : amdmi3@FreeBSD.org
WWW            : http://supertuxkart.sourceforge.net/
Comment        : Free 3D kart racing game
Options        :
        NETTLE         : on
        SERVER_ONLY    : off
Shared Libs required:
        libnettle.so.8
        libogg.so.0
        libGLU.so.1
        libGL.so.1
        libX11.so.6
        libjpeg.so.8
        libharfbuzz.so.0
        libSDL2-2.0.so.0
        libsqlite3.so.0
        libvorbisenc.so.2
        libfreetype.so.6
        libpng16.so.16
        libopenal.so.1
        libvorbis.so.0
        libGLEW.so.2
        libvorbisfile.so.3
        libcurl.so.4
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 652MiB
Description    :
SuperTuxKart is a Free 3d kart racing game; we want to make the
game fun more than we want to make it realistic. You can play with
up to 4 friends on one PC racing against each other, or just try
to beat the computer.

See the great lighthouse or drive through the sand and visit the
pyramids. Race under water or in space, watching the stars passing
by. Have some rest under the palms on the beach (watching the other
karts overtaking you :) ). But don't fall in the volcano.

You can do a single race against other karts, compete in one of
several Grand Prix, or try to beat the high score in time trials
on your own.

WWW: http://supertuxkart.sourceforge.net/

$ supertuxkart
[verbose  ] main: Error messages and other text output will be logged to /home/stephan/.config/supertuxkart/config-0.10/stdout.log.
[info   ] [FileManager]: Data files will be fetched from: '/usr/local/share/supertuxkart/data/'
[info   ] [FileManager]: User directory is '/home/stephan/.config/supertuxkart/config-0.10/'.
[info   ] [FileManager]: Addons files will be stored in '/home/stephan/.local/share/supertuxkart/addons/'.
[info   ] [FileManager]: Screenshots will be stored in '/home/stephan/.local/share/supertuxkart/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in '/home/stephan/.local/share/supertuxkart/grandprix/'.
[info   ] [FileManager]: Asset 0 will be loaded from '/usr/local/share/supertuxkart/data/challenges/'.
[info   ] [FileManager]: Asset 1 will be loaded from '/usr/local/share/supertuxkart/data/gfx/'.
[info   ] [FileManager]: Asset 2 will be loaded from '/usr/local/share/supertuxkart/data/grandprix/'.
[info   ] [FileManager]: Asset 3 will be loaded from '/usr/local/share/supertuxkart/data/gui/icons/'.
[info   ] [FileManager]: Asset 4 will be loaded from '/usr/local/share/supertuxkart/data/gui/screens/'.
[info   ] [FileManager]: Asset 5 will be loaded from '/usr/local/share/supertuxkart/data/gui/dialogs/'.
[info   ] [FileManager]: Asset 6 will be loaded from '/usr/local/share/supertuxkart/data/replay/'.
[info   ] [FileManager]: Asset 7 will be loaded from '/usr/local/share/supertuxkart/data/shaders/'.
[info   ] [FileManager]: Asset 8 will be loaded from '/usr/local/share/supertuxkart/data/skins/'.
[info   ] [FileManager]: Asset 9 will be loaded from '/usr/local/share/supertuxkart/data/ttf/'.
[info   ] [FileManager]: Asset 10 will be loaded from '/usr/local/share/supertuxkart/data/po/'.
[info   ] [FileManager]: Asset 11 will be loaded from '/usr/local/share/supertuxkart/data/library/'.
[info   ] [FileManager]: Asset 12 will be loaded from '/usr/local/share/supertuxkart/data/models/'.
[info   ] [FileManager]: Asset 13 will be loaded from '/usr/local/share/supertuxkart/data/music/'.
[info   ] [FileManager]: Asset 14 will be loaded from '/usr/local/share/supertuxkart/data/sfx/'.
[info   ] [FileManager]: Asset 15 will be loaded from '/usr/local/share/supertuxkart/data/textures/'.
[info   ] [FileManager]: Asset 16 will be loaded from '/usr/local/share/supertuxkart/data/tracks/'.
[verbose  ] translation: Env var LANGUAGE = 'de_DE.UTF-8'.
[verbose  ] translation: Language 'German (Germany)'.
[info   ] tinygettext: Adding language fallback de

..:: Antarctica Rendering Engine 2.0 ::..
[info   ] IrrDriver: OpenGL version: 4.6
[info   ] IrrDriver: OpenGL vendor: Intel
[info   ] IrrDriver: OpenGL renderer: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2)
[info   ] IrrDriver: OpenGL version string: 4.6 (Core Profile) Mesa 20.2.3
[info   ] GLEW: Glew couldn't open glx display.
[info   ] GLDriver: ARB Buffer Storage Present
[info   ] GLDriver: ARB Compute Shader Present
[info   ] GLDriver: ARB Arrays of Arrays Present
[info   ] GLDriver: ARB Texture Storage Present
[info   ] GLDriver: ARB Texture View Present
[info   ] GLDriver: ARB Image Load Store Present
[info   ] GLDriver: ARB Shader Atomic Counters Present
[info   ] GLDriver: ARB Shader Storage Buffer Object Present
[info   ] GLDriver: EXT Texture Compression S3TC Present
[info   ] GLDriver: ARB Uniform Buffer Object Present
[info   ] GLDriver: ARB Explicit Attrib Location Present
[info   ] GLDriver: EXT Texture Filter Anisotropic Present
[info   ] GLDriver: Geometry Shaders Present
[info   ] GLDriver: ARB Texture Buffer Object Present
[info   ] GLDriver: ARB Texture Swizzle Present
[info   ] GLDriver: ARB Pixel Buffer Object Present
[info   ] GLDriver: ARB Sampler Objects Present
[info   ] GLDriver: ARB Vertex Type 2_10_10_10_rev Present
[info   ] GLDriver: ARB Instanced Arrays Present
[info   ] SharedGPUObjects: Hardware Skinning enabled, method: TBO, max bones: 1024
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/screenquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/motion_blur.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/lightning.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/primitive2dlist.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/transparent.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/texturedquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/uniformcolortexturedquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/texturedquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/coloredquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/coloredquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colortexturedquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colortexturedquad.frag
[info   ] irr_driver: GLSL supported.
wl_display@1: error 0: invalid object 24
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_pass.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_solid.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/white.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_skinning.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_skinning_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_map.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_alpha_test.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_shadow_alpha_test.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_decal.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass_pass.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_unlit.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_transparent.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_ghost.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_dynamic_night_bloom.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_tilling_mitigation.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_vertical_mapping.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_road_blending.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_displace.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colorize.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.geom
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.frag
[info   ] HTTPRequest: Downloading https://online.supertuxkart.net/dl/xml/online_news.xml
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[info   ] GrandPrixManager: Loading Grand Prix files from /usr/local/share/supertuxkart/data/grandprix/
[info   ] GrandPrixManager: Loading Grand Prix files from /home/stephan/.local/share/supertuxkart/grandprix/
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[info   ] addons: Downloading updated addons.xml.
[info   ] HTTPRequest: Downloading https://online.supertuxkart.net/dl/xml/online_assets.xml
[verbose  ] Thread: Start waiting 239173.731000
[error  ] addons: Error on download addons.xml: Operation was aborted by an application callback.
[verbose  ] Thread: Waited 0.032000 seconds for thread to become deleteable.
[verbose  ] Thread: Stop waiting 239173.763000
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
Comment 1 Jan Beich freebsd_committer 2021-04-27 13:40:12 UTC
Created attachment 224473 [details]
fix (with commit message)

(In reply to stephan from comment #0)
> [info   ] GLEW: Glew couldn't open glx display.

Seems benign for supertuxkart. Can be fixed via glew-wayland package e.g.,

  $ pkg install glew-wayland
  $ SDL_VIDEODRIVER=wayland LD_PRELOAD=libGLEW-wayland.so supertuxkart

> wl_display@1: error 0: invalid object 24

Actual cause. To fix apply the attached patch, upgrade to sdl2-2.0.14 (bug 252371) or work around via SDL_VIDEODRIVER=x11 (Xwayland).
Comment 2 commit-hook freebsd_committer 2021-04-27 18:32:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b46d53b6cedd133f4caa018e76a161e686ff5858

commit b46d53b6cedd133f4caa018e76a161e686ff5858
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-04-27 18:28:46 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-04-27 18:29:55 +0000

    devel/sdl20: backport Wayland fix for games/supertuxkart

    PR:             255418
    Reported by:    stephan@lichtenauer.co.za
    Submitted by:   jbeich

 devel/sdl20/Makefile                  |  2 +-
 devel/sdl20/files/patch-wayland (new) | 70 +++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 1 deletion(-)
Comment 3 Dmitry Marakasov freebsd_committer 2021-04-27 18:32:26 UTC
Fix committed; submitter, please test
Comment 4 stephan 2021-04-28 05:11:08 UTC
Thanks, will test as soon as it arrives in quarterly!
Comment 5 commit-hook freebsd_committer 2021-04-28 19:09:41 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7a06623c035f41585104cc14f1b2fc04e09e660a

commit 7a06623c035f41585104cc14f1b2fc04e09e660a
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-04-27 18:28:46 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-04-28 19:07:42 +0000

    devel/sdl20: backport Wayland fix for games/supertuxkart

    PR:             255418
    Reported by:    stephan@lichtenauer.co.za
    Submitted by:   jbeich

    (cherry picked from commit b46d53b6cedd133f4caa018e76a161e686ff5858)

 devel/sdl20/Makefile                  |  2 +-
 devel/sdl20/files/patch-wayland (new) | 70 +++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 1 deletion(-)
Comment 6 Jan Beich freebsd_committer 2021-05-02 03:11:13 UTC
(In reply to stephan from comment #4)
> Thanks, will test as soon as it arrives in quarterly!

See https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/sdl2-2.0.12_4.txz

However, use "pkg upgrade" to pick it up.
Comment 7 Jan Beich freebsd_committer 2021-05-11 19:55:25 UTC
Stephan, does it work fine now? If so, please, close the bug.
Comment 8 stephan 2021-05-12 04:53:33 UTC
Sorry Jan, everyone,

yes, it works fine now. Thanks a lot for the quick fix and sorry again for taking so long to test it again!

Stephan