Closed MastaG closed 10 months ago
Sounds like you need to install the x86 and x86-64 custom mesa libraries in to the Ubuntu rootfs paths as well. Since it is trying to search for zink in $ROOTFS/usr/local/lib/dri/zink_dri.so
which doesn't exist. Since the mesa libraries we have installed in the rootfs are under $ROOTFS/usr/lib/dri/zink_dri.so
instead.
Thanks @Sonicadvance1 But do they need to be the exact same libraries? Or can I just copy the stock ones from /usr/lib to /use/local/lib? Because in the first case I'll have to compile the exact same source on a x86-64 host running Ubuntu 23.10 first. The ones from the image are probably something like mesa 23.2 and the custom mesa is 24.0.0-devel.
I believe mesa hardcodes some paths so just moving them from /usr/
to /usr/local/
might cause issues. Could give it a try though.
The Mesa version we are currently shipping in our rootfs images are Mesa 23.3.0, we overwrite the version that Ubuntu ships.
You're right, so here's what I did. First I setup a Ubuntu 23.10 x86-64 VM on my laptop and I've rsynced all of the modified mesa sources to it. Then I configured and compiled mesa with the exact same options for both 32bit and 64bit. Finally I rsynced the /usr/local folder from my VM into the FEX' RootFS folder.
So I now have:
$ file ~/.fex-emu/RootFS/Ubuntu_23_10/usr/local/lib64/libGL.so.1.2.0
/home/mastag/.fex-emu/RootFS/Ubuntu_23_10/usr/local/lib64/libGL.so.1.2.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c7a79964ae9f192d9b7a193c081898bfb4da5803, not stripped
$ file ~/.fex-emu/RootFS/Ubuntu_23_10/usr/local/lib/libGL.so.1.2.0
/home/mastag/.fex-emu/RootFS/Ubuntu_23_10/usr/local/lib/libGL.so.1.2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=a2069cd08f182ee6e2ce06cf6b3a71841ebfaab0, not stripped
They also seem to be working from within FEXBash:
$ FEXBash
FEXBash-mastag@localhost:~> LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib MESA_LOADER_DRIVER_OVERRIDE=zink glxinfo
name of display: :0
ATTENTION: default value of option vblank_mode overridden by environment.
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_get_drawable_type, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_ATI_pixel_format_float, GLX_EXT_buffer_age,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_no_config_context, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
GLX_MESA_copy_sub_buffer, GLX_MESA_gl_interop, GLX_MESA_query_renderer,
GLX_MESA_swap_control, GLX_NV_float_buffer, GLX_OML_sync_control,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_no_config_context, GLX_EXT_swap_control,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0x5143)
Device: zink Vulkan 1.3(Turnip Adreno (TM) 640 (MESA_TURNIP)) (0x6040001)
Version: 24.0.0
Accelerated: yes
Video memory: 8585MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 8519 MB, largest block: 8519 MB
VBO free aux. memory - total: 0 MB, largest block: 0 MB
Texture free memory - total: 8519 MB, largest block: 8519 MB
Texture free aux. memory - total: 0 MB, largest block: 0 MB
Renderbuffer free memory - total: 8519 MB, largest block: 8519 MB
Renderbuffer free aux. memory - total: 0 MB, largest block: 0 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 8585 MB
Total available memory: 8585 MB
Currently available dedicated video memory: 8519 MB
OpenGL vendor string: Mesa
OpenGL renderer string: zink Vulkan 1.3(Turnip Adreno (TM) 640 (MESA_TURNIP))
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.0-devel
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: no-error
OpenGL core profile profile mask: core profile
...
glxgears is also working from withtin FEXBash :) So far so good!
So I've created a small script to run steam:
$ cat /usr/local/bin/run_steam
#!/bin/bash
export STEAMOS=1
export STEAM_RUNTIME=1
export DBUS_FATAL_WARNINGS=0
export MESA_LOADER_DRIVER_OVERRIDE=zink
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
exec taskset -c 4-7 ~/steam/bin/steam "$@"
However when running it, I eventually hit an illegal instruction:
$ FEXBash run_steam
bin_steam.sh[10373]: Setting up Steam content in /home/mastag/.local/share/Steam
steam.sh[10373]: Running Steam on ubuntu 23.10 64-bit
steam.sh[10373]: STEAM_RUNTIME is enabled by the user
setup.sh[10463]: Updating Steam runtime environment...
(process:10471): Gtk-WARNING **: 13:31:31.782: Locale not supported by C library.
Using the fallback 'C' locale.
steam.sh[10373]: Can't find 'steam-runtime-check-requirements', continuing anyway
[2023-12-13 13:36:35] Startup - updater built Apr 28 2023 18:32:42
[2023-12-13 13:36:35] Startup - Steam Client launched with: '/home/mastag/.local/share/Steam/ubuntu12_32/steam'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
Installing breakpad exception handler for appid(steam)/version(0)/tid(15564)
No minidump written, nothing to upload.
/home/mastag/.local/share/Steam/steam.sh: line 798: 15564 Illegal instruction "$STEAMROOT/$STEAMEXEPATH" "$@"
Any ideas?
Without some coredump it will hard to debug why it hit SIGILL. Could be something seccomp related. When running Steam on my Linux device I don't hit SIGILL with steam.
Are there any instructions on how to create a coredump? normally I'd just run in through gdb and dump the backtrace.
Normally I would just use systemd-coredump
Well I'm running FEX on termux-x11 using a Ubuntu 23.10 XFCE4 proot environment on a Android 12 device with a heavily outdated kernel (version 4.4.x). So things like systemd don't start. But the biggest setback is that it's not possible to setup proper binfmt support as this would require root access (breaking Google Play Integrity security on my device).
I'll close this for now as it's not possible to properly use coredump without systemd and also it seems the steam launch scripts will try to run the x86-64 binaries natively without resorting to FEX (or box64 for that matter) due to the lack of binfmt support. Altering the Steam runtime causes it to re-download everything (and they're a mess anyways.. way too over-engineered).
It just differs too much from a native linux distro.
Hi there,
I've just installed FEX-emu on my Android 12 phone running Ubuntu 23.10 in a Proot environment. In order to get proper OpenGL (using zink) and Vulkan using freedreno's turnip, I've manually compiled mesa from source and installed it in /usr/local/lib64 and /usr/local/lib.
So I've set:
And I've also created a
/etc/ld.conf.so.d/000-local.conf
with:This works great for native things like glxinfo, vkcube and supertuxkart:
However, when I run steam, it doesn't seem to load the native libGL from /usr/local/lib{,64}:
Any ideas?