You are not logged in.

#1 2020-05-26 17:21:45

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

[Solved] Unreal tournament 2004 on wayland

I'm trying to run an older game ( Unreal Tournament 2004, the native version supports anitialising, the wine version doesn't which is why I'm using it )

It works great in X but when I try to launch it in KDE wayland I get this output:

Couldn't set video mode: Couldn't find matching GLX visual


History: 

Exiting due to error

Clearly this is due to running on Wayland and being unable to create the window. It's my understanding that XWalyand should be able to solve this and for some reason it's not launching in XWayland automatically. Is there any way to manually create an XWayland session/window and run the game inside it?

Or am I misunderstanding how XWayland works and this isn't even possible?

edit: The wiki suggests SDL_VIDEODRIVER=x11, but this has no effect and produces the same error.

Last edited by Tom B (2020-05-27 13:01:11)

Offline

#2 2020-05-26 18:18:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Unreal tournament 2004 on wayland

How to force an Xwayland session depends on the gui library used by a program .

AUR has 3 ut2004 variations, which are you using ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-05-27 11:07:23

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: [Solved] Unreal tournament 2004 on wayland

I'm using the ut2004-steam version. I tried installing sdl2_compat12-git but I get the same error after installation.

edit: Perhaps I didn't install sdl2-compat12 correctly. I had to use `pacman -Rdd sdl`  then install `sdl2_compat12-git` because ut2004-steam depends on `sdl` so I can't just remove `sdl` with `pacman -R` without also removing `ut2004-steam`.

Last edited by Tom B (2020-05-27 11:42:41)

Offline

#4 2020-05-27 12:02:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Unreal tournament 2004 on wayland

Looking at provides/conflicts, I'd expect pacman -U sdl2_compat12-git to result in a something like this :

sdl2_compat12-git conflicts with sdl , do you wish to remove sdl (N/y) ?

Answering yes should continue fine,. If it doesn't post the console pacman output of pacman -U .

It does look like a compatibility layer is your best chance to run UT2004 with wayland.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2020-05-27 12:38:39

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: [Solved] Unreal tournament 2004 on wayland

The problem is, that ut2004-steam requires sdl so I can't remove it without removing ut2004-steam:

# pacman -R sdl
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing sdl breaks dependency 'sdl' required by ut2004-steam
:: removing sdl breaks dependency 'sdl' required by virtualbox

Presumably I'd need to remove ut2004-steam, virtualbox and sdl, then reinstall virtualbox and ut2004-steam after I've installed sdl2_compat12 ?

Alternatively, this is ugly but let me install sdl2_compat12 without also reinstalling virtualbox and ut2004-steam:

pacman -Rdd sdl

It's loading sdl2_compat12  but I still can't launch the game:

FIXME: what was different in 1.2? (SDL_Init, SDL12_compat.c:1240)
FIXME: there is never a parachute in SDL2, should we catch segfaults ourselves? (SDL_InitSubSystem, SDL12_compat.c:1196)
FIXME: support event thread where it makes sense to do so? (SDL_InitSubSystem, SDL12_compat.c:1198)
FIXME: do something about SDL12_INIT_EVENTTHREAD (SDL_InitSubSystem, SDL12_compat.c:1224)
FIXME: cache this value during SDL_Init() so it doesn't change. (GetVideoDisplay, SDL12_compat.c:1056)
FIXME: Make sure mode dimensions fit in 16-bits for SDL12_Rect (Init12VidModes, SDL12_compat.c:1119)
FIXME: not sure if we can determine this in SDL2...? (Init12Video, SDL12_compat.c:1186)
FIXME: fail if (offset) is too big (RWops12to20_seek, SDL12_compat.c:4055)
FIXME: fail if (size) or (maxnum) is too big (RWops12to20_read, SDL12_compat.c:4063)
FIXME: make sure this fits in a Uint16 (Surface20to12, SDL12_compat.c:2244)
FIXME: currently ignores SDL_WINDOWID, which we could use with SDL_CreateWindowFrom ...? (SDL_SetVideoMode, SDL12_compat.c:2728)
FIXME: handle SDL_ANYFORMAT (SDL_SetVideoMode, SDL12_compat.c:2746)
FIXME: There's an environment variable to choose a display (SDL_SetVideoMode, SDL12_compat.c:2753)
FIXME: bgr instead of rgb? (SDL_SetVideoMode, SDL12_compat.c:2773)
FIXME: don't do anything if the window's dimensions, etc haven't changed. (SDL_SetVideoMode, SDL12_compat.c:2780)
FIXME: we need to preserve VideoSurface12 (but not its pixels), I think... (SDL_SetVideoMode, SDL12_compat.c:2781)
FIXME: setup screen saver (SDL_SetVideoMode, SDL12_compat.c:2936)
FIXME: This should only save the dst rect in use (SaveDestAlpha, SDL12_compat.c:2953)
FIXME: Maybe lock texture always, until present, if no conversion needed? (PresentScreen, SDL12_compat.c:3177)
FIXME: write me (SDL_EnableUNICODE, SDL12_compat.c:3719)
FIXME: OpenGL will still expect letterboxing and centering if it didn't get an exact resolution match. (SDL_SetVideoMode, SDL12_compat.c:2798)
FIXME: do something about SDL12_INIT_EVENTTHREAD (InitFlags12To20, SDL12_compat.c:1263)
FIXME: reset a bunch of other global variables too. (SDL_QuitSubSystem, SDL12_compat.c:1330)
FIXME: do something about SDL12_INIT_EVENTTHREAD (SDL_QuitSubSystem, SDL12_compat.c:1335)
Couldn't set video mode: Couldn't find matching GLX visual


History: 

Exiting due to error

SDL_VIDEODRIVER=x11 makes no difference here, though I'd expect sdl2_compat12 not to require it.


edit: This alternative also doesn't work: https://github.com/MrAlert/sdlcl/ and gives "Couldn't find matching GLX visual"


Perhaps I'm missing something else that's required. I have sdl2 installed, and the ut2004-bin-linux-amd64 executable is 64 bit, so it's not that I need the lib32 versions.

Last edited by Tom B (2020-05-27 12:53:14)

Offline

#6 2020-05-27 13:00:50

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: [Solved] Unreal tournament 2004 on wayland

I've no idea why this works and I got  the solution from here: https://www.reddit.com/r/bashonubuntuon … lx_visual/

But

SDL_VIDEO_X11_VISUALID= ut2004

Launches the game correctly.

Offline

#7 2020-05-27 13:09:10

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Unreal tournament 2004 on wayland

I suggested to use pacman -U sdl2_compat12-git and let pacman take care of the removal of sdl .

Glad you figured out a way to get things running.
SDL_VIDEO_X11_VISUALID is documented at https://www.libsdl.org/release/SDL-1.2. … vvars.html .

Last edited by Lone_Wolf (2020-05-27 13:09:26)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2020-05-27 13:10:42

Tom B
Member
Registered: 2014-01-15
Posts: 187
Website

Re: [Solved] Unreal tournament 2004 on wayland

as sdl2_compat12-git  is an AUR package and not an official package, pacman -U can't find it.

Offline

#9 2020-05-27 13:20:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Unreal tournament 2004 on wayland

In the folder where you build the package there should be sdl2_compat12-git/sdl2_compat12-git-r120+.dc55edfe5d2f+-1-x86_64.pkg.tar.zst
(last 3 letters may be different ) .

That package can be installed with pacman -U .
Maybe you need to refresh your knowledge how https://wiki.archlinux.org/index.php/Ar … Repository works .
(Hint : you don't need an aur helper to use AUR )


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB