pauleve/docker-mtgo

macOS: black windows (was: MTGO Never opens)

Opened this issue · 15 comments

The first time I went through this process every time I got to the point of actually starting Magic, I typed the command "./run-mtgo" and XQuartz would open with "bash-3.2$" in the window. Nothing else would happen, no matter what I tried so I uninstalled and deleted all the files and started over. Now when I try to run "./run-mtgo" I get feedback (which I will paste at the bottom) like it's working and then XQuartz opens on my dock, but no actual windows come up and I'm stuck again. Any subsequent commands I send aren't recognized until I actually quit Terminal, at which point it says "Closing this window will terminate the running processes: bash (3), tail, docker." I am running Sierra 10.12.6

This is the feedback I receive from Terminal:
open -a XQuartz
socat on forwarding to /private/tmp/com.apple.launchd.G6OpvTemMG/org.macosforge.xquartz:0
2018/02/06 14:06:00 socat[4946] E getaddrinfo("", "NULL", {1,2,1,6}, {}): nodename nor servname provided, or not known
docker run --privileged --rm -e DISPLAY -v /Users/my name/.local/share/mtgo:/home/wine/.wine/host/ -v mtgo-data:/home/wine/.wine/drive_c/users/ -e WINE_X11_NO_MITSHM=1 --net=host --ipc=host -e TZ=/usr/share/zoneinfo/America/New_York --name mtgo_running panard/mtgo:latest mtgo

It seems that the run-mtgo script failed to detect your (local) ip address.
Currently, it looks for network interface "en0", which I guess in your case does not exists...
Can you try with the attached run-mtgo script? (bash run-mtgo.txt)
run-mtgo.txt

I ran it and got a lot of feedback which I'll put into a text file and attach. It, again, opened XQuartz (but opened no windows) and reached the end of the script and did nothing else afterwards. It ended with this:
System information:
Wine build: wine-2.20 (Staging)
Platform: i386
Version: Windows 7
Host system: Linux
Host version: 4.9.60-linuxkit-aufs
Logs.docx

Ok, so we are closer now.
The issue is now that socat cannot connect to XQuartz. I would suggest doing a reboot, then try again, and if it fails, try the following commands:

open -a XQuartz
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

if it fails (it should), please show the result of

stat $DISPLAY

A reboot fixed that problem and I can now open and log into MTGO! Thanks for your help there! One last problem, though, is that any popups come up as black screens and only things I can click on render (I will attach pictures) so I can't build decks or etc. Thanks, again
screen shot 2018-02-07 at 12 20 37 pm
screen shot 2018-02-07 at 12 20 52 pm

Thanks for the feedback, good to know it is (almost) working now.
For the graphics problem, you can try a few different things:

  • use ./run-mtgo --winecfg to start wine configuration utility at startup. Then go to Graphics tab and select "emulate virtual desktop", maybe it will help ;
  • use ./run-mtgo --shell, at prompt enter
winetricks ddr=gdi

then

mtgo
  • use experimental wine 3.0 image using ./run-mtgo panard/mtgo:sound

Let me know if any solution works.

I tried the first two solutions, rebooting for each one, and the problem still occurred. The last solution caused the game to open then instantly close with this error in Terminal:
Please either:

  • remove it and restart.
  • run with --gst-disable-segtrap --gst-disable-registry-fork and debug.
    ====== shutting down
    wineserver -kw
    /Users/my name/Downloads/docker-mtgo-master/run-mtgo.txt: line 229: 772 Terminated: 15 tail -f ${URL_REQUESTS}
    774 | while read url; do
    run $WEBBROWSER "${url}";
    done

Ok, I've created an image with wine3 but without sound (as it causes a crash here): ./run-mtgo panard/mtgo:wine3, can you give another try?
Doesn't window minimization/resizing help redrawing it?

Note that you may want to try to manually install wine and MTGO, for instance following the instructions here https://appdb.winehq.org/objectManager.php?sClass=version&iId=32007#notes to avoid using the docker/linux layer. This is more tedious, and may not solve your issue though..

Another mac OS user here. The wine3 image you just mentioned works about the same as the others - which is to say, not great, but okay.

Resizing the windows slightly solves most problems with black-out - so thanks for that tip. You can also "paint over" any buttons that might pop up to see what they say. But some text either can't be resized or isn't directly on the button, so it remains black or illegible. Sometimes you just have to click Yes and pray it's what you want. Still, it beats spending money on an OS and a virtual machine, so thanks.

I tried installing it myself with both wine3 and wine2.1, but I didn't have any success. The docker image is still the best way to go for me.

Let me know if there's anything I can do to help you further debug.

Unfortunately, I can't think at other directions for now, except trying different combinations of options in Graphics of ./run-mtgo --winecfg, but I don't have much expectations.

For the installation of wine and MTGO, I agree that docker is easier and more stable (that was my main motivation creating this project), but maybe you can give another try following the tutorial by @JeffHoogland here: https://it.toolbox.com/blogs/jeffhoogland/howto-install-mtgo-on-ubuntu-linux-010718
Of course, you skip the ubuntu related part (install wine using the official package), but the range of winetricks command etc should work on macOS as well. In addition you have to run winetricks ddr=gdi to ensure opengl is not used.

For the black windows issue in MTGO, try to open a terminal and type xrefresh ; does it help?

Another possible direction (more promising maybe):

./run-mtgo --shell
echo REGEDIT4 > import.reg
echo >> import.reg
echo "[HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]" >> import.reg
echo '"ClientSideWithRender"="N"' >> import.reg
echo >> import.reg
regedit import.reg
mtgo

Let me know if it works..

This seems to be a bug in xquartz that is fixed/not present in Wine's now-built-in mac drivers. Doing a new install in wine doesn't suffer it. On my machine (macbook air integrated graphics) sluggish drawing and unresponsiveness is noticeable in all x11 windows not just the main app. Might be related to this: https://bugs.freedesktop.org/show_bug.cgi?id=93430 ?

Just for the record - I'm having no issues (after ddr=gdi) with MTGO on mac using native wine (no docker or any containers).

Life totals never display during gameplay, any reason as to why this occurs?

@AlfredoB212 I created a dedicated issue to discuss this: #64