Open jathanasiou opened 2 years ago
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.
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 https://github.com/pauleve/docker-mtgo/issues/68#issuecomment-941548684 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.
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.
@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.
Regarding wine version, from feedback from #107 wine 4.9 might work better:
./run-mtgo panard/mtgo:wine-4.9
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
, restartingdocker.service
and changing https://github.com/pauleve/docker-mtgo/blob/f99b972bf68fd4216cf128dd2e65ec192dc9edb7/run-mtgo#L280 toI'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.