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.

Hi @ivan.li
Any news on this problem?
(I found more software with same error and cannot be run as root)
Thanks for looking in to this.
Kind regards

Hello @prejinme

The permissions of some nodes may be causing this problem.The jury is still out.

Can you list them? I don’t have enough examples here.thx !!!
I will solve the problem as soon as possible :point_up_2:

Hi @ivan.li
We happily await the jury’s verdict :slightly_smiling_face:
I have 2 examples: “mgba-qt” and “ckb-next”
Both are installed “sudo apt …”
I think i have more examples, i will look for it.
Thank you!

khadas@Khadas:~$ mgba-qt
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Couldn’t open plugin directory: No such file or directory
No plugins found, falling back on no decorations
mgba-qt: symbol lookup error: /usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so: undefined symbol: eglGetPlatformDisplay
khadas@Khadas:~$ ckb-next
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QObject::startTimer: Timers cannot have negative intervals
Path to settings: “/home/khadas/.config/ckb-next/ckb-next.conf”
[…{some txt}…]
ckb-next: symbol lookup error: /usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so: undefined symbol: eglGetPlatformDisplay

Its nice that :grinning:

hello @ivan.li
here are a few more examples (of games) that dont work:
7kaa (seven kingdoms)
visualboyadvance (but the frontend “vbaexpress” works)
boswars
knights
lgeneral

the list I already mentioned:
warzone2100, mgba-qt, wireshark, ckb-next, 0ad, ksirk

exept for wireshark and ckb-next these are all games.
Running them as superuser works for a few. Others work but without sound. Some won’t start with sudo.
Other software like programming IDE’s, music editors, etc works fine.
thanks for looking in to this.
If i find more examples, i post them. :slightly_smiling_face:

Hi~@prejinme
Thank you for providing so many examples. I’ll spend time on it

Hi @ivan.li
I have found a few more examples.
umbrello, kiwix, aqemu
Thanks for looking in to this issue.
Kind regards

Hi @ivan.li
I’am just checking in with you.
Any progress?
Thanks for the effort your putting in this.
Kind regards

Hi @ivan.li
Since the last system upgrade, there are apps that don’t work anymore, even if you run them as root.
Its getting worse.
I know this is not the biggest issue in the world.
Thanks for the effort spend on this.
Kind regards

@prejinme

I’ll an answer for you this week or next

Hi~ @prejinme

This was caused by a third party update, there’s so little we can change. for now, use the historical firmware version

Hi @ivan.li
Thanks for looking in to this.
Too bad there is no better solution.
Kind regards