ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices

Home Page:https://box86.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random game freezes while using box64

Pro42good opened this issue · comments

So i rather not say the name of the game but for some reason when i load into the menu or do something the game freezes, music keeps playing most of the time.

I suspect the root cause is
A. Issues with the rendering engine (Unity)
B. Too little video memory
C. Graphical effects cause graphics engine to hang and box freezes due to not knowing what to do

Possible Fixes
A. Beg dev for native arm version (Kinda out of my hands, maybe debugging?)
B. If possible use swap space or native ram
C. Add shortcut or error handler that resets the graphics engine
D. Performance mode? (If it even exists)
E. Open GL Flag that helps prevent hanging?

Unity logs before crash

requesting resize 1280 x 720
resizing window to 1280 x 720
Desktop is 1920 x 1080 @ 75 Hz
InitializeOrResetSwapChain 1280x720 hdr=0 samples=1
Unloading 5 Unused Serialized files (Serialized files now loaded: 26)
Unloading 243 unused Assets to reduce memory usage. Loaded Objects now: 15343.
Total: 119.684518 ms (FindLiveObjects: 6.502703 ms CreateObjectMapping: 1.674297 ms MarkObjects: 108.802667 ms  DeleteObjects: 2.539722 ms)

Unloading 0 Unused Serialized files (Serialized files now loaded: 26)
Switching view from  to Menu View (Fungus.View)
Unloading 9 unused Assets to reduce memory usage. Loaded Objects now: 15364.
Total: 80.597018 ms (FindLiveObjects: 5.428019 ms CreateObjectMapping: 1.178629 ms MarkObjects: 73.806222 ms  DeleteObjects: 0.182649 ms)

Changed game state to EmptyGameState to GameScript+MainMenuState

System Info

       _,met$$$$$gg.          diego@diego-raspberry-pi-5 
    ,g$$$$$$$$$$$$$$$P.       -------------------------- 
  ,g$$P"        """Y$$.".     OS: Debian GNU/Linux 12 (bookworm) aarch64 
 ,$$P'              `$$$.     Host: Raspberry Pi 5 Model B Rev 1.0 
',$$P       ,ggs.     `$$b:   Kernel: 6.6.31+rpt-rpi-v8 
`d$$'     ,$P"'   .    $$$    Uptime: 1 hour, 19 mins 
 $$P      d$'     ,    $$P    Packages: 3154 (dpkg), 14 (flatpak), 8 (snap) 
 $$:      $$.   -    ,d$$'    Shell: bash 5.2.15 
 $$;      Y$b._   _,d$P'      Resolution: 1920x1080 
 Y$$.    `.`"Y$$$$P"'         DE: LXDE-pi-wayfire (Wayland) 
 `$$b      "-.__              WM: wayfire 
  `Y$$                        Theme: PiXnoir [GTK3] 
   `Y$$.                      Icons: PiXflat [GTK3] 
     `$$b.                    Terminal: lxterminal 
       `Y$$b.                 Terminal Font: Monospace 10 
          `"Y$b._             CPU: Cortex-A76 (4) @ 2.400GHz 
              `"""            GPU: V3D 7.1 
                              Memory: 2319MiB / 3987Mib

Graphics Card info (Vulkan):

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

You might need to use some of the Box64 flags, to fine tune box64 emulation.

You can either set the flag on command line (like with the MESA one) or using a config file so it's automatic. For the config file, create ~/.box64rc (for example with nano) nano and create section per game name, like [BALDI.x86_64] and put the settings bellow.

If the game freeze, tryBOX64_DYNAREC_STRONGMEM=1

If the game has some physics issues try BOX64_DYNAREC_FASTNAN=0 and/or BOX64_DYNAREC_FASTROUND=0

If the game is too slow, try BOX64_DYNAREC_BIGBLOCK=2 (or 3) BOX64_DYNAREC_SAFEFLAGS=0 and BOX64_DYNAREC_CALLRET=1 (but those settings can make the game crash, depending on the game...)

There are many other settings to play with, look at USAGE.md in box64 files.