Wine 7 won't run games on FreeBSD - Unknown error (127)

Code:
> uname -rm
13.1-RELEASE-p3 amd64
Code:
> pciconf -lv | grep -B 4 VGA
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1d01 subvendor=0x1043 subdevice=0x85f5
vendor = 'NVIDIA Corporation'
device = 'GP108 [GeForce GT 1030]'
class = display
subclass = VGA
---
Code:
> sudo pkg info | grep wine
i386-wine-devel-6.11_1,1 32-bit Microsoft Windows compatibility environment for 64-bit FreeBSD
wine-7.0,1 Microsoft Windows compatibility environment
wine-gecko-devel-2.47.3 Gecko Layout Engine for Wine development branch (HTML support)
wine-mono-5.1.1 Mono .NET implementation for Wine
wine-mono-devel-7.3.0 Mono .NET implementation for Wine development branch
wine-proton-6.3.2_6 Wine with a bit of extra spice
winetricks-20220411 Easy way to work around problems in Wine

> /opt/wine-7.0/bin/wine64 --version
wine-7.0

> /opt/wine-7.0/share/wine/pkg32.sh install wine mesa-dri
pkg -o ABI=FreeBSD:13:i386 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir /home/clockwork/.i386-wine-pkg install wine mesa-dri
Updating FreeBSD repository catalogue...
Fetching packagesite.pkg: 100% 6 MiB 6.5MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 31583 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed

> .i386-wine-pkg/usr/local/bin/wine --version
wine-6.0.4
when I start any game I get an error:
Code:
> .i386-wine-pkg/usr/local/bin/wine .wine/drive_c/GOG\ Games/Fallout\ New\ Vegas/FalloutNV.exe
002c:fixme:ntdll:get_firmware_info info_class SYSTEM_FIRMWARE_TABLE_INFORMATION
002c:fixme:ntdll:get_firmware_info info_class SYSTEM_FIRMWARE_TABLE_INFORMATION
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0060:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0060:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0068:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0068:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0068:err:module:open_builtin_file failed to load .so lib "/usr/home/clockwork/.i386-wine-pkg/usr/local/lib/wine/winex11.drv.so"
0068:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:err:winediag:gnutls_initialize failed to load libgnutls, no support for encryption
00e8:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00e8:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0024:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031EE38 1 C) semi-stub
0024:err:d3d:wined3d_adapter_init Failed to initialise output, hr 0x80070057.
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0024:err:winediag:nodrv_CreateWindow Unknown error (127).
0024:err:d3d:wined3d_adapter_init Failed to initialise output, hr 0x80070057.
0024:fixme:msvcrt:__clean_type_info_names_internal (10066A1C) stub
0024:fixme:msvcrt:__clean_type_info_names_internal (018229A4) stub
---
Code:
> wine --version
wine-6.11
^But This wine perfectly launches games.
 
My guess, you are using x11/nvidia-driver as your graphic driver? If yes, it is a known bug in the Nvidia driver: you can't run any 32-bit applications because for some reasons, applications can't find the 32-bit version of the driver. Temporary solution, before the driver will be upgraded: downgrade your driver to x11/nvidia-driver-470.
 
My guess, you are using x11/nvidia-driver as your graphic driver? If yes, it is a known bug in the Nvidia driver: you can't run any 32-bit applications because for some reasons, applications can't find the 32-bit version of the driver. Temporary solution, before the driver will be upgraded: downgrade your driver to x11/nvidia-driver-470.
Thanks for the answer. I am using x11/nvidia-driver-390

I replaced the driver with 470 then I couldn't run X:

My /var/log/Xorg.0.log
Code:
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 15437.990] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[ 15437.990] (EE) NVIDIA:     system's kernel log for additional error messages and
[ 15437.990] (EE) NVIDIA:     consult the NVIDIA README for details.
[ 15437.990] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[ 15437.990] (EE) NVIDIA:     system's kernel log for additional error messages and
[ 15437.990] (EE) NVIDIA:     consult the NVIDIA README for details.
[ 15437.990] (EE) No devices detected.
[ 15437.990] (EE)
[ 15437.990] (EE) no screens found(EE)
[ 15437.990] (EE)
[ 15437.990] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 15437.990] (EE)
[ 15437.990] (EE) Server terminated with error (1). Closing log file.

My loaded modules
Code:
> kldstat | grep linux
10 7 0xffffffff8238e000 385b0 linux_common.ko
11 3 0xffffffff823c7000 9bf18 linux.ko
27 1 0xffffffff8464d000 32208 linux64.ko
33 1 0xffffffff846ac000 4354 geom_linux_lvm.ko
> kldstat | grep nvidia
  9 1 0xffffffff82227000 166088 nvidia-modeset.ko
12 2 0xffffffff82463000 15d9280 nvidia.ko

and my /usr/local/etc/X11/xorg.conf.d/nvidia.conf
Code:
Section "Device"
    Identifier "card0"
    Driver "nvidia"
EndSection
 
That's interesting. ;) I wonder if the Nvidia's kernel module is loaded properly. Maybe dmesg shows something?

Besides that, my nvidia.conf looks similar:

Code:
Section "Device"
    Identifier "NVIDIA Card"
    VendorName "NVIDIA Corporation"
    Driver "nvidia"
EndSection

GT 1030 should be supported even by the newest Nvidia drivers. Additionally, replacing a driver usually requires reboot. Sometimes even unloading the module doesn't help.
 
The GT 1030 needs to use x11/nvidia-driver, not any of the legacy versions. And any Nvidia driver from 470 and onward do not support 32 bit anymore. The 390 legacy version was the last version that supported 32 bit.

Drivers: Game Ready Driver upgrades, including performance enhancements, new features, and bug fixes, will be available only on 64-bit operating systems. Critical security updates will be provided for 32-bit operating systems through January 2019. This includes the following operating systems: Microsoft Windows 7 Microsoft Windows 8/8.1 Microsoft Windows 10 Linux FreeBSD
 
Code:
> .i386-wine-pkg/usr/local/bin/wine .wine/drive_c/GOG\ Games/Fallout\ New\ Vegas/FalloutNV.exe
You are not supposed to invoke ~/.i386-wine-pkg/usr/local/bin/wine directly, /usr/local/bin/wine sets the environment for launching the 32-bit loader as necessary.
 
it is a known bug in the Nvidia driver: you can't run any 32-bit applications because for some reasons, applications can't find the 32-bit version of the driver.
I wouldn't be so sure of the "known" part or the "bug" part, or this issue's entire existence for that matter.
 
The GT 1030 needs to use x11/nvidia-driver, not any of the legacy versions. And any Nvidia driver from 470 and onward do not support 32 bit anymore. The 390 legacy version was the last version that supported 32 bit.
I installed the nvidia-driver and now I can't turn on the computer. The loading screen is frozen and does not respond to anything.

at first one moment hangs. Then the second hangs for a very long time:

I can't boot into a non multi user, I can't boot into a single user, I can't boot into another kernel. Only booting to another boot environment with snapshot -p4 helped
 
You are not supposed to invoke ~/.i386-wine-pkg/usr/local/bin/wine directly, /usr/local/bin/wine sets the environment for launching the 32-bit loader as necessary.

but I have a working i386-wine-devel-6.11_1,1 installed. wine-7.0,1 is installed in a different prefix at the moment.
 
And any Nvidia driver from 470 and onward do not support 32 bit anymore.

Drivers: Game Ready Driver upgrades, including performance enhancements, new features, and bug fixes, will be available only on 64-bit operating systems.
How then to deal with support for 32-bit applications/games on amd64 systems?
 
I installed the nvidia-driver and now I can't turn on the computer. The loading screen is frozen and does not respond to anything.
I was able to move the nvidia loader from loader.conf to rc.conf. This seems to have solved the problem.
 
The packages are supported as is, if you messed up their installation paths that's on you.
I don't understand you. What do you mean? I have several versions of wine installed, so it's different for me.
Code:
> /usr/local/bin/wine --version                                                                                                                                                                     [0]
wine-6.11
> .i386-wine-pkg/usr/local/bin/wine --version                                                                                                                                                       [0]
wine-6.0.4
 
I wouldn't be so sure of the "known" part or the "bug" part, or this issue's entire existence for that matter.
From 515.86.01 onwards, anything released at or after November 22, 2022, 32-bit applications like under wine works again. I tested it for example with Guild Wars. Nvidia doesn't provide drivers for 32-bit OS's but provides 32-bit versions of libraries for 64-bit systems. So, at least the problem was known for Nvidia. ;) And in Bugzilla, there are at least 2 bugs related to the problem with 32-bit wine: PR 265273 and PR 263475.
 
Yeah, because FreeBSD deletes old packages from ports as it's being updated. Try downloading the source code for 6.11 from the Wine website and compiling. Or downgrade the port.
 
At shkhln's post (yay for empty quoting :)):

The first issue changed over time in something like a metabug: indeed, the starter doesn't use Nvidia card, explained in the comment #20, but on the other hand I'm not sure about reports from other people, comments #9, #18 and #23. And the issue in comments from #26 to #29 is definitely related. ;)

The second issue: That happens when you are trying to use 64-bit libraries with 32-bit program. ;) I was checking with truss and wine was trying to load 64-bit Nvidia libraries when starting a 32-bit application. That's why it couldn't find a driver (according to the Wine error message). The second report is fully related.
 
Yeah, because FreeBSD deletes old packages from ports as it's being updated. Try downloading the source code for 6.11 from the Wine website and compiling. Or downgrade the port.
Does my configure fail with the following error:

configure: error: FreeType 32-bit development files not found. Fonts will not be built.
Use the --without-freetype option if you really want this.

And if you continue, then more warnings:


Do not tell me how to assemble it correctly? Or should I do it on a 32-bit system?

I also tried to salvage i386-wine-devel but couldn't get the distfiles. The latest available version on the internet was 5.8
 
Back
Top