Skip to content
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

Basic video test fails #44

Closed
lostfictions opened this issue Jun 7, 2019 · 11 comments
Closed

Basic video test fails #44

lostfictions opened this issue Jun 7, 2019 · 11 comments
Assignees
Labels

Comments

@lostfictions
Copy link

lostfictions commented Jun 7, 2019

hey there, i can't seem to get the image or script to work. it pulls the image fine, and running the script without arguments gives a bash shell as expected, but running the suggested troubleshooting command fails:

$ docker-wine wine notepad
latest: Pulling from scottyhardy/docker-wine
Digest: sha256:59aedd84889b55825008e084e8b17752166e266760522e21a800c4c6558415d7
Status: Image is up to date for scottyhardy/docker-wine:latest
INFO: Using existing Docker volume container 'winehome'...
No protocol specified
0010:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0010:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0010:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0010:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0010:err:ole:get_local_server_stream Failed: 80004002
0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

okay, not sure what any of that means -- let's check $DISPLAY:

$ echo $DISPLAY
:0

seems fine to me?

as a test, let's delete the winehome volume just in case:

$ docker volume rm winehome
winehome
$ docker-wine wine notepad
latest: Pulling from scottyhardy/docker-wine
Digest: sha256:59aedd84889b55825008e084e8b17752166e266760522e21a800c4c6558415d7
Status: Image is up to date for scottyhardy/docker-wine:latest
INFO: Creating Docker volume container 'winehome'...
winehome
wine: created the configuration directory '/home/wineuser/.wine'
0009:err:file:init_redirects cannot open L"C:\\windows" (c000000f)
No protocol specified
No protocol specified
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0012:err:ole:get_local_server_stream Failed: 80004002
0014:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0014:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0010:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0010:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 14007
0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x800736b7
0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 800736b7
0014:err:ole:get_local_server_stream Failed: 800736b7
000b:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
000b:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0016:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0016:err:mscoree:LoadLibraryShim error reading registry key for installroot
0016:err:mscoree:LoadLibraryShim error reading registry key for installroot
0016:err:mscoree:LoadLibraryShim error reading registry key for installroot
0016:err:mscoree:LoadLibraryShim error reading registry key for installroot
0018:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0018:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0016:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0016:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
001a:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
001a:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
001a:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0010:fixme:dwmapi:DwmIsCompositionEnabled 0x6dbd1518
001c:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x69ebd3de, context 0x8565c0, init_notify 0, handle 0x114fa10): stub
0036:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0036:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0038:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0038:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0038:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0036:fixme:dwmapi:DwmIsCompositionEnabled 0x6d5d3018
003a:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x6a0cb608, context 0x8d88c8, init_notify 0, handle 0x111fc88): stub
wine: configuration in '/home/wineuser/.wine' has been updated.
0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

that seems worse, not better!

this is on ubuntu 16.04. here's some additional output in case it helps diagnose this:

$ uname -a
Linux tekkon 4.15.0-51-generic #55~16.04.1-Ubuntu SMP Thu May 16 09:24:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:35:27 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false
@scottyhardy
Copy link
Owner

Hi @lostfictions
Thanks for the feedback! I'll need to set up an Ubuntu 16.04 machine to test as I've been using only Ubuntu 18.04 lately. At a guess, it may be related to the .Xauthority cookie. Could you please try the following and let me know if you have any success?

docker run -it \
    --rm \
    --env="DISPLAY" \
    --volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:ro" \
    --volume="/etc/localtime:/etc/localtime:ro" \
    --volume="winehome:/home/wineuser" \
    --hostname="winecellar" \
    --name="wine" \
    scottyhardy/docker-wine wine notepad  

@lostfictions
Copy link
Author

lostfictions commented Jun 7, 2019

thanks for the quick reply! $XAUTHORITY is defined for me and points to the right place -- i tried this just in case and it doesn't seem to make a difference.

@scottyhardy
Copy link
Owner

Ok, I've got an Ubuntu 16.04 VM and can confirm I get the same errors. I've gone back to an older version of my scripts and found that running with this will work:

docker run -it \
    --rm \
    --env="DISPLAY" \
    --volume="winehome:/home/wineuser" \
    --name="wine" \
    --network="host" \
    scottyhardy/docker-wine wine notepad

It's hardly ideal though as I'd been trying to move away from insecure settings like --network="host". I'll keep trying to find a better solution, but if I can't come up with one quickly enough I'll add this to the next release of docker-wine. It's also pretty close to the solution I've come up for running over SSH with X11 forwarding so I might be able to combine the two somehow.

@scottyhardy
Copy link
Owner

Aha! I've found the problem - apparently .Xauthority cookie is dependent on the hostname matching for some OSes. So, this will work:

docker run -it \
    --rm \
    --env="DISPLAY" \
    --volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix" \
    --volume="winehome:/home/wineuser" \
    --hostname="$(hostname)" \
    --name="wine" \
    scottyhardy/docker-wine wine notepad

I'll add this to the dev branch soon and do a release with the update soon 😄

@lostfictions
Copy link
Author

amazing! thanks so much for all the work you've put into this :)

@gluckzhang
Copy link

Same issue for me. And @scottyhardy 's latest reply solved the problem. Thanks very much for your nice work!

@gluckzhang
Copy link

Just for your information, this is my argument list:

	docker run -it \
    --rm \
    --env="DISPLAY" \
    --env="LD_LIBRARY_PATH=/usr/lib32/nvidia-410" \
    --env="WINEARCH=win32" \
    --env="PULSE_SERVER=/tmp/pulse-socket" \
    --volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix" \
    --volume="/tmp/pulse-socket:/tmp/pulse-socket" \
    --volume="/usr/lib32/nvidia-410:/usr/lib32/nvidia-410" \
    --volume="/etc/localtime:/etc/localtime:ro" \
    --volume="winehome:/home/wineuser" \
    --device=/dev/nvidiactl \
    --device=/dev/nvidia-uvm \
    --device=/dev/nvidia0 \
    --hostname="$(hostname)" \
    --name="wine" \
    $DOCKER_IMAGE "$@"

If someone is using an Nvidia driver and PulseAudio in Ubuntu 16.04, probably he needs some more arguments to make complex games work. Key tricks:

  • define LD_LIBRARY_PATH env with path to the nvidia driver (otherwise you may fail to support OpenGL, or errors like libGL error: unable to load driver)
  • define PULSE_SERVER env with path to the PulseAudio socket (otherwise wine may fail to detect audio device, and maybe even worse: a "Couldn't initialize DirectSound" error)
  • Add some devices which are needed by the Nvidia driver

I am not sure whether these arguments are essential for other OSes. But when I tried to run WinKawaks in the container, I have to setup everything like the above. Hopefully this will give inspirations when others face similar issues.

Cheers!

@501st-alpha1
Copy link

I ran into this issue just now, and the fix in #44 (comment) worked for me.

@scottyhardy I see the fix was added to aabcfa1, any chance we could get that release now?

@gluckzhang I'm getting a similar GL error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

so I was trying to follow your solution, without success yet. Do you remember how you found the /usr/lib32/nvidia-410 directory, or what files it contained?

@gluckzhang
Copy link

I ran into this issue just now, and the fix in #44 (comment) worked for me.

@scottyhardy I see the fix was added to aabcfa1, any chance we could get that release now?

@gluckzhang I'm getting a similar GL error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

so I was trying to follow your solution, without success yet. Do you remember how you found the /usr/lib32/nvidia-410 directory, or what files it contained?

Hi @501st-alpha1 , sorry but I forget how I find the exact path to nvidia-410. Probably you could also try /usr/lib32 first, according to the version of nvidia driver you are using. The list of files in my nvidia-410 is as follows:

libEGL_nvidia.so.0             libGL.so.1                    libnvidia-fatbinaryloader.so.410.78
libEGL_nvidia.so.410.78        libGL.so.1.7.0                libnvidia-fbc.so
libEGL.so                      libGL.so.410.78               libnvidia-fbc.so.1
libEGL.so.1                    libGLX_indirect.so.0          libnvidia-fbc.so.410.78
libEGL.so.1.1.0                libGLX_nvidia.so.0            libnvidia-glcore.so.410.78
libEGL.so.410.78               libGLX_nvidia.so.410.78       libnvidia-glsi.so.410.78
libGLdispatch.so.0             libGLX.so                     libnvidia-glvkspirv.so.410.78
libGLESv1_CM_nvidia.so.1       libGLX.so.0                   libnvidia-ifr.so
libGLESv1_CM_nvidia.so.410.78  libnvcuvid.so                 libnvidia-ifr.so.1
libGLESv1_CM.so                libnvcuvid.so.1               libnvidia-ifr.so.410.78
libGLESv1_CM.so.1              libnvcuvid.so.410.78          libnvidia-ml.so
libGLESv1_CM.so.1.2.0          libnvidia-cfg.so              libnvidia-ml.so.1
libGLESv2_nvidia.so.2          libnvidia-compiler.so         libnvidia-ml.so.410.78
libGLESv2_nvidia.so.410.78     libnvidia-compiler.so.1       libnvidia-ptxjitcompiler.so.1
libGLESv2.so                   libnvidia-compiler.so.410.78  libnvidia-ptxjitcompiler.so.410.78
libGLESv2.so.2                 libnvidia-eglcore.so.410.78   libnvidia-tls.so.410.78
libGLESv2.so.2.1.0             libnvidia-encode.so           libOpenGL.so
libGL.la                       libnvidia-encode.so.1         tls
libGL.so                       libnvidia-encode.so.410.78    vdpau

@scottyhardy
Copy link
Owner

I ran into this issue just now, and the fix in #44 (comment) worked for me.

@scottyhardy I see the fix was added to aabcfa1, any chance we could get that release now?

@501st-alpha1 Yep, I've decided to give this little project some more attention so I'll get onto releasing this fix very soon

@scottyhardy scottyhardy self-assigned this Mar 24, 2020
@scottyhardy
Copy link
Owner

Now fixed in release 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants