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

Support for hardware acceleration #57

Open
scottyhardy opened this issue Mar 31, 2020 · 0 comments
Open

Support for hardware acceleration #57

scottyhardy opened this issue Mar 31, 2020 · 0 comments

Comments

@scottyhardy
Copy link
Owner

I don't have the hardware to test with, but I think this would be a pretty nifty feature that wouldn't be too difficult to add since all changes are only in the docker run command.

Here's a post from @gluckzhang for some inspiration:

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!

Originally posted by @gluckzhang in #44 (comment)

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

No branches or pull requests

1 participant