mirror of
https://github.com/games-on-whales/gow.git
synced 2026-10-15 12:52:00 +00:00
[GH-ISSUE #13] Test on Windows with WSL2 #11
Labels
No labels
bug
enhancement
enhancement
github_actions
good first issue
help wanted
help wanted
invalid
needs testers
pull-request
question
x11-images
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gow#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ABeltramo on GitHub (Jun 26, 2021).
Original GitHub issue: https://github.com/games-on-whales/gow/issues/13
WSL2 is missing the
uinputkernel module. There's a way to get it which involves recompile the kernel, try following the instructions at https://gist.github.com/cerebrate/d40c89d3fa89594e1b1538b2ce9d2720@TheSamDickey commented on GitHub (Sep 29, 2021):
Hello! I stumbled across this repo today and it looks very interesting. I am curious, would HW acceleration work with WSL?
@ABeltramo commented on GitHub (Sep 29, 2021):
That's a very good question to which I don't have an answer. I'm not even sure that WSL will expose the underlying GPU like you do on Linux via
/dev/dri.We are currently focusing our efforts on Linux, to be fair, the more I think about running GOW on Windows, the more I'm convinced it's not worth the effort compared to just running the .exe
@ABeltramo commented on GitHub (Oct 7, 2021):
It might be worth to investigate on https://github.com/microsoft/wslg
@Poprox198 commented on GitHub (Nov 14, 2021):
There is a published nvidia guide for WSL2 and docker : https://docs.nvidia.com/cuda/wsl-user-guide/index.html
@jfrgagnon commented on GitHub (Feb 2, 2023):
Did anyone retried to implement GOW with WSL2 since the addition of systemd and the 2022 new kernel features?
@ABeltramo commented on GitHub (Feb 2, 2023):
AFAIK no, and to be fair, I'm not sure I see the point; as things are right now Sunshine works perfectly well natively on Windows, and why would you run games in a Docker container via proton or the likes when you can just run them natively on the host?
I'm open to suggestions and POW, but right now, I'm focusing all my efforts in Linux.
@lostmsu commented on GitHub (Feb 22, 2023):
Just tried on my WSL 2 Ubuntu 20.04 install + WSLg + CUDA 11.4 which I use for ML.
Headless
Fails to start X11. The suggested hack with EDID did not work. I still get
Fatal server error: no screens found.Host
I installed and ensured GEdit works.
Launching Steam container actually shows Steam login window in Windows, but Sunshine fails to start:
Windows
Two goals really: containerization and running headless (+ as a bonus in arbitrary resolutions and multiple games at once from the same host?)
@lostmsu commented on GitHub (Feb 22, 2023):
After updating wsl with
wsl --update,/dev/driis now available and so Sunshine starts, and I can access the web UI, but Moonlight still can not connect to it.sunshine-wsl2.log
The relevant bits appear to be:
Moonlight complains about access to UDP 47999, which I take it means Sunshine failed to start the control stream.
@ABeltramo commented on GitHub (Feb 22, 2023):
Thanks for reporting this, by a quick look at the logs I think you are hitting multiple issues:
Issues
Error: Could not create Sunshine Mouseisuinputpresent in the WSL kernel? (You can check with:lsmod | grep uinput) When I originally opened this issue it wasn't present, I'm not sure if that's changed now. Withoutuinputyou'll not be able to create virtual devices and that means that you'll not be able to control the stream remotely.Cannot load libcuda.so.1,failed to load driver: vgem,Couldn't initialize va display: unknown libva errorlooks like you have issues with your video drivers, which GPU are you using? Can you try runningvainfoand see what's reported?Goals
Sunshine supports multiple users sharing a single screen (ex: co-op games). We are building a completely different solution in order to support headless virtual HW accelerated displays for multiple users which is called Wolf.
It's still under heavy development and not really ready to be used as is but, since we are building our own Wayland compositor, this could potentially work under WSL.
I can only say, keep an eye on this space because we are getting close to something that looks like a solution. 😅
@lostmsu commented on GitHub (Feb 22, 2023):
@KeenMaron commented on GitHub (Jul 16, 2024):
Any updates with WSL2? I tried the guide for Nvidia but got several issues to run it on ubunutu WSL2 from windows
@ABeltramo commented on GitHub (Jul 16, 2024):
Last I've checked WSL2 was still missing both
/dev/uinputand/dev/uhidthis means that the current implementation of virtual inputs wouldn't work in it.I'm going to implement https://github.com/games-on-whales/gst-wayland-display/issues/4 soon, with that, at least mouse and keyboard should work. Not sure what's the status of HW acceleration in WSL is, but hopefully that should work.
Stay tuned!
@KeenMaron commented on GitHub (Jul 17, 2024):
Thanks, it would be awesome to make it run through the ubuntu subsystem of windows 10 :)
@ABeltramo commented on GitHub (Jul 24, 2024):
Anyone willing to test out the latest on WSL? Checkout the latest quickstart guide
@yousecjoe commented on GitHub (Jul 24, 2024):
Me! I'll do it tonight. This is exciting and I have been looking forward to this, great job everyone!
@KeenMaron commented on GitHub (Jul 26, 2024):
Do you have updated the instruction for nvidia user in wsl? Because the subsystem recognize the gpu and it is useable, but there is no native driver installed in the subsystem. I had issues to make the container run.
@namquang93 commented on GitHub (Aug 25, 2024):
looks like it still doesn't work since WSL doesn't have uinput
@ABeltramo commented on GitHub (Aug 25, 2024):
I assume you followed the wrong tab of the quickstart guide, in WSL2 there's no mention of
/dev/uinput😉Anyway, others have reported on Discord that HW acceleration is not properly working; seems that Windows exposes the GPU as a different virtual vendor and our code doesn't recognise that MS specific card.
Even with a temporary fix for that it seems that Sway doesn't run in WSL (or at least not without further fixes). If anyone wants to make this work I'm afraid they have to get their hands dirty and write some code!
@namquang93 commented on GitHub (Aug 26, 2024):
I followed the Nvidia tab since my laptop has an Intel iGPU and a NVIDIA dGPU. I'm gonna try using the WSL2 guide.
@namquang93 commented on GitHub (Aug 26, 2024):
looks like I got it to run with WSL but I can't seem to access the web interface either in https://localhost:47984 or http://localhost:47989. Anyone got an idea why?
@Asofwar commented on GitHub (Aug 27, 2024):
В Windows Docker по умолчанию работает с использованием виртуальной машины (через WSL 2 или Hyper-V). Если вы используете --network=host, это может не работать так, как ожидалось, потому что host сеть работает иначе в Windows.
Рассмотрите возможность использования портового перенаправления, вместо --network=host:
docker run
--name wolf
-e XDG_RUNTIME_DIR=/tmp/sockets
-v /tmp/sockets:/tmp/sockets:rw
-e NVIDIA_DRIVER_VOLUME_NAME=nvidia-driver-vol
-v nvidia-driver-vol:/usr/nvidia:rw
-e HOST_APPS_STATE_FOLDER=/etc/wolf
-v /etc/wolf:/etc/wolf:rw
-v /var/run/docker.sock:/var/run/docker.sock:rw
--device /dev/dri/
--gpus all
-p 47984:47984/tcp
-p 47989:47989/tcp
-p 47999:47999/udp
-p 48010:48010/tcp
-p 48100-48110:48100-48110/udp
-p 48200-48210:48200-48210/udp
ghcr.io/games-on-whales/wolf:stable
@AuxAtlas commented on GitHub (Aug 27, 2024):
From what I remember, you have to get the direct IP of WSL2 and connect to it via that. If you list all network interfaces in the windows command prompt it should show the WSL2's IP.
@LanHikari22 commented on GitHub (Sep 28, 2024):
Hi. Coming from https://github.com/games-on-whales/wolf/issues/129,
I have already tried
--gpus allprior but I have added according to @ABeltramo's suggestion NVIDIA_DRIVER_CAPABILITIES=all and NVIDIA_VISIBLE_DEVICES=all and removed the PUID and PGID environmental variables:Some docker logs from wolf I have noted:
And the encoders being detected now:
Black screen issue persists when running Firefox. I'll include the docker logs for wolf, WolfPulseAudio, and WolfFirefox below.
Please note that there is a long string of trace logs in wolf when I am able to move the mouse in the firefox moonlight stream and finally this last log after going in and out of the firefox control which disables my mouse access within it:
240928 wolf docker logs 1.txt
240928 WolfFirefox docker logs 1.txt
240928 WolfPulseAudio docker logs 1.txt
Thanks,
Mohammed
@PeterTucker commented on GitHub (Oct 8, 2024):
Current docker-compose setup on WSL2:
When I run steam this is what I get:
Shows a black background with a cursor. Never seems to finish loading.
@salty2011 commented on GitHub (Oct 8, 2024):
Correct me if I'm wrong, but WSL 2 doesn't exactly expose the actual graphics card. Instead you'll find it's a Microsoft virtual adapter that's good enough for rendering light weight UI's but doesn't expose any of the actual GPU capabilities. In the case of Wolf, it looks for Intel / Nvidia or AMD gpu's to determine what encoding pipeline to use.
if you do the following command in WSL
What adapters are returned?
@PeterTucker commented on GitHub (Oct 8, 2024):
Unfortunately, I don't see much info.
However if I run this:

I do get specific information about my 3060:

@salty2011 commented on GitHub (Oct 8, 2024):
So looking at the output, WSL isn't listing your Nvidia cards. instead WSL just has a basic 3d controller (first entry in screen shot).
I am not aware of any method to expose your actual graphics card into WSL so that docker can leverage in Wolf. It is this reason why WSL is considered unsupported by Wolf. As understood WSL has a technical limitation that prevent Wolf from being able to leverage the actual graphics card.
Given this limitation this its not currently a focus to get it working, but welcome comments / feedback from others who may know how get around this limitation and submit a PR to update our doc's.
In the meantime I will review the docs for WSL and call out explicitly the current known limitations as we understand them.
@AuxAtlas commented on GitHub (Nov 12, 2024):
I dont have any sources off the top of my head besides "trust me", but from doing HyperV GPU-PV(AKA HyperVisor GPU Para-Virtualization) I somewhat recall the GPU being intentionally passed through as a generic/basic 3D Controller by windows due to GPU-PV. Im not certain it also applies to WSL2 but I wouldn't be surprised if it did. I do know for sure that with HyperV GPU-PV it did pass through my RTX 3070 Ti as a basic 3d controller, but I was able to use it to its full effect(most of the time)