You are not logged in.

#1 2022-05-17 03:35:31

lzer0
Member
Registered: 2022-05-17
Posts: 8

(WINE) Project64k doesn't work, cannot initialize OpenGL

Hi, whenever I try to run the netplay emulator Project64KSE on (32-bit Wineprefix) wine-7.7, it fails to load OpenGL and crashes. Below is the error message:

libGL error: MESA-LOADER: failed to open iris: libLLVM-13.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: libLLVM-13.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: libLLVM-13.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: swrast
057c:err:wgl:X11DRV_WineGL_InitOpenglInfo  couldn't initialize OpenGL, expect problems
wine: Unhandled page fault on read access to 7B935250 at address 7B935250 (thread 057c), starting debugger...

Searching on the web, I found that this workaround solves the error, kind of.
However, then I would get with this second error:

libGL error: failed to load driver: i915
libGL error: MESA-LOADER: failed to open i915: /usr/lib32/dri/i915_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: i915
libGL error: MESA-LOADER: failed to open swrast: libLLVM-13.so: failed to map segment from shared object (search paths /usr/lib32/dri, suffix _dri)
libGL error: failed to load driver: swrast
0828:err:wgl:X11DRV_WineGL_InitOpenglInfo  couldn't initialize OpenGL, expect problems
wine: Unhandled page fault on read access to 7B976250 at address 7B976250 (thread 0828), starting debugger...

A quick pacman -F i915_dri.so tells me that this driver is owned by mesa-amber and lib32-mesa-amber, which both are incompatible with the standard ones.
After doing this, I get ANOTHER problem, at this point I'm running out of options and don't know how to solve this

0410:err:wgl:X11DRV_WineGL_InitOpenglInfo  couldn't initialize OpenGL, expect problems
wine: Unhandled page fault on read access to 00000000 at address 024AD66F (thread 0410), starting debugger...

This error still persists but, interestingly, Project64 1.6 with Jabo D3D8 1.6 plugin will succesfully display the game with the standard mesa and lib32-mesa libraries, albeit with poor performance, however this version lacks netplay support. No other video plugin works, but I only tested the plugins that come in 1.6 and 3.0 with little luck. I thought I could use the D3D8 plugin of that version with Project64KSE but strangely it doesn't work, the emulator crashes after selecting it and auto-crashes the next time I open it so I'm forced to delete it from the plugin folder, huh, seems like a very specific problem with this emulator. This is the only emulator that has netplay supports for ROM Hacks like Smash Remix. Tried with other video plugins (Glide64) with mesa-amber and the emulator throws this error:

"Unable to find a suitable pixel format"

Any help in making this emulator working would be appreciated. My computer is a laptop Acer Nitro AN515-52 with Nvidia Optimus (Intel UHD 630/GTX 1050 Mobile)
Tried switching both GPUs, and changed drivers with no avail. Oh, here is the full log of the error log with mesa-amber libraries, I noticed mmap() fails to allocate memory, my laptop has 12GB RAM, maybe wine is only detecting a small amount due to being in 32-bits wineprefix?

Offline

#2 2022-05-17 06:49:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: (WINE) Project64k doesn't work, cannot initialize OpenGL

A UHD 630 should not need mesa-amber. Install mesa and lib32-mesa properly and make sure your system is actually up to date, try installing lib32-mesa-utils and post the outputs of

glxinfo -B
glxinfo32 -B

to check whether your GL is setup right.

Did you actively set up a 32bit prefix? What happens if you don't do that and just rely on the WOW64 implementation?

Last edited by V1del (2022-05-17 06:53:58)

Offline

#3 2022-05-17 15:04:23

lzer0
Member
Registered: 2022-05-17
Posts: 8

Re: (WINE) Project64k doesn't work, cannot initialize OpenGL

V1del wrote:

Install mesa and lib32-mesa properly and make sure your system is actually up to date, try installing lib32-mesa-utils and post the outputs of

glxinfo -B
glxinfo32 -B

glxinfo on UHD630
glxinfo32 on UHD630

glxinfo on GTX1050M (nouveau)
glxinfo32 on GTX1050M (nouveau)

V1del wrote:

Did you actively set up a 32bit prefix? What happens if you don't do that and just rely on the WOW64 implementation?

Good question, PJ64K needs some libraries like Directx and some VC+ redistributables in order to function properly, these can be installed through Winetricks, but this happens if I attempt to use 64-bit WINEPREFIX.

Last edited by lzer0 (2022-05-17 15:15:58)

Offline

#4 2022-05-22 19:41:14

lzer0
Member
Registered: 2022-05-17
Posts: 8

Re: (WINE) Project64k doesn't work, cannot initialize OpenGL

A quick update:
It seems the dedicated GPU (Nvidia) died, the driver installation crashes on Windows and Linux no longer recognizes the device when listed with xrandr, before this happened the GPU was working on both systems and driver installation succeeded on Windows without reporting any errors, and on Linux it would display as an available provider with xrandr --listproviders

Gave up trying to fix the issue as it's affecting both Linux and Windows even thought I didn't change any meaningful configuration, since Windows had the driver previously installed and working but then would boot into a blackscreen a few days later so I had to reinstall everything from scratch, however the driver installation that worked previously didn't work this time and always crashed into a BSOD with the error message: "page fault in nonpaged area nvlddmkm.sys", so I assumed the GPU died somehow since this is a refurbished laptop that was repaired less than two weeks ago. Also gave up on attempting to make work Project64K on Wine, I tried Mupen64++ which also supports online netplay and it runs fine except that there are 1 or 2 minor bugs in the controller plugin but still playable and configurable.

However I do have some trouble. At some point the Mayflash Gamecube Controller Adapter stopped working on Wine, so no matter what setup I tried none of the controller plugins would detect the adapter. When running the emulator from terminal I noticed this error displaying:

0228:err:rawinput:add_device Failed to open device file L"\\\\?\\HID#VID_0079&PID_1843&IG_00#272&03000000790000004318000010010000&0&0#{4d1e55b2-f16f-11cf-88cb-001111000030}", error 2.

Note that on real Windows, the adapter would need no drivers so indeed it's a plug and play device when the adapter is set on PC mode.
On WiiU/Switch mode is another story, Linux doesn't need any drivers as long as this udev rule exists:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666" 

The thing is WiiU/Switch mode only works for Dolphin/CEMU/Yuzu because they support Direct Connect as those emulators were designated specifically for being compatible with the GCC Adapters.
Wine and most other Windows/Linux games needs the Adapter set in PC mode so it can be recognized. This worked for a while but suddenly stopped working on Wine.

After tinkering with udev rules and native DLL overrides I found a solution:
1. Make a udev rule for the Adapter in PC mode (Mupen64Plus on Linux  and the other Linux-based games doesn't need this btw), only Wine needs it if for whatever reason the adapter stops being recognized there.

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0079", ATTRS{idProduct}=="1843", MODE="0666"

2. Install hid through winetricks (I'm not sure this is the one that will do the work but it should be since it's USB-related)
3. Run winetricks, go to "change settings" and tick "alldlls=builtin", this will override the default DLLs provided by wine with the ones you installed through Winetricks or manually (I guess that's how it works)
After doing this now my Mayflash GCC Adapter is recognized again, but the weird thing, is that on my first time running Wine/Project64K the adapter was already recognized but I don't know what mess I did previously that caused the emulator to stop recognizing the device.

Won't mark this thread as solved/closed since the original issue is still unsolved, but a workaround is to simply use Mupen64++ which also support netplay and ROM Hacks provided the ROM Hacks entries are updated in mupen64.ini
I also haven't tested online play since I know none who plays smash64 online with Mupen64++, but offline play works very well and Mupen64 can use the same plugins that are optimally bundled in Project64KSE that's downloaded from > smash64.online
As for offline N64 emulation on Linux, normally I would use m64py which worked for me a few months ago but since a while the program segfaults and generates a core dump, don't know why that happens but it seems likely a general issue from what I've been searching.

Last edited by lzer0 (2022-05-22 19:44:51)

Offline

Board footer

Powered by FluxBB