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

Nvidia host support #132

Open
jathanasiou opened this issue Jul 17, 2021 · 5 comments
Open

Nvidia host support #132

jathanasiou opened this issue Jul 17, 2021 · 5 comments

Comments

@jathanasiou
Copy link

I have been using an Arch Linux host with Nvidia GPU and my performance was terrible until now (worse than a virtualbox VM). I did some googling and it turns out that nvidia acceleration needs to explicitly allowed, after an nvidia tookit installed.

In my case, this meant doing yay -S nvidia-container-toolkit, restarting docker.service and changing

run docker run --privileged --rm -e DISPLAY \

to

run docker run --gpus all --privileged --rm -e DISPLAY \

I'm not sure if it's safe to add this change for everyone, but perhaps an argument could be passed to the mtgo-run script to append that option.

I'm not very experience with Docker but I could PR a little README addition for these cases and try to add a runner parameter for adding --gpus all internally.

@pauleve
Copy link
Owner

pauleve commented Oct 9, 2021

Thanks for your report. It might be hope for #68 . Do you confirm you have a smooth experience since using this trick?
I'll investigate which changes would be the most universal.

@jathanasiou
Copy link
Author

Hey @pauleve. I've been a bit busy and was trying out other ways to get MTGO to run as well.

I followed your instructions here #68 (comment) and unfortunately there seems to be no significant improvement. The --gpus all helping me earlier must have been coincidental and/or placebo effect.

After ensuring I have the nvidia-container module and the latest script, a fresh MTGO docker install would still have random freezes (perhaps triggered by cards with new art? maybe there's some network or filesystem-level function in Wine causing delays?) sometimes lasting over a minute. Which, unfortunately, make the client far not so reliable when matches have timers :/

Another suspicion of mine is that it may have something to do with DE compositing/vsync. I might try to install a very bare-bones DE like XFCE/LXDE to see if the freezes still occur there.

@pauleve
Copy link
Owner

pauleve commented Dec 21, 2021

That's an interesting suspicion... I'm on minimalist DE (xmonad) and never experienced these freezes. It may be worth trying with a direct wine install as well (following https://it.toolbox.com/blogs/jeffhoogland/howto-install-mtgo-on-ubuntu-linux-010718) to check whether it is a Docker issue or not.
Regarding filesystem delays, that would be surprising; the game file system is within a Docker volume, which should be very fast...
I could also give a try to a vnc mode within Docker to avoid interactions with the host DE.

@jathanasiou
Copy link
Author

@pauleve I tried with LXQT yesterday (which has no compositing AFAIK) and it behaved exactly the same for me. Might try a minimal WM as well
Re filesystem operations, I was thinking of the Wine layer since I believe it has some OS-calls implemented to imitate windows and maybe those are slightly different. There's a chance I did not have those freezes some months ago on a different Wine version, but I haven't confirmed or pinpointed that yet.

The overall "feel" when those freezes occur is akin to some I/O operation on the MTGO client being (erroneously) executed on its main thread and, in conjunction with some setups having overhead for them, leading to a frozen GUI.

@pauleve

This comment was marked as outdated.

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

2 participants