Solved Linuxulator-steam-utils (rl9) 3D acceleration fails (AMD and NVIDIA)

Greetings all,

As far as my experience goes, LSU might be the logical option when it comes to installing and running Steam games on FreeBSD.

I've compiled and took care of all dependencies, Steam is up and running, stable with sound, no issues.

Unfortunately, I can't figure it out on how to make 3D acceleration work on Steam games. As suggested, I used the provided script (linux-chroot) to test 3D. I can confirm that 3D is available and working with Linux compatibility.

I am a little confused on what compatibility tools should be used/installed to run games: On Compatibility tab one can currently select FreeBSD Wine (proton-wine) and LSU chroot with Proton 8.

Legacy is the recommended way for AMD/Intel cards, but it's not available? How would one install it?

LSU chroot Proton 8 complains about lacking Microsoft Visual C++ Runtime, the game won't start. With FreeBSD Wine most titles will start but will fail to run with no 3D acceleration.

GPU is a NAVI31.

Any suggestions would be greatly appreciated!
 
Assetto Corsa Competitizone/EVO and iRacing. The first two give me a blank screen, iRacing complains about not having enough graphics.

I also tried a "free" game, War Thunder which gives the option to run it on the LSU chroot Legacy Steam Runtime. It works fine with FreeBSD wine. Not the most demanding game I suspect, but FPS were on the roof (200+).
 
I had the opportunity to grab a used NVIDIA, so I decided to get it to test it further.

Re-installed everything, drivers are in place and I have a working Wayland (Sway) desktop environement, with 3D acceleration:
Code:
❱ freebsd-version -kru
14.2-RELEASE-p1
14.2-RELEASE-p1
14.2-RELEASE-p3

Code:
❱ pkg info -qa | grep nvidia
libva-nvidia-driver-0.0.13
linux-nvidia-libs-570.124.04
nvidia-driver-570.124.04.1402000_2
nvidia-drm-61-kmod-570.124.04.1402000_1
nvidia-drm-kmod-570.124.04
nvidia-settings-535.146.02_1
nvidia-texture-tools-2.1.2
Code:
❱ pkg info -qa | grep mesa
mesa-devel-25.0.b.2936
mesa-dri-24.1.7_4
mesa-libs-24.1.7_1

Sway is launched with
--unsupported-gpu flag and the following env vars:
Code:
 35 # NVIDIA Wayland
 36 export WLR_NO_HARDWARE_CURSORS=1
 37 export GBM_BACKEND=nvidia-drm
 38 export __GLX_VENDOR_LIBRARY_NAME=nvidia
 39 export WLR_RENDERER=vulkan
 40 export XWAYLAND_NO_GLAMOR=1
 41 export SDL_VIDEODRIVER=wayland
 42 export LIBVA_DRIVER_NAME=nvidia
 43 export CLUTTER_BACKEND=wayland
 44 export XDG_SESSION_TYPE=wayland
 45 export GDK_BACKEND=wayland
 46 export QT_AUTO_SCREEN_SCALE_FACTOR=1
 47 export WLR_RENDERER_ALLOW_SOFTWARE=1

Code:
❱ glxinfo | less
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, 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: NVIDIA Corporation
client glx version string: 1.4

vulkaninfo reports a working(ish) GPU:

Code:
❱ vulkaninfo | less
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
==========
VULKANINFO
==========

Vulkan Instance Version: 1.4.312


Instance Extensions: count = 25
===============================
        VK_EXT_acquire_drm_display             : extension revision 1
        VK_EXT_acquire_xlib_display            : extension revision 1
        VK_EXT_debug_report                    : extension revision 10
        VK_EXT_debug_utils                     : extension revision 2
        VK_EXT_direct_mode_display             : extension revision 1
        VK_EXT_display_surface_counter         : extension revision 1
        VK_EXT_headless_surface                : extension revision 1
        VK_EXT_surface_maintenance1            : extension revision 1
        VK_EXT_swapchain_colorspace            : extension revision 4
        VK_KHR_device_group_creation           : extension revision 1
        VK_KHR_display                         : extension revision 23
        VK_KHR_external_fence_capabilities     : extension revision 1
        VK_KHR_external_memory_capabilities    : extension revision 1
        VK_KHR_external_semaphore_capabilities : extension revision 1
        VK_KHR_get_display_properties2         : extension revision 1
        VK_KHR_get_physical_device_properties2 : extension revision 2
        VK_KHR_get_surface_capabilities2       : extension revision 1
        VK_KHR_portability_enumeration         : extension revision 1
        VK_KHR_surface                         : extension revision 25
        VK_KHR_surface_protected_capabilities  : extension revision 1
        VK_KHR_wayland_surface                 : extension revision 6
        VK_KHR_xcb_surface                     : extension revision 6
        VK_KHR_xlib_surface                    : extension revision 6
        VK_LUNARG_direct_driver_loading        : extension revision 1
        VK_NV_display_stereo                   : extension revision 1

Layers: count = 6
=================
VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.4.312, layer version 1:
        Layer Extensions: count = 4
                VK_EXT_debug_report        : extension revision 9
                VK_EXT_debug_utils         : extension revision 1
                VK_EXT_layer_settings      : extension revision 2
                VK_EXT_validation_features : extension revision 2
        Devices: count = 2
                GPU id = 0 (NVIDIA GeForce RTX 4070 Ti)
                Layer-Device Extensions: count = 3
                        VK_EXT_debug_marker     : extension revision 4
                        VK_EXT_tooling_info     : extension revision 1
                        VK_EXT_validation_cache : extension revision 1

                GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
                Layer-Device Extensions: count = 3
                        VK_EXT_debug_marker     : extension revision 4
                        VK_EXT_tooling_info     : extension revision 1
                        VK_EXT_validation_cache : extension revision 1

VK_LAYER_NV_optimus (NVIDIA Optimus layer) Vulkan version 1.4.303, layer version 1:
        Layer Extensions: count = 0
        Devices: count = 2
                GPU id = 0 (NVIDIA GeForce RTX 4070 Ti)
                Layer-Device Extensions: count = 0

                GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
                Layer-Device Extensions: count = 0

VK_LAYER_VALVE_steam_fossilize_32 (Steam Pipeline Caching Layer) Vulkan version 1.3.207, layer version 1:
        Layer Extensions: count = 0
        Devices: count = 2
                GPU id = 0 (NVIDIA GeForce RTX 4070 Ti)
                Layer-Device Extensions: count = 0

                GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
                Layer-Device Extensions: count = 0

:

glxgears
Code:
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
91 frames in 5.0 seconds = 18.162 FPS
86 frames in 5.0 seconds = 17.151 FPS

vkcube
Code:
Selected WSI platform: xcb
Selected GPU 0: NVIDIA GeForce RTX 4070 Ti, type: DiscreteGpu

I tried using the script linux-chroot to test linux acceleration, but it fails downloading the packages.
Code:
❱ ./linux-chroot glxinfo | less
Downloading libexpat1_2.4.7-1ubuntu0.5_amd64.deb from http://archive.ubuntu.com/ubuntu/...
fetch: http://archive.ubuntu.com/ubuntu//pool/main/e/expat/libexpat1_2.4.7-1ubuntu0.5_amd64.deb: Not Found
Downloading libexpat1_2.4.7-1ubuntu0.5_amd64.deb from https://nl.archive.ubuntu.com/ubuntu...
fetch: https://nl.archive.ubuntu.com/ubuntu/pool/main/e/expat/libexpat1_2.4.7-1ubuntu0.5_amd64.deb: Not Found
Downloading libexpat1_2.4.7-1ubuntu0.5_amd64.deb from https://mirrors.kernel.org/ubuntu...
fetch: https://mirrors.kernel.org/ubuntu/pool/main/e/expat/libexpat1_2.4.7-1ubuntu0.5_amd64.deb: Not Found
./linux-chroot:188:in `block (2 levels) in download_debs': unable to download libexpat1_2.4.7-1ubuntu0.5_amd64.deb (RuntimeError)

And last, /usr/local/bin/unigine-sanctuary_1024x768_windowed.sh, but it also fails:
Code:
❱ /usr/local/bin/unigine-sanctuary_1024x768_windowed.sh
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  28
  Current serial number in output stream:  29

Any suggestions and pointers would be greatly appreciated!
 
Well, if you want GLX (that is, GL for X11) with Wayland, it's up to you to make it work.
Isn't that what XWayland is for?

Nevertheless, I got rid of Wayland, but still the same result.

Code:
Set 1024x768 windowed video mode
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  49
  Current serial number in output stream:  50
AL lib: (EE) alc_cleanup: 1 device not closed
 
Isn't that what XWayland is for?

Nevertheless, I got rid of Wayland, but still the same result.

Code:
Set 1024x768 windowed video mode
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  49
  Current serial number in output stream:  50
AL lib: (EE) alc_cleanup: 1 device not closed
I removed linux compat entirely, and reinstalled linux-rl9 libs only. That seems to have solved most of the issues.
 
Back
Top