-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Windows + GPU #148
Comments
Technically it works different than on Linux. On Linux the GPU device files are shared with the container, and container applications access it directly (direct rendering). On Windows direct rendering is not possible, but X servers VcXsrv and Xwin provide GPU support with indirect rendering (GPU requests forwarded through the X server). Could you please show me the output of:
That should contain some infos of your GPU hardware visible by the container. For comparison: Output on Linux with AMD GPU:
Most of interest are the lines:
|
Closing due to inactivity. @phil294 feel free to reopen. I'd be happy to hear if it works for you. |
Reopening due to issues reported in #145. |
As commented in #145, EDIT I updated the driver to 430.64, with the same result. |
@1138-4eb Could you show the results from the laptop that works for comparision? The laptop has an NVIDIA card, too? Does one or both machines have an integrated non-NVIDIA GPU? Edit: |
I opened 'Run a bash terminal' and executed glxinfo inside. It shows:
No. A black window is shown, where the gears should be rendered; but no gear is seen. It crashes before drawing anything. On the laptop, the gears are shown in the black square, and they seem to "move" for a couple of frames before freezing and crashing.
The laptop has and Intel and an NVIDIA card. But I believe that the Intel one is being used (see #70).
The laptop is an ASUS F555LD-XX110H with an NVIDIA GeForce GT 820M and an Intel Core i7-4510U (Intel HD Graphics 4400). The workstation has an i5-6600K (Intel HD Graphics 530), but the NVIDIA GTX 1060 is used. |
and it freezes/crashes. |
I think that it is not possible to select the integrated card on the workstation, because I'd need to physically connect the monitors to a different output. However, on the laptop the NVIDIA Control Panel allows me to bind the NVIDIA GPU to VcXsrv, instead of the Intel GPU which is the default. I am going to try that now. |
Do I understand correctly, that only It seems x11docker should show a general warning on Windows for option
Edit:
Is this the full or a shortened output? On Linux |
When vcxsrv is bind to NVIDIA on the laptop, all the tests fail/crash. So, it seems that GPU acceleration with NVIDIA cards is not supported by vcxsrv. EDIT: https://sourceforge.net/p/vcxsrv/bugs/94/
Yes, that is it.
Yes. It looks well, both with the Intel GPU on the laptop and with software rendering on the workstation.
This is sensible. However, isn't it surprising that glxgears fails but glxspheres works? Shouldn't glxgears be 'simpler'?
For which setup would this be interesting? For the Intel card or for NVIDIA?
It's the full output if I click on 'Run glxinfo'. If I open a bash terminal and I execute |
Thanks for your answers, now I understand better. x11docker shows a warning now, and I've updated the wiki Windows page accordingly.
Yes, it is surprising. However,
I would first test with the Intel GPU to check if hardware acceleration works at all without this environment variable. However, according to the VcXsrv bug report I doubt that we can achieve anything. What about the palinopsia leak check? Does it work with the intel GPU? Does it show some GPU memory content? Could you also run a check in Cygwin/X with |
It fails with either Intel or NVIDIA. It works with the software rendering, I think.
The palinopsia check works, although all black window is shown, so no video memory is leaked.
EDIT Would it be possible to support |
Did you check with Intel, NVIDIA or both of them? Does glxinfo show the GPU vendor in the renderer string?
In general it would be possible; I did not include it so far because it has the same features as |
I got around to test a Windows machine (Nvidia GTX 1050 Ti) today, too: x11 stuff works without --gpu just fine, which is awesome, including I can try |
@phil294 Thank you for the feedback! According to the VcXsrv bug ticket NVIDIA cards won't work with Instead of checks with
I did not think about this so far. I doubt it would make much sense because x11docker inside a container could not provide much more than the batch script that runs it. |
I run the tests for NVIDIA (workstation). These are the results on the laptop:
Note that hardinfo works ok with both GPUs.
Unless we find out the issue with VcXsrv and NVIDIA, I think it makes a big difference. However, there might be some issue with line endings. Currently, I use MSYS2 mostly because |
@mviereck, a summary of the tests:
Test with NVIDIA cards have been executed on the workstation and on the laptop. |
@phil294, since x11docker is essentially a single bash script, it is possible to use it without cloning the repo. For example: curl -fsSL https://raw.githubusercontent.com/mviereck/x11docker/master/x11docker \
| bash -s -- --clipboard --gpu x11docker/check I think that this is functionally equivalent to what you would expect from a docker image. This might not work for x11docker-gui, though. |
I tried commenting out
With NVIDIA, it still crashes. |
I tried
I will proceed to try out other gpu accessing programs like games. Concerning my idea of a docker-x11docker-image: Yes, I know, it would not help much: a simple batch script could achieve the same thing. However, there is no such batch script right now and I did not know there were any plans on doing so. With no batch script available and x11docker containerized, Windows users could be spared to install msys2 or cygwin. Feel free to ignore this paragraph, I should have opened a seperate issue. |
@1138-4eb and @phil294 , much thanks for your tests! Especially the table of @1138-4eb is quite helpful. I did several attempts to run Xwin in MSYS2. It was a PITA in my Windows VM setup, and although I had partial success, I've dropped all the new code. It costs a lot of time to run tests, and the code gets quite complicated due to incompatibility between Cygwin and MSYS2. Sorry, currently I can only recommend to use
It is a very good sign if It is odd that the Intel results in #148 (comment) show high frame rates, but the NVIDIA results show 60fps. Something seems to be wrong in the Intel result. Maybe the correct GPU is shown, but software rendering is used nonetheless? Mabe the driver does not report the correct frame rate? |
I think you misread, @mviereck: Everything seems to work with |
I assume that the incompatibility arises when you try to somehow execute Cygwin from MSYS2 in order to initialize the X server. Would a two-step approach be feasible alternatively? I.e.:
|
The current 5.7.0-beta supports |
The current master version 6.0.0-beta drops option In WSL and MSYS2 x11docker must be started with Thank you for your test reports! |
Is this possible? If not, it would be good to have https://github.com/mviereck/x11docker/wiki/x11docker-on-MS-Windows state it.
Greetings
Edit: Thanks! Ill be testing this in a few days,
please dont closeedit2: I dont use a Windows machine myself. Hopefully next few days I can continue testing on a friends computer.
The text was updated successfully, but these errors were encountered: