microsoft / microsoft/wslg

Spine PlayStation 4 emulator does not work in WSLg with GPU enabled

Open
#445 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug GPU
Dominant language
C++
Stars
11.9k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

Environment

Windows build number: 22000.184
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.26
Nvidia GeForce Drivers: 510.06
SR-IOV: Enabled in motherboard BIOS

Steps to reproduce

I got Spine working in my Ubuntu 21.04 virtual machine in VMWare Workstation 16. Unfortunately, I cannot get it to work in WSLg. Spine requires PlayStation 4 firmware files that I have placed in the emulator directory's firmware directory. Please note that in Ubuntu, Spine requires libsdl2-dev to be installed. I have installed libsdl2-dev in Ubuntu in WSL through sudo apt install libsdl2-dev.

1.) Copy Spine emulator directory (spine-20210901) to /home/steven/
2.) Run chmod a+x on the spine binary file and on the contents of the lib directory in the emulator directory
3.) Run cd /home/steven/spine-20210901 to cd to the emulator directory
4.) Run ./spine /home/steven/Sonic_Mania/eboot.bin to launch Sonic Mania.
5.) I am using a 144 Hz display. I have added the following lines to c:\ProgramData\Microsoft\WSL\.wslgconfig; however, this issue has occurred with and without these lines added to my .wslgconfig file:

[system-distro-env]
WESTON_RDP_MONITOR_REFRESH_RATE=144

Below are my file permissions to verify that they are correctly set:

steven@My-Desktop:~/spine-20210901$ ls -l spine
-rwxr-xr-x 1 root root 3221616 Sep  1 05:58 spine
steven@My-Desktop:~/spine-20210901$ ls -l ./lib
total 6512
-rwxr-xr-x 1 root root 1983096 Jun 29 05:36 libavcodec.so.58
-rwxr-xr-x 1 root root 1983096 Jun 29 05:36 libavcodec.so.58.134.100
-rwxr-xr-x 1 root root  663112 Jun 29 05:36 libavutil.so.56
-rwxr-xr-x 1 root root  663112 Jun 29 05:36 libavutil.so.56.70.100
-rwxr-xr-x 1 root root  117056 Jun 29 05:36 libswresample.so.3
-rwxr-xr-x 1 root root  117056 Jun 29 05:36 libswresample.so.3.9.100
-rwxr-xr-x 1 root root  563512 Jun 29 05:36 libswscale.so.5
-rwxr-xr-x 1 root root  563512 Jun 29 05:36 libswscale.so.5.9.100

Below is my dmesg output:

[   24.215967] process 'home/steven/spine-20210901/spine' started with executable stack
[   24.775775] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   24.775776] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   24.775777] dxgk:err: adapter_by_handle failed 40000080
[   24.776619] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   24.776619] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   24.776620] dxgk:err: adapter_by_handle failed 40000080
[   24.778768] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   24.778768] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   24.778769] dxgk:err: adapter_by_handle failed 40000080
[   24.779602] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   24.779603] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   24.779603] dxgk:err: adapter_by_handle failed 40000080
[   25.683854] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   25.683855] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   25.683856] dxgk:err: adapter_by_handle failed 40000080
[   25.684766] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   25.684767] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   25.684768] dxgk:err: adapter_by_handle failed 40000080
[   25.687062] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   25.687063] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   25.687063] dxgk:err: adapter_by_handle failed 40000080
[   25.687949] dxgk:err: is_handle_valid Entry is freed 40000080 2
[   25.687950] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
[   25.687950] dxgk:err: adapter_by_handle failed 40000080

Below is my glxinfo output:

steven@My-Desktop:~/spine-20210901$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2080 SUPER) (0xffffffff)
    Version: 21.0.3
    Accelerated: yes
    Video memory: 40735MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2080 SUPER)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.0.3
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.1 Mesa 21.0.3
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

WSL logs:

Unfortunately, running wpr -start wsl.wprp -filemode from an administrative command prompt gave me the output:

        Error code: 0xc00ce584
        DTD is prohibited.

        Line Number: 7
        Column Number: 11

Please find attached directly below my WSLg logs.
pulseaudio.log
weston.log

Attempting to open versions.txt in Notepad++ had given me a message that versions.txt did not exist. I could not copy versions.txt elsewhere.

Edit: Running cat on versions.txt from within WSL gave me the following output:

WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

I expected Sonic Mania to start with the Spine emulator through WSLg, just as it did for me in my Ubuntu 21.04 virtual machine.

Please find below a screenshot of Sonic Mania running in Spine in my Ubuntu 21.04 virtual machine.

image

Actual behavior

Sonic Mania is not running in Spine in WSLg.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached weston.log and pulseaudio.log, then reproduce the listed Spine launch command with the provided WSLg, Ubuntu, driver, dmesg, and glxinfo details. Done means identifying and resolving the WSLg GPU-enabled failure so Sonic Mania launches through Spine as it does in the Ubuntu virtual machine.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
computer-graphics, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.