ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.73k stars 267 forks source link

Unable to launch a Unity linux game with box64 #1569

Closed Pro42good closed 3 months ago

Pro42good commented 3 months ago

Hi, so im trying to run Baldi's basics remastered and it doesn't want to run, for context i try to run it and it just stops on a library and doesn't launch the program.

Command being run box64 /path to game

Output: Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Cortex-A76 with 4 Cores Will use Hardware counter measured at 54.0 MHz emulating 3.4 GHz Params database has 73 entries Box64 with Dynarec v0.2.9 2e379300 built on Jun 8 2024 06:19:53 BOX64: Didn't detect 48bits of address space, considering it's 39bits Counted 56 Env var BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ BOX64 BIN PATH: ./:bin/:/home/diego/.local/bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/:/snap/bin/ Looking for /home/diego/Downloads/BaldisBasicsCR_1.1_Linux/BALDI.x86_64 Rename process to "BALDI.x86_64" Using emulated /home/diego/Downloads/BaldisBasicsCR_1.1_Linux/UnityPlayer.so Using native(wrapped) libm.so.6 Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1 Using native(wrapped) libpthread.so.0 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libdl.so.2 Using native(wrapped) libutil.so.1 Using native(wrapped) librt.so.1 Using native(wrapped) libbsd.so.0 Using native(wrapped) libX11.so.6 Using native(wrapped) libxcb.so.1 Using native(wrapped) libXau.so.6 Using native(wrapped) libXdmcp.so.6 Using native(wrapped) libXext.so.6 Using native(wrapped) libXcursor.so.1 Using native(wrapped) libXfixes.so.3 Using native(wrapped) libXrender.so.1 Using native(wrapped) libXinerama.so.1 Using native(wrapped) libXi.so.6 Using native(wrapped) libXrandr.so.2 Using native(wrapped) libXss.so.1 Using native(wrapped) libXxf86vm.so.1 Using native(wrapped) libGL.so.1 Using native(wrapped) libudev.so.1

System info (Neofetch): OS: Debian GNU/Linux 12 (bookworm) aarch64 Host: Raspberry Pi 5 Model B Rev 1.0 Kernel: 6.6.31+rpt-rpi-v8 Uptime: 11 hours, 47 mins Packages: 3152 (dpkg), 14 (flatpak), 8 (snap) Shell: bash 5.2.15 Resolution: 1920x1080 DE: LXDE-pi-wayfire (Wayland) WM: wayfire Theme: PiXnoir [GTK3] Icons: PiXflat [GTK3] Terminal: lxterminal Terminal Font: Monospace 10 CPU: Cortex-A76 (4) @ 2.400GHz GPU: V3D 7.1 Memory: 2503MiB / 3987MiB

Pro42good commented 3 months ago

Im not sure if im missing a paramater to launch it in user mode or smth?

ptitSeb commented 3 months ago

Unity3D games usualy require OpenGL 3.2 or more. Try to launch with MESA_GL_DRIVER_OVERRIDE=3.2 box64 ./game.x86_64

Pro42good commented 3 months ago

Let me try

Pro42good commented 3 months ago

Unity3D games usualy require OpenGL 3.2 or more. Try to launch with MESA_GL_DRIVER_OVERRIDE=3.2 box64 ./game.x86_64

Same issue, no change, im not sure but it doesn't even open a window so i can interact with the program, not sure if i need a parameter to open the game in a window

ptitSeb commented 3 months ago

You'll need to look at Unity3D logs. They are in you home, in ~/.config/unity3d/[EDITOR NAME]/[GAME NAME]/Player.log (you need to replace editor name and game name by the correct balue of course... No idea what that could be but you'll find out.

Pro42good commented 3 months ago

You'll need to look at Unity3D logs. They are in you home, in ~/.config/unity3d/[EDITOR NAME]/[GAME NAME]/Player.log (you need to replace editor name and game name by the correct balue of course... No idea what that could be but you'll find out.

I looked at it, is there any vulkan render engines that work with raspberry pi ?

Issue: Unable to find a supported OpenGL core profile Failed to create valid graphics context: please ensure you meet the minimum requirements E.g. OpenGL core profile 3.2 or later for OpenGL Core renderer [Vulkan init] extensions: count=3 [Vulkan init] extensions: name=VK_EXT_debug_report [enabled=0, external=0] [Vulkan init] extensions: name=VK_EXT_debug_utils [enabled=0, external=0] [Vulkan init] extensions: name=VK_KHR_portability_enumeration [enabled=0, external=0] Vulkan detection: 0 No supported renderers found, exiting

Pro42good commented 3 months ago

Root cause seems to be no vulkan drivers natively on RPI Os

Potential fix sudo apt install mesa-vulkan-drivers mesa-utils vulkan-tools

Run vkcube to verify vulkan works

End result: Vulkan is still undetected, therefore box would have to add vulkan support or have to add a potential fix so graphics context gets created properly or a new paramiter is needed

ptitSeb commented 3 months ago

mmm, did you used the exact command I gave you, to force opengl to 3.2?

MESA_GL_VERSION_OVERRIDE=3.2 box64 ./BALDI.x86_64

should work. At least you should not have unity complaining about not find opengl core....

Pro42good commented 3 months ago

mmm, did you used the exact command I gave you, to force opengl to 3.2?

MESA_GL_VERSION_OVERRIDE=3.2 box64 ./BALDI.x86_64

should work. At least you should not have unity complaining about not find opengl core....

So for all my tests since you gave me that launch command ive been using it, and yes i do use the exact command, i copy paste it, I'll try restarting my os and use the command again

ptitSeb commented 3 months ago

What gives you

MESA_GL_VERSION_OVERRIDE=3.2 glxinfo -B
Pro42good commented 3 months ago

What gives you

MESA_GL_VERSION_OVERRIDE=3.2 glxinfo -B

MESA_GL_VERSION_OVERRIDE=3.2 glxinfo -B name of display: :1 display: :1 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Broadcom (0x14e4) Device: V3D 7.1 (0xffffffff) Version: 23.2.1 Accelerated: yes Video memory: 3987MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.2 Max compat profile version: 3.2 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Broadcom OpenGL renderer string: V3D 7.1 OpenGL core profile version string: 3.2 (Core Profile) Mesa 23.2.1-1~bpo12+rpt3 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 3.2 (Compatibility Profile) Mesa 23.2.1-1~bpo12+rpt3 OpenGL shading language version string: 3.30 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1~bpo12+rpt3 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

ptitSeb commented 3 months ago

So, opengl 3.2 core profile. It's here.

Pro42good commented 3 months ago

Its weird Tbh

Pro42good commented 3 months ago

Ok so now it loads, Somehow?

Pro42good commented 3 months ago

Is it ok if i get help running another game so i don't need to open another issue?

ptitSeb commented 3 months ago

typo maybe? who knows... (I do a lot of typo)

So, it works?

Pro42good commented 3 months ago

Yeah it works now somehow, Like i said before, is it ok if i get help with running another game while here?

ptitSeb commented 3 months ago

If it's a different issue, it's better to close this one and open a new one. It's simpler when you search for fixed issue in the future...

Pro42good commented 3 months ago

Sure, Im gonna open another issue

Summary For newcomers like me:

If on raspberry pi

  1. Run this in terminal (Fixes no Graphics Card issue) sudo apt install mesa-vulkan-drivers mesa-utils vulkan-tools

  2. Verify install vkcube

  3. Check if driver supports what you need MESA_GL_VERSION_OVERRIDE=3.2 glxinfo -B

  4. Use this command to run with box with open GL 3.2 (Change numbers if needed) MESA_GL_VERSION_OVERRIDE=3.2 box64 ./File-Path-To-App