Cannot create EGL surface (gaming)

Which version of system do you use? Khadas official images, self built images, or others?

Ubuntu 22.04 from OOWOW

Please describe your issue below:

In the first version (1.1) it was possible to play games like “Warzone2100”.
Just “sudo install …” and it played right out the box.
Since the upgrade to 1.2 and now 1.4 I get these errors. With other games (“0AD” and “Ksirk”) i have the same issue. Thnx for looking in to this.

Post a console log of your issue below:

khadas@Khadas:~$ 0ad
TIMER| InitVfs: 3.98307 ms
Writing the mainlog at /home/khadas/.config/0ad/logs/mainlog.html
TIMER| CONFIG_Init: 6.81436 ms
Sound: AlcInit success, using OpenAL Soft
Couldn't open plugin directory: No such file or directory
No plugins found, falling back on no decorations
WARNING: Failed to set the video mode to fullscreen for the chosen resolution 1920x1080:24 ("failed to create an EGL window surface"), falling back to windowed mode
ERROR: SetVideoMode failed in SDL_CreateWindow: 1024x768:24 0 ("failed to create an EGL window surface")
WARNING: Failed to set the video mode to fullscreen for the chosen resolution 1920x1080:24 ("failed to create an EGL window surface"), falling back to windowed mode
ERROR: SetVideoMode failed in SDL_CreateWindow: 1024x768:24 0 ("failed to create an EGL window surface")
terminate called after throwing an instance of 'PSERROR_System_VmodeFailed'
  what():  System_VmodeFailed
Aborted
khadas@Khadas:~$ warzone2100
info    |13:59:38: [urlSelectSSLBackend:1319] cURL has no available thread-safe SSL backends to configure
info    |13:59:38: [urlSelectSSLBackend:1322] (Ignored backend: 1 (build did not permit thread-safe configuration)
info    |13:59:38: [urlSelectSSLBackend:1322] (Ignored backend: 2 (build did not permit thread-safe configuration)
Couldn't open plugin directory: No such file or directory
No plugins found, falling back on no decorations
fatal   |13:59:38: [wzMainScreenSetup_CreateVideoWindow:2398] Can't create a window, because: failed to create an EGL window surface
khadas@Khadas:~$ ksirk
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
org.kde.games.private.kgame: :id= 4128861  Cannot emitSignal because there is no handler set
QObject::connect: No such signal KGameChat::signalReturnPressed(QString)
Icon theme "breeze" not found.
ksirk: symbol lookup error: /usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so: undefined symbol: eglGetPlatformDisplay
khadas@Khadas:~$

Hello @prejinme

So it works with version 1.1 installed from oowow online but not work with current 1.4 version ?

Could you also provide the steps how it works so we can reproduce on our side. And @ivan.li will check this issue.

Hello @numbqq , @ivan.li
~$ sudo apt install warzone2100
then start from application menu
This did work in version 1.1. (a few months ago)
I did a lot of tryouts with different apps so it might be that some kind of dependency was installed back then. The other games (0AD, ksirk, boswars) i didn’t tried then, but they now give a similar error (these I also installed with ~$ sudo apt install…)
I had to reinstall the OS (which was then 1.2) and since then warzone2100 didn’t work anymore. The “synaptic packet installer” don’t give any errors or missing dependency’s
I haven’t tried to install the 1.1 and warzone2100 since then.
Thnx for the support of the Khadas team and community!

Hello~ @prejinme
I’ll give you feedback later.

Hi~ @prejinme
You try to run it under superuser, you get a good result. no matter what version.

$ sudo /usr/games/warzone2100

Thanx @ivan.li . It works indeed!
But, with the game “0AD” I get the message that its not allowed to run the game as a superuser or as root.

And with other software i get the same problem. For example Wireshark only works when i run it as superuser (sudo wireshark). If i don’t , i get this:

~$ wireshark
wireshark: symbol lookup error: /usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so: undefined symbol: eglGetPlatformDisplay

I think its the same problem, and wonder if there might be a solution for the root of this error.

I’m going to spend some time exploring this.